Skip to content

Commit 74d1f60

Browse files
lucien-nxpnashif
authored andcommitted
boards: mimxrt1180_evk: Enable PWM for RT1180 EVK
Enables PWM for RT1180 EVK. Tested with sample led_pwm Signed-off-by: Lucien Zhao <[email protected]>
1 parent 18a2a63 commit 74d1f60

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

boards/nxp/mimxrt1180_evk/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ configuration supports the following hardware features:
114114
+-----------+------------+-------------------------------------+
115115
| FLEXSPI | on-chip | flash programming |
116116
+-----------+------------+-------------------------------------+
117+
| PWM | on-chip | pwm |
118+
+-----------+------------+-------------------------------------+
117119

118120
The default configuration can be found in the defconfig file:
119121
:zephyr_file:`boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33_defconfig`

boards/nxp/mimxrt1180_evk/mimxrt1180_evk-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,12 @@
129129
input-enable;
130130
};
131131
};
132+
133+
pinmux_flexpwm2: pinmux_flexpwm2 {
134+
group0 {
135+
pinmux = <&iomuxc_gpio_ad_27_flexpwm2_pwm1_b>;
136+
drive-strength = "high";
137+
slew-rate = "fast";
138+
};
139+
};
132140
};

boards/nxp/mimxrt1180_evk/mimxrt1180_evk.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
aliases {
1212
led0 = &green_led;
1313
sw0 = &user_button;
14+
pwm-led0 = &green_pwm_led;
1415
};
1516

1617
leds {
@@ -29,6 +30,13 @@
2930
zephyr,code = <INPUT_KEY_0>;
3031
};
3132
};
33+
34+
pwmleds {
35+
compatible = "pwm-leds";
36+
green_pwm_led: green_pwm_led {
37+
pwms = <&flexpwm2_pwm1 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
38+
};
39+
};
3240
};
3341

3442
&lpuart1 {
@@ -125,3 +133,9 @@
125133
max-bitrate = <5000000>;
126134
};
127135
};
136+
137+
&flexpwm2_pwm1 {
138+
status = "okay";
139+
pinctrl-0 = <&pinmux_flexpwm2>;
140+
pinctrl-names = "default";
141+
};

boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ supported:
2222
- adc
2323
- netif:eth
2424
- can
25+
- pwm
2526
vendor: nxp

boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm7.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ supported:
2121
- counter
2222
- adc
2323
- can
24+
- pwm
2425
vendor: nxp

0 commit comments

Comments
 (0)