From 10215889cd89d282d27a2c718f8ef601b1c683b4 Mon Sep 17 00:00:00 2001 From: Chen Xingyu Date: Fri, 29 Sep 2023 20:46:16 +0800 Subject: [PATCH] boards: arm64: rpi_4b: Add DTS node for LED_ACT LED_ACT is the green LED at the top left corner of the 4B board This also update doc of the board to add the newly added GPIO driver. Signed-off-by: Chen Xingyu --- boards/arm64/rpi_4b/doc/index.rst | 2 ++ boards/arm64/rpi_4b/rpi_4b.dts | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/boards/arm64/rpi_4b/doc/index.rst b/boards/arm64/rpi_4b/doc/index.rst index 2083b7cdb1049c3..79a19e9adc6c8c6 100644 --- a/boards/arm64/rpi_4b/doc/index.rst +++ b/boards/arm64/rpi_4b/doc/index.rst @@ -21,6 +21,8 @@ hardware features: +===========+============+======================================+ | GIC-400 | on-chip | GICv2 interrupt controller | +-----------+------------+--------------------------------------+ +| GPIO | on-chip | GPIO controller | ++-----------+------------+--------------------------------------+ | UART | on-chip | Mini uart serial port | +-----------+------------+--------------------------------------+ diff --git a/boards/arm64/rpi_4b/rpi_4b.dts b/boards/arm64/rpi_4b/rpi_4b.dts index 371ca3c09e8a539..f567a36e51cae89 100644 --- a/boards/arm64/rpi_4b/rpi_4b.dts +++ b/boards/arm64/rpi_4b/rpi_4b.dts @@ -7,17 +7,36 @@ /dts-v1/; #include +#include + / { model = "Raspberry Pi 4 Model B"; compatible = "raspberrypi,4-model-b", "brcm,bcm2838"; #address-cells = <1>; #size-cells = <1>; + aliases { + led0 = &led_act; + }; + chosen { zephyr,console = &uart1; zephyr,shell-uart = &uart1; zephyr,sram = &sram0; }; + + leds { + compatible = "gpio-leds"; + + led_act: led-act { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; /* GPIO 42 */ + label = "ACT"; + }; + }; +}; + +&gpio1 { + status = "okay"; }; &uart1 {