Commit | Line | Data |
---|---|---|
e015050c | 1 | Binding for TI/National Semiconductor LP55xx Led Drivers |
7542a04b LW |
2 | |
3 | Required properties: | |
9ef8c877 DM |
4 | - compatible: one of |
5 | national,lp5521 | |
6 | national,lp5523 | |
7 | ti,lp55231 | |
8 | ti,lp5562 | |
9 | ti,lp8501 | |
10 | ||
2dac9128 KM |
11 | - reg: I2C slave address |
12 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) | |
13 | ||
14 | Each child has own specific current settings | |
7542a04b LW |
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. | |
7542a04b | 17 | |
2dac9128 | 18 | Optional properties: |
30dae2f9 | 19 | - enable-gpio: GPIO attached to the chip's enable pin |
2dac9128 | 20 | - label: Used for naming LEDs |
33b3a561 KM |
21 | - 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 | |
2dac9128 | 26 | |
f65f0a1a LW |
27 | Alternatively, 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 | |
2dac9128 KM |
31 | |
32 | example 1) LP5521 | |
33 | 3 LED channels, external clock used. Channel names are 'lp5521_pri:channel0', | |
f65f0a1a LW |
34 | 'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger |
35 | on channel 0. | |
7542a04b LW |
36 | |
37 | lp5521@32 { | |
38 | compatible = "national,lp5521"; | |
39 | reg = <0x32>; | |
40 | label = "lp5521_pri"; | |
2dac9128 KM |
41 | clock-mode = /bits/ 8 <2>; |
42 | ||
43 | chan0 { | |
44 | led-cur = /bits/ 8 <0x2f>; | |
45 | max-cur = /bits/ 8 <0x5f>; | |
f65f0a1a | 46 | linux,default-trigger = "heartbeat"; |
2dac9128 KM |
47 | }; |
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 | ||
60 | example 2) LP5523 | |
61 | 9 LED channels with specific name. Internal clock used. | |
62 | The I2C slave address is configurable with ASEL1 and ASEL0 pins. | |
63 | Available addresses are 32/33/34/35h. | |
64 | ||
65 | ASEL1 ASEL0 Address | |
66 | ------------------------- | |
67 | GND GND 32h | |
68 | GND VEN 33h | |
69 | VEN GND 34h | |
70 | VEN VEN 35h | |
71 | ||
72 | lp5523@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 | }; | |
7542a04b | 130 | }; |
e015050c KM |
131 | |
132 | example 3) LP5562 | |
133 | 4 channels are defined. | |
134 | ||
135 | lp5562@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 | }; | |
33b3a561 KM |
164 | |
165 | example 4) LP8501 | |
166 | 9 channels are defined. The 'pwr-sel' is LP8501 specific property. | |
167 | Others are same as LP5523. | |
168 | ||
169 | lp8501@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 | }; |