Based on kernel version 6.11
. Page generated on 2024-09-24 08:21 EST
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/leds/richtek,rt8515.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Richtek RT8515 1.5A dual channel LED driver maintainers: - Linus Walleij <linus.walleij@linaro.org> description: | 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: compatible: const: richtek,rt8515 enf-gpios: maxItems: 1 description: A connection to the 'ENF' (enable flash) pin. ent-gpios: maxItems: 1 description: A connection to the 'ENT' (enable torch) pin. richtek,rfs-ohms: minimum: 7680 maximum: 367000 description: 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: minimum: 7680 maximum: 367000 description: 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: type: object $ref: common.yaml# properties: function: true color: true flash-max-timeout-us: true flash-max-microamp: maximum: 700000 description: 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: maximum: 700000 description: 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. additionalProperties: false required: - compatible - ent-gpios - enf-gpios - led additionalProperties: false 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>; }; }; ... |