Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[linux-drm-fsl-dcu.git] / Documentation / devicetree / bindings / leds / leds-lp55xx.txt
1 Binding for TI/National Semiconductor LP55xx Led Drivers
2
3 Required properties:
4 - compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501"
5 - reg: I2C slave address
6 - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
7
8 Each child has own specific current settings
9 - led-cur: Current setting at each led channel (mA x10, 0 if led is not connected)
10 - max-cur: Maximun current at each led channel.
11
12 Optional properties:
13 - enable-gpio: GPIO attached to the chip's enable pin
14 - label: Used for naming LEDs
15 - pwr-sel: LP8501 specific property. Power selection for output channels.
16          0: D1~9 are connected to VDD
17          1: D1~6 with VDD, D7~9 with VOUT
18          2: D1~6 with VOUT, D7~9 with VDD
19          3: D1~9 are connected to VOUT
20
21 Alternatively, each child can have a specific channel name and trigger:
22 - chan-name (optional): name of channel
23 - linux,default-trigger (optional): see
24   Documentation/devicetree/bindings/leds/common.txt
25
26 example 1) LP5521
27 3 LED channels, external clock used. Channel names are 'lp5521_pri:channel0',
28 'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger
29 on channel 0.
30
31 lp5521@32 {
32         compatible = "national,lp5521";
33         reg = <0x32>;
34         label = "lp5521_pri";
35         clock-mode = /bits/ 8 <2>;
36
37         chan0 {
38                 led-cur = /bits/ 8 <0x2f>;
39                 max-cur = /bits/ 8 <0x5f>;
40                 linux,default-trigger = "heartbeat";
41         };
42
43         chan1 {
44                 led-cur = /bits/ 8 <0x2f>;
45                 max-cur = /bits/ 8 <0x5f>;
46         };
47
48         chan2 {
49                 led-cur = /bits/ 8 <0x2f>;
50                 max-cur = /bits/ 8 <0x5f>;
51         };
52 };
53
54 example 2) LP5523
55 9 LED channels with specific name. Internal clock used.
56 The I2C slave address is configurable with ASEL1 and ASEL0 pins.
57 Available addresses are 32/33/34/35h.
58
59 ASEL1    ASEL0    Address
60 -------------------------
61  GND      GND       32h
62  GND      VEN       33h
63  VEN      GND       34h
64  VEN      VEN       35h
65
66 lp5523@32 {
67         compatible = "national,lp5523";
68         reg = <0x32>;
69         clock-mode = /bits/ 8 <1>;
70
71         chan0 {
72                 chan-name = "d1";
73                 led-cur = /bits/ 8 <0x14>;
74                 max-cur = /bits/ 8 <0x20>;
75         };
76
77         chan1 {
78                 chan-name = "d2";
79                 led-cur = /bits/ 8 <0x14>;
80                 max-cur = /bits/ 8 <0x20>;
81         };
82
83         chan2 {
84                 chan-name = "d3";
85                 led-cur = /bits/ 8 <0x14>;
86                 max-cur = /bits/ 8 <0x20>;
87         };
88
89         chan3 {
90                 chan-name = "d4";
91                 led-cur = /bits/ 8 <0x14>;
92                 max-cur = /bits/ 8 <0x20>;
93         };
94
95         chan4 {
96                 chan-name = "d5";
97                 led-cur = /bits/ 8 <0x14>;
98                 max-cur = /bits/ 8 <0x20>;
99         };
100
101         chan5 {
102                 chan-name = "d6";
103                 led-cur = /bits/ 8 <0x14>;
104                 max-cur = /bits/ 8 <0x20>;
105         };
106
107         chan6 {
108                 chan-name = "d7";
109                 led-cur = /bits/ 8 <0x14>;
110                 max-cur = /bits/ 8 <0x20>;
111         };
112
113         chan7 {
114                 chan-name = "d8";
115                 led-cur = /bits/ 8 <0x14>;
116                 max-cur = /bits/ 8 <0x20>;
117         };
118
119         chan8 {
120                 chan-name = "d9";
121                 led-cur = /bits/ 8 <0x14>;
122                 max-cur = /bits/ 8 <0x20>;
123         };
124 };
125
126 example 3) LP5562
127 4 channels are defined.
128
129 lp5562@30 {
130         compatible = "ti,lp5562";
131         reg = <0x30>;
132         clock-mode = /bits/8 <2>;
133
134         chan0 {
135                 chan-name = "R";
136                 led-cur = /bits/ 8 <0x20>;
137                 max-cur = /bits/ 8 <0x60>;
138         };
139
140         chan1 {
141                 chan-name = "G";
142                 led-cur = /bits/ 8 <0x20>;
143                 max-cur = /bits/ 8 <0x60>;
144         };
145
146         chan2 {
147                 chan-name = "B";
148                 led-cur = /bits/ 8 <0x20>;
149                 max-cur = /bits/ 8 <0x60>;
150         };
151
152         chan3 {
153                 chan-name = "W";
154                 led-cur = /bits/ 8 <0x20>;
155                 max-cur = /bits/ 8 <0x60>;
156         };
157 };
158
159 example 4) LP8501
160 9 channels are defined. The 'pwr-sel' is LP8501 specific property.
161 Others are same as LP5523.
162
163 lp8501@32 {
164         compatible = "ti,lp8501";
165         reg = <0x32>;
166         clock-mode = /bits/ 8 <2>;
167         pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
168
169         chan0 {
170                 chan-name = "d1";
171                 led-cur = /bits/ 8 <0x14>;
172                 max-cur = /bits/ 8 <0x20>;
173         };
174
175         chan1 {
176                 chan-name = "d2";
177                 led-cur = /bits/ 8 <0x14>;
178                 max-cur = /bits/ 8 <0x20>;
179         };
180
181         chan2 {
182                 chan-name = "d3";
183                 led-cur = /bits/ 8 <0x14>;
184                 max-cur = /bits/ 8 <0x20>;
185         };
186
187         chan3 {
188                 chan-name = "d4";
189                 led-cur = /bits/ 8 <0x14>;
190                 max-cur = /bits/ 8 <0x20>;
191         };
192
193         chan4 {
194                 chan-name = "d5";
195                 led-cur = /bits/ 8 <0x14>;
196                 max-cur = /bits/ 8 <0x20>;
197         };
198
199         chan5 {
200                 chan-name = "d6";
201                 led-cur = /bits/ 8 <0x14>;
202                 max-cur = /bits/ 8 <0x20>;
203         };
204
205         chan6 {
206                 chan-name = "d7";
207                 led-cur = /bits/ 8 <0x14>;
208                 max-cur = /bits/ 8 <0x20>;
209         };
210
211         chan7 {
212                 chan-name = "d8";
213                 led-cur = /bits/ 8 <0x14>;
214                 max-cur = /bits/ 8 <0x20>;
215         };
216
217         chan8 {
218                 chan-name = "d9";
219                 led-cur = /bits/ 8 <0x14>;
220                 max-cur = /bits/ 8 <0x20>;
221         };
222 };