Skip to content

Commit 2943202

Browse files
committed
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 eedaa40 commit 2943202

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.dts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,28 @@
1919
zephyr,sram = &sram0;
2020
zephyr,flash = &flash0;
2121
};
22+
23+
aliases {
24+
led0 = &led0;
25+
sw0 = &button0;
26+
};
27+
28+
leds {
29+
compatible = "gpio-leds";
30+
led0: led_0 {
31+
gpios = <&portc 18 GPIO_ACTIVE_LOW>;
32+
label = "Yellow LED";
33+
};
34+
};
35+
36+
buttons {
37+
compatible = "gpio-keys";
38+
button0: button_0 {
39+
gpios = <&portb 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
40+
label = "SW0";
41+
zephyr,code = <INPUT_KEY_0>;
42+
};
43+
};
2244
};
2345

2446
&flash0 {
@@ -60,3 +82,11 @@
6082
pinctrl-0 = <&sercom2_uart_default>;
6183
pinctrl-names = "default";
6284
};
85+
86+
&portb {
87+
status = "okay";
88+
};
89+
90+
&portc {
91+
status = "okay";
92+
};

boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ toolchain:
1010
flash: 1024
1111
ram: 256
1212
supported:
13+
- gpio
1314
- pinctrl
1415
- shell
1516
- uart

0 commit comments

Comments
 (0)