Kim, Milo | e015050 | 2013-05-07 00:14:49 -0700 | [diff] [blame] | 1 | Binding for TI/National Semiconductor LP55xx Led Drivers |
Linus Walleij | 7542a04b | 2013-04-23 04:52:59 -0700 | [diff] [blame] | 2 | |
| 3 | Required properties: |
Daniel Mack | 9ef8c87 | 2014-05-05 04:46:54 -0700 | [diff] [blame] | 4 | - compatible: one of |
| 5 | national,lp5521 |
| 6 | national,lp5523 |
| 7 | ti,lp55231 |
| 8 | ti,lp5562 |
| 9 | ti,lp8501 |
| 10 | |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 11 | - reg: I2C slave address |
Linus Walleij | 7542a04b | 2013-04-23 04:52:59 -0700 | [diff] [blame] | 12 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) |
| 13 | |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 14 | Each 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 | |
| 18 | Optional properties: |
Sebastian Reichel | 30dae2f | 2013-10-22 11:02:56 -0700 | [diff] [blame] | 19 | - enable-gpio: GPIO attached to the chip's enable pin |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 20 | - label: Used for naming LEDs |
Kim, Milo | 33b3a56 | 2013-07-09 02:11:37 -0700 | [diff] [blame] | 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 |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 26 | |
Linus Walleij | f65f0a1 | 2013-09-15 03:50:17 -0700 | [diff] [blame] | 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 |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 31 | |
| 32 | example 1) LP5521 |
| 33 | 3 LED channels, external clock used. Channel names are 'lp5521_pri:channel0', |
Linus Walleij | f65f0a1 | 2013-09-15 03:50:17 -0700 | [diff] [blame] | 34 | 'lp5521_pri:channel1' and 'lp5521_pri:channel2', with a heartbeat trigger |
| 35 | on channel 0. |
Linus Walleij | 7542a04b | 2013-04-23 04:52:59 -0700 | [diff] [blame] | 36 | |
| 37 | lp5521@32 { |
| 38 | compatible = "national,lp5521"; |
| 39 | reg = <0x32>; |
| 40 | label = "lp5521_pri"; |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 41 | clock-mode = /bits/ 8 <2>; |
| 42 | |
| 43 | chan0 { |
| 44 | led-cur = /bits/ 8 <0x2f>; |
| 45 | max-cur = /bits/ 8 <0x5f>; |
Linus Walleij | f65f0a1 | 2013-09-15 03:50:17 -0700 | [diff] [blame] | 46 | linux,default-trigger = "heartbeat"; |
Kim, Milo | 2dac912 | 2013-05-07 00:14:48 -0700 | [diff] [blame] | 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 | }; |
Linus Walleij | 7542a04b | 2013-04-23 04:52:59 -0700 | [diff] [blame] | 130 | }; |
Kim, Milo | e015050 | 2013-05-07 00:14:49 -0700 | [diff] [blame] | 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 | }; |
Kim, Milo | 33b3a56 | 2013-07-09 02:11:37 -0700 | [diff] [blame] | 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 | }; |