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-mt6360.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: LED driver for MT6360 PMIC from MediaTek Integrated.
8
9maintainers:
10  - Gene Chen <gene_chen@richtek.com>
11
12description: |
13  This module is part of the MT6360 MFD device.
14  see Documentation/devicetree/bindings/mfd/mt6360.yaml
15  Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,
16  and 4-channel RGB LED support Register/Flash/Breath Mode
17
18properties:
19  compatible:
20    const: mediatek,mt6360-led
21
22  "#address-cells":
23    const: 1
24
25  "#size-cells":
26    const: 0
27
28patternProperties:
29  "^(multi-)?led@[0-5]$":
30    type: object
31    $ref: common.yaml#
32    description:
33      Properties for a single LED.
34
35    properties:
36      reg:
37        description: Index of the LED.
38        enum:
39          - 0 # LED output ISINK1
40          - 1 # LED output ISINK2
41          - 2 # LED output ISINK3
42          - 3 # LED output ISINKML
43          - 4 # LED output FLASH1
44          - 5 # LED output FLASH2
45
46unevaluatedProperties: false
47
48required:
49  - compatible
50  - "#address-cells"
51  - "#size-cells"
52
53additionalProperties: false
54
55examples:
56  - |
57   #include <dt-bindings/leds/common.h>
58   led-controller {
59     compatible = "mediatek,mt6360-led";
60     #address-cells = <1>;
61     #size-cells = <0>;
62
63     multi-led@0 {
64       reg = <0>;
65       function = LED_FUNCTION_INDICATOR;
66       color = <LED_COLOR_ID_RGB>;
67       led-max-microamp = <24000>;
68       #address-cells = <1>;
69       #size-cells = <0>;
70       led@0 {
71         reg = <0>;
72         color = <LED_COLOR_ID_RED>;
73       };
74       led@1 {
75         reg = <1>;
76         color = <LED_COLOR_ID_GREEN>;
77       };
78       led@2 {
79         reg = <2>;
80         color = <LED_COLOR_ID_BLUE>;
81       };
82     };
83     led@3 {
84       reg = <3>;
85       function = LED_FUNCTION_INDICATOR;
86       color = <LED_COLOR_ID_WHITE>;
87       led-max-microamp = <150000>;
88     };
89     led@4 {
90       reg = <4>;
91       function = LED_FUNCTION_FLASH;
92       color = <LED_COLOR_ID_WHITE>;
93       function-enumerator = <1>;
94       led-max-microamp = <200000>;
95       flash-max-microamp = <500000>;
96       flash-max-timeout-us = <1024000>;
97     };
98     led@5 {
99       reg = <5>;
100       function = LED_FUNCTION_FLASH;
101       color = <LED_COLOR_ID_WHITE>;
102       function-enumerator = <2>;
103       led-max-microamp = <200000>;
104       flash-max-microamp = <500000>;
105       flash-max-timeout-us = <1024000>;
106     };
107   };
108
109  - |
110
111   led-controller {
112     compatible = "mediatek,mt6360-led";
113     #address-cells = <1>;
114     #size-cells = <0>;
115
116     led@0 {
117       reg = <0>;
118       function = LED_FUNCTION_INDICATOR;
119       color = <LED_COLOR_ID_RED>;
120       led-max-microamp = <24000>;
121     };
122     led@1 {
123       reg = <1>;
124       function = LED_FUNCTION_INDICATOR;
125       color = <LED_COLOR_ID_GREEN>;
126       led-max-microamp = <24000>;
127     };
128     led@2 {
129       reg = <2>;
130       function = LED_FUNCTION_INDICATOR;
131       color = <LED_COLOR_ID_BLUE>;
132       led-max-microamp = <24000>;
133     };
134     led@3 {
135       reg = <3>;
136       function = LED_FUNCTION_INDICATOR;
137       color = <LED_COLOR_ID_WHITE>;
138       led-max-microamp = <150000>;
139     };
140     led@4 {
141       reg = <4>;
142       function = LED_FUNCTION_FLASH;
143       color = <LED_COLOR_ID_WHITE>;
144       function-enumerator = <1>;
145       led-max-microamp = <200000>;
146       flash-max-microamp = <500000>;
147       flash-max-timeout-us = <1024000>;
148     };
149     led@5 {
150       reg = <5>;
151       function = LED_FUNCTION_FLASH;
152       color = <LED_COLOR_ID_WHITE>;
153       function-enumerator = <2>;
154       led-max-microamp = <200000>;
155       flash-max-microamp = <500000>;
156       flash-max-timeout-us = <1024000>;
157     };
158   };
159...
160