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