xref: /linux/Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml (revision 7cc2726d4847c48844eb0ee16f973d449260f248)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/backlight/ti,tps65217.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TPS65217 family of regulators
8
9maintainers:
10  - Eduard Bostina <egbostina@gmail.com>
11
12description:
13  The TPS65217 chip contains a boost converter and current sinks which can be
14  used to drive LEDs for use as backlights.
15
16properties:
17  compatible:
18    const: ti,tps65217
19
20  reg:
21    maxItems: 1
22    description: I2C slave address
23
24  interrupts:
25    maxItems: 1
26
27  interrupt-controller: true
28
29  "#interrupt-cells":
30    const: 1
31
32  ti,pmic-shutdown-controller:
33    type: boolean
34    description:
35      Set the PMIC to shutdown on PWR_EN toggle.
36
37  backlight:
38    type: object
39    additionalProperties: false
40    description:
41      Node for specifying WLED1 and WLED2 lines in TPS65217.
42
43    properties:
44      isel:
45        $ref: /schemas/types.yaml#/definitions/uint32
46        enum: [1, 2]
47        description: |
48          Selection bit. Valid values:
49            1 - ISEL1 (low-level)
50            2 - ISEL2 (high-level)
51
52      fdim:
53        $ref: /schemas/types.yaml#/definitions/uint32
54        enum: [100, 200, 500, 1000]
55        description:
56          PWM dimming frequency in Hz.
57
58      default-brightness:
59        $ref: /schemas/types.yaml#/definitions/uint32
60        minimum: 0
61        maximum: 100
62
63    required:
64      - isel
65      - fdim
66      - default-brightness
67
68  regulators:
69    type: object
70    additionalProperties: false
71    description:
72      List of child nodes that specify the regulator initialization data.
73      Not all regulators for the given device need to be present.
74
75    patternProperties:
76      "^(dcdc[1-3]|ldo[1-4])$":
77        type: object
78        $ref: /schemas/regulator/regulator.yaml#
79        unevaluatedProperties: false
80
81  charger:
82    $ref: /schemas/power/supply/tps65217-charger.yaml#
83    unevaluatedProperties: false
84
85  pwrbutton:
86    $ref: /schemas/input/ti,tps65217-pwrbutton.yaml#
87    unevaluatedProperties: false
88
89required:
90  - compatible
91  - reg
92
93additionalProperties: false
94
95examples:
96  - |
97    i2c {
98        #address-cells = <1>;
99        #size-cells = <0>;
100
101        pmic@24 {
102            compatible = "ti,tps65217";
103            reg = <0x24>;
104            interrupt-controller;
105            #interrupt-cells = <1>;
106            ti,pmic-shutdown-controller;
107
108            backlight {
109                isel = <1>;   /* 1 - ISET1, 2 ISET2 */
110                fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
111                default-brightness = <50>;
112            };
113
114            charger {
115                compatible = "ti,tps65217-charger";
116                interrupts = <0>, <1>;
117                interrupt-names = "USB", "AC";
118            };
119
120            pwrbutton {
121                compatible = "ti,tps65217-pwrbutton";
122                interrupts = <2>;
123            };
124
125            regulators {
126                dcdc1 {
127                    regulator-name = "vdds_dpr";
128                    regulator-always-on;
129                };
130
131                dcdc2 {
132                    regulator-name = "vdd_mpu";
133                    regulator-min-microvolt = <925000>;
134                    regulator-max-microvolt = <1351500>;
135                    regulator-boot-on;
136                    regulator-always-on;
137                };
138
139                dcdc3 {
140                    regulator-name = "vdd_core";
141                    regulator-min-microvolt = <925000>;
142                    regulator-max-microvolt = <1150000>;
143                    regulator-boot-on;
144                    regulator-always-on;
145                };
146
147                ldo1 {
148                    regulator-name = "vio,vrtc,vdds";
149                    regulator-always-on;
150                };
151
152                ldo2 {
153                    regulator-name = "vdd_3v3aux";
154                    regulator-always-on;
155                };
156
157                ldo3 {
158                    regulator-name = "vdd_1v8";
159                    regulator-min-microvolt = <1800000>;
160                    regulator-max-microvolt = <1800000>;
161                    regulator-always-on;
162                };
163
164                ldo4 {
165                    regulator-name = "vdd_3v3a";
166                    regulator-always-on;
167                };
168            };
169        };
170    };
171