xref: /linux/Documentation/devicetree/bindings/leds/adi,ltc3220.yaml (revision 67f8bc848ee31831336bd478e57d2f993551902e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/adi,ltc3220.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices LTC3220 LED Driver
8
9maintainers:
10  - Edelweise Escala <edelweise.escala@analog.com>
11
12description: >
13  The LTC3220 is a multi-display LED driver, which contains a high-efficiency,
14  low-noise charge pump to provide power to up to 18 LED current sources.
15  The LEDs are individually configurable to 64-step linear brightness control,
16  blinking and gradation control via 2-wire I2C interface.
17
18  For more product information please see the link below
19    https://www.analog.com/en/products/ltc3220.html
20
21properties:
22  compatible:
23    const: adi,ltc3220
24
25  reg:
26    maxItems: 1
27
28  '#address-cells':
29    const: 1
30
31  '#size-cells':
32    const: 0
33
34  reset-gpios:
35    maxItems: 1
36
37patternProperties:
38  '^led@([1-9a-f]|1[0-2])$':
39    type: object
40    $ref: /schemas/leds/common.yaml#
41    unevaluatedProperties: false
42    properties:
43      reg:
44        description:
45          Output channel for the LED (1-18 maps to LED outputs D1-D18).
46          Unit-address must be in hexadecimal (1-12 hex = 1-18 decimal).
47          For aggregated LED control, define only one LED node with reg = <0x1>
48          and use led-sources to list all controlled outputs. Only reg 1 should
49          be present when using led-sources.
50        items:
51          - minimum: 1
52            maximum: 18
53
54    required:
55      - reg
56
57    if:
58      required:
59        - led-sources
60    then:
61      properties:
62        reg:
63          items:
64            - const: 1
65
66required:
67  - compatible
68  - reg
69  - '#address-cells'
70  - '#size-cells'
71
72additionalProperties: false
73
74examples:
75  - |
76    // Independent LEDs
77    #include <dt-bindings/gpio/gpio.h>
78    #include <dt-bindings/leds/common.h>
79
80    i2c {
81        #address-cells = <1>;
82        #size-cells = <0>;
83
84        led-controller@1c {
85            compatible = "adi,ltc3220";
86            reg = <0x1c>;
87            #address-cells = <1>;
88            #size-cells = <0>;
89            reset-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
90
91            led@1 {
92                reg = <0x1>;
93                function = LED_FUNCTION_INDICATOR;
94                function-enumerator = <1>;
95            };
96
97            led@2 {
98                reg = <0x2>;
99                function = LED_FUNCTION_INDICATOR;
100                function-enumerator = <2>;
101            };
102
103            led@3 {
104                reg = <0x3>;
105                function = LED_FUNCTION_INDICATOR;
106                function-enumerator = <3>;
107            };
108        };
109    };
110
111  - |
112    // Aggregated LED
113    #include <dt-bindings/leds/common.h>
114
115    i2c {
116        #address-cells = <1>;
117        #size-cells = <0>;
118
119        led-controller@1c {
120            compatible = "adi,ltc3220";
121            reg = <0x1c>;
122            #address-cells = <1>;
123            #size-cells = <0>;
124
125            led@1 {
126                reg = <0x1>;
127                led-sources = <0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12>;
128                function = LED_FUNCTION_BACKLIGHT;
129            };
130        };
131    };
132
133...
134