Skip to content

Commit c4f640c

Browse files
AzharMCHPjhedberg
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 a809fb9 commit c4f640c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.dts

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

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

2940
pwmleds {
@@ -34,6 +45,16 @@
3445
pwms = <&tcc0 2 PWM_MSEC(20) 0>;
3546
};
3647
};
48+
49+
buttons {
50+
compatible = "gpio-keys";
51+
52+
button0: button_0 {
53+
gpios = <&portb 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
54+
label = "SW0";
55+
zephyr,code = <INPUT_KEY_0>;
56+
};
57+
};
3758
};
3859

3960
&flash0 {
@@ -170,3 +191,11 @@
170191
prescaler = <8>;
171192
channels = <6>;
172193
};
194+
195+
&portb {
196+
status = "okay";
197+
};
198+
199+
&portc {
200+
status = "okay";
201+
};

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)