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 7title: TI/National Semiconductor LP55xx and LP8501 LED Drivers 8 9maintainers: 10 - Jacek Anaszewski <jacek.anaszewski@gmail.com> 11 - Pavel Machek <pavel@ucw.cz> 12 13description: | 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 24properties: 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-gpio: 47 maxItems: 1 48 description: | 49 GPIO attached to the chip's enable pin 50 51 pwr-sel: 52 $ref: /schemas/types.yaml#definitions/uint8 53 description: | 54 LP8501 specific property. Power selection for output channels. 55 enum: 56 - 0 # D1~9 are connected to VDD 57 - 1 # D1~6 with VDD, D7~9 with VOUT 58 - 2 # D1~6 with VOUT, D7~9 with VDD 59 - 3 # D1~9 are connected to VOUT 60 61 '#address-cells': 62 const: 1 63 64 '#size-cells': 65 const: 0 66 67patternProperties: 68 "(^led@[0-9a-f]$|led)": 69 type: object 70 $ref: common.yaml# 71 properties: 72 led-cur: 73 $ref: /schemas/types.yaml#definitions/uint8 74 description: | 75 Current setting at each LED channel (mA x10, 0 if LED is not connected) 76 minimum: 0 77 maximum: 255 78 79 max-cur: 80 $ref: /schemas/types.yaml#definitions/uint8 81 description: Maximun current at each LED channel. 82 83 reg: 84 description: | 85 Output channel for the LED. This is zero based channel identifier and 86 the data sheet is a one based channel identifier. 87 reg value to output to LED output number 88 enum: 89 - 0 # LED output D1 90 - 1 # LED output D2 91 - 2 # LED output D3 92 - 3 # LED output D4 93 - 4 # LED output D5 94 - 5 # LED output D6 95 - 6 # LED output D7 96 - 7 # LED output D8 97 - 8 # LED output D9 98 99 chan-name: 100 $ref: /schemas/types.yaml#definitions/string 101 description: name of channel 102 103required: 104 - compatible 105 - reg 106 107additionalProperties: false 108 109examples: 110 - | 111 #include <dt-bindings/leds/common.h> 112 113 i2c { 114 #address-cells = <1>; 115 #size-cells = <0>; 116 117 led-controller@32 { 118 #address-cells = <1>; 119 #size-cells = <0>; 120 compatible = "ti,lp8501"; 121 reg = <0x32>; 122 clock-mode = /bits/ 8 <2>; 123 pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ 124 125 led@0 { 126 reg = <0>; 127 chan-name = "d1"; 128 led-cur = /bits/ 8 <0x14>; 129 max-cur = /bits/ 8 <0x20>; 130 }; 131 132 led@1 { 133 reg = <1>; 134 chan-name = "d2"; 135 led-cur = /bits/ 8 <0x14>; 136 max-cur = /bits/ 8 <0x20>; 137 }; 138 139 led@2 { 140 reg = <2>; 141 chan-name = "d3"; 142 led-cur = /bits/ 8 <0x14>; 143 max-cur = /bits/ 8 <0x20>; 144 }; 145 146 led@3 { 147 reg = <3>; 148 chan-name = "d4"; 149 led-cur = /bits/ 8 <0x14>; 150 max-cur = /bits/ 8 <0x20>; 151 }; 152 153 led@4 { 154 reg = <4>; 155 chan-name = "d5"; 156 led-cur = /bits/ 8 <0x14>; 157 max-cur = /bits/ 8 <0x20>; 158 }; 159 160 led@5 { 161 reg = <5>; 162 chan-name = "d6"; 163 led-cur = /bits/ 8 <0x14>; 164 max-cur = /bits/ 8 <0x20>; 165 }; 166 167 led@6 { 168 reg = <6>; 169 chan-name = "d7"; 170 led-cur = /bits/ 8 <0x14>; 171 max-cur = /bits/ 8 <0x20>; 172 }; 173 174 led@7 { 175 reg = <7>; 176 chan-name = "d8"; 177 led-cur = /bits/ 8 <0x14>; 178 max-cur = /bits/ 8 <0x20>; 179 }; 180 181 led@8 { 182 reg = <8>; 183 chan-name = "d9"; 184 led-cur = /bits/ 8 <0x14>; 185 max-cur = /bits/ 8 <0x20>; 186 }; 187 }; 188 189 led-controller@33 { 190 #address-cells = <1>; 191 #size-cells = <0>; 192 compatible = "national,lp5523"; 193 reg = <0x33>; 194 clock-mode = /bits/ 8 <0>; 195 196 multi-led@2 { 197 #address-cells = <1>; 198 #size-cells = <0>; 199 reg = <0x2>; 200 color = <LED_COLOR_ID_RGB>; 201 function = LED_FUNCTION_STANDBY; 202 linux,default-trigger = "heartbeat"; 203 204 led@0 { 205 led-cur = /bits/ 8 <50>; 206 max-cur = /bits/ 8 <100>; 207 reg = <0x0>; 208 color = <LED_COLOR_ID_GREEN>; 209 }; 210 211 led@1 { 212 led-cur = /bits/ 8 <50>; 213 max-cur = /bits/ 8 <100>; 214 reg = <0x1>; 215 color = <LED_COLOR_ID_BLUE>; 216 }; 217 218 led@6 { 219 led-cur = /bits/ 8 <50>; 220 max-cur = /bits/ 8 <100>; 221 reg = <0x6>; 222 color = <LED_COLOR_ID_RED>; 223 }; 224 }; 225 }; 226 }; 227 228... 229