blob: c55b8c016a9e2bc55490efb3228a285a129725fc [file] [log] [blame]
Kim, Miloe0150502013-05-07 00:14:49 -07001Binding for TI/National Semiconductor LP55xx Led Drivers
Linus Walleij7542a04b2013-04-23 04:52:59 -07002
3Required properties:
Kim, Milo33b3a562013-07-09 02:11:37 -07004- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501"
Kim, Milo2dac9122013-05-07 00:14:48 -07005- reg: I2C slave address
Linus Walleij7542a04b2013-04-23 04:52:59 -07006- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
7
Kim, Milo2dac9122013-05-07 00:14:48 -07008Each 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
12Optional properties:
Sebastian Reichel30dae2f2013-10-22 11:02:56 -070013- enable-gpio: GPIO attached to the chip's enable pin
Kim, Milo2dac9122013-05-07 00:14:48 -070014- label: Used for naming LEDs
Kim, Milo33b3a562013-07-09 02:11:37 -070015- 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
Kim, Milo2dac9122013-05-07 00:14:48 -070020
Linus Walleijf65f0a12013-09-15 03:50:17 -070021Alternatively, 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
Kim, Milo2dac9122013-05-07 00:14:48 -070025
26example 1) LP5521
273 LED channels, external clock used. Channel names are 'lp5521_pri:channel0',
Linus Walleijf65f0a12013-09-15 03:50:17 -070028'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger
29on channel 0.
Linus Walleij7542a04b2013-04-23 04:52:59 -070030
31lp5521@32 {
32 compatible = "national,lp5521";
33 reg = <0x32>;
34 label = "lp5521_pri";
Kim, Milo2dac9122013-05-07 00:14:48 -070035 clock-mode = /bits/ 8 <2>;
36
37 chan0 {
38 led-cur = /bits/ 8 <0x2f>;
39 max-cur = /bits/ 8 <0x5f>;
Linus Walleijf65f0a12013-09-15 03:50:17 -070040 linux,default-trigger = "heartbeat";
Kim, Milo2dac9122013-05-07 00:14:48 -070041 };
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
54example 2) LP5523
559 LED channels with specific name. Internal clock used.
56The I2C slave address is configurable with ASEL1 and ASEL0 pins.
57Available addresses are 32/33/34/35h.
58
59ASEL1 ASEL0 Address
60-------------------------
61 GND GND 32h
62 GND VEN 33h
63 VEN GND 34h
64 VEN VEN 35h
65
66lp5523@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 };
Linus Walleij7542a04b2013-04-23 04:52:59 -0700124};
Kim, Miloe0150502013-05-07 00:14:49 -0700125
126example 3) LP5562
1274 channels are defined.
128
129lp5562@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};
Kim, Milo33b3a562013-07-09 02:11:37 -0700158
159example 4) LP8501
1609 channels are defined. The 'pwr-sel' is LP8501 specific property.
161Others are same as LP5523.
162
163lp8501@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};