Skip to content

Commit f8ad8bb

Browse files
smaeulwens
authored andcommitted
riscv: dts: allwinner: d1: Add RGB LEDs to boards
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>
1 parent c8e75e0 commit f8ad8bb

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@
5959
status = "okay";
6060
};
6161

62+
&ledc {
63+
pinctrl-0 = <&ledc_pc0_pin>;
64+
pinctrl-names = "default";
65+
status = "okay";
66+
67+
multi-led@0 {
68+
reg = <0x0>;
69+
color = <LED_COLOR_ID_RGB>;
70+
function = LED_FUNCTION_STATUS;
71+
};
72+
};
73+
6274
&mmc1 {
6375
bus-width = <4>;
6476
mmc-pwrseq = <&wifi_pwrseq>;

arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include <dt-bindings/gpio/gpio.h>
2424
#include <dt-bindings/input/input.h>
25+
#include <dt-bindings/leds/common.h>
2526

2627
/dts-v1/;
2728

@@ -121,6 +122,18 @@
121122
};
122123
};
123124

125+
&ledc {
126+
pinctrl-0 = <&ledc_pc0_pin>;
127+
pinctrl-names = "default";
128+
status = "okay";
129+
130+
multi-led@0 {
131+
reg = <0x0>;
132+
color = <LED_COLOR_ID_RGB>;
133+
function = LED_FUNCTION_STATUS;
134+
};
135+
};
136+
124137
&mdio {
125138
ext_rgmii_phy: ethernet-phy@1 {
126139
compatible = "ethernet-phy-ieee802.3-c22";

0 commit comments

Comments
 (0)