]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dts: allwinner: d1: Add RGB LEDs to boards
authorSamuel Holland <samuel@sholland.org>
Sun, 29 Oct 2023 21:26:59 +0000 (16:26 -0500)
committerChen-Yu Tsai <wens@kernel.org>
Tue, 13 Jan 2026 16:40:40 +0000 (00:40 +0800)
Some D1-based boards feature an onboard RGB LED. Enable them.

Acked-by: Guo Ren <guoren@kernel.org>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Tested-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://patch.msgid.link/20231029212738.7871-6-samuel@sholland.org
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts
arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts

index 08cf716328a05e17b3f1cd7e2798b6cfa3fba590..feaa75d5aead927c992dd8d48c13a11caec54486 100644 (file)
        status = "okay";
 };
 
+&ledc {
+       pinctrl-0 = <&ledc_pc0_pin>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       multi-led@0 {
+               reg = <0x0>;
+               color = <LED_COLOR_ID_RGB>;
+               function = LED_FUNCTION_STATUS;
+       };
+};
+
 &mmc1 {
        bus-width = <4>;
        mmc-pwrseq = <&wifi_pwrseq>;
index 8dbe717c79ce0158dc87bd82806e008a0cad5634..73840ea300f0702d870d1b0f28198afefaf84c17 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 /dts-v1/;
 
        };
 };
 
+&ledc {
+       pinctrl-0 = <&ledc_pc0_pin>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       multi-led@0 {
+               reg = <0x0>;
+               color = <LED_COLOR_ID_RGB>;
+               function = LED_FUNCTION_STATUS;
+       };
+};
+
 &mdio {
        ext_rgmii_phy: ethernet-phy@1 {
                compatible = "ethernet-phy-ieee802.3-c22";