Commit 8622817c authored by Mark Brown's avatar Mark Brown

Add support for TI TPS65219 PMIC.

Merge series from Jerome Neanne <jneanne@baylibre.com>:

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.
parents a2740378 c12ac5fc
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/ti,tps65219.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI tps65219 Power Management Integrated Circuit regulators
maintainers:
- Jerome Neanne <jerome.neanne@baylibre.com>
description: |
Regulator nodes should be named to buck<number> and ldo<number>.
properties:
compatible:
enum:
- ti,tps65219
reg:
maxItems: 1
system-power-controller:
type: boolean
description: Optional property that indicates that this device is
controlling system power.
interrupts:
description: Short-circuit, over-current, under-voltage for regulators, PB interrupts.
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
description: Specifies the PIN numbers and Flags, as defined in
include/dt-bindings/interrupt-controller/irq.h
const: 1
ti,power-button:
type: boolean
description: |
Optional property that sets the EN/PB/VSENSE pin to be a
power-button.
TPS65219 has a multipurpose pin called EN/PB/VSENSE that can be either
1. EN in which case it functions as an enable pin.
2. VSENSE which compares the voltages and triggers an automatic
on/off request.
3. PB in which case it can be configured to trigger an interrupt
to the SoC.
ti,power-button reflects the last one of those options
where the board has a button wired to the pin and triggers
an interrupt on pressing it.
patternProperties:
"^buck[1-3]-supply$":
description: Input supply phandle of one regulator.
"^ldo[1-4]-supply$":
description: Input supply phandle of one regulator.
regulators:
type: object
description: |
list of regulators provided by this controller
patternProperties:
"^ldo[1-4]$":
type: object
$ref: regulator.yaml#
description:
Properties for single LDO regulator.
unevaluatedProperties: false
"^buck[1-3]$":
type: object
$ref: regulator.yaml#
description:
Properties for single BUCK regulator.
unevaluatedProperties: false
additionalProperties: false
required:
- compatible
- reg
- interrupts
- regulators
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
tps65219: pmic@30 {
compatible = "ti,tps65219";
reg = <0x30>;
buck1-supply = <&vcc_3v3_sys>;
buck2-supply = <&vcc_3v3_sys>;
buck3-supply = <&vcc_3v3_sys>;
ldo1-supply = <&vcc_3v3_sys>;
ldo2-supply = <&buck2_reg>;
ldo3-supply = <&vcc_3v3_sys>;
ldo4-supply = <&vcc_3v3_sys>;
pinctrl-0 = <&pmic_irq_pins_default>;
interrupt-parent = <&gic500>;
interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
ti,power-button;
regulators {
buck1_reg: buck1 {
regulator-name = "VDD_CORE";
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <750000>;
regulator-boot-on;
regulator-always-on;
};
buck2_reg: buck2 {
regulator-name = "VCC1V8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-always-on;
};
buck3_reg: buck3 {
regulator-name = "VDD_LPDDR4";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-boot-on;
regulator-always-on;
};
ldo1_reg: ldo1 {
regulator-name = "VDDSHV_SD_IO_PMIC";
regulator-min-microvolt = <33000000>;
regulator-max-microvolt = <33000000>;
};
ldo2_reg: ldo2 {
regulator-name = "VDDAR_CORE";
regulator-min-microvolt = <850000>;
regulator-max-microvolt = <850000>;
regulator-boot-on;
regulator-always-on;
};
ldo3_reg: ldo3 {
regulator-name = "VDDA_1V8";
regulator-min-microvolt = <18000000>;
regulator-max-microvolt = <18000000>;
regulator-boot-on;
regulator-always-on;
};
ldo4_reg: ldo4 {
regulator-name = "VDD_PHY_2V5";
regulator-min-microvolt = <25000000>;
regulator-max-microvolt = <25000000>;
regulator-boot-on;
regulator-always-on;
};
};
};
};
......@@ -14935,6 +14935,7 @@ F: drivers/regulator/palmas-regulator*.c
F: drivers/regulator/pbias-regulator.c
F: drivers/regulator/tps65217-regulator.c
F: drivers/regulator/tps65218-regulator.c
F: drivers/regulator/tps65219-regulator.c
F: drivers/regulator/tps65910-regulator.c
F: drivers/regulator/twl-regulator.c
F: drivers/regulator/twl6030-regulator.c
......
......@@ -1384,6 +1384,15 @@ config REGULATOR_TPS65218
voltage regulators. It supports software based voltage control
for different voltage domains
config REGULATOR_TPS65219
tristate "TI TPS65219 Power regulators"
depends on MFD_TPS65219 && OF
help
This driver supports TPS65219 voltage regulator chips.
TPS65219 series of PMICs have 3 single phase BUCKs & 4 LDOs
voltage regulators. It supports software based voltage control
for different voltage domains.
config REGULATOR_TPS6524X
tristate "TI TPS6524X Power regulators"
depends on SPI
......
......@@ -162,6 +162,7 @@ obj-$(CONFIG_REGULATOR_TPS65086) += tps65086-regulator.o
obj-$(CONFIG_REGULATOR_TPS65090) += tps65090-regulator.o
obj-$(CONFIG_REGULATOR_TPS65217) += tps65217-regulator.o
obj-$(CONFIG_REGULATOR_TPS65218) += tps65218-regulator.o
obj-$(CONFIG_REGULATOR_TPS65219) += tps65219-regulator.o
obj-$(CONFIG_REGULATOR_TPS6524X) += tps6524x-regulator.o
obj-$(CONFIG_REGULATOR_TPS6586X) += tps6586x-regulator.o
obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment