# LED driver for MT6360 PMIC from MediaTek Integrated.

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

> Device-tree binding reference for LED driver for MT6360 PMIC from MediaTek Integrated..

<!-- 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;leds&#45;mt6360&#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;Gene Chen &#60;gene&#95;chen&#64;richtek&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This module is part of the MT6360 MFD device.
see Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml
Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,
and 4-channel RGB LED support Register/Flash/Breath Mode</p>
</div>

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;mediatek&#44;mt6360&#45;led&#34;</code></span>

<a id="dt-2efe70314a961a652abe"></a>

### <code>&#35;address&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-e6e6af09ab617572731b"><code>1</code></span>

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

### <code>&#35;size&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>0</code></span>

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

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

<a id="dt-41297294fa4ce68e3558"></a>

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

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

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

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

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

<code>false</code>

Not allowed by this rule.

<a id="dt-7fe9ed5ed34ae7d01167"></a>

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

<a id="dt-13c3bd094d159e9f6de1"></a>

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

<div id="dt-904960a605f0800c6885">
<p style="white-space: pre-wrap">Index of the LED.</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-b18286c12e7d714c2c0a"></a> <span id="dt-8244d9f938473d2ad6da"><code>0</code></span>, <span id="dt-730cd7eac2b6d2c2538e"><code>1</code></span>, <span id="dt-4458fa3b620a5fda1a54"><code>2</code></span>, <span id="dt-efeb9af241ed1ee04b4f"><code>3</code></span>, <span id="dt-51da4d7eda80733d81fa"><code>4</code></span>, <span id="dt-44075c1b76e6b440f930"><code>5</code></span>

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

**<code>&#35;address&#45;cells</code> — required here**

**Exact value (<code>const</code>):** <span id="dt-bacd74b487337e57872d"><code>1</code></span>

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

**<code>&#35;size&#45;cells</code> — required here**

**Exact value (<code>const</code>):** <span id="dt-b5db3997fb0dd7793f2f"><code>0</code></span>

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

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

<a id="dt-274db9a7f583e2c33bd6"></a>

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

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

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

<a id="dt-78a96d492054f3472d48"></a>

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

<code>false</code>

Not allowed by this rule.

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

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

<a id="dt-95f3ec70e82cfe90ed7d"></a>

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

**Allowed values (<code>enum</code>):** <a id="dt-e5e2eaed3d53dd522f04"></a> <span id="dt-024a99f69d782b04bb37"><code>0</code></span>, <span id="dt-0bb6abe7ca29ad8b0f90"><code>1</code></span>, <span id="dt-004852bea9243a1108f2"><code>2</code></span>

**Required in this object (<code>required</code>):** <a id="dt-cfb727a4c7a0981a355e"></a> <span id="dt-18f783fb4c4f8c5f9e1e"><code>&#34;reg&#34;</code></span>, <span id="dt-5ee7832ffd9e05f4252e"><code>&#34;color&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-573abafe0ffee609561b"></a> <span id="dt-74e3a61555c8c4c806df"><code>&#34;reg&#34;</code></span>, <span id="dt-3793ec80c81966f7aa58"><code>&#34;&#35;address&#45;cells&#34;</code></span>, <span id="dt-93a89f433317aada0f43"><code>&#34;&#35;size&#45;cells&#34;</code></span>

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

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

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

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

<a id="dt-919d29de0c809057d21b"></a>

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

<code>false</code>

Not allowed by this rule.

<div id="dt-145485dac3bd7d100516">
<p style="white-space: pre-wrap">Properties for a single LED.</p>
</div>

<a id="dt-61eecda24950cfe44d13"></a>

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

<a id="dt-663b169946d027b64931"></a>

**<code>reg</code> — not listed as required here**

