xref: /openbmc/linux/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
11aeff621SFenglin Wu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21aeff621SFenglin Wu%YAML 1.2
31aeff621SFenglin Wu---
41aeff621SFenglin Wu$id: http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml#
51aeff621SFenglin Wu$schema: http://devicetree.org/meta-schemas/core.yaml#
61aeff621SFenglin Wu
71aeff621SFenglin Wutitle: Flash LED device inside Qualcomm Technologies, Inc. PMICs
81aeff621SFenglin Wu
91aeff621SFenglin Wumaintainers:
101aeff621SFenglin Wu  - Fenglin Wu <quic_fenglinw@quicinc.com>
111aeff621SFenglin Wu
121aeff621SFenglin Wudescription: |
131aeff621SFenglin Wu  Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs.
141aeff621SFenglin Wu  The flash LED module can have different number of LED channels supported
151aeff621SFenglin Wu  e.g. 3 or 4. There are some different registers between them but they can
161aeff621SFenglin Wu  both support maximum current up to 1.5 A per channel and they can also support
171aeff621SFenglin Wu  ganging 2 channels together to supply maximum current up to 2 A. The current
181aeff621SFenglin Wu  will be split symmetrically on each channel and they will be enabled and
191aeff621SFenglin Wu  disabled at the same time.
201aeff621SFenglin Wu
211aeff621SFenglin Wuproperties:
221aeff621SFenglin Wu  compatible:
231aeff621SFenglin Wu    items:
241aeff621SFenglin Wu      - enum:
25*d4856dccSLuca Weiss          - qcom,pm6150l-flash-led
261aeff621SFenglin Wu          - qcom,pm8150c-flash-led
271aeff621SFenglin Wu          - qcom,pm8150l-flash-led
281aeff621SFenglin Wu          - qcom,pm8350c-flash-led
291aeff621SFenglin Wu          - qcom,pm8550-flash-led
301aeff621SFenglin Wu          - qcom,pmi8998-flash-led
311aeff621SFenglin Wu      - const: qcom,spmi-flash-led
321aeff621SFenglin Wu
331aeff621SFenglin Wu  reg:
341aeff621SFenglin Wu    maxItems: 1
351aeff621SFenglin Wu
361aeff621SFenglin WupatternProperties:
371aeff621SFenglin Wu  "^led-[0-3]$":
381aeff621SFenglin Wu    type: object
391aeff621SFenglin Wu    $ref: common.yaml#
401aeff621SFenglin Wu    unevaluatedProperties: false
411aeff621SFenglin Wu    description:
421aeff621SFenglin Wu      Represents the physical LED components which are connected to the
431aeff621SFenglin Wu      flash LED channels' output.
441aeff621SFenglin Wu
451aeff621SFenglin Wu    properties:
461aeff621SFenglin Wu      led-sources:
471aeff621SFenglin Wu        description:
481aeff621SFenglin Wu          The HW indices of the flash LED channels that connect to the
491aeff621SFenglin Wu          physical LED
501aeff621SFenglin Wu        allOf:
511aeff621SFenglin Wu          - minItems: 1
521aeff621SFenglin Wu            maxItems: 2
531aeff621SFenglin Wu            items:
541aeff621SFenglin Wu              enum: [1, 2, 3, 4]
551aeff621SFenglin Wu
561aeff621SFenglin Wu      led-max-microamp:
571aeff621SFenglin Wu        anyOf:
581aeff621SFenglin Wu          - minimum: 5000
591aeff621SFenglin Wu            maximum: 500000
601aeff621SFenglin Wu            multipleOf: 5000
611aeff621SFenglin Wu          - minimum: 10000
621aeff621SFenglin Wu            maximum: 1000000
631aeff621SFenglin Wu            multipleOf: 10000
641aeff621SFenglin Wu
651aeff621SFenglin Wu      flash-max-microamp:
661aeff621SFenglin Wu        anyOf:
671aeff621SFenglin Wu          - minimum: 12500
681aeff621SFenglin Wu            maximum: 1500000
691aeff621SFenglin Wu            multipleOf: 12500
701aeff621SFenglin Wu          - minimum: 25000
711aeff621SFenglin Wu            maximum: 2000000
721aeff621SFenglin Wu            multipleOf: 25000
731aeff621SFenglin Wu
741aeff621SFenglin Wu      flash-max-timeout-us:
751aeff621SFenglin Wu        minimum: 10000
761aeff621SFenglin Wu        maximum: 1280000
771aeff621SFenglin Wu        multipleOf: 10000
781aeff621SFenglin Wu
791aeff621SFenglin Wu    required:
801aeff621SFenglin Wu      - led-sources
811aeff621SFenglin Wu      - led-max-microamp
821aeff621SFenglin Wu
831aeff621SFenglin Wurequired:
841aeff621SFenglin Wu  - compatible
851aeff621SFenglin Wu  - reg
861aeff621SFenglin Wu
871aeff621SFenglin WuadditionalProperties: false
881aeff621SFenglin Wu
891aeff621SFenglin Wuexamples:
901aeff621SFenglin Wu  - |
911aeff621SFenglin Wu    #include <dt-bindings/leds/common.h>
921aeff621SFenglin Wu    spmi {
931aeff621SFenglin Wu        #address-cells = <1>;
941aeff621SFenglin Wu        #size-cells = <0>;
951aeff621SFenglin Wu        led-controller@ee00 {
961aeff621SFenglin Wu            compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
971aeff621SFenglin Wu            reg = <0xee00>;
981aeff621SFenglin Wu
991aeff621SFenglin Wu            led-0 {
1001aeff621SFenglin Wu                function = LED_FUNCTION_FLASH;
1011aeff621SFenglin Wu                color = <LED_COLOR_ID_WHITE>;
1021aeff621SFenglin Wu                led-sources = <1>, <4>;
1031aeff621SFenglin Wu                led-max-microamp = <300000>;
1041aeff621SFenglin Wu                flash-max-microamp = <2000000>;
1051aeff621SFenglin Wu                flash-max-timeout-us = <1280000>;
1061aeff621SFenglin Wu                function-enumerator = <0>;
1071aeff621SFenglin Wu            };
1081aeff621SFenglin Wu
1091aeff621SFenglin Wu            led-1 {
1101aeff621SFenglin Wu                function = LED_FUNCTION_FLASH;
1111aeff621SFenglin Wu                color = <LED_COLOR_ID_YELLOW>;
1121aeff621SFenglin Wu                led-sources = <2>, <3>;
1131aeff621SFenglin Wu                led-max-microamp = <300000>;
1141aeff621SFenglin Wu                flash-max-microamp = <2000000>;
1151aeff621SFenglin Wu                flash-max-timeout-us = <1280000>;
1161aeff621SFenglin Wu                function-enumerator = <1>;
1171aeff621SFenglin Wu            };
118        };
119    };
120