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 <quic_fenglinw@quicinc.com> 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,pm7550-flash-led 28 - qcom,pm8150c-flash-led 29 - qcom,pm8150l-flash-led 30 - qcom,pm8350c-flash-led 31 - qcom,pm8550-flash-led 32 - qcom,pmh0101-flash-led 33 - qcom,pmi8998-flash-led 34 - const: qcom,spmi-flash-led 35 36 reg: 37 maxItems: 1 38 39patternProperties: 40 "^led-[0-3]$": 41 type: object 42 $ref: common.yaml# 43 unevaluatedProperties: false 44 description: 45 Represents the physical LED components which are connected to the 46 flash LED channels' output. 47 48 properties: 49 led-sources: 50 description: 51 The HW indices of the flash LED channels that connect to the 52 physical LED 53 allOf: 54 - minItems: 1 55 maxItems: 2 56 items: 57 enum: [1, 2, 3, 4] 58 59 led-max-microamp: 60 anyOf: 61 - minimum: 5000 62 maximum: 500000 63 multipleOf: 5000 64 - minimum: 10000 65 maximum: 1000000 66 multipleOf: 10000 67 68 flash-max-microamp: 69 anyOf: 70 - minimum: 12500 71 maximum: 1500000 72 multipleOf: 12500 73 - minimum: 25000 74 maximum: 2000000 75 multipleOf: 25000 76 77 flash-max-timeout-us: 78 minimum: 10000 79 maximum: 1280000 80 multipleOf: 10000 81 82 required: 83 - led-sources 84 - led-max-microamp 85 86required: 87 - compatible 88 - reg 89 90additionalProperties: false 91 92examples: 93 - | 94 #include <dt-bindings/leds/common.h> 95 96 pmic { 97 #address-cells = <1>; 98 #size-cells = <0>; 99 100 led-controller@ee00 { 101 compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led"; 102 reg = <0xee00>; 103 104 led-0 { 105 function = LED_FUNCTION_FLASH; 106 color = <LED_COLOR_ID_WHITE>; 107 led-sources = <1>, <4>; 108 led-max-microamp = <300000>; 109 flash-max-microamp = <2000000>; 110 flash-max-timeout-us = <1280000>; 111 function-enumerator = <0>; 112 }; 113 114 led-1 { 115 function = LED_FUNCTION_FLASH; 116 color = <LED_COLOR_ID_YELLOW>; 117 led-sources = <2>, <3>; 118 led-max-microamp = <300000>; 119 flash-max-microamp = <2000000>; 120 flash-max-timeout-us = <1280000>; 121 function-enumerator = <1>; 122 }; 123 }; 124 }; 125