293 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 Drivers8 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 channel15 LED Drivers.16 17 For more product information please see the link below:18 https://www.ti.com/lit/gpn/lp552119 https://www.ti.com/lit/gpn/lp552320 https://www.ti.com/lit/gpn/lp5523121 https://www.ti.com/lit/gpn/lp556222 https://www.ti.com/lit/gpn/lp850123 24properties:25 compatible:26 enum:27 - national,lp552128 - national,lp552329 - ti,lp5523130 - ti,lp556231 - ti,lp556932 - ti,lp850133 34 reg:35 maxItems: 136 description: I2C slave address37 38 clock-mode:39 $ref: /schemas/types.yaml#/definitions/uint840 description: |41 Input clock mode42 enum:43 - 0 # automode44 - 1 # internal45 - 2 # external46 47 enable-gpios:48 maxItems: 149 description: |50 GPIO attached to the chip's enable pin51 52 label: true53 54 pwr-sel:55 $ref: /schemas/types.yaml#/definitions/uint856 description: |57 LP8501 specific property. Power selection for output channels.58 enum:59 - 0 # D1~9 are connected to VDD60 - 1 # D1~6 with VDD, D7~9 with VOUT61 - 2 # D1~6 with VOUT, D7~9 with VDD62 - 3 # D1~9 are connected to VOUT63 64 '#address-cells':65 const: 166 67 '#size-cells':68 const: 069 70 ti,charge-pump-mode:71 description:72 Set the operating mode of the internal charge pump as defined in73 <dt-bindings/leds/leds-lp55xx.h>.74 $ref: /schemas/types.yaml#/definitions/uint3275 default: 3 # auto76 maximum: 377 78patternProperties:79 '^multi-led@[0-8]$':80 type: object81 $ref: leds-class-multicolor.yaml#82 unevaluatedProperties: false83 84 properties:85 reg:86 maximum: 887 88 '#address-cells':89 const: 190 91 '#size-cells':92 const: 093 94 patternProperties:95 "^led@[0-8]$":96 type: object97 $ref: common.yaml#98 unevaluatedProperties: false99 100 properties:101 led-cur:102 $ref: /schemas/types.yaml#/definitions/uint8103 description: |104 Current setting at each LED channel (mA x10, 0 if LED is not connected)105 minimum: 0106 maximum: 255107 108 max-cur:109 $ref: /schemas/types.yaml#/definitions/uint8110 description: Maximum current at each LED channel.111 112 reg:113 maximum: 8114 115 required:116 - reg117 118 "^led@[0-8]$":119 type: object120 $ref: common.yaml#121 unevaluatedProperties: false122 123 properties:124 led-cur:125 $ref: /schemas/types.yaml#/definitions/uint8126 description: |127 Current setting at each LED channel (mA x10, 0 if LED is not connected)128 minimum: 0129 maximum: 255130 131 max-cur:132 $ref: /schemas/types.yaml#/definitions/uint8133 description: Maximum current at each LED channel.134 135 reg:136 description: |137 Output channel for the LED. This is zero based channel identifier and138 the data sheet is a one based channel identifier.139 reg value to output to LED output number140 enum:141 - 0 # LED output D1142 - 1 # LED output D2143 - 2 # LED output D3144 - 3 # LED output D4145 - 4 # LED output D5146 - 5 # LED output D6147 - 6 # LED output D7148 - 7 # LED output D8149 - 8 # LED output D9150 151 chan-name:152 $ref: /schemas/types.yaml#/definitions/string153 description: name of channel154 155if:156 not:157 properties:158 compatible:159 contains:160 const: ti,lp8501161then:162 properties:163 pwr-sel: false164 165required:166 - compatible167 - reg168 169additionalProperties: false170 171examples: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...293