Flash LED device inside Qualcomm Technologies, Inc. PMICs
Schema identifier ($id): "http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Fenglin Wu <quic_fenglinw@quicinc.com>"
Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs. The flash LED module can have different number of LED channels supported e.g. 3 or 4. There are some different registers between them but they can both support maximum current up to 1.5 A per channel and they can also support ganging 2 channels together to supply maximum current up to 2 A. The current will be split symmetrically on each channel and they will be enabled and disabled at the same time.
Properties and child nodes (properties) #
compatible — required here #
Array item rules (items) #
Item 1
Allowed values (
enum):"qcom,pm6150l-flash-led","qcom,pm660l-flash-led","qcom,pm7550-flash-led","qcom,pm8150c-flash-led","qcom,pm8150l-flash-led","qcom,pm8350c-flash-led","qcom,pm8550-flash-led","qcom,pmh0101-flash-led","qcom,pmi8998-flash-led"
Item 2
Exact value (
const):"qcom,spmi-flash-led"
reg — required here #
Maximum number of items (maxItems): 1
Properties matching a name pattern (patternProperties) #
^led-[0-3]$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): common.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Represents the physical LED components which are connected to the flash LED channels' output.
Properties and child nodes (properties) #
led-sources — required here
The HW indices of the flash LED channels that connect to the physical LED
All of these rules must match (allOf)
Rule 1
Minimum number of items (
minItems):1Maximum number of items (
maxItems):2Array item rules (
items)
led-max-microamp — required here
At least one of these rules must match (anyOf)
Rule 1
Minimum value (
minimum):5000Maximum value (
maximum):500000Multiple of (
multipleOf):5000
Rule 2
Minimum value (
minimum):10000Maximum value (
maximum):1000000Multiple of (
multipleOf):10000
flash-max-microamp — not listed as required here
At least one of these rules must match (anyOf)
Rule 1
Minimum value (
minimum):12500Maximum value (
maximum):1500000Multiple of (
multipleOf):12500
Rule 2
Minimum value (
minimum):25000Maximum value (
maximum):2000000Multiple of (
multipleOf):25000
flash-max-timeout-us — not listed as required here
Minimum value (minimum): 10000
Maximum value (maximum): 1280000
Multiple of (multipleOf): 10000
Required in this object (required): "led-sources", "led-max-microamp"
Required in this object (required): "compatible", "reg"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/leds/common.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
led-controller@ee00 {
compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
reg = <0xee00>;
led-0 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <1>, <4>;
led-max-microamp = <300000>;
flash-max-microamp = <2000000>;
flash-max-timeout-us = <1280000>;
function-enumerator = <0>;
};
led-1 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_YELLOW>;
led-sources = <2>, <3>;
led-max-microamp = <300000>;
flash-max-microamp = <2000000>;
flash-max-timeout-us = <1280000>;
function-enumerator = <1>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)