Skip to content

Commit 8622817

Browse files
committed
Add support for TI TPS65219 PMIC.
Merge series from Jerome Neanne <[email protected]>: This driver supports - 3 Buck regulators and 4 LDOs - low-power standby mode - warm/soft reset - basic fault handling (via interrupts). - power button Not implemented - DVS 1-Regulators: Full implementation and test Visual check: cat /sys/kernel/debug/regulator/regulator_summary Full validation requires userspace-consumer and virtual-regulator LDO1 is not used and output can be probbed on TP84.
2 parents a274037 + c12ac5f commit 8622817

File tree

5 files changed

+600
-0
lines changed

5 files changed

+600
-0
lines changed
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/ti,tps65219.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: TI tps65219 Power Management Integrated Circuit regulators
8+
9+
maintainers:
10+
- Jerome Neanne <[email protected]>
11+
12+
description: |
13+
Regulator nodes should be named to buck<number> and ldo<number>.
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- ti,tps65219
19+
20+
reg:
21+
maxItems: 1
22+
23+
system-power-controller:
24+
type: boolean
25+
description: Optional property that indicates that this device is
26+
controlling system power.
27+
28+
interrupts:
29+
description: Short-circuit, over-current, under-voltage for regulators, PB interrupts.
30+
maxItems: 1
31+
32+
interrupt-controller: true
33+
34+
'#interrupt-cells':
35+
description: Specifies the PIN numbers and Flags, as defined in
36+
include/dt-bindings/interrupt-controller/irq.h
37+
const: 1
38+
39+
ti,power-button:
40+
type: boolean
41+
description: |
42+
Optional property that sets the EN/PB/VSENSE pin to be a
43+
power-button.
44+
TPS65219 has a multipurpose pin called EN/PB/VSENSE that can be either
45+
1. EN in which case it functions as an enable pin.
46+
2. VSENSE which compares the voltages and triggers an automatic
47+
on/off request.
48+
3. PB in which case it can be configured to trigger an interrupt
49+
to the SoC.
50+
ti,power-button reflects the last one of those options
51+
where the board has a button wired to the pin and triggers
52+
an interrupt on pressing it.
53+
54+
patternProperties:
55+
"^buck[1-3]-supply$":
56+
description: Input supply phandle of one regulator.
57+
58+
"^ldo[1-4]-supply$":
59+
description: Input supply phandle of one regulator.
60+
61+
regulators:
62+
type: object
63+
description: |
64+
list of regulators provided by this controller
65+
66+
patternProperties:
67+
"^ldo[1-4]$":
68+
type: object
69+
$ref: regulator.yaml#
70+
description:
71+
Properties for single LDO regulator.
72+
73+
unevaluatedProperties: false
74+
75+
"^buck[1-3]$":
76+
type: object
77+
$ref: regulator.yaml#
78+
description:
79+
Properties for single BUCK regulator.
80+
81+
unevaluatedProperties: false
82+
83+
additionalProperties: false
84+
85+
required:
86+
- compatible
87+
- reg
88+
- interrupts
89+
- regulators
90+
91+
additionalProperties: false
92+
93+
examples:
94+
- |
95+
#include <dt-bindings/interrupt-controller/arm-gic.h>
96+
i2c {
97+
#address-cells = <1>;
98+
#size-cells = <0>;
99+
100+
tps65219: pmic@30 {
101+
compatible = "ti,tps65219";
102+
reg = <0x30>;
103+
buck1-supply = <&vcc_3v3_sys>;
104+
buck2-supply = <&vcc_3v3_sys>;
105+
buck3-supply = <&vcc_3v3_sys>;
106+
ldo1-supply = <&vcc_3v3_sys>;
107+
ldo2-supply = <&buck2_reg>;
108+
ldo3-supply = <&vcc_3v3_sys>;
109+
ldo4-supply = <&vcc_3v3_sys>;
110+
111+
pinctrl-0 = <&pmic_irq_pins_default>;
112+
113+
interrupt-parent = <&gic500>;
114+
interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
115+
ti,power-button;
116+
117+
regulators {
118+
buck1_reg: buck1 {
119+
regulator-name = "VDD_CORE";
120+
regulator-min-microvolt = <750000>;
121+
regulator-max-microvolt = <750000>;
122+
regulator-boot-on;
123+
regulator-always-on;
124+
};
125+
126+
buck2_reg: buck2 {
127+
regulator-name = "VCC1V8";
128+
regulator-min-microvolt = <1800000>;
129+
regulator-max-microvolt = <1800000>;
130+
regulator-boot-on;
131+
regulator-always-on;
132+
};
133+
134+
buck3_reg: buck3 {
135+
regulator-name = "VDD_LPDDR4";
136+
regulator-min-microvolt = <1100000>;
137+
regulator-max-microvolt = <1100000>;
138+
regulator-boot-on;
139+
regulator-always-on;
140+
};
141+
142+
ldo1_reg: ldo1 {
143+
regulator-name = "VDDSHV_SD_IO_PMIC";
144+
regulator-min-microvolt = <33000000>;
145+
regulator-max-microvolt = <33000000>;
146+
};
147+
148+
ldo2_reg: ldo2 {
149+
regulator-name = "VDDAR_CORE";
150+
regulator-min-microvolt = <850000>;
151+
regulator-max-microvolt = <850000>;
152+
regulator-boot-on;
153+
regulator-always-on;
154+
};
155+
156+
ldo3_reg: ldo3 {
157+
regulator-name = "VDDA_1V8";
158+
regulator-min-microvolt = <18000000>;
159+
regulator-max-microvolt = <18000000>;
160+
regulator-boot-on;
161+
regulator-always-on;
162+
};
163+
164+
ldo4_reg: ldo4 {
165+
regulator-name = "VDD_PHY_2V5";
166+
regulator-min-microvolt = <25000000>;
167+
regulator-max-microvolt = <25000000>;
168+
regulator-boot-on;
169+
regulator-always-on;
170+
};
171+
};
172+
};
173+
};

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14935,6 +14935,7 @@ F: drivers/regulator/palmas-regulator*.c
1493514935
F: drivers/regulator/pbias-regulator.c
1493614936
F: drivers/regulator/tps65217-regulator.c
1493714937
F: drivers/regulator/tps65218-regulator.c
14938+
F: drivers/regulator/tps65219-regulator.c
1493814939
F: drivers/regulator/tps65910-regulator.c
1493914940
F: drivers/regulator/twl-regulator.c
1494014941
F: drivers/regulator/twl6030-regulator.c

