Richtek RT8515 1.5A dual channel LED driver
Schema identifier ($id): "http://devicetree.org/schemas/leds/richtek,rt8515.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Linus Walleij <linusw@kernel.org>"
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.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "richtek,rt8515"
enf-gpios — required here #
Maximum number of items (maxItems): 1
A connection to the 'ENF' (enable flash) pin.
ent-gpios — required here #
Maximum number of items (maxItems): 1
A connection to the 'ENT' (enable torch) pin.
richtek,rfs-ohms — not listed as required here #
Minimum value (minimum): 7680
Maximum value (maximum): 367000
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.
richtek,rts-ohms — not listed as required here #
Minimum value (minimum): 7680
Maximum value (maximum): 367000
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.
led — required here #
Value type (type): "object"
Shared schema rule ($ref): common.yaml#
Properties and child nodes (properties) #
function — not listed as required here
true — No constraints added by this property rule.
color — not listed as required here
true — No constraints added by this property rule.
flash-max-timeout-us — not listed as required here
true — No constraints added by this property rule.
flash-max-microamp — not listed as required here
Maximum value (maximum): 700000
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.
led-max-microamp — not listed as required here
Maximum value (maximum): 700000
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.
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "ent-gpios", "enf-gpios", "led"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "richtek,rt8515";
enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
richtek,rfs-ohms = <16000>;
richtek,rts-ohms = <100000>;
led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <250000>;
flash-max-microamp = <150000>;
led-max-microamp = <25000>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)