[PATCH v2] arm64: dts: renesas: spider-cpu: Add GP LEDs

Geert Uytterhoeven geert+renesas at glider.be
Thu Jul 27 01:38:35 PDT 2023


Describe the two General Purpose LEDs LED7 and LED8 on the Spider CPU
board, so they can be used as indicator LEDs.

Note that General Purpose LEDs LED9 to LED11 are not added, as they are
connected to GPIO block 4, which can only be accessed from the Control
Domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
Tested-by: Kieran Bingham <kieran.bingham+renesas at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas at ideasonboard.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh at renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh at renesas.com>
---
To be queued in renesas-devel for v6.6.

v2:
  - Add Tested-by, Reviewed-by,
  - Widen audience after testing.
---
 .../boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
index dd8e0e1595260b3d..76a94812875ef261 100644
--- a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
@@ -6,6 +6,8 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
 #include "r8a779f0.dtsi"
 
 / {
@@ -22,6 +24,24 @@ chosen {
 		stdout-path = "serial0:1843200n8";
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		led-7 {
+			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+			function-enumerator = <7>;
+		};
+
+		led-8 {
+			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+			function-enumerator = <8>;
+		};
+	};
+
 	memory at 48000000 {
 		device_type = "memory";
 		/* first 128MB is reserved for secure area. */
-- 
2.34.1




More information about the linux-arm-kernel mailing list