193 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/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.yaml15 Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,16 and 4-channel RGB LED support Register/Flash/Breath Mode17 18properties:19 compatible:20 const: mediatek,mt6360-led21 22 "#address-cells":23 const: 124 25 "#size-cells":26 const: 027 28patternProperties:29 "^multi-led@[0-5]$":30 type: object31 $ref: leds-class-multicolor.yaml#32 unevaluatedProperties: false33 34 properties:35 reg:36 description: Index of the LED.37 enum:38 - 0 # LED output ISINK139 - 1 # LED output ISINK240 - 2 # LED output ISINK341 - 3 # LED output ISINKML42 - 4 # LED output FLASH143 - 5 # LED output FLASH244 45 "#address-cells":46 const: 147 48 "#size-cells":49 const: 050 51 patternProperties:52 "^led@[0-2]$":53 type: object54 $ref: common.yaml#55 unevaluatedProperties: false56 57 properties:58 reg:59 enum: [0, 1, 2]60 61 required:62 - reg63 - color64 65 required:66 - reg67 - "#address-cells"68 - "#size-cells"69 70 "^led@[0-5]$":71 type: object72 $ref: common.yaml#73 unevaluatedProperties: false74 description:75 Properties for a single LED.76 77 properties:78 reg:79 enum: [0, 1, 2, 3, 4, 5]80 81required:82 - compatible83 - "#address-cells"84 - "#size-cells"85 86additionalProperties: false87 88examples:89 - |90 #include <dt-bindings/leds/common.h>91 led-controller {92 compatible = "mediatek,mt6360-led";93 #address-cells = <1>;94 #size-cells = <0>;95 96 multi-led@0 {97 reg = <0>;98 function = LED_FUNCTION_INDICATOR;99 color = <LED_COLOR_ID_RGB>;100 led-max-microamp = <24000>;101 #address-cells = <1>;102 #size-cells = <0>;103 led@0 {104 reg = <0>;105 color = <LED_COLOR_ID_RED>;106 };107 led@1 {108 reg = <1>;109 color = <LED_COLOR_ID_GREEN>;110 };111 led@2 {112 reg = <2>;113 color = <LED_COLOR_ID_BLUE>;114 };115 };116 led@3 {117 reg = <3>;118 function = LED_FUNCTION_INDICATOR;119 color = <LED_COLOR_ID_WHITE>;120 led-max-microamp = <150000>;121 };122 led@4 {123 reg = <4>;124 function = LED_FUNCTION_FLASH;125 color = <LED_COLOR_ID_WHITE>;126 function-enumerator = <1>;127 led-max-microamp = <200000>;128 flash-max-microamp = <500000>;129 flash-max-timeout-us = <1024000>;130 };131 led@5 {132 reg = <5>;133 function = LED_FUNCTION_FLASH;134 color = <LED_COLOR_ID_WHITE>;135 function-enumerator = <2>;136 led-max-microamp = <200000>;137 flash-max-microamp = <500000>;138 flash-max-timeout-us = <1024000>;139 };140 };141 142 - |143 144 led-controller {145 compatible = "mediatek,mt6360-led";146 #address-cells = <1>;147 #size-cells = <0>;148 149 led@0 {150 reg = <0>;151 function = LED_FUNCTION_INDICATOR;152 color = <LED_COLOR_ID_RED>;153 led-max-microamp = <24000>;154 };155 led@1 {156 reg = <1>;157 function = LED_FUNCTION_INDICATOR;158 color = <LED_COLOR_ID_GREEN>;159 led-max-microamp = <24000>;160 };161 led@2 {162 reg = <2>;163 function = LED_FUNCTION_INDICATOR;164 color = <LED_COLOR_ID_BLUE>;165 led-max-microamp = <24000>;166 };167 led@3 {168 reg = <3>;169 function = LED_FUNCTION_INDICATOR;170 color = <LED_COLOR_ID_WHITE>;171 led-max-microamp = <150000>;172 };173 led@4 {174 reg = <4>;175 function = LED_FUNCTION_FLASH;176 color = <LED_COLOR_ID_WHITE>;177 function-enumerator = <1>;178 led-max-microamp = <200000>;179 flash-max-microamp = <500000>;180 flash-max-timeout-us = <1024000>;181 };182 led@5 {183 reg = <5>;184 function = LED_FUNCTION_FLASH;185 color = <LED_COLOR_ID_WHITE>;186 function-enumerator = <2>;187 led-max-microamp = <200000>;188 flash-max-microamp = <500000>;189 flash-max-timeout-us = <1024000>;190 };191 };192...193