Skip to contentSkip to conversation

arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs

PATCH Superseded Chen-Yu Tsai 3 participants 9 messages Feb 25 – Feb 26

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen-Yu Tsai

author maintainer
#0 lore raw

cover arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs

Hi folks,

This series enables the RGB LEDs found on the Avaota A1 board. The LEDs are connected in series to the SoC's LED controller.

Patch 1 adds a new compatible string for the LED controller found in the Allwinner A523 SoC family.

Patch 2 adds a device node for the LED controller to the dtsi file.

Patch 3 enables the LEDs found on the Avaota A1 board.

Please have a look.

Thanks
ChenYu

Chen-Yu Tsai (3):
dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC
arm64: dts: allwinner: sun55i-a523: Add LED controller
arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs

 .../leds/allwinner,sun50i-a100-ledc.yaml      |  1 +
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 22 ++++++++++
 .../dts/allwinner/sun55i-t527-avaota-a1.dts   | 41 +++++++++++++++++++
 3 files changed, 64 insertions(+)
Signature · 1 line
2.47.3
author maintainer
#1 lore raw

PATCH 1/3 dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC

The Allwinner A523 SoC family features an identical LED controller as found on the A100.

Add a SoC-specific compatible for it, with fallback to the A100 one.

---
 .../devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml     | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml +1 -0
index 760cb336dccb..0b73fe5b662f 100644
@@ -21,6 +21,7 @@ properties:
           - enum:
               - allwinner,sun20i-d1-ledc
               - allwinner,sun50i-r329-ledc
+              - allwinner,sun55i-a523-ledc
           - const: allwinner,sun50i-a100-ledc
 
   reg:
Signature · 1 line
2.47.3
maintainer Acked-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC

Dne sreda, 25. februar 2026 ob 17:08:24 Srednjeevropski standardni čas je Chen-Yu Tsai napisal(a):

Quoted 6 lines

The Allwinner A523 SoC family features an identical LED controller as found on the A100.

Add a SoC-specific compatible for it, with fallback to the A100 one.

Best regards,
Jernej

Acked-by on v1 1/3
#3 lore raw

