Skip to content

Commit e569b3a

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 20110bf commit e569b3a

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
@@ -21,7 +21,17 @@
2121
};
2222

2323
aliases {
24+
led0 = &led0;
2425
pwm-led0 = &pwm_led0;
26+
sw0 = &button0;
27+
};
28+
29+
leds {
30+
compatible = "gpio-leds";
31+
led0: led_0 {
32+
gpios = <&portc 18 GPIO_ACTIVE_LOW>;
33+
label = "Yellow LED";
34+
};
2535
};
2636

2737
pwmleds {
@@ -32,6 +42,15 @@
3242
pwms = <&tcc0 2 PWM_MSEC(20) 0>;
3343
};
3444
};
45+
46+
buttons {
47+
compatible = "gpio-keys";
48+
button0: button_0 {
49+
gpios = <&portb 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
50+
label = "SW0";
51+
zephyr,code = <INPUT_KEY_0>;
52+
};
53+
};
3554
};
3655

3756
&flash0 {
@@ -84,3 +103,11 @@
84103
prescaler = <8>;
85104
channels = <6>;
86105
};
106+
107+
&portb {
108+
status = "okay";
109+
};
110+
111+
&portc {
112+
status = "okay";
113+
};

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
- pwm
1516
- reset

0 commit comments

Comments
 (0)