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