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