Re: [PATCH 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC

In reply to Chen-Yu Tsai
Quoted 9 lines · Chen-Yu Tsai

The Allwinner A523 SoC family features an identical LED controller as found on the A100.

Add a SoC-specific compatible for it, with fallback to the A100 one.

---
 .../devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml     | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof

author maintainer
#4 lore raw

PATCH 2/3 arm64: dts: allwinner: sun55i-a523: Add LED controller

In reply to Chen-Yu Tsai

The A523 SoC family features an LED controller that is identical to the one found on previous SoCs.

Add a device node for it, and one of the possible pinmux settings. This setting is used on the Avaota A1.

---
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +22 -0
index 09bd149bbf51..b8263e2872af 100644
@@ -170,6 +170,13 @@ i2s2_pi_pins: i2s2-pi-pins {
 				bias-disable;
 			};
 
+			/omit-if-no-ref/
+			ledc_ph_pin: ledc-ph-pin {
+				pins = "PH19";
+				function = "ledc";
+				allwinner,pinmux = <5>;
+			};
+
 			mmc0_pins: mmc0-pins {
 				pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5";
 				allwinner,pinmux = <2>;
@@ -300,6 +307,21 @@ ccu: clock-controller@2001000 {
 			#reset-cells = <1>;
 		};
 
+		ledc: led-controller@2008000 {
+			compatible = "allwinner,sun55i-a523-ledc",
+				     "allwinner,sun50i-a100-ledc";
+			reg = <0x02008000 0x400>;
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_LEDC>, <&ccu CLK_LEDC>;
+			clock-names = "bus", "mod";
+			resets = <&ccu RST_BUS_LEDC>;
+			dmas = <&dma 42>;
+			dma-names = "tx";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		ths1: thermal-sensor@2009400 {
 			compatible = "allwinner,sun55i-a523-ths1";
 			reg = <0x02009400 0x400>;
Signature · 1 line
2.47.3
author maintainer
#5 lore raw

Re: [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller

Quoted 40 lines · Chen-Yu Tsai

The A523 SoC family features an LED controller that is identical to the one found on previous SoCs.

Add a device node for it, and one of the possible pinmux settings. This setting is used on the Avaota A1.

---
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +13 -0
index 09bd149bbf51..b8263e2872af 100644
@@ -170,6 +170,13 @@ i2s2_pi_pins: i2s2-pi-pins {
                                bias-disable;
                        };
 
+                       /omit-if-no-ref/
+                       ledc_ph_pin: ledc-ph-pin {
+                               pins = "PH19";
+                               function = "ledc";
+                               allwinner,pinmux = <5>;
+                       };
+
                        mmc0_pins: mmc0-pins {
                                pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5";
                                allwinner,pinmux = <2>;
@@ -300,6 +307,21 @@ ccu: clock-controller@2001000 {
                        #reset-cells = <1>;
                };
 
+               ledc: led-controller@2008000 {
+                       compatible = "allwinner,sun55i-a523-ledc",
+                                    "allwinner,sun50i-a100-ledc";
+                       reg = <0x02008000 0x400>;
+                       interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_LEDC>, <&ccu CLK_LEDC>;

arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi ccu: clock-controller@2001000 { · line 325

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +9 -0
+                       clock-names = "bus", "mod";
+                       resets = <&ccu RST_BUS_LEDC>;
+                       dmas = <&dma 42>;
+                       dma-names = "tx";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
                ths1: thermal-sensor@2009400 {

I Forgot to rebase this patch before the thermal sensor one in my tree. I can fix this when applying, so please still review the patch.

ChenYu

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0 -1
                        compatible = "allwinner,sun55i-a523-ths1";
                        reg = <0x02009400 0x400>;
--

2.47.3

maintainer Reviewed-by
#6 lore raw

Re: [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller

Dne sreda, 25. februar 2026 ob 17:14:51 Srednjeevropski standardni čas je Chen-Yu Tsai napisal(a):

Quoted 46 lines · Chen-Yu Tsai
Quoted 45 lines

The A523 SoC family features an LED controller that is identical to the one found on previous SoCs.

Add a device node for it, and one of the possible pinmux settings. This setting is used on the Avaota A1.

---
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +18 -0
index 09bd149bbf51..b8263e2872af 100644
@@ -170,6 +170,13 @@ i2s2_pi_pins: i2s2-pi-pins {
                                bias-disable;
                        };
 
+                       /omit-if-no-ref/
+                       ledc_ph_pin: ledc-ph-pin {
+                               pins = "PH19";
+                               function = "ledc";
+                               allwinner,pinmux = <5>;
+                       };
+
                        mmc0_pins: mmc0-pins {
                                pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5";
                                allwinner,pinmux = <2>;
@@ -300,6 +307,21 @@ ccu: clock-controller@2001000 {
                        #reset-cells = <1>;
                };
 
+               ledc: led-controller@2008000 {
+                       compatible = "allwinner,sun55i-a523-ledc",
+                                    "allwinner,sun50i-a100-ledc";
+                       reg = <0x02008000 0x400>;
+                       interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_LEDC>, <&ccu CLK_LEDC>;
+                       clock-names = "bus", "mod";
+                       resets = <&ccu RST_BUS_LEDC>;
+                       dmas = <&dma 42>;
+                       dma-names = "tx";
+                       #address-cells = <1>;
Quoted 8 lines

arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi ccu: clock-controller@2001000 { · line 325

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +4 -0
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
                ths1: thermal-sensor@2009400 {

I Forgot to rebase this patch before the thermal sensor one in my tree. I can fix this when applying, so please still review the patch.

Values are correct, so with a rebase this patch is:

Best regards,
Jernej

Quoted 9 lines

ChenYu

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0 -1
                        compatible = "allwinner,sun55i-a523-ths1";
                        reg = <0x02009400 0x400>;
--

2.47.3

author maintainer
#7 lore raw

PATCH 3/3 arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs

In reply to Chen-Yu Tsai

The Avaota A1 board features 4 RGB LEDs in a string connected to the SoC's LED controller.

Enable the LED controller and add device nodes for them. The timings were copied from the downstream vendor DTS. The design does not specify what these LEDs are for, nor are there any markings on the board for them, so just use them as indicators.

---
 .../dts/allwinner/sun55i-t527-avaota-a1.dts   | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +41 -0
index 054d0357c139..7c24121de88f 100644
@@ -6,6 +6,7 @@
 #include "sun55i-a523.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Avaota A1";
@@ -99,6 +100,46 @@ &gpu {
 	status = "okay";
 };
 
+&ledc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ledc_ph_pin>;
+	allwinner,pixel-format = "grb";
+	allwinner,t0l-ns = <800>;
+	allwinner,t0h-ns = <300>;
+	allwinner,t1l-ns = <320>;
+	allwinner,t1h-ns = <800>;
+	allwinner,treset-ns = <84>;
+	status = "okay";
+
+	multi-led@0 {
+		reg = <0x0>;
+		color = <LED_COLOR_ID_RGB>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <0>;
+	};
+
+	multi-led@1 {
+		reg = <0x1>;
+		color = <LED_COLOR_ID_RGB>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <1>;
+	};
+
+	multi-led@2 {
+		reg = <0x2>;
+		color = <LED_COLOR_ID_RGB>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <2>;
+	};
+
+	multi-led@3 {
+		reg = <0x3>;
+		color = <LED_COLOR_ID_RGB>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <3>;
+	};
+};
+
 &mdio0 {
 	ext_rgmii0_phy: ethernet-phy@1 {
 		compatible = "ethernet-phy-ieee802.3-c22";
Signature · 1 line
2.47.3
maintainer Acked-by on v1 3/3
#8 lore raw

Dne sreda, 25. februar 2026 ob 17:08:26 Srednjeevropski standardni čas je Chen-Yu Tsai napisal(a):

Quoted 9 lines

The Avaota A1 board features 4 RGB LEDs in a string connected to the SoC's LED controller.

Enable the LED controller and add device nodes for them. The timings were copied from the downstream vendor DTS. The design does not specify what these LEDs are for, nor are there any markings on the board for them, so just use them as indicators.

Best regards,
Jernej