public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs
@ 2026-03-02 15:27 Chen-Yu Tsai
  2026-03-02 15:27 ` [PATCH v2 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC Chen-Yu Tsai
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:27 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, linux-sunxi,
	linux-arm-kernel, linux-kernel, linux-leds

Hi folks,

This is v2 of my A523 LED controller enablement series.

Changes since v1:
- Rebased onto next-20260226 to get rid of unmerged context
- Collected tags
- Link to v1:
  https://lore.kernel.org/linux-sunxi/20260225160828.1687643-1-wens@kernel.org/

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(+)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC
  2026-03-02 15:27 [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
@ 2026-03-02 15:27 ` Chen-Yu Tsai
  2026-03-02 15:27 ` [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller Chen-Yu Tsai
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:27 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, linux-sunxi,
	linux-arm-kernel, linux-kernel, linux-leds, Krzysztof Kozlowski,
	Jernej Skrabec

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.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
 .../devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml b/Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
index 760cb336dccb..0b73fe5b662f 100644
--- a/Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
+++ b/Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
@@ -21,6 +21,7 @@ properties:
           - enum:
               - allwinner,sun20i-d1-ledc
               - allwinner,sun50i-r329-ledc
+              - allwinner,sun55i-a523-ledc
           - const: allwinner,sun50i-a100-ledc
 
   reg:
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller
  2026-03-02 15:27 [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
  2026-03-02 15:27 ` [PATCH v2 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC Chen-Yu Tsai
@ 2026-03-02 15:27 ` Chen-Yu Tsai
  2026-03-02 15:27 ` [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
  2026-03-10 19:41 ` [PATCH v2 0/3] " Chen-Yu Tsai
  3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:27 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, linux-sunxi,
	linux-arm-kernel, linux-kernel, linux-leds, Jernej Skrabec

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.

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index 9335977751e2..92aecb90d4e1 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -153,6 +153,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>;
@@ -283,6 +290,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";
+		};
+
 		wdt: watchdog@2050000 {
 			compatible = "allwinner,sun55i-a523-wdt";
 			reg = <0x2050000 0x20>;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs
  2026-03-02 15:27 [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
  2026-03-02 15:27 ` [PATCH v2 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC Chen-Yu Tsai
  2026-03-02 15:27 ` [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller Chen-Yu Tsai
@ 2026-03-02 15:27 ` Chen-Yu Tsai
  2026-03-10 19:41 ` [PATCH v2 0/3] " Chen-Yu Tsai
  3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:27 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek
  Cc: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, linux-sunxi,
	linux-arm-kernel, linux-kernel, linux-leds, Jernej Skrabec

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.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
 .../dts/allwinner/sun55i-t527-avaota-a1.dts   | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
index 054d0357c139..7c24121de88f 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
@@ -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";
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs
  2026-03-02 15:27 [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2026-03-02 15:27 ` [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
@ 2026-03-10 19:41 ` Chen-Yu Tsai
  3 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-03-10 19:41 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Chen-Yu Tsai
  Cc: Jernej Skrabec, Samuel Holland, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-sunxi, linux-arm-kernel,
	linux-kernel, linux-leds

On Mon, 02 Mar 2026 23:27:19 +0800, Chen-Yu Tsai wrote:
> This is v2 of my A523 LED controller enablement series.
> 
> Changes since v1:
> - Rebased onto next-20260226 to get rid of unmerged context
> - Collected tags
> - Link to v1:
>   https://lore.kernel.org/linux-sunxi/20260225160828.1687643-1-wens@kernel.org/
> 
> [...]

Applied to sunxi/dt-for-7.1 in local tree, thanks!

[1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC
      commit: 7cb259eacc08df8e5d1b17e6a75a19518e5de7ca
[2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller
      commit: 24cd5a81771d8213abb7494245a7f320a6e75e52
[3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs
      commit: cc68a8a3f89c18bdbce33a449c31e6467a3cbcfa

Best regards,
-- 
Chen-Yu Tsai <wens@kernel.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-10 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 15:27 [PATCH v2 0/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
2026-03-02 15:27 ` [PATCH v2 1/3] dt-bindings: leds: sun50i-a100: Add compatible for Allwinner A523 SoC Chen-Yu Tsai
2026-03-02 15:27 ` [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add LED controller Chen-Yu Tsai
2026-03-02 15:27 ` [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs Chen-Yu Tsai
2026-03-10 19:41 ` [PATCH v2 0/3] " Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox