]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: allwinner: a527: cubie-a5e: Add LEDs
authorChen-Yu Tsai <wens@csie.org>
Tue, 12 Aug 2025 17:59:27 +0000 (01:59 +0800)
committerChen-Yu Tsai <wens@csie.org>
Wed, 20 Aug 2025 17:16:13 +0000 (01:16 +0800)
The Radxa Cubie A5E has a 3-color LED. The green and blue LEDs are wired
to GPIO pins on the SoC, and the green one is lit by default to serve as
a power indicator. The red LED is wired to the M.2 slot.

Add device nodes for the green and blue LEDs.

A default "heartbeat" trigger is set for the green power LED, though in
practice it might be better if it were inverted, i.e. lit most of the
time.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20250812175927.2199219-1-wens@kernel.org
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts

index 553ad774ed13d6093951ca95231e20d86437519a..70d439bc845c14eb39c5b089175170fa726e29bb 100644 (file)
@@ -6,6 +6,7 @@
 #include "sun55i-a523.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        model = "Radxa Cubie A5E";
                clock-output-names = "ext_osc32k";
        };
 
+       leds {
+               compatible = "gpio-leds";
+
+               power-led {
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
+                       default-state = "on";
+                       linux,default-trigger = "heartbeat";
+               };
+
+               use-led {
+                       function = LED_FUNCTION_ACTIVITY;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
+               };
+       };
+
        reg_vcc5v: vcc5v {
                /* board wide 5V supply from the USB-C connector */
                compatible = "regulator-fixed";