# Flash LED device inside Qualcomm Technologies, Inc. PMICs

_Peios Kernel / Hardware and drivers / Device-tree binding reference / LED bindings_

> Device-tree binding reference for Flash LED device inside Qualcomm Technologies, Inc. PMICs.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;leds&#47;qcom&#44;spmi&#45;flash&#45;led&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Fenglin Wu &#60;quic&#95;fenglinw&#64;quicinc&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">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.</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

<a id="dt-cc3709943397035582d2"></a>

#### Array item rules (<code>items</code>)

<a id="dt-fec97e71a4359503ae6e"></a>

**Item 1**

> **Allowed values (<code>enum</code>):** <a id="dt-851ace07a50c83495949"></a> <span id="dt-63b688f2ccd82724cb8f"><code>&#34;qcom&#44;pm6150l&#45;flash&#45;led&#34;</code></span>, <span id="dt-2d97ae0f34d14dd8e72b"><code>&#34;qcom&#44;pm660l&#45;flash&#45;led&#34;</code></span>, <span id="dt-9802844ed4869452d348"><code>&#34;qcom&#44;pm7550&#45;flash&#45;led&#34;</code></span>, <span id="dt-24a1253e29125294194d"><code>&#34;qcom&#44;pm8150c&#45;flash&#45;led&#34;</code></span>, <span id="dt-6eb9cf2b3f55b257fde4"><code>&#34;qcom&#44;pm8150l&#45;flash&#45;led&#34;</code></span>, <span id="dt-50ce8af78a6d0f3b7b82"><code>&#34;qcom&#44;pm8350c&#45;flash&#45;led&#34;</code></span>, <span id="dt-8be3d578ae616ce6273c"><code>&#34;qcom&#44;pm8550&#45;flash&#45;led&#34;</code></span>, <span id="dt-348801aa97cc32ed4b8e"><code>&#34;qcom&#44;pmh0101&#45;flash&#45;led&#34;</code></span>, <span id="dt-08e250be67bbdba4113e"><code>&#34;qcom&#44;pmi8998&#45;flash&#45;led&#34;</code></span>

<a id="dt-0891c69625632ea817fd"></a>

**Item 2**

> **Exact value (<code>const</code>):** <span id="dt-f1f862a3cfab3ac620c8"><code>&#34;qcom&#44;spmi&#45;flash&#45;led&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-e92215bd3c2f5373b164"></a>

## Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-473251c3906028c600d0"></a>

### <code>&#94;led&#45;&#91;0&#45;3&#93;&#36;</code> — name matches this regular expression

**Value type (<code>type</code>):** <span id="dt-32f96bd3ac3babdbc1e4"><code>&#34;object&#34;</code></span>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-60d69d492ac2fb8f2fc7">[<code>common&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-leds/common.md#dt-root>)</span>

<a id="dt-19c9f332772ac2072e77"></a>

#### Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<div id="dt-1aa663f08543557a63df">
<p style="white-space: pre-wrap">Represents the physical LED components which are connected to the flash LED channels' output.</p>
</div>

<a id="dt-651cb2022af3bfb00368"></a>

#### Properties and child nodes (<code>properties</code>)

<a id="dt-814ed81e0c587a08ecb3"></a>

**<code>led&#45;sources</code> — required here**

<div id="dt-f544ef2fb6441fd549b4">
<p style="white-space: pre-wrap">The HW indices of the flash LED channels that connect to the physical LED</p>
</div>

<a id="dt-63ca1c30a334ec9e0723"></a>

**All of these rules must match (<code>allOf</code>)**

<a id="dt-b9f87d26f17962a89f6a"></a>

**Rule 1**

> **Minimum number of items (<code>minItems</code>):** <span id="dt-0982050e8d77a526b202"><code>1</code></span>
>
> **Maximum number of items (<code>maxItems</code>):** <span id="dt-4315e0e2886d8672fefd"><code>2</code></span>
>
> <a id="dt-da1b3b73f6edb678a6cb"></a>
>
> **Array item rules (<code>items</code>)**
>
> > **Allowed values (<code>enum</code>):** <a id="dt-117307d5eba7d2880c17"></a> <span id="dt-2a1d3e1d5aac95c7d933"><code>1</code></span>, <span id="dt-271af610e74510c75180"><code>2</code></span>, <span id="dt-f9cb6532cecc79e9abb3"><code>3</code></span>, <span id="dt-b95ee3f7e0e3623c6f4a"><code>4</code></span>

