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/mediatek,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
46required:
47  - compatible
48  - "#address-cells"
49  - "#size-cells"
50
51additionalProperties: false
52
53examples:
54  - |
55   #include <dt-bindings/leds/common.h>
56   led-controller {
57     compatible = "mediatek,mt6360-led";
58     #address-cells = <1>;
59     #size-cells = <0>;
60
61     multi-led@0 {
62       reg = <0>;
63       function = LED_FUNCTION_INDICATOR;
64       color = <LED_COLOR_ID_RGB>;
65       led-max-microamp = <24000>;
66       #address-cells = <1>;
67       #size-cells = <0>;
68       led@0 {
69         reg = <0>;
70         color = <LED_COLOR_ID_RED>;
71       };
72       led@1 {
73         reg = <1>;
74         color = <LED_COLOR_ID_GREEN>;
75       };
76       led@2 {
77         reg = <2>;
78         color = <LED_COLOR_ID_BLUE>;
79       };
80     };
81     led@3 {
82       reg = <3>;
83       function = LED_FUNCTION_INDICATOR;
84       color = <LED_COLOR_ID_WHITE>;
85       led-max-microamp = <150000>;
86     };
87     led@4 {
88       reg = <4>;
89       function = LED_FUNCTION_FLASH;
90       color = <LED_COLOR_ID_WHITE>;
91       function-enumerator = <1>;
92       led-max-microamp = <200000>;
93       flash-max-microamp = <500000>;
94       flash-max-timeout-us = <1024000>;
95     };
96     led@5 {
97       reg = <5>;
98       function = LED_FUNCTION_FLASH;
99       color = <LED_COLOR_ID_WHITE>;
100       function-enumerator = <2>;
101       led-max-microamp = <200000>;
102       flash-max-microamp = <500000>;
103       flash-max-timeout-us = <1024000>;
104     };
105   };
106
107  - |
108
109   led-controller {
110     compatible = "mediatek,mt6360-led";
111     #address-cells = <1>;
112     #size-cells = <0>;
113
114     led@0 {
115       reg = <0>;
116       function = LED_FUNCTION_INDICATOR;
117       color = <LED_COLOR_ID_RED>;
118       led-max-microamp = <24000>;
119     };
120     led@1 {
121       reg = <1>;
122       function = LED_FUNCTION_INDICATOR;
123       color = <LED_COLOR_ID_GREEN>;
124       led-max-microamp = <24000>;
125     };
126     led@2 {
127       reg = <2>;
128       function = LED_FUNCTION_INDICATOR;
129       color = <LED_COLOR_ID_BLUE>;
130       led-max-microamp = <24000>;
131     };
132     led@3 {
133       reg = <3>;
134       function = LED_FUNCTION_INDICATOR;
135       color = <LED_COLOR_ID_WHITE>;
136       led-max-microamp = <150000>;
137     };
138     led@4 {
139       reg = <4>;
140       function = LED_FUNCTION_FLASH;
141       color = <LED_COLOR_ID_WHITE>;
142       function-enumerator = <1>;
143       led-max-microamp = <200000>;
144       flash-max-microamp = <500000>;
145       flash-max-timeout-us = <1024000>;
146     };
147     led@5 {
148       reg = <5>;
149       function = LED_FUNCTION_FLASH;
150       color = <LED_COLOR_ID_WHITE>;
151       function-enumerator = <2>;
152       led-max-microamp = <200000>;
153       flash-max-microamp = <500000>;
154       flash-max-timeout-us = <1024000>;
155     };
156   };
157...
158