Skip to content

Commit 2400d18

Browse files
AzharMCHPnandojve
authored andcommitted
boards: microchip: sam_e54_xpro: add led and button dts node
Adds the led and button dts nodes for sam_e54_xpro board Signed-off-by: Mohamed Azhar <[email protected]>
1 parent d9aaa3e commit 2400d18

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.dts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@
2323
};
2424

2525
aliases {
26+
led0 = &led0;
2627
pwm-led0 = &pwm_led0;
28+
sw0 = &button0;
29+
};
30+
31+
leds {
32+
compatible = "gpio-leds";
33+
led0: led_0 {
34+
gpios = <&portc 18 GPIO_ACTIVE_LOW>;
35+
label = "Yellow LED";
36+
};
2737
};
2838

2939
pwmleds {
@@ -34,6 +44,15 @@
3444
pwms = <&tcc0 2 PWM_MSEC(20) 0>;
3545
};
3646
};
47+
48+
buttons {
49+
compatible = "gpio-keys";
50+
button0: button_0 {
51+
gpios = <&portb 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
52+
label = "SW0";
53+
zephyr,code = <INPUT_KEY_0>;
54+
};
55+
};
3756
};
3857

3958
&flash0 {
@@ -170,3 +189,11 @@
170189
prescaler = <8>;
171190
channels = <6>;
172191
};
192+
193+
&portb {
194+
status = "okay";
195+
};
196+
197+
&portc {
198+
status = "okay";
199+
};

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ram: 256
1212
supported:
1313
- clock_control
1414
- flash
15+
- gpio
1516
- mcuboot
1617
- pinctrl
1718
- pwm

0 commit comments

Comments
 (0)