blob: feb5febaf361aef71a2b419d0fe50adc21c67c62 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/awinic,aw200xx.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: AWINIC AW200XX LED
8
9maintainers:
10 - Martin Kurbanov <mmkurbanov@sberdevices.ru>
11
12description: |
13 This controller is present on AW20036/AW20054/AW20072.
14 It is a 3x12/6x9/6x12 matrix LED programmed via
15 an I2C interface, up to 36/54/72 LEDs or 12/18/24 RGBs,
16 3 pattern controllers for auto breathing or group dimming control.
17
18 For more product information please see the link below:
19 aw20036 - https://www.awinic.com/en/productDetail/AW20036QNR#tech-docs
20 aw20054 - https://www.awinic.com/en/productDetail/AW20054QNR#tech-docs
21 aw20072 - https://www.awinic.com/en/productDetail/AW20072QNR#tech-docs
22
23properties:
24 compatible:
25 enum:
26 - awinic,aw20036
27 - awinic,aw20054
28 - awinic,aw20072
29
30 reg:
31 maxItems: 1
32
33 "#address-cells":
34 const: 1
35
36 "#size-cells":
37 const: 0
38
39 awinic,display-rows:
40 $ref: /schemas/types.yaml#/definitions/uint32
41 description:
42 Leds matrix size
43
44patternProperties:
45 "^led@[0-9a-f]$":
46 type: object
47 $ref: common.yaml#
48 unevaluatedProperties: false
49
50 properties:
51 reg:
52 description:
53 LED number
54 maxItems: 1
55
56 led-max-microamp:
57 default: 9780
58 description: |
59 Note that a driver will take the minimum of all LED limits
60 since the chip has a single global setting.
61 The maximum output current of each LED is calculated by the
62 following formula:
63 IMAXled = 160000 * (592 / 600.5) * (1 / display-rows)
64 And the minimum output current formula:
65 IMINled = 3300 * (592 / 600.5) * (1 / display-rows)
66
67required:
68 - compatible
69 - reg
70 - "#address-cells"
71 - "#size-cells"
72 - awinic,display-rows
73
74allOf:
75 - if:
76 properties:
77 compatible:
78 contains:
79 const: awinic,aw20036
80 then:
81 properties:
82 awinic,display-rows:
83 enum: [1, 2, 3]
84 else:
85 properties:
86 awinic,display-rows:
87 enum: [1, 2, 3, 4, 5, 6, 7]
88
89additionalProperties: false
90
91examples:
92 - |
93 #include <dt-bindings/leds/common.h>
94
95 i2c {
96 #address-cells = <1>;
97 #size-cells = <0>;
98
99 led-controller@3a {
100 compatible = "awinic,aw20036";
101 reg = <0x3a>;
102 #address-cells = <1>;
103 #size-cells = <0>;
104 awinic,display-rows = <3>;
105
106 led@0 {
107 reg = <0x0>;
108 color = <LED_COLOR_ID_RED>;
109 led-max-microamp = <9780>;
110 };
111
112 led@1 {
113 reg = <0x1>;
114 color = <LED_COLOR_ID_GREEN>;
115 led-max-microamp = <9780>;
116 };
117
118 led@2 {
119 reg = <0x2>;
120 color = <LED_COLOR_ID_BLUE>;
121 led-max-microamp = <9780>;
122 };
123 };
124 };
125
126...