# Multi-color LEDs connected to PWM

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

> Device-tree binding reference for Multi-color LEDs connected to PWM.

<!-- 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;pwm&#45;multicolor&#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;Sven Schwermer &#60;sven&#46;schwermer&#64;disruptive&#45;technologies&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">This driver combines several monochrome PWM LEDs into one multi-color
LED using the multicolor LED class.</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;pwm&#45;leds&#45;multicolor&#34;</code></span>

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

### <code>multi&#45;led</code> — not listed as required here

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

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-5e4ce5eb9dd359f48d3c">[<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-850b6df1fd018b5c206d"></a>

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

<code>false</code>

Not allowed by this rule.

<a id="dt-06a616ca378e5b0c5564"></a>

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

<a id="dt-6d3e33bde0be8dfd6ace"></a>

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

<div id="dt-a612822b4929ba7b2328">
<p style="white-space: pre-wrap">Maximum brightness possible for the LED</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-44cd6cf6693533ebccfb">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

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

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

<a id="dt-07963273eeb12ff1189d"></a>

**<code>&#94;led&#45;&#91;0&#45;9a&#45;z&#93;&#43;&#36;</code> — name matches this regular expression**

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

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

<a id="dt-11c49d6ef07f2df17c17"></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-4b7d5e98ea84df7489d0"></a>

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

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

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

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

<a id="dt-463eae7c8b8c5f663f93"></a>

**<code>pwm&#45;names</code> — not listed as required here**

<code>true</code> — No constraints added by this property rule.

<a id="dt-600879b7f304f8e397cd"></a>

**<code>active&#45;low</code> — not listed as required here**

<code>true</code> — No constraints added by this property rule.

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

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

<code>true</code> — No constraints added by this property rule.

**Required in this object (<code>required</code>):** <a id="dt-0d4a442d5be6cac36de9"></a> <span id="dt-d9c26b3084c88c775d79"><code>&#34;pwms&#34;</code></span>, <span id="dt-65fd27676e689707c7a9"><code>&#34;color&#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>

<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 = "pwm-leds-multicolor";

    multi-led {
        color = &lt;LED_COLOR_ID_RGB&gt;;
        function = LED_FUNCTION_INDICATOR;
        max-brightness = &lt;65535&gt;;

        led-red {
            pwms = &lt;&amp;pwm1 0 1000000&gt;;
            color = &lt;LED_COLOR_ID_RED&gt;;
        };

        led-green {
            pwms = &lt;&amp;pwm2 0 1000000&gt;;
            color = &lt;LED_COLOR_ID_GREEN&gt;;
        };

        led-blue {
            pwms = &lt;&amp;pwm3 0 1000000&gt;;
            color = &lt;LED_COLOR_ID_BLUE&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>