drivers/regulator/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,15 @@ config REGULATOR_TPS65218
13841384
voltage regulators. It supports software based voltage control
13851385
for different voltage domains
13861386

1387+
config REGULATOR_TPS65219
1388+
tristate "TI TPS65219 Power regulators"
1389+
depends on MFD_TPS65219 && OF
1390+
help
1391+
This driver supports TPS65219 voltage regulator chips.
1392+
TPS65219 series of PMICs have 3 single phase BUCKs & 4 LDOs
1393+
voltage regulators. It supports software based voltage control
1394+
for different voltage domains.
1395+
13871396
config REGULATOR_TPS6524X
13881397
tristate "TI TPS6524X Power regulators"
13891398
depends on SPI

drivers/regulator/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ obj-$(CONFIG_REGULATOR_TPS65086) += tps65086-regulator.o
162162
obj-$(CONFIG_REGULATOR_TPS65090) += tps65090-regulator.o
163163
obj-$(CONFIG_REGULATOR_TPS65217) += tps65217-regulator.o
164164
obj-$(CONFIG_REGULATOR_TPS65218) += tps65218-regulator.o
165+
obj-$(CONFIG_REGULATOR_TPS65219) += tps65219-regulator.o
165166
obj-$(CONFIG_REGULATOR_TPS6524X) += tps6524x-regulator.o
166167
obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o
167168
obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o

0 commit comments

Comments
 (0)