arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs
Subsystems (3)
Chen-Yu Tsai
maintainerv2 cover arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable 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/[email protected]/
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
Chen-Yu Tsai
maintainerPATCH v2 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
@@ -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
Chen-Yu Tsai
maintainerPATCH v2 2/3 arm64: dts: allwinner: sun55i-a523: Add LED controller
In reply to Chen-Yu TsaiThe 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
@@ -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>;
Signature · 1 line
2.47.3
Chen-Yu Tsai
maintainerPATCH v2 3/3 arm64: dts: allwinner: sun55i-t527: avaota-a1: Enable LEDs
In reply to Chen-Yu TsaiThe 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
@@ -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
Chen-Yu Tsai
maintainerQuoted 9 lines · Chen-Yu Tsai
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/[email protected]/[...]
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: cc68a8a3f89c18bdbce33a449c31e6467a3cbcfaBest regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>