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