1 From 31857adcc9db7244a047a3a3550219f7559d8846 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Wed, 4 Aug 2021 21:36:26 -0500
4 Subject: [PATCH 054/117] dt-bindings: leds: Add Allwinner A100 LED controller
6 The Allwinner A100, R329, and D1 SoCs contain an LED controller designed
7 to drive a series of RGB LED pixels. It supports PIO and DMA transfers,
8 and has configurable timing and pixel format. All three implementations
9 appear to be identical, so use the oldest as the fallback compatible.
12 - Fixed typo leading to duplicate t1h-ns property
13 - Removed "items" layer in definition of dmas/dma-names
14 - Replaced uint32 type reference with maxItems in timing properties
17 - Removed quotes from enumeration values
18 - Added vendor prefix to timing/format properties
19 - Renamed "format" property to "pixel-format" for clarity
20 - Dropped "vled-supply" as it is unrelated to the controller hardware
23 - Use "default" instead of "maxItems" for timing properties
26 - A100 contains the original implementation, so use that as the base
27 compatible string, and rename the binding to match
28 - Add "unevaluatedProperties: false" to the child multi-led binding
30 Acked-by: Maxime Ripard <maxime@cerno.tech>
31 Reviewed-by: Rob Herring <robh@kernel.org>
32 Signed-off-by: Samuel Holland <samuel@sholland.org>
34 .../leds/allwinner,sun50i-a100-ledc.yaml | 139 ++++++++++++++++++
35 1 file changed, 139 insertions(+)
36 create mode 100644 Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
39 +++ b/Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
41 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
44 +$id: http://devicetree.org/schemas/leds/allwinner,sun50i-a100-ledc.yaml#
45 +$schema: http://devicetree.org/meta-schemas/core.yaml#
47 +title: Allwinner A100 LED Controller Bindings
50 + - Samuel Holland <samuel@sholland.org>
53 + The LED controller found in Allwinner sunxi SoCs uses a one-wire serial
54 + interface to drive up to 1024 RGB LEDs.
59 + - const: allwinner,sun50i-a100-ledc
62 + - allwinner,sun20i-d1-ledc
63 + - allwinner,sun50i-r329-ledc
64 + - const: allwinner,sun50i-a100-ledc
80 + - description: Bus clock
81 + - description: Module clock
93 + description: TX DMA channel
98 + allwinner,pixel-format:
99 + description: Pixel format (subpixel transmission order), default is "grb"
110 + description: Length of high pulse when transmitting a "0" bit
114 + description: Length of low pulse when transmitting a "0" bit
118 + description: Length of high pulse when transmitting a "1" bit
122 + description: Length of low pulse when transmitting a "1" bit
124 + allwinner,treset-ns:
126 + description: Minimum delay between transmission frames
129 + "^multi-led@[0-9a-f]+$":
131 + $ref: leds-class-multicolor.yaml#
132 + unevaluatedProperties: false
137 + description: Index of the LED in the series (must be contiguous)
152 +additionalProperties: false
156 + #include <dt-bindings/interrupt-controller/irq.h>
157 + #include <dt-bindings/leds/common.h>
159 + ledc: led-controller@2008000 {
160 + compatible = "allwinner,sun20i-d1-ledc",
161 + "allwinner,sun50i-a100-ledc";
162 + reg = <0x2008000 0x400>;
163 + interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
164 + clocks = <&ccu 12>, <&ccu 34>;
165 + clock-names = "bus", "mod";
166 + resets = <&ccu 12>;
169 + #address-cells = <1>;
174 + color = <LED_COLOR_ID_RGB>;
175 + function = LED_FUNCTION_INDICATOR;