Skip to content

Commit 8f60b74

Browse files
dnltzjhedberg
authored andcommitted
boards: aesc: ElemRV-N: Add GPIO Controller
ElemRV-N has a gpio controller. Enable this node in the board-level device-tree and add this interface to all aux. files. Also sort device-tree nodes in the DTS file alphabetically. Signed-off-by: Daniel Schultz <[email protected]>
1 parent 15aa152 commit 8f60b74

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

boards/aesc/elemrv/doc/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,22 @@ To evaluate the UART interface, build and run the following sample:
6262
:zephyr-app: samples/hello_world
6363
:goals: build
6464

65+
GPIO
66+
====
67+
68+
The GPIO (General-Purpose Input/Output) interface with tri-state pins is a digital interface that
69+
allows each pin to be configured as either an input or an output, with additional control for
70+
setting the direction of data flow.
71+
72+
``gpio`` consists of a total of 12 individual pins.
73+
74+
The Blinky sample provides a simple way to explore how a GPIO can be used to control an external LED.
75+
76+
.. zephyr-app-commands::
77+
:board: elemrv/elemrv_n
78+
:zephyr-app: samples/basic/blinky
79+
:goals: build
80+
6581
.. _GitHub Project:
6682
https://github.com/aesc-silicon/elemrv
6783

boards/aesc/elemrv/elemrv_elemrv_n.dts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,26 @@
1212
model = "ElemRV-N";
1313
compatible = "aesc,elemrv-n";
1414

15+
aliases {
16+
led0 = &led0;
17+
};
18+
1519
chosen {
1620
zephyr,console = &uart0;
1721
zephyr,shell-uart = &uart0;
1822
zephyr,sram = &hyperbus;
1923
zephyr,flash = &flash;
2024
};
2125

26+
leds: leds {
27+
compatible = "gpio-leds";
28+
29+
led0: led0 {
30+
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
31+
label = "LED_0";
32+
};
33+
};
34+
2235
soc {
2336
ocram: memory@80000000 {
2437
device_type = "memory";
@@ -39,12 +52,16 @@
3952
};
4053
};
4154

42-
&uart0 {
55+
&cpu0 {
4356
clock-frequency = <DT_FREQ_M(20)>;
44-
current-speed = <115200>;
57+
};
58+
59+
&gpio0 {
4560
status = "okay";
4661
};
4762

48-
&cpu0 {
63+
&uart0 {
4964
clock-frequency = <DT_FREQ_M(20)>;
65+
current-speed = <115200>;
66+
status = "okay";
5067
};

boards/aesc/elemrv/elemrv_elemrv_n.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ toolchain:
77
- zephyr
88
ram: 32
99
flash: 32
10+
vendor: aesc
11+
supported:
12+
- gpio
13+
- uart

boards/aesc/elemrv/elemrv_elemrv_n_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ CONFIG_SERIAL=y
77
# Enable Console
88
CONFIG_CONSOLE=y
99
CONFIG_UART_CONSOLE=y
10+
11+
# GPIO Driver
12+
CONFIG_GPIO=y

0 commit comments

Comments
 (0)