Skip to content

Commit 16fde87

Browse files
committed
boards: microchip: sam_e54_xpro: Enabled blinky pwm support
Added the pinmuxing as well as the dts node for supporting blinky on sam_e54_xpro board. Signed-off-by: Muhammed Asif <[email protected]>
1 parent 3755a37 commit 16fde87

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro-pinctrl.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@
1313
<PB24D_SERCOM2_PAD1>;
1414
};
1515
};
16+
17+
tcc0_pwm_default: tcc0_pwm_default {
18+
group1 {
19+
pinmux = <PC18F_TCC0_WO2>;
20+
};
21+
};
1622
};

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.dts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
zephyr,sram = &sram0;
2020
zephyr,flash = &flash0;
2121
};
22+
23+
aliases {
24+
pwm-led0 = &pwm_led0;
25+
};
26+
27+
pwmleds {
28+
compatible = "pwm-leds";
29+
30+
pwm_led0: pwm_led_0 {
31+
status = "okay";
32+
pwms = <&tcc0 2 PWM_MSEC(20) 0>;
33+
};
34+
};
2235
};
2336

2437
&flash0 {
@@ -60,3 +73,14 @@
6073
pinctrl-0 = <&sercom2_uart_default>;
6174
pinctrl-names = "default";
6275
};
76+
77+
&tcc0 {
78+
compatible = "microchip,tcc-g1-pwm";
79+
status = "okay";
80+
#pwm-cells = <3>;
81+
pinctrl-0 = <&tcc0_pwm_default>;
82+
pinctrl-names = "default";
83+
max-bit-width = <24>;
84+
prescaler = <8>;
85+
channels = <6>;
86+
};

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ flash: 1024
1111
ram: 256
1212
supported:
1313
- pinctrl
14+
- pwm
1415
- shell
1516
- uart
1617
vendor: microchip

0 commit comments

Comments
 (0)