Merge branch 'asoc-5.2' into asoc-5.3
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / leds / backlight / lm3630a-backlight.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: TI LM3630A High-Efficiency Dual-String White LED
8
9 maintainers:
10   - Lee Jones <lee.jones@linaro.org>
11   - Daniel Thompson <daniel.thompson@linaro.org>
12   - Jingoo Han <jingoohan1@gmail.com>
13
14 description: |
15   The LM3630A is a current-mode boost converter which supplies the power and
16   controls the current in up to two strings of 10 LEDs per string.
17   https://www.ti.com/product/LM3630A
18
19 properties:
20   compatible:
21     const: ti,lm3630a
22
23   reg:
24     maxItems: 1
25
26   ti,linear-mapping-mode:
27     description: |
28       Enable linear mapping mode. If disabled, then it will use exponential
29       mapping mode in which the ramp up/down appears to have a more uniform
30       transition to the human eye.
31     type: boolean
32
33 required:
34   - compatible
35   - reg
36
37 patternProperties:
38   "^led@[01]$":
39     type: object
40     description: |
41       Properties for a string of connected LEDs.
42
43     properties:
44       reg:
45         description: |
46           The control bank that is used to program the two current sinks. The
47           LM3630A has two control banks (A and B) and are represented as 0 or 1
48           in this property. The two current sinks can be controlled
49           independently with both banks, or bank A can be configured to control
50           both sinks with the led-sources property.
51         maxItems: 1
52         minimum: 0
53         maximum: 1
54
55       label:
56         maxItems: 1
57
58       led-sources:
59         allOf:
60           - minItems: 1
61             maxItems: 2
62             items:
63               minimum: 0
64               maximum: 1
65
66       default-brightness:
67         description: Default brightness level on boot.
68         minimum: 0
69         maximum: 255
70
71       max-brightness:
72         description: Maximum brightness that is allowed during runtime.
73         minimum: 0
74         maximum: 255
75
76     required:
77       - reg
78
79     additionalProperties: false
80
81 additionalProperties: false
82
83 examples:
84   - |
85     i2c {
86         #address-cells = <1>;
87         #size-cells = <0>;
88
89         led-controller@38 {
90                 compatible = "ti,lm3630a";
91                 reg = <0x38>;
92
93                 #address-cells = <1>;
94                 #size-cells = <0>;
95
96                 led@0 {
97                         reg = <0>;
98                         led-sources = <0 1>;
99                         label = "lcd-backlight";
100                         default-brightness = <200>;
101                         max-brightness = <255>;
102                 };
103         };
104     };
105   - |
106     i2c {
107         #address-cells = <1>;
108         #size-cells = <0>;
109
110         led-controller@38 {
111                 compatible = "ti,lm3630a";
112                 reg = <0x38>;
113
114                 #address-cells = <1>;
115                 #size-cells = <0>;
116
117                 led@0 {
118                         reg = <0>;
119                         default-brightness = <150>;
120                         ti,linear-mapping-mode;
121                 };
122
123                 led@1 {
124                         reg = <1>;
125                         default-brightness = <225>;
126                         ti,linear-mapping-mode;
127                 };
128         };
129     };