File Index
Files and directories
Sign in
FILE

qcom,spmi-flash-led.yaml

File preview with syntax highlighting.

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