xref: /linux/Documentation/devicetree/bindings/leds/backlight/ti,lm3509.yaml (revision ed7171ff9fabc49ae6ed42fbd082a576473836fc)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/backlight/ti,lm3509.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TI LM3509 High Efficiency Boost for White LED's and/or OLED Displays
8
9maintainers:
10  - Patrick Gansterer <paroga@paroga.com>
11
12description:
13  The LM3509 current mode boost converter offers two separate outputs.
14  https://www.ti.com/product/LM3509
15
16properties:
17  compatible:
18    const: ti,lm3509
19
20  reg:
21    maxItems: 1
22
23  "#address-cells":
24    const: 1
25
26  "#size-cells":
27    const: 0
28
29  reset-gpios:
30    maxItems: 1
31
32  ti,brightness-rate-of-change-us:
33    description: Brightness Rate of Change in microseconds.
34    enum: [51, 13000, 26000, 52000]
35
36  ti,oled-mode:
37    description: Enable OLED mode.
38    type: boolean
39
40patternProperties:
41  "^led@[01]$":
42    type: object
43    description: Properties for a string of connected LEDs.
44    $ref: common.yaml#
45
46    properties:
47      reg:
48        description:
49          The control register that is used to program the two current sinks.
50          The LM3509 has two registers (BMAIN and BSUB) and are represented
51          as 0 or 1 in this property. The two current sinks can be controlled
52          independently with both registers, or register BMAIN can be
53          configured to control both sinks with the led-sources property.
54        minimum: 0
55        maximum: 1
56
57      label: true
58
59      led-sources:
60        minItems: 1
61        maxItems: 2
62        items:
63          minimum: 0
64          maximum: 1
65
66      default-brightness:
67        minimum: 0
68        maximum: 31
69        default: 18
70
71      max-brightness:
72        minimum: 0
73        maximum: 31
74        default: 31
75
76    required:
77      - reg
78
79    additionalProperties: false
80
81required:
82  - compatible
83  - reg
84
85additionalProperties: false
86
87examples:
88  - |
89    #include <dt-bindings/gpio/gpio.h>
90    i2c {
91        #address-cells = <1>;
92        #size-cells = <0>;
93
94        backlight@36 {
95            compatible = "ti,lm3509";
96            reg = <0x36>;
97            reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
98
99            ti,oled-mode;
100            ti,brightness-rate-of-change-us = <52000>;
101
102            #address-cells = <1>;
103            #size-cells = <0>;
104
105            led@0 {
106                reg = <0>;
107                led-sources = <0 1>;
108                label = "lcd-backlight";
109                default-brightness = <12>;
110                max-brightness = <31>;
111            };
112        };
113    };
114  - |
115    i2c {
116        #address-cells = <1>;
117        #size-cells = <0>;
118
119        backlight@36 {
120            compatible = "ti,lm3509";
121            reg = <0x36>;
122
123            #address-cells = <1>;
124            #size-cells = <0>;
125
126            led@0 {
127                reg = <0>;
128                default-brightness = <12>;
129            };
130
131            led@1 {
132                reg = <1>;
133                default-brightness = <15>;
134            };
135        };
136    };
137