Skip to content

Commit 00eafee

Browse files
VynDragonkartben
authored andcommitted
boards: bflb: ai_m62_12f: add buttons and leds
add the available button and leds Signed-off-by: Camille BAUD <[email protected]>
1 parent 02d51a7 commit 00eafee

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

boards/aithinker/ai_m62_12f/ai_m62_12f.dts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,49 @@
2121
zephyr,console = &uart0;
2222
zephyr,shell-uart = &uart0;
2323
};
24+
25+
aliases {
26+
led0 = &blue_led;
27+
sw0 = &button_0;
28+
};
29+
30+
leds {
31+
compatible = "gpio-leds";
32+
33+
blue_led: led_0 {
34+
gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
35+
label = "Blue - LED0";
36+
};
37+
38+
green_led: led_1 {
39+
gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
40+
label = "Green - LED1";
41+
};
42+
43+
red_led: led_2 {
44+
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
45+
label = "Red - LED2";
46+
};
47+
48+
white_led: led_3 {
49+
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
50+
label = "White - LED3";
51+
};
52+
53+
warmwhite_led: led_4 {
54+
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
55+
label = "Warm White - LED4";
56+
};
57+
};
58+
59+
buttons {
60+
compatible = "gpio-keys";
61+
62+
button_0: sw0 {
63+
gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH)>;
64+
zephyr,code = <INPUT_KEY_0>;
65+
};
66+
};
2467
};
2568

2669
&cpu0 {
@@ -61,3 +104,7 @@
61104
pinctrl-1 = <&uart0_sleep>;
62105
pinctrl-names = "default", "sleep";
63106
};
107+
108+
&gpio0 {
109+
status = "okay";
110+
};

0 commit comments

Comments
 (0)