<a id="dt-a1704aa7166284fc590b"></a>

**<code>led&#45;max&#45;microamp</code> — required here**

<a id="dt-8a5b7a24af3797fb5806"></a>

**At least one of these rules must match (<code>anyOf</code>)**

<a id="dt-71453daa1947c8ee1001"></a>

**Rule 1**

> **Minimum value (<code>minimum</code>):** <span id="dt-b318a44fbc7f26acb460"><code>5000</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-d0632bdd8ceeabd41aee"><code>500000</code></span>
>
> **Multiple of (<code>multipleOf</code>):** <span id="dt-df99f65b4258e322861d"><code>5000</code></span>

<a id="dt-d75bdcb6a1304f826e20"></a>

**Rule 2**

> **Minimum value (<code>minimum</code>):** <span id="dt-099759f9ac574ba7a3b1"><code>10000</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-e899f46e25c1ccc9fdd5"><code>1000000</code></span>
>
> **Multiple of (<code>multipleOf</code>):** <span id="dt-90ef25f8fbc3cd669e73"><code>10000</code></span>

<a id="dt-0a28d41a07413e2fefaf"></a>

**<code>flash&#45;max&#45;microamp</code> — not listed as required here**

<a id="dt-d3ef8ecd1fa6526e640c"></a>

**At least one of these rules must match (<code>anyOf</code>)**

<a id="dt-0ab6d86791af8c7e4ee7"></a>

**Rule 1**

> **Minimum value (<code>minimum</code>):** <span id="dt-954d089bac61faf1084e"><code>12500</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-063b0c6da3fbdb2056fd"><code>1500000</code></span>
>
> **Multiple of (<code>multipleOf</code>):** <span id="dt-460a36568c39ed1948a0"><code>12500</code></span>

<a id="dt-e2513e361238f34e284a"></a>

**Rule 2**

> **Minimum value (<code>minimum</code>):** <span id="dt-db43ca3040d9ae791256"><code>25000</code></span>
>
> **Maximum value (<code>maximum</code>):** <span id="dt-5da0369f8c1fdabfba91"><code>2000000</code></span>
>
> **Multiple of (<code>multipleOf</code>):** <span id="dt-45cc3401761afc6ec42d"><code>25000</code></span>

<a id="dt-e5a23fec0b8cb6e16229"></a>

**<code>flash&#45;max&#45;timeout&#45;us</code> — not listed as required here**

**Minimum value (<code>minimum</code>):** <span id="dt-389b21f11299eb6421cb"><code>10000</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-5403be498048b28843a0"><code>1280000</code></span>

**Multiple of (<code>multipleOf</code>):** <span id="dt-be4abf828d2055bb5006"><code>10000</code></span>

**Required in this object (<code>required</code>):** <a id="dt-c8772514df430e442907"></a> <span id="dt-20cb2082ed6cb5fe8baa"><code>&#34;led&#45;sources&#34;</code></span>, <span id="dt-e53b35dc0458667a5592"><code>&#34;led&#45;max&#45;microamp&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/leds/common.h&gt;

pmic {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    led-controller@ee00 {
        compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
        reg = &lt;0xee00&gt;;

        led-0 {
            function = LED_FUNCTION_FLASH;
            color = &lt;LED_COLOR_ID_WHITE&gt;;
            led-sources = &lt;1&gt;, &lt;4&gt;;
            led-max-microamp = &lt;300000&gt;;
            flash-max-microamp = &lt;2000000&gt;;
            flash-max-timeout-us = &lt;1280000&gt;;
            function-enumerator = &lt;0&gt;;
        };

        led-1 {
            function = LED_FUNCTION_FLASH;
            color = &lt;LED_COLOR_ID_YELLOW&gt;;
            led-sources = &lt;2&gt;, &lt;3&gt;;
            led-max-microamp = &lt;300000&gt;;
            flash-max-microamp = &lt;2000000&gt;;
            flash-max-timeout-us = &lt;1280000&gt;;
            function-enumerator = &lt;1&gt;;
        };
    };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