**Allowed values (<code>enum</code>):** <a id="dt-4f8f91cda0c82a609ab9"></a> <span id="dt-249f7b7229c1e0ae9f40"><code>0</code></span>, <span id="dt-7a0dac823c447bd322e5"><code>1</code></span>, <span id="dt-1c67fa26ef32b3423c73"><code>2</code></span>, <span id="dt-bd69c1b2c299bdf3c767"><code>3</code></span>, <span id="dt-d056f87ec983f476dde4"><code>4</code></span>, <span id="dt-e8ad3ec8628c02ff0646"><code>5</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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;size&#45;cells&#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;
led-controller {
    compatible = "mediatek,mt6360-led";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    multi-led@0 {
        reg = &lt;0&gt;;
        function = LED_FUNCTION_INDICATOR;
        color = &lt;LED_COLOR_ID_RGB&gt;;
        led-max-microamp = &lt;24000&gt;;
        #address-cells = &lt;1&gt;;
        #size-cells = &lt;0&gt;;
        led@0 {
            reg = &lt;0&gt;;
            color = &lt;LED_COLOR_ID_RED&gt;;
        };
        led@1 {
            reg = &lt;1&gt;;
            color = &lt;LED_COLOR_ID_GREEN&gt;;
        };
        led@2 {
            reg = &lt;2&gt;;
            color = &lt;LED_COLOR_ID_BLUE&gt;;
        };
    };
    led@3 {
        reg = &lt;3&gt;;
        function = LED_FUNCTION_INDICATOR;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        led-max-microamp = &lt;150000&gt;;
    };
    led@4 {
        reg = &lt;4&gt;;
        function = LED_FUNCTION_FLASH;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        function-enumerator = &lt;1&gt;;
        led-max-microamp = &lt;200000&gt;;
        flash-max-microamp = &lt;500000&gt;;
        flash-max-timeout-us = &lt;1024000&gt;;
    };
    led@5 {
        reg = &lt;5&gt;;
        function = LED_FUNCTION_FLASH;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        function-enumerator = &lt;2&gt;;
        led-max-microamp = &lt;200000&gt;;
        flash-max-microamp = &lt;500000&gt;;
        flash-max-timeout-us = &lt;1024000&gt;;
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">led-controller {
    compatible = "mediatek,mt6360-led";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    led@0 {
        reg = &lt;0&gt;;
        function = LED_FUNCTION_INDICATOR;
        color = &lt;LED_COLOR_ID_RED&gt;;
        led-max-microamp = &lt;24000&gt;;
    };
    led@1 {
        reg = &lt;1&gt;;
        function = LED_FUNCTION_INDICATOR;
        color = &lt;LED_COLOR_ID_GREEN&gt;;
        led-max-microamp = &lt;24000&gt;;
    };
    led@2 {
        reg = &lt;2&gt;;
        function = LED_FUNCTION_INDICATOR;
        color = &lt;LED_COLOR_ID_BLUE&gt;;
        led-max-microamp = &lt;24000&gt;;
    };
    led@3 {
        reg = &lt;3&gt;;
        function = LED_FUNCTION_INDICATOR;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        led-max-microamp = &lt;150000&gt;;
    };
    led@4 {
        reg = &lt;4&gt;;
        function = LED_FUNCTION_FLASH;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        function-enumerator = &lt;1&gt;;
        led-max-microamp = &lt;200000&gt;;
        flash-max-microamp = &lt;500000&gt;;
        flash-max-timeout-us = &lt;1024000&gt;;
    };
    led@5 {
        reg = &lt;5&gt;;
        function = LED_FUNCTION_FLASH;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        function-enumerator = &lt;2&gt;;
        led-max-microamp = &lt;200000&gt;;
        flash-max-microamp = &lt;500000&gt;;
        flash-max-timeout-us = &lt;1024000&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>

<p id="dt-comment-1"><strong>Line 38:</strong> <span> LED output ISINK1</span></p>

<p id="dt-comment-2"><strong>Line 39:</strong> <span> LED output ISINK2</span></p>

<p id="dt-comment-3"><strong>Line 40:</strong> <span> LED output ISINK3</span></p>

<p id="dt-comment-4"><strong>Line 41:</strong> <span> LED output ISINKML</span></p>

<p id="dt-comment-5"><strong>Line 42:</strong> <span> LED output FLASH1</span></p>

<p id="dt-comment-6"><strong>Line 43:</strong> <span> LED output FLASH2</span></p>

</details>
