# Richtek RT8515 1.5A dual channel LED driver

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

> Device-tree binding reference for Richtek RT8515 1.5A dual channel LED driver.

<!-- 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;richtek&#44;rt8515&#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;Linus Walleij &#60;linusw&#64;kernel&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Richtek RT8515 is a dual channel (two mode) LED driver that
supports driving a white LED in flash or torch mode. The maximum
current for each mode is defined in hardware using two resistors
RFS and RTS.</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;richtek&#44;rt8515&#34;</code></span>

<a id="dt-380e568832c3fcfa8174"></a>

### <code>enf&#45;gpios</code> — required here

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

<div id="dt-9a1d7a6692dc3de27c96">
<p style="white-space: pre-wrap">A connection to the 'ENF' (enable flash) pin.</p>
</div>

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

### <code>ent&#45;gpios</code> — required here

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

<div id="dt-df87b094974282ea5c32">
<p style="white-space: pre-wrap">A connection to the 'ENT' (enable torch) pin.</p>
</div>

<a id="dt-4fe4e3fb6ba1802c4a51"></a>

### <code>richtek&#44;rfs&#45;ohms</code> — not listed as required here

**Minimum value (<code>minimum</code>):** <span id="dt-a229286f44a13432fa65"><code>7680</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-f12dd2c85cf0a4904ab8"><code>367000</code></span>

<div id="dt-a4c9c1c19f75afb5a119">
<p style="white-space: pre-wrap">The resistance value of the RFS resistor. This resistors limits the maximum flash current. This must be set for the property flash-max-microamp to work, the RFS resistor defines the range of the dimmer setting (brightness) of the flash LED.</p>
</div>

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

### <code>richtek&#44;rts&#45;ohms</code> — not listed as required here

**Minimum value (<code>minimum</code>):** <span id="dt-eaaa7bf66227bf5c880c"><code>7680</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-507bd3bcf59edadc8a78"><code>367000</code></span>

<div id="dt-5e6922759cb6fc990a6a">
<p style="white-space: pre-wrap">The resistance value of the RTS resistor. This resistors limits the maximum torch current. This must be set for the property torch-max-microamp to work, the RTS resistor defines the range of the dimmer setting (brightness) of the torch LED.</p>
</div>

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

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

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

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

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

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

<a id="dt-86d953fcf25853eab68d"></a>

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

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

<a id="dt-58e416fb5bdfcf0345ec"></a>

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

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

<a id="dt-05faba5e13e585231331"></a>

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

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

<a id="dt-5973299489666f8e26e3"></a>

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

**Maximum value (<code>maximum</code>):** <span id="dt-5ab4dd11a9dc62eaea61"><code>700000</code></span>

<div id="dt-f2f2d4145e5e22d557f9">
<p style="white-space: pre-wrap">The maximum current for flash mode is hardwired to the component using the RFS resistor to ground. The maximum hardware current setting is calculated according to the formula Imax = 5500 / RFS. The lowest allowed resistance value is 7.86 kOhm giving an absolute maximum current of 700mA. By setting this attribute in the device tree, you can further restrict the maximum current below the hardware limit. This requires the RFS to be defined as it defines the maximum range.</p>
</div>

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

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

**Maximum value (<code>maximum</code>):** <span id="dt-031adb05f7fa296f4fc6"><code>700000</code></span>

<div id="dt-d371e5d614de50479f27">
<p style="white-space: pre-wrap">The maximum current for torch mode is hardwired to the component using the RTS resistor to ground. The maximum hardware current setting is calculated according to the formula Imax = 5500 / RTS. The lowest allowed resistance value is 7.86 kOhm giving an absolute maximum current of 700mA. By setting this attribute in the device tree, you can further restrict the maximum current below the hardware limit. This requires the RTS to be defined as it defines the maximum range.</p>
</div>

<a id="dt-60b829bfcfb5f6754307"></a>

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

<code>false</code>

Not allowed by this rule.

**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;ent&#45;gpios&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;enf&#45;gpios&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;led&#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/gpio/gpio.h&gt;
#include &lt;dt-bindings/leds/common.h&gt;

led-controller {
    compatible = "richtek,rt8515";
    enf-gpios = &lt;&amp;gpio4 12 GPIO_ACTIVE_HIGH&gt;;
    ent-gpios = &lt;&amp;gpio4 13 GPIO_ACTIVE_HIGH&gt;;
    richtek,rfs-ohms = &lt;16000&gt;;
    richtek,rts-ohms = &lt;100000&gt;;

    led {
        function = LED_FUNCTION_FLASH;
        color = &lt;LED_COLOR_ID_WHITE&gt;;
        flash-max-timeout-us = &lt;250000&gt;;
        flash-max-microamp = &lt;150000&gt;;
        led-max-microamp = &lt;25000&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>
