| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/leds/leds-lp55xx.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: TI/National Semiconductor LP55xx and LP8501 LED Drivers |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Jacek Anaszewski <[email protected]> |
| 11 |
- Pavel Machek <[email protected]> |
| 12 |
|
| 13 |
description: | |
| 14 |
Bindings for the TI/National Semiconductor LP55xx and LP8501 multi channel |
| 15 |
LED Drivers. |
| 16 |
|
| 17 |
For more product information please see the link below: |
| 18 |
https://www.ti.com/lit/gpn/lp5521 |
| 19 |
https://www.ti.com/lit/gpn/lp5523 |
| 20 |
https://www.ti.com/lit/gpn/lp55231 |
| 21 |
https://www.ti.com/lit/gpn/lp5562 |
| 22 |
https://www.ti.com/lit/gpn/lp8501 |
| 23 |
|
| 24 |
properties: |
| 25 |
compatible: |
| 26 |
enum: |
| 27 |
- national,lp5521 |
| 28 |
- national,lp5523 |
| 29 |
- ti,lp55231 |
| 30 |
- ti,lp5562 |
| 31 |
- ti,lp5569 |
| 32 |
- ti,lp8501 |
| 33 |
|
| 34 |
reg: |
| 35 |
maxItems: 1 |
| 36 |
description: I2C slave address |
| 37 |
|
| 38 |
clock-mode: |
| 39 |
$ref: /schemas/types.yaml#/definitions/uint8 |
| 40 |
description: | |
| 41 |
Input clock mode |
| 42 |
enum: |
| 43 |
- 0 # automode |
| 44 |
- 1 # internal |
| 45 |
- 2 # external |
| 46 |
|
| 47 |
enable-gpios: |
| 48 |
maxItems: 1 |
| 49 |
description: | |
| 50 |
GPIO attached to the chip's enable pin |
| 51 |
|
| 52 |
label: true |
| 53 |
|
| 54 |
pwr-sel: |
| 55 |
$ref: /schemas/types.yaml#/definitions/uint8 |
| 56 |
description: | |
| 57 |
LP8501 specific property. Power selection for output channels. |
| 58 |
enum: |
| 59 |
- 0 # D1~9 are connected to VDD |
| 60 |
- 1 # D1~6 with VDD, D7~9 with VOUT |
| 61 |
- 2 # D1~6 with VOUT, D7~9 with VDD |
| 62 |
- 3 # D1~9 are connected to VOUT |
| 63 |
|
| 64 |
'#address-cells': |
| 65 |
const: 1 |
| 66 |
|
| 67 |
'#size-cells': |
| 68 |
const: 0 |
| 69 |
|
| 70 |
ti,charge-pump-mode: |
| 71 |
description: |
| 72 |
Set the operating mode of the internal charge pump as defined in |
| 73 |
<dt-bindings/leds/leds-lp55xx.h>. |
| 74 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 75 |
default: 3 # auto |
| 76 |
maximum: 3 |
| 77 |
|
| 78 |
patternProperties: |
| 79 |
'^multi-led@[0-8]$': |
| 80 |
type: object |
| 81 |
$ref: leds-class-multicolor.yaml# |
| 82 |
unevaluatedProperties: false |
| 83 |
|
| 84 |
properties: |
| 85 |
reg: |
| 86 |
maximum: 8 |
| 87 |
|
| 88 |
'#address-cells': |
| 89 |
const: 1 |
| 90 |
|
| 91 |
'#size-cells': |
| 92 |
const: 0 |
| 93 |
|
| 94 |
patternProperties: |
| 95 |
"^led@[0-8]$": |
| 96 |
type: object |
| 97 |
$ref: common.yaml# |
| 98 |
unevaluatedProperties: false |
| 99 |
|
| 100 |
properties: |
| 101 |
led-cur: |
| 102 |
$ref: /schemas/types.yaml#/definitions/uint8 |
| 103 |
description: | |
| 104 |
Current setting at each LED channel (mA x10, 0 if LED is not connected) |
| 105 |
minimum: 0 |
| 106 |
maximum: 255 |
| 107 |
|
| 108 |
max-cur: |
| 109 |
$ref: /schemas/types.yaml#/definitions/uint8 |
| 110 |
description: Maximum current at each LED channel. |
| 111 |
|
| 112 |
reg: |
| 113 |
maximum: 8 |
| 114 |
|
| 115 |
required: |
| 116 |
- reg |
| 117 |
|
| 118 |
"^led@[0-8]$": |
| 119 |
type: object |
| 120 |
$ref: common.yaml# |
| 121 |
unevaluatedProperties: false |
| 122 |
|
| 123 |
properties: |
| 124 |
led-cur: |
| 125 |
$ref: /schemas/types.yaml#/definitions/uint8 |
| 126 |
description: | |
| 127 |
Current setting at each LED channel (mA x10, 0 if LED is not connected) |
| 128 |
minimum: 0 |
| 129 |
maximum: 255 |
| 130 |
|
| 131 |
max-cur: |
| 132 |
$ref: /schemas/types.yaml#/definitions/uint8 |
| 133 |
description: Maximum current at each LED channel. |
| 134 |
|
| 135 |
reg: |
| 136 |
description: | |
| 137 |
Output channel for the LED. This is zero based channel identifier and |
| 138 |
the data sheet is a one based channel identifier. |
| 139 |
reg value to output to LED output number |
| 140 |
enum: |
| 141 |
- 0 # LED output D1 |
| 142 |
- 1 # LED output D2 |
| 143 |
- 2 # LED output D3 |
| 144 |
- 3 # LED output D4 |
| 145 |
- 4 # LED output D5 |
| 146 |
- 5 # LED output D6 |
| 147 |
- 6 # LED output D7 |
| 148 |
- 7 # LED output D8 |
| 149 |
- 8 # LED output D9 |
| 150 |
|
| 151 |
chan-name: |
| 152 |
$ref: /schemas/types.yaml#/definitions/string |
| 153 |
description: name of channel |
| 154 |
|
| 155 |
if: |
| 156 |
not: |
| 157 |
properties: |
| 158 |
compatible: |
| 159 |
contains: |
| 160 |
const: ti,lp8501 |
| 161 |
then: |
| 162 |
properties: |
| 163 |
pwr-sel: false |
| 164 |
|
| 165 |
required: |
| 166 |
- compatible |
| 167 |
- reg |
| 168 |
|
| 169 |
additionalProperties: false |
| 170 |
|
| 171 |
examples: |
| 172 |
- | |
| 173 |
#include <dt-bindings/leds/common.h> |
| 174 |
#include <dt-bindings/leds/leds-lp55xx.h> |
| 175 |
|
| 176 |
i2c { |
| 177 |
#address-cells = <1>; |
| 178 |
#size-cells = <0>; |
| 179 |
|
| 180 |
led-controller@32 { |
| 181 |
#address-cells = <1>; |
| 182 |
#size-cells = <0>; |
| 183 |
compatible = "ti,lp8501"; |
| 184 |
reg = <0x32>; |
| 185 |
clock-mode = /bits/ 8 <2>; |
| 186 |
pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ |
| 187 |
ti,charge-pump-mode = <LP55XX_CP_BYPASS>; |
| 188 |
|
| 189 |
led@0 { |
| 190 |
reg = <0>; |
| 191 |
chan-name = "d1"; |
| 192 |
led-cur = /bits/ 8 <0x14>; |
| 193 |
max-cur = /bits/ 8 <0x20>; |
| 194 |
}; |
| 195 |
|
| 196 |
led@1 { |
| 197 |
reg = <1>; |
| 198 |
chan-name = "d2"; |
| 199 |
led-cur = /bits/ 8 <0x14>; |
| 200 |
max-cur = /bits/ 8 <0x20>; |
| 201 |
}; |
| 202 |
|
| 203 |
led@2 { |
| 204 |
reg = <2>; |
| 205 |
chan-name = "d3"; |
| 206 |
led-cur = /bits/ 8 <0x14>; |
| 207 |
max-cur = /bits/ 8 <0x20>; |
| 208 |
}; |
| 209 |
|
| 210 |
led@3 { |
| 211 |
reg = <3>; |
| 212 |
chan-name = "d4"; |
| 213 |
led-cur = /bits/ 8 <0x14>; |
| 214 |
max-cur = /bits/ 8 <0x20>; |
| 215 |
}; |
| 216 |
|
| 217 |
led@4 { |
| 218 |
reg = <4>; |
| 219 |
chan-name = "d5"; |
| 220 |
led-cur = /bits/ 8 <0x14>; |
| 221 |
max-cur = /bits/ 8 <0x20>; |
| 222 |
}; |
| 223 |
|
| 224 |
led@5 { |
| 225 |
reg = <5>; |
| 226 |
chan-name = "d6"; |
| 227 |
led-cur = /bits/ 8 <0x14>; |
| 228 |
max-cur = /bits/ 8 <0x20>; |
| 229 |
}; |
| 230 |
|
| 231 |
led@6 { |
| 232 |
reg = <6>; |
| 233 |
chan-name = "d7"; |
| 234 |
led-cur = /bits/ 8 <0x14>; |
| 235 |
max-cur = /bits/ 8 <0x20>; |
| 236 |
}; |
| 237 |
|
| 238 |
led@7 { |
| 239 |
reg = <7>; |
| 240 |
chan-name = "d8"; |
| 241 |
led-cur = /bits/ 8 <0x14>; |
| 242 |
max-cur = /bits/ 8 <0x20>; |
| 243 |
}; |
| 244 |
|
| 245 |
led@8 { |
| 246 |
reg = <8>; |
| 247 |
chan-name = "d9"; |
| 248 |
led-cur = /bits/ 8 <0x14>; |
| 249 |
max-cur = /bits/ 8 <0x20>; |
| 250 |
}; |
| 251 |
}; |
| 252 |
|
| 253 |
led-controller@33 { |
| 254 |
#address-cells = <1>; |
| 255 |
#size-cells = <0>; |
| 256 |
compatible = "national,lp5523"; |
| 257 |
reg = <0x33>; |
| 258 |
clock-mode = /bits/ 8 <0>; |
| 259 |
|
| 260 |
multi-led@2 { |
| 261 |
#address-cells = <1>; |
| 262 |
#size-cells = <0>; |
| 263 |
reg = <0x2>; |
| 264 |
color = <LED_COLOR_ID_RGB>; |
| 265 |
function = LED_FUNCTION_STANDBY; |
| 266 |
linux,default-trigger = "heartbeat"; |
| 267 |
|
| 268 |
led@0 { |
| 269 |
led-cur = /bits/ 8 <50>; |
| 270 |
max-cur = /bits/ 8 <100>; |
| 271 |
reg = <0x0>; |
| 272 |
color = <LED_COLOR_ID_GREEN>; |
| 273 |
}; |
| 274 |
|
| 275 |
led@1 { |
| 276 |
led-cur = /bits/ 8 <50>; |
| 277 |
max-cur = /bits/ 8 <100>; |
| 278 |
reg = <0x1>; |
| 279 |
color = <LED_COLOR_ID_BLUE>; |
| 280 |
}; |
| 281 |
|
| 282 |
led@6 { |
| 283 |
led-cur = /bits/ 8 <50>; |
| 284 |
max-cur = /bits/ 8 <100>; |
| 285 |
reg = <0x6>; |
| 286 |
color = <LED_COLOR_ID_RED>; |
| 287 |
}; |
| 288 |
}; |
| 289 |
}; |
| 290 |
}; |
| 291 |
|
| 292 |
... |