xref: /openbmc/linux/Documentation/devicetree/bindings/leds/leds-mt6360.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1e05cab34SGene Chen# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e05cab34SGene Chen%YAML 1.2
3e05cab34SGene Chen---
4e05cab34SGene Chen$id: http://devicetree.org/schemas/leds/leds-mt6360.yaml#
5e05cab34SGene Chen$schema: http://devicetree.org/meta-schemas/core.yaml#
6e05cab34SGene Chen
7e05cab34SGene Chentitle: LED driver for MT6360 PMIC from MediaTek Integrated.
8e05cab34SGene Chen
9e05cab34SGene Chenmaintainers:
10e05cab34SGene Chen  - Gene Chen <gene_chen@richtek.com>
11e05cab34SGene Chen
12e05cab34SGene Chendescription: |
13e05cab34SGene Chen  This module is part of the MT6360 MFD device.
14e53da8c4SGene Chen  see Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml
15e05cab34SGene Chen  Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,
16e05cab34SGene Chen  and 4-channel RGB LED support Register/Flash/Breath Mode
17e05cab34SGene Chen
18e05cab34SGene Chenproperties:
19e05cab34SGene Chen  compatible:
20e05cab34SGene Chen    const: mediatek,mt6360-led
21e05cab34SGene Chen
22e05cab34SGene Chen  "#address-cells":
23e05cab34SGene Chen    const: 1
24e05cab34SGene Chen
25e05cab34SGene Chen  "#size-cells":
26e05cab34SGene Chen    const: 0
27e05cab34SGene Chen
28e05cab34SGene ChenpatternProperties:
29*960c2de7SKrzysztof Kozlowski  "^multi-led@[0-5]$":
30e05cab34SGene Chen    type: object
31*960c2de7SKrzysztof Kozlowski    $ref: leds-class-multicolor.yaml#
32*960c2de7SKrzysztof Kozlowski    unevaluatedProperties: false
33e05cab34SGene Chen
34e05cab34SGene Chen    properties:
35e05cab34SGene Chen      reg:
36e05cab34SGene Chen        description: Index of the LED.
37e05cab34SGene Chen        enum:
38e05cab34SGene Chen          - 0 # LED output ISINK1
39e05cab34SGene Chen          - 1 # LED output ISINK2
40e05cab34SGene Chen          - 2 # LED output ISINK3
41e05cab34SGene Chen          - 3 # LED output ISINKML
42e05cab34SGene Chen          - 4 # LED output FLASH1
43e05cab34SGene Chen          - 5 # LED output FLASH2
44e05cab34SGene Chen
45*960c2de7SKrzysztof Kozlowski      "#address-cells":
46*960c2de7SKrzysztof Kozlowski        const: 1
47*960c2de7SKrzysztof Kozlowski
48*960c2de7SKrzysztof Kozlowski      "#size-cells":
49*960c2de7SKrzysztof Kozlowski        const: 0
50*960c2de7SKrzysztof Kozlowski
51*960c2de7SKrzysztof Kozlowski    patternProperties:
52*960c2de7SKrzysztof Kozlowski      "^led@[0-2]$":
53*960c2de7SKrzysztof Kozlowski        type: object
54*960c2de7SKrzysztof Kozlowski        $ref: common.yaml#
55*960c2de7SKrzysztof Kozlowski        unevaluatedProperties: false
56*960c2de7SKrzysztof Kozlowski
57*960c2de7SKrzysztof Kozlowski        properties:
58*960c2de7SKrzysztof Kozlowski          reg:
59*960c2de7SKrzysztof Kozlowski            enum: [0, 1, 2]
60*960c2de7SKrzysztof Kozlowski
61*960c2de7SKrzysztof Kozlowski        required:
62*960c2de7SKrzysztof Kozlowski          - reg
63*960c2de7SKrzysztof Kozlowski          - color
64*960c2de7SKrzysztof Kozlowski
65*960c2de7SKrzysztof Kozlowski    required:
66*960c2de7SKrzysztof Kozlowski      - reg
67*960c2de7SKrzysztof Kozlowski      - "#address-cells"
68*960c2de7SKrzysztof Kozlowski      - "#size-cells"
69*960c2de7SKrzysztof Kozlowski
70*960c2de7SKrzysztof Kozlowski  "^led@[0-5]$":
71*960c2de7SKrzysztof Kozlowski    type: object
72*960c2de7SKrzysztof Kozlowski    $ref: common.yaml#
73*960c2de7SKrzysztof Kozlowski    unevaluatedProperties: false
74*960c2de7SKrzysztof Kozlowski    description:
75*960c2de7SKrzysztof Kozlowski      Properties for a single LED.
76*960c2de7SKrzysztof Kozlowski
77*960c2de7SKrzysztof Kozlowski    properties:
78*960c2de7SKrzysztof Kozlowski      reg:
79*960c2de7SKrzysztof Kozlowski        enum: [0, 1, 2, 3, 4, 5]
80*960c2de7SKrzysztof Kozlowski
81e05cab34SGene Chenrequired:
82e05cab34SGene Chen  - compatible
83e05cab34SGene Chen  - "#address-cells"
84e05cab34SGene Chen  - "#size-cells"
85e05cab34SGene Chen
86e05cab34SGene ChenadditionalProperties: false
87e05cab34SGene Chen
88e05cab34SGene Chenexamples:
89e05cab34SGene Chen  - |
90e05cab34SGene Chen   #include <dt-bindings/leds/common.h>
91e05cab34SGene Chen   led-controller {
92e05cab34SGene Chen     compatible = "mediatek,mt6360-led";
93e05cab34SGene Chen     #address-cells = <1>;
94e05cab34SGene Chen     #size-cells = <0>;
95e05cab34SGene Chen
96e05cab34SGene Chen     multi-led@0 {
97e05cab34SGene Chen       reg = <0>;
98e05cab34SGene Chen       function = LED_FUNCTION_INDICATOR;
99e05cab34SGene Chen       color = <LED_COLOR_ID_RGB>;
100e05cab34SGene Chen       led-max-microamp = <24000>;
101e05cab34SGene Chen       #address-cells = <1>;
102e05cab34SGene Chen       #size-cells = <0>;
103e05cab34SGene Chen       led@0 {
104e05cab34SGene Chen         reg = <0>;
105e05cab34SGene Chen         color = <LED_COLOR_ID_RED>;
106e05cab34SGene Chen       };
107e05cab34SGene Chen       led@1 {
108e05cab34SGene Chen         reg = <1>;
109e05cab34SGene Chen         color = <LED_COLOR_ID_GREEN>;
110e05cab34SGene Chen       };
111e05cab34SGene Chen       led@2 {
112e05cab34SGene Chen         reg = <2>;
113e05cab34SGene Chen         color = <LED_COLOR_ID_BLUE>;
114e05cab34SGene Chen       };
115e05cab34SGene Chen     };
116e05cab34SGene Chen     led@3 {
117e05cab34SGene Chen       reg = <3>;
118e05cab34SGene Chen       function = LED_FUNCTION_INDICATOR;
119e05cab34SGene Chen       color = <LED_COLOR_ID_WHITE>;
120e05cab34SGene Chen       led-max-microamp = <150000>;
121e05cab34SGene Chen     };
122e05cab34SGene Chen     led@4 {
123e05cab34SGene Chen       reg = <4>;
124e05cab34SGene Chen       function = LED_FUNCTION_FLASH;
125e05cab34SGene Chen       color = <LED_COLOR_ID_WHITE>;
126e05cab34SGene Chen       function-enumerator = <1>;
127e05cab34SGene Chen       led-max-microamp = <200000>;
128e05cab34SGene Chen       flash-max-microamp = <500000>;
129e05cab34SGene Chen       flash-max-timeout-us = <1024000>;
130e05cab34SGene Chen     };
131e05cab34SGene Chen     led@5 {
132e05cab34SGene Chen       reg = <5>;
133e05cab34SGene Chen       function = LED_FUNCTION_FLASH;
134e05cab34SGene Chen       color = <LED_COLOR_ID_WHITE>;
135e05cab34SGene Chen       function-enumerator = <2>;
136e05cab34SGene Chen       led-max-microamp = <200000>;
137e05cab34SGene Chen       flash-max-microamp = <500000>;
138e05cab34SGene Chen       flash-max-timeout-us = <1024000>;
139e05cab34SGene Chen     };
140e05cab34SGene Chen   };
141e05cab34SGene Chen
142e05cab34SGene Chen  - |
143e05cab34SGene Chen
144e05cab34SGene Chen   led-controller {
145e05cab34SGene Chen     compatible = "mediatek,mt6360-led";
146e05cab34SGene Chen     #address-cells = <1>;
147e05cab34SGene Chen     #size-cells = <0>;
148e05cab34SGene Chen
149e05cab34SGene Chen     led@0 {
150e05cab34SGene Chen       reg = <0>;
151e05cab34SGene Chen       function = LED_FUNCTION_INDICATOR;
152e05cab34SGene Chen       color = <LED_COLOR_ID_RED>;
153e05cab34SGene Chen       led-max-microamp = <24000>;
154e05cab34SGene Chen     };
155e05cab34SGene Chen     led@1 {
156e05cab34SGene Chen       reg = <1>;
157e05cab34SGene Chen       function = LED_FUNCTION_INDICATOR;
158e05cab34SGene Chen       color = <LED_COLOR_ID_GREEN>;
159e05cab34SGene Chen       led-max-microamp = <24000>;
160e05cab34SGene Chen     };
161e05cab34SGene Chen     led@2 {
162e05cab34SGene Chen       reg = <2>;
163e05cab34SGene Chen       function = LED_FUNCTION_INDICATOR;
164e05cab34SGene Chen       color = <LED_COLOR_ID_BLUE>;
165e05cab34SGene Chen       led-max-microamp = <24000>;
166e05cab34SGene Chen     };
167e05cab34SGene Chen     led@3 {
168e05cab34SGene Chen       reg = <3>;
1698018708dSChiYuan Huang       function = LED_FUNCTION_INDICATOR;
170e05cab34SGene Chen       color = <LED_COLOR_ID_WHITE>;
171e05cab34SGene Chen       led-max-microamp = <150000>;
172e05cab34SGene Chen     };
173e05cab34SGene Chen     led@4 {
174e05cab34SGene Chen       reg = <4>;
175e05cab34SGene Chen       function = LED_FUNCTION_FLASH;
176e05cab34SGene Chen       color = <LED_COLOR_ID_WHITE>;
177e05cab34SGene Chen       function-enumerator = <1>;
178e05cab34SGene Chen       led-max-microamp = <200000>;
179e05cab34SGene Chen       flash-max-microamp = <500000>;
180e05cab34SGene Chen       flash-max-timeout-us = <1024000>;
181e05cab34SGene Chen     };
182e05cab34SGene Chen     led@5 {
183e05cab34SGene Chen       reg = <5>;
184e05cab34SGene Chen       function = LED_FUNCTION_FLASH;
185e05cab34SGene Chen       color = <LED_COLOR_ID_WHITE>;
186e05cab34SGene Chen       function-enumerator = <2>;
187e05cab34SGene Chen       led-max-microamp = <200000>;
188e05cab34SGene Chen       flash-max-microamp = <500000>;
189e05cab34SGene Chen       flash-max-timeout-us = <1024000>;
190e05cab34SGene Chen     };
191e05cab34SGene Chen   };
192e05cab34SGene Chen...
193