Commit f307a7e9 authored by James Ban's avatar James Ban Committed by Mark Brown

regulator: pv88060: new regulator driver

This is the driver for the Powerventure PV88060 BUCKs and LDOs regulator.
It communicates via an I2C bus to the device.
Signed-off-by: default avatarJames Ban <James.Ban.opensource@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8005c49d
* Powerventure Semiconductor PV88060 Voltage Regulator
Required properties:
- compatible: "pvs,pv88060".
- reg: I2C slave address, usually 0x49.
- interrupts: the interrupt outputs of the controller
- regulators: A node that houses a sub-node for each regulator within the
device. Each sub-node is identified using the node's name, with valid
values listed below. The content of each sub-node is defined by the
standard binding for regulators; see regulator.txt.
BUCK1, LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7, SW1, SW2, SW3, SW4,
SW5, and SW6.
Optional properties:
- Any optional property defined in regulator.txt
Example
pmic: pv88060@49 {
compatible = "pvs,pv88060";
reg = <0x49>;
interrupt-parent = <&gpio>;
interrupts = <24 24>;
regulators {
BUCK1 {
regulator-name = "buck1";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <4387500>;
regulator-min-microamp = <1496000>;
regulator-max-microamp = <4189000>;
regulator-boot-on;
};
LDO1 {
regulator-name = "ldo1";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
LDO2 {
regulator-name = "ldo2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
LDO3 {
regulator-name = "ldo3";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
LDO4 {
regulator-name = "ldo4";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
LDO5 {
regulator-name = "ldo5";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
LDO6 {
regulator-name = "ldo6";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
LDO7 {
regulator-name = "ldo7";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <3350000>;
regulator-boot-on;
};
SW1 {
regulator-name = "sw1";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
SW2 {
regulator-name = "sw2";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
};
SW3 {
regulator-name = "sw3";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
};
SW4 {
regulator-name = "sw4";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
};
SW5 {
regulator-name = "sw5";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
};
SW6 {
regulator-name = "sw6";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
};
};
\ No newline at end of file
...@@ -504,6 +504,14 @@ config REGULATOR_PFUZE100 ...@@ -504,6 +504,14 @@ config REGULATOR_PFUZE100
Say y here to support the regulators found on the Freescale Say y here to support the regulators found on the Freescale
PFUZE100/PFUZE200 PMIC. PFUZE100/PFUZE200 PMIC.
config REGULATOR_PV88060
tristate "Powerventure Semiconductor PV88060 regulator"
depends on I2C
select REGMAP_I2C
help
Say y here to support the voltage regulators and convertors
PV88060
config REGULATOR_PWM config REGULATOR_PWM
tristate "PWM voltage regulator" tristate "PWM voltage regulator"
depends on PWM depends on PWM
......
...@@ -66,6 +66,7 @@ obj-$(CONFIG_REGULATOR_QCOM_SMD_RPM) += qcom_smd-regulator.o ...@@ -66,6 +66,7 @@ obj-$(CONFIG_REGULATOR_QCOM_SMD_RPM) += qcom_smd-regulator.o
obj-$(CONFIG_REGULATOR_QCOM_SPMI) += qcom_spmi-regulator.o obj-$(CONFIG_REGULATOR_QCOM_SPMI) += qcom_spmi-regulator.o
obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o
obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o
obj-$(CONFIG_REGULATOR_PV88060) += pv88060-regulator.o
obj-$(CONFIG_REGULATOR_PWM) += pwm-regulator.o obj-$(CONFIG_REGULATOR_PWM) += pwm-regulator.o
obj-$(CONFIG_REGULATOR_TPS51632) += tps51632-regulator.o obj-$(CONFIG_REGULATOR_TPS51632) += tps51632-regulator.o
obj-$(CONFIG_REGULATOR_PBIAS) += pbias-regulator.o obj-$(CONFIG_REGULATOR_PBIAS) += pbias-regulator.o
......
This diff is collapsed.
/*
* pv88060-regulator.h - Regulator definitions for PV88060
* Copyright (C) 2015 Powerventure Semiconductor Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __PV88060_REGISTERS_H__
#define __PV88060_REGISTERS_H__
/* System Control and Event Registers */
#define PV88060_REG_EVENT_A 0x04
#define PV88060_REG_MASK_A 0x08
#define PV88060_REG_MASK_B 0x09
#define PV88060_REG_MASK_C 0x0A
/* Regulator Registers */
#define PV88060_REG_BUCK1_CONF0 0x1B
#define PV88060_REG_BUCK1_CONF1 0x1C
#define PV88060_REG_LDO1_CONF 0x1D
#define PV88060_REG_LDO2_CONF 0x1E
#define PV88060_REG_LDO3_CONF 0x1F
#define PV88060_REG_LDO4_CONF 0x20
#define PV88060_REG_LDO5_CONF 0x21
#define PV88060_REG_LDO6_CONF 0x22
#define PV88060_REG_LDO7_CONF 0x23
#define PV88060_REG_SW1_CONF 0x3B
#define PV88060_REG_SW2_CONF 0x3C
#define PV88060_REG_SW3_CONF 0x3D
#define PV88060_REG_SW4_CONF 0x3E
#define PV88060_REG_SW5_CONF 0x3F
#define PV88060_REG_SW6_CONF 0x40
/* PV88060_REG_EVENT_A (addr=0x04) */
#define PV88060_E_VDD_FLT 0x01
#define PV88060_E_OVER_TEMP 0x02
/* PV88060_REG_MASK_A (addr=0x08) */
#define PV88060_M_VDD_FLT 0x01
#define PV88060_M_OVER_TEMP 0x02
/* PV88060_REG_BUCK1_CONF0 (addr=0x1B) */
#define PV88060_BUCK_EN 0x80
#define PV88060_VBUCK_MASK 0x7F
/* PV88060_REG_LDO1/2/3/4/5/6/7_CONT */
#define PV88060_LDO_EN 0x40
#define PV88060_VLDO_MASK 0x3F
/* PV88060_REG_SW1/2/3/4/5_CONF */
#define PV88060_SW_EN 0x80
/* PV88060_REG_BUCK1_CONF1 (addr=0x1C) */
#define PV88060_BUCK_ILIM_SHIFT 2
#define PV88060_BUCK_ILIM_MASK 0x0C
#define PV88060_BUCK_MODE_SHIFT 0
#define PV88060_BUCK_MODE_MASK 0x03
#define PV88060_BUCK_MODE_SLEEP 0x00
#define PV88060_BUCK_MODE_AUTO 0x01
#define PV88060_BUCK_MODE_SYNC 0x02
#endif /* __PV88060_REGISTERS_H__ */
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