Allwinner A100 LED Controller

Schema identifier ($id): "http://devicetree.org/schemas/leds/allwinner,sun50i-a100-ledc.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Samuel Holland <samuel@sholland.org>"

The LED controller found in Allwinner sunxi SoCs uses a one-wire serial interface to drive up to 1024 RGB LEDs.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "allwinner,sun50i-a100-ledc"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "allwinner,sun20i-d1-ledc", "allwinner,sun50i-r329-ledc"

Item 2

Exact value (const): "allwinner,sun50i-a100-ledc"

reg — required here #

Maximum number of items (maxItems): 1

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Array item rules (items) #

Item 1

Bus clock

Item 2

Module clock

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "bus"

Item 2

Exact value (const): "mod"

resets — required here #

Maximum number of items (maxItems): 1

dmas — not listed as required here #

Maximum number of items (maxItems): 1

TX DMA channel

dma-names — not listed as required here #

Exact value (const): "tx"

allwinner,pixel-format — not listed as required here #

Pixel format (subpixel transmission order), default is "grb"

Allowed values (enum): "bgr", "brg", "gbr", "grb", "rbg", "rgb"

allwinner,t0h-ns — not listed as required here #

Default value (default): 336

Length of high pulse when transmitting a "0" bit

allwinner,t0l-ns — not listed as required here #

Default value (default): 840

Length of low pulse when transmitting a "0" bit

allwinner,t1h-ns — not listed as required here #

Default value (default): 882

Length of high pulse when transmitting a "1" bit

allwinner,t1l-ns — not listed as required here #

Default value (default): 294

Length of low pulse when transmitting a "1" bit

allwinner,treset-ns — not listed as required here #

Default value (default): 300000

Minimum delay between transmission frames

Properties matching a name pattern (patternProperties) #

^multi-led@[0-9a-f]+$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): leds-class-multicolor.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

Minimum value (minimum): 0

Maximum value (maximum): 1023

Index of the LED in the series (must be contiguous)

Required in this object (required): "reg"

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "resets"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>

ledc: led-controller@2008000 {
  compatible = "allwinner,sun20i-d1-ledc",
               "allwinner,sun50i-a100-ledc";
  reg = <0x2008000 0x400>;
  interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
  clocks = <&ccu 12>, <&ccu 34>;
  clock-names = "bus", "mod";
  resets = <&ccu 12>;
  dmas = <&dma 42>;
  dma-names = "tx";
  #address-cells = <1>;
  #size-cells = <0>;

  multi-led@0 {
    reg = <0x0>;
    color = <LED_COLOR_ID_RGB>;
    function = LED_FUNCTION_INDICATOR;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Edit this page