1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/leds/richtek,rt8515.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Richtek RT8515 1.5A dual channel LED driver
10 - Linus Walleij <linus.walleij@linaro.org>
13 The Richtek RT8515 is a dual channel (two mode) LED driver that
14 supports driving a white LED in flash or torch mode. The maximum
15 current for each mode is defined in hardware using two resistors
24 description: A connection to the 'ENF' (enable flash) pin.
28 description: A connection to the 'ENT' (enable torch) pin.
33 description: The resistance value of the RFS resistor. This
34 resistors limits the maximum flash current. This must be set
35 for the property flash-max-microamp to work, the RFS resistor
36 defines the range of the dimmer setting (brightness) of the
42 description: The resistance value of the RTS resistor. This
43 resistors limits the maximum torch current. This must be set
44 for the property torch-max-microamp to work, the RTS resistor
45 defines the range of the dimmer setting (brightness) of the
54 flash-max-timeout-us: true
58 description: The maximum current for flash mode
59 is hardwired to the component using the RFS resistor to
60 ground. The maximum hardware current setting is calculated
61 according to the formula Imax = 5500 / RFS. The lowest
62 allowed resistance value is 7.86 kOhm giving an absolute
63 maximum current of 700mA. By setting this attribute in
64 the device tree, you can further restrict the maximum
65 current below the hardware limit. This requires the RFS
66 to be defined as it defines the maximum range.
70 description: The maximum current for torch mode
71 is hardwired to the component using the RTS resistor to
72 ground. The maximum hardware current setting is calculated
73 according to the formula Imax = 5500 / RTS. The lowest
74 allowed resistance value is 7.86 kOhm giving an absolute
75 maximum current of 700mA. By setting this attribute in
76 the device tree, you can further restrict the maximum
77 current below the hardware limit. This requires the RTS
78 to be defined as it defines the maximum range.
80 additionalProperties: false
88 additionalProperties: false
92 #include <dt-bindings/gpio/gpio.h>
93 #include <dt-bindings/leds/common.h>
96 compatible = "richtek,rt8515";
97 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
98 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
99 richtek,rfs-ohms = <16000>;
100 richtek,rts-ohms = <100000>;
103 function = LED_FUNCTION_FLASH;
104 color = <LED_COLOR_ID_WHITE>;
105 flash-max-timeout-us = <250000>;
106 flash-max-microamp = <150000>;
107 led-max-microamp = <25000>;