xref: /linux/Documentation/devicetree/bindings/leds/ti,lm3560.yaml (revision 6e717507bfbe8d6955f3f4c5604857a392c7e6fa)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/ti,lm3560.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TI LM3560 Synchronous Boost Flash Driver
8
9maintainers:
10  - Svyatoslav Ryhel <clamor95@gmail.com>
11
12description:
13  The LM3560 is a 2-MHz fixed frequency synchronous boost converter with two
14  1000-mA constant current drivers for high-current white LEDs. The dual high-
15  side current sources allow for grounded cathode LED operation and can be
16  tied together for providing flash currents at up to 2 A through a single LED.
17  An adaptive regulation method ensures the current for each LED remains in
18  regulation and maximizes efficiency.
19
20properties:
21  compatible:
22    enum:
23      - ti,lm3559
24      - ti,lm3560
25
26  reg:
27    maxItems: 1
28
29  '#address-cells':
30    const: 1
31
32  '#size-cells':
33    const: 0
34
35  enable-gpios:
36    description: GPIO connected to the HWEN pin.
37    maxItems: 1
38
39  vin-supply:
40    description: Supply connected to the IN line.
41
42  flash-max-timeout-us:
43    minimum: 32000
44    maximum: 1024000
45    default: 32000
46
47  ti,peak-current-microamp:
48    description:
49      The LM3560 features 4 selectable current limits 1.6A, 2.3A, 3A, and 3.6A
50      (in case of LM3559 - 1.4A, 2.1A, 2.7A, and 3.2A). When the current limit
51      is reached, the LM3559/LM3560 stops switching for the remainder of the
52      switching cycle.
53
54patternProperties:
55  '^led@[01]$':
56    type: object
57    $ref: /schemas/leds/common.yaml#
58    description: LED control bank nodes.
59    unevaluatedProperties: false
60
61    properties:
62      reg:
63        description: Control bank selection (0 = bank A, 1 = bank B).
64        maximum: 1
65
66    required:
67      - reg
68      - flash-max-microamp
69      - led-max-microamp
70
71allOf:
72  - $ref: /schemas/leds/common.yaml#
73  - if:
74      properties:
75        compatible:
76          contains:
77            const: ti,lm3559
78    then:
79      properties:
80        ti,peak-current-microamp:
81          enum: [1400000, 2100000, 2700000, 3200000]
82          default: 1400000
83      patternProperties:
84        '^led@[01]$':
85          properties:
86            flash-max-microamp:
87              minimum: 56250
88              maximum: 900000
89            led-max-microamp:
90              minimum: 28125
91              maximum: 225000
92
93  - if:
94      properties:
95        compatible:
96          contains:
97            const: ti,lm3560
98    then:
99      properties:
100        ti,peak-current-microamp:
101          enum: [1600000, 2300000, 3000000, 3600000]
102          default: 1600000
103      patternProperties:
104        '^led@[01]$':
105          properties:
106            flash-max-microamp:
107              minimum: 62500
108              maximum: 1000000
109            led-max-microamp:
110              minimum: 31250
111              maximum: 250000
112
113required:
114  - compatible
115  - reg
116  - '#address-cells'
117  - '#size-cells'
118
119additionalProperties: false
120
121examples:
122  - |
123    #include <dt-bindings/gpio/gpio.h>
124    #include <dt-bindings/leds/common.h>
125
126    i2c {
127        #address-cells = <1>;
128        #size-cells = <0>;
129
130        led-controller@53 {
131            compatible = "ti,lm3560";
132            reg = <0x53>;
133
134            enable-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
135            vin-supply = <&vdd_3v3_sys>;
136
137            flash-max-timeout-us = <1024000>;
138            ti,peak-current-microamp = <1600000>;
139
140            #address-cells = <1>;
141            #size-cells = <0>;
142
143            led@0 {
144                reg = <0>;
145
146                function = LED_FUNCTION_FLASH;
147                color = <LED_COLOR_ID_WHITE>;
148
149                flash-max-microamp = <562500>;
150                led-max-microamp = <156250>;
151            };
152
153            led@1 {
154                reg = <1>;
155
156                function = LED_FUNCTION_FLASH;
157                color = <LED_COLOR_ID_YELLOW>;
158
159                flash-max-microamp = <562500>;
160                led-max-microamp = <156250>;
161            };
162        };
163    };
164