Skip to content

Commit 41ea399

Browse files
ssekar15kartben
authored andcommitted
boards: ti: lp_mspm0g3507: Enable PWM and PWM-LED on board
Enable PWM output to control a LED1 on lp_mspm03507 board. Signed-off-by: Saravanan Sekar <[email protected]>
1 parent 6f6530d commit 41ea399

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

boards/ti/lp_mspm0g3507/lp_mspm0g3507.dts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
#include <ti/mspm0/g/mspm0g1x0x_g3x0x-pinctrl.dtsi>
1212
#include <zephyr/dt-bindings/clock/mspm0_clock.h>
1313
#include <zephyr/dt-bindings/gpio/gpio.h>
14+
#include <zephyr/dt-bindings/pwm/pwm.h>
1415

1516
/ {
1617
model = "TI LP_MSPM0G3507/MSPM0G3507";
1718
compatible = "ti,mspm0g3507";
1819

1920
aliases {
2021
led0 = &led0;
22+
pwm-led0 = &pwm_led0;
2123
};
2224

2325
chosen {
@@ -36,6 +38,14 @@
3638
label = "Blue LED";
3739
};
3840
};
41+
42+
pwm_leds {
43+
compatible = "pwm-leds";
44+
45+
pwm_led0: pwm_led0 {
46+
pwms = <&pwma0 0 PWM_MSEC(100) PWM_POLARITY_NORMAL>;
47+
};
48+
};
3949
};
4050

4151
&cpu0 {
@@ -105,3 +115,13 @@
105115
pinctrl-0 = <&uart0_tx_pa10 &uart0_rx_pa11>;
106116
pinctrl-names = "default";
107117
};
118+
119+
&pwma0 {
120+
status = "okay";
121+
122+
pinctrl-0 = <&tima0_ccp0_pa0>;
123+
pinctrl-names = "default";
124+
ti,cc-index = <0>;
125+
ti,pwm-mode = "EDGE_ALIGN";
126+
ti,period = <1000>;
127+
};

0 commit comments

Comments
 (0)