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