1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Flash LED device inside Qualcomm Technologies, Inc. PMICs 8 9maintainers: 10 - Fenglin Wu <[email protected]> 11 12description: | 13 Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs. 14 The flash LED module can have different number of LED channels supported 15 e.g. 3 or 4. There are some different registers between them but they can 16 both support maximum current up to 1.5 A per channel and they can also support 17 ganging 2 channels together to supply maximum current up to 2 A. The current 18 will be split symmetrically on each channel and they will be enabled and 19 disabled at the same time. 20 21properties: 22 compatible: 23 items: 24 - enum: 25 - qcom,pm6150l-flash-led 26 - qcom,pm660l-flash-led 27 - qcom,pm8150c-flash-led 28 - qcom,pm8150l-flash-led 29 - qcom,pm8350c-flash-led 30 - qcom,pm8550-flash-led 31 - qcom,pmi8998-flash-led 32 - const: qcom,spmi-flash-led 33 34 reg: 35 maxItems: 1 36 37patternProperties: 38 "^led-[0-3]$": 39 type: object 40 $ref: common.yaml# 41 unevaluatedProperties: false 42 description: 43 Represents the physical LED components which are connected to the 44 flash LED channels' output. 45 46 properties: 47 led-sources: 48 description: 49 The HW indices of the flash LED channels that connect to the 50 physical LED 51 allOf: 52 - minItems: 1 53 maxItems: 2 54 items: 55 enum: [1, 2, 3, 4] 56 57 led-max-microamp: 58 anyOf: 59 - minimum: 5000 60 maximum: 500000 61 multipleOf: 5000 62 - minimum: 10000 63 maximum: 1000000 64 multipleOf: 10000 65 66 flash-max-microamp: 67 anyOf: 68 - minimum: 12500 69 maximum: 1500000 70 multipleOf: 12500 71 - minimum: 25000 72 maximum: 2000000 73 multipleOf: 25000 74 75 flash-max-timeout-us: 76 minimum: 10000 77 maximum: 1280000 78 multipleOf: 10000 79 80 required: 81 - led-sources 82 - led-max-microamp 83 84required: 85 - compatible 86 - reg 87 88additionalProperties: false 89 90examples: 91 - | 92 #include <dt-bindings/leds/common.h> 93 94 pmic { 95 #address-cells = <1>; 96 #size-cells = <0>; 97 98 led-controller@ee00 { 99 compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led"; 100 reg = <0xee00>; 101 102 led-0 { 103 function = LED_FUNCTION_FLASH; 104 color = <LED_COLOR_ID_WHITE>; 105 led-sources = <1>, <4>; 106 led-max-microamp = <300000>; 107 flash-max-microamp = <2000000>; 108 flash-max-timeout-us = <1280000>; 109 function-enumerator = <0>; 110 }; 111 112 led-1 { 113 function = LED_FUNCTION_FLASH; 114 color = <LED_COLOR_ID_YELLOW>; 115 led-sources = <2>, <3>; 116 led-max-microamp = <300000>; 117 flash-max-microamp = <2000000>; 118 flash-max-timeout-us = <1280000>; 119 function-enumerator = <1>; 120 }; 121 }; 122 }; 123