aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2013-07-09 05:11:37 -0400
committerBryan Wu <cooloney@gmail.com>2013-08-26 20:22:10 -0400
commit33b3a561f417ec3e1013999ce8bdb6c055abb1ce (patch)
treec2288f2c8fba1860f433c7fb05cc54e346238cfa /Documentation
parent81d22878092feab779f3efaab404036d31dc06f8 (diff)
leds: support new LP8501 device - another LP55xx common
LP8501 can drive up to 9 channels like LP5523. LEDs can be controlled directly via the I2C and programmable engines are supported. LP55xx common driver LP8501 is one of LP55xx family device, so LP55xx common code are used. Chip specific data is defined in the structure, 'lp55xx_device_config'. Differences between LP8501 and LP5523 Different register layout for LED output control and others. LP8501 specific feature for separate output power selection. LP8501 doesn't support external clock detection. Different programming engine data. LP8501 specific feature - output power selection Output channels are selected by power selection - Vout or Vdd. Separate power for VDD1-6 and VDD7-9 are available. It is configurable in the platform data. To support this feature, LP55xx DT structure and header are changed. Device tree binding is updated as well. LED pattern data Example pattern data is updated in the driver documentation. Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/leds/leds-lp55xx.txt72
-rw-r--r--Documentation/leds/leds-lp55xx.txt30
2 files changed, 98 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
index d5176882d8b9..a61727f9a6d1 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
@@ -1,7 +1,7 @@
1Binding for TI/National Semiconductor LP55xx Led Drivers 1Binding for TI/National Semiconductor LP55xx Led Drivers
2 2
3Required properties: 3Required properties:
4- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" 4- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501"
5- reg: I2C slave address 5- reg: I2C slave address
6- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) 6- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
7 7
@@ -11,6 +11,11 @@ Each child has own specific current settings
11 11
12Optional properties: 12Optional properties:
13- label: Used for naming LEDs 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
14 19
15Alternatively, each child can have specific channel name 20Alternatively, each child can have specific channel name
16- chan-name: Name of each channel name 21- chan-name: Name of each channel name
@@ -145,3 +150,68 @@ lp5562@30 {
145 max-cur = /bits/ 8 <0x60>; 150 max-cur = /bits/ 8 <0x60>;
146 }; 151 };
147}; 152};
153
154example 4) LP8501
1559 channels are defined. The 'pwr-sel' is LP8501 specific property.
156Others are same as LP5523.
157
158lp8501@32 {
159 compatible = "ti,lp8501";
160 reg = <0x32>;
161 clock-mode = /bits/ 8 <2>;
162 pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
163
164 chan0 {
165 chan-name = "d1";
166 led-cur = /bits/ 8 <0x14>;
167 max-cur = /bits/ 8 <0x20>;
168 };
169
170 chan1 {
171 chan-name = "d2";
172 led-cur = /bits/ 8 <0x14>;
173 max-cur = /bits/ 8 <0x20>;
174 };
175
176 chan2 {
177 chan-name = "d3";
178 led-cur = /bits/ 8 <0x14>;
179 max-cur = /bits/ 8 <0x20>;
180 };
181
182 chan3 {
183 chan-name = "d4";
184 led-cur = /bits/ 8 <0x14>;
185 max-cur = /bits/ 8 <0x20>;
186 };
187
188 chan4 {
189 chan-name = "d5";
190 led-cur = /bits/ 8 <0x14>;
191 max-cur = /bits/ 8 <0x20>;
192 };
193
194 chan5 {
195 chan-name = "d6";
196 led-cur = /bits/ 8 <0x14>;
197 max-cur = /bits/ 8 <0x20>;
198 };
199
200 chan6 {
201 chan-name = "d7";
202 led-cur = /bits/ 8 <0x14>;
203 max-cur = /bits/ 8 <0x20>;
204 };
205
206 chan7 {
207 chan-name = "d8";
208 led-cur = /bits/ 8 <0x14>;
209 max-cur = /bits/ 8 <0x20>;
210 };
211
212 chan8 {
213 chan-name = "d9";
214 led-cur = /bits/ 8 <0x14>;
215 max-cur = /bits/ 8 <0x20>;
216 };
217};
diff --git a/Documentation/leds/leds-lp55xx.txt b/Documentation/leds/leds-lp55xx.txt
index eec8fa2ffe4e..82713ff92eb3 100644
--- a/Documentation/leds/leds-lp55xx.txt
+++ b/Documentation/leds/leds-lp55xx.txt
@@ -1,11 +1,11 @@
1LP5521/LP5523/LP55231 Common Driver 1LP5521/LP5523/LP55231/LP5562/LP8501 Common Driver
2=================================== 2=================================================
3 3
4Authors: Milo(Woogyom) Kim <milo.kim@ti.com> 4Authors: Milo(Woogyom) Kim <milo.kim@ti.com>
5 5
6Description 6Description
7----------- 7-----------
8LP5521, LP5523/55231 and LP5562 have common features as below. 8LP5521, LP5523/55231, LP5562 and LP8501 have common features as below.
9 9
10 Register access via the I2C 10 Register access via the I2C
11 Device initialization/deinitialization 11 Device initialization/deinitialization
@@ -109,6 +109,30 @@ As soon as 'loading' is set to 0, registered callback is called.
109Inside the callback, the selected engine is loaded and memory is updated. 109Inside the callback, the selected engine is loaded and memory is updated.
110To run programmed pattern, 'run_engine' attribute should be enabled. 110To run programmed pattern, 'run_engine' attribute should be enabled.
111 111
112The pattern sqeuence of LP8501 is same as LP5523.
113However pattern data is specific.
114Ex 1) Engine 1 is used
115echo 1 > /sys/bus/i2c/devices/xxxx/select_engine
116echo 1 > /sys/class/firmware/lp8501/loading
117echo "9d0140ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
118echo 0 > /sys/class/firmware/lp8501/loading
119echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
120
121Ex 2) Engine 2 and 3 are used at the same time
122echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
123sleep 1
124echo 1 > /sys/class/firmware/lp8501/loading
125echo "9d0140ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
126echo 0 > /sys/class/firmware/lp8501/loading
127sleep 1
128echo 3 > /sys/bus/i2c/devices/xxxx/select_engine
129sleep 1
130echo 1 > /sys/class/firmware/lp8501/loading
131echo "9d0340ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
132echo 0 > /sys/class/firmware/lp8501/loading
133sleep 1
134echo 1 > /sys/class/leds/d1/device/run_engine
135
112( 'run_engine' and 'firmware_cb' ) 136( 'run_engine' and 'firmware_cb' )
113The sequence of running the program data is common. 137The sequence of running the program data is common.
114But each device has own specific register addresses for commands. 138But each device has own specific register addresses for commands.