174 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/awinic,aw200xx.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: AWINIC AW200XX LED8 9maintainers:10 - Martin Kurbanov <mmkurbanov@sberdevices.ru>11 12description: |13 It is a matrix LED driver programmed via an I2C interface. Devices have14 a set of individually controlled leds and support 3 pattern controllers15 for auto breathing or group dimming control. Supported devices:16 - AW20036 (3x12) 36 LEDs17 - AW20054 (6x9) 54 LEDs18 - AW20072 (6x12) 72 LEDs19 - AW20108 (9x12) 108 LEDs20 21 For more product information please see the link below:22 aw20036 - https://www.awinic.com/en/productDetail/AW20036QNR#tech-docs23 aw20054 - https://www.awinic.com/en/productDetail/AW20054QNR#tech-docs24 aw20072 - https://www.awinic.com/en/productDetail/AW20072QNR#tech-docs25 aw20108 - https://www.awinic.com/en/productDetail/AW20108QNR#tech-docs26 27properties:28 compatible:29 enum:30 - awinic,aw2003631 - awinic,aw2005432 - awinic,aw2007233 - awinic,aw2010834 35 reg:36 maxItems: 137 38 "#address-cells":39 const: 140 41 "#size-cells":42 const: 043 44 enable-gpios:45 maxItems: 146 47patternProperties:48 "^led@[0-9a-f]+$":49 type: object50 $ref: common.yaml#51 unevaluatedProperties: false52 53 properties:54 reg:55 description:56 LED number57 maxItems: 158 59 led-max-microamp:60 default: 978061 description: |62 Note that a driver will take the minimum of all LED limits63 since the chip has a single global setting.64 The maximum output current of each LED is calculated by the65 following formula:66 IMAXled = 160000 * (592 / 600.5) * (1 / max-current-switch-number)67 And the minimum output current formula:68 IMINled = 3300 * (592 / 600.5) * (1 / max-current-switch-number)69 where max-current-switch-number is determined by led configuration70 and depends on how leds are physically connected to the led driver.71 72allOf:73 - if:74 properties:75 compatible:76 contains:77 const: awinic,aw2003678 then:79 patternProperties:80 "^led@[0-9a-f]+$":81 properties:82 reg:83 items:84 minimum: 085 maximum: 3686 87 - if:88 properties:89 compatible:90 contains:91 const: awinic,aw2005492 then:93 patternProperties:94 "^led@[0-9a-f]+$":95 properties:96 reg:97 items:98 minimum: 099 maximum: 54100 101 - if:102 properties:103 compatible:104 contains:105 const: awinic,aw20072106 then:107 patternProperties:108 "^led@[0-9a-f]+$":109 properties:110 reg:111 items:112 minimum: 0113 maximum: 72114 115 - if:116 properties:117 compatible:118 contains:119 const: awinic,aw20108120 then:121 patternProperties:122 "^led@[0-9a-f]+$":123 properties:124 reg:125 items:126 minimum: 0127 maximum: 108128 129required:130 - compatible131 - reg132 - "#address-cells"133 - "#size-cells"134 135additionalProperties: false136 137examples:138 - |139 #include <dt-bindings/gpio/gpio.h>140 #include <dt-bindings/leds/common.h>141 142 i2c {143 #address-cells = <1>;144 #size-cells = <0>;145 146 led-controller@3a {147 compatible = "awinic,aw20036";148 reg = <0x3a>;149 #address-cells = <1>;150 #size-cells = <0>;151 enable-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;152 153 led@0 {154 reg = <0x0>;155 color = <LED_COLOR_ID_RED>;156 led-max-microamp = <9780>;157 };158 159 led@1 {160 reg = <0x1>;161 color = <LED_COLOR_ID_GREEN>;162 led-max-microamp = <9780>;163 };164 165 led@2 {166 reg = <0x2>;167 color = <LED_COLOR_ID_BLUE>;168 led-max-microamp = <9780>;169 };170 };171 };172 173...174