Browse Source
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 <dat.nguyenduy@nxp.com>pull/84185/head
9 changed files with 186 additions and 0 deletions
@ -0,0 +1,39 @@
@@ -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"; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,39 @@
@@ -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"; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,51 @@
@@ -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>; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,51 @@
@@ -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>; |
||||
}; |
||||
}; |
||||
}; |
Loading…
Reference in new issue