-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: s32z2xxdc2: add support PWM eMIOS
Add support PWM eMIOS for s32z2xxdc2 board. There is no LED on-board dedicated for PWM, so no sample is supported. Only enabling some pwm tests Signed-off-by: Dat Nguyen Duy <[email protected]>
- Loading branch information
1 parent
227cc32
commit 72d347f
Showing
9 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ supported: | |
- counter | ||
- adc | ||
- i2c | ||
- pwm | ||
vendor: nxp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ supported: | |
- counter | ||
- adc | ||
- i2c | ||
- pwm | ||
vendor: nxp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ supported: | |
- counter | ||
- adc | ||
- i2c | ||
- pwm | ||
vendor: nxp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ supported: | |
- counter | ||
- adc | ||
- i2c | ||
- pwm | ||
vendor: nxp |
39 changes: 39 additions & 0 deletions
39
tests/drivers/pwm/pwm_api/boards/s32z2xxdc2_s32z270_rtu0.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2024 NXP | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <nxp/s32/S32Z27-BGA594-pinctrl.h> | ||
|
||
/ { | ||
aliases { | ||
pwm-0 = &emios0_pwm; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
emios0_default: emios0_default { | ||
group0 { | ||
pinmux = <PK0_EMIOS_0_CH24_O>; | ||
output-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&emios0 { | ||
clock-divider = <133>; | ||
status = "okay"; | ||
|
||
emios0_pwm: pwm { | ||
pinctrl-0 = <&emios0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
|
||
pwm_24 { | ||
channel = <24>; | ||
prescaler = <16>; | ||
pwm-mode = "OPWFMB"; | ||
}; | ||
}; | ||
}; |
39 changes: 39 additions & 0 deletions
39
tests/drivers/pwm/pwm_api/boards/s32z2xxdc2_s32z270_rtu1.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2024 NXP | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <nxp/s32/S32Z27-BGA594-pinctrl.h> | ||
|
||
/ { | ||
aliases { | ||
pwm-0 = &emios0_pwm; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
emios0_default: emios0_default { | ||
group0 { | ||
pinmux = <PK0_EMIOS_0_CH24_O>; | ||
output-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&emios0 { | ||
clock-divider = <133>; | ||
status = "okay"; | ||
|
||
emios0_pwm: pwm { | ||
pinctrl-0 = <&emios0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
|
||
pwm_24 { | ||
channel = <24>; | ||
prescaler = <16>; | ||
pwm-mode = "OPWFMB"; | ||
}; | ||
}; | ||
}; |
51 changes: 51 additions & 0 deletions
51
tests/drivers/pwm/pwm_loopback/boards/s32z2xxdc2_s32z270_rtu0.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright 2024 NXP | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pwm/pwm.h> | ||
|
||
/ { | ||
pwm_loopback_0 { | ||
compatible = "test-pwm-loopback"; | ||
pwms = <&emios0_pwm 24 0 PWM_POLARITY_NORMAL>, | ||
<&emios0_pwm 25 0 PWM_POLARITY_NORMAL>; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
emios0_default: emios0_default { | ||
group0 { | ||
pinmux = <PK0_EMIOS_0_CH24_O>; | ||
output-enable; | ||
}; | ||
group1 { | ||
pinmux = <PJ15_EMIOS_0_CH25_I>; | ||
input-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&emios0 { | ||
clock-divider = <200>; | ||
status = "okay"; | ||
|
||
emios0_pwm: pwm { | ||
pinctrl-0 = <&emios0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
|
||
pwm_24 { | ||
channel = <24>; | ||
prescaler = <16>; | ||
pwm-mode = "OPWFMB"; | ||
}; | ||
|
||
pwm_25 { | ||
channel = <25>; | ||
pwm-mode = "SAIC"; | ||
prescaler = <16>; | ||
}; | ||
}; | ||
}; |
51 changes: 51 additions & 0 deletions
51
tests/drivers/pwm/pwm_loopback/boards/s32z2xxdc2_s32z270_rtu1.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright 2024 NXP | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pwm/pwm.h> | ||
|
||
/ { | ||
pwm_loopback_0 { | ||
compatible = "test-pwm-loopback"; | ||
pwms = <&emios0_pwm 24 0 PWM_POLARITY_NORMAL>, | ||
<&emios0_pwm 25 0 PWM_POLARITY_NORMAL>; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
emios0_default: emios0_default { | ||
group0 { | ||
pinmux = <PK0_EMIOS_0_CH24_O>; | ||
output-enable; | ||
}; | ||
group1 { | ||
pinmux = <PJ15_EMIOS_0_CH25_I>; | ||
input-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&emios0 { | ||
clock-divider = <200>; | ||
status = "okay"; | ||
|
||
emios0_pwm: pwm { | ||
pinctrl-0 = <&emios0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
|
||
pwm_24 { | ||
channel = <24>; | ||
prescaler = <16>; | ||
pwm-mode = "OPWFMB"; | ||
}; | ||
|
||
pwm_25 { | ||
channel = <25>; | ||
pwm-mode = "SAIC"; | ||
prescaler = <16>; | ||
}; | ||
}; | ||
}; |