Skip to content

Commit 5d23d0c

Browse files
boards: microchip: sam: add led and button device for sama7g54-ek
Devices has been verified by samples/basic/button Signed-off-by: Xing Chen <xing.chen@microchip.com>
1 parent 39deee1 commit 5d23d0c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

boards/microchip/sam/sama7g54_ek/sama7g54_ek.dts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@
99
#include <common/freq.h>
1010
#include <dt-bindings/mfd/mfd_mchp_sam_flexcom.h>
1111
#include <dt-bindings/pinctrl/sama7g5-pinctrl.h>
12+
#include <dt-bindings/gpio/gpio.h>
13+
#include <dt-bindings/gpio/microchip-sam-gpio.h>
14+
#include <dt-bindings/input/input-event-codes.h>
1215
#include <microchip/sam/sama7g5.dtsi>
1316

1417
/ {
1518
model = "SAMA7G54-EK board";
1619
compatible = "microchip,sama7g5ek", "microchip,sama7g5", "microchip,sama7";
1720

21+
aliases {
22+
led0 = &led_green;
23+
sw0 = &button_user;
24+
};
25+
1826
chosen {
1927
zephyr,sram = &ddram;
2028
zephyr,console = &usart3;
@@ -35,6 +43,37 @@
3543
compatible = "ddram";
3644
reg = <0x60000000 DT_SIZE_M(512)>;
3745
};
46+
47+
leds {
48+
compatible = "gpio-leds";
49+
status = "okay";
50+
51+
led_red: red {
52+
label = "red";
53+
gpios = <&piob 8 GPIO_ACTIVE_HIGH>;
54+
};
55+
56+
led_green: green {
57+
label = "green";
58+
gpios = <&pioa 13 GPIO_ACTIVE_HIGH>;
59+
};
60+
61+
led_blue: blue {
62+
label = "blue";
63+
gpios = <&piod 20 GPIO_ACTIVE_HIGH>;
64+
};
65+
};
66+
67+
gpio_keys {
68+
compatible = "gpio-keys";
69+
status = "okay";
70+
71+
button_user: button_0 {
72+
label = "PB_USER";
73+
gpios = <&pioa 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
74+
zephyr,code = <INPUT_KEY_0>;
75+
};
76+
};
3877
};
3978

4079
&flx3 {

0 commit comments

Comments
 (0)