Commit 6501c1f5 authored by Saravanan Sekar's avatar Saravanan Sekar Committed by Mark Brown

regulator: mpq7920: add mpq7920 regulator driver

Adding regulator driver for the device mpq7920.
The MPQ7920 PMIC device contains four DC-DC buck converters and
five regulators, is designed for automotive and accessed over I2C.

Fixed sparse warning reported on this patch
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarSaravanan Sekar <sravanhome@gmail.com>
Link: https://lore.kernel.org/r/20200109195346.30270-1-sravanhome@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c5bae95b
...@@ -623,6 +623,16 @@ config REGULATOR_MP8859 ...@@ -623,6 +623,16 @@ config REGULATOR_MP8859
Say M here if you want to include support for the regulator as a Say M here if you want to include support for the regulator as a
module. The module will be named "mp8859". module. The module will be named "mp8859".
config REGULATOR_MPQ7920
tristate "Monolithic MPQ7920 PMIC"
depends on I2C && OF
select REGMAP_I2C
help
Say y here to support the MPQ7920 PMIC. This will enable supports
the software controllable 4 buck and 5 LDO regulators.
This driver supports the control of different power rails of device
through regulator interface.
config REGULATOR_MT6311 config REGULATOR_MT6311
tristate "MediaTek MT6311 PMIC" tristate "MediaTek MT6311 PMIC"
depends on I2C depends on I2C
......
...@@ -79,6 +79,7 @@ obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o ...@@ -79,6 +79,7 @@ obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o
obj-$(CONFIG_REGULATOR_MCP16502) += mcp16502.o obj-$(CONFIG_REGULATOR_MCP16502) += mcp16502.o
obj-$(CONFIG_REGULATOR_MP8859) += mp8859.o obj-$(CONFIG_REGULATOR_MP8859) += mp8859.o
obj-$(CONFIG_REGULATOR_MPQ7920) += mpq7920.o
obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o
obj-$(CONFIG_REGULATOR_MT6323) += mt6323-regulator.o obj-$(CONFIG_REGULATOR_MT6323) += mt6323-regulator.o
obj-$(CONFIG_REGULATOR_MT6358) += mt6358-regulator.o obj-$(CONFIG_REGULATOR_MT6358) += mt6358-regulator.o
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* mpq7920.h - Regulator definitions for mpq7920
*
* Copyright 2019 Monolithic Power Systems, Inc
*
*/
#ifndef __MPQ7920_H__
#define __MPQ7920_H__
#define MPQ7920_REG_CTL0 0x00
#define MPQ7920_REG_CTL1 0x01
#define MPQ7920_REG_CTL2 0x02
#define MPQ7920_BUCK1_REG_A 0x03
#define MPQ7920_BUCK1_REG_B 0x04
#define MPQ7920_BUCK1_REG_C 0x05
#define MPQ7920_BUCK1_REG_D 0x06
#define MPQ7920_BUCK2_REG_A 0x07
#define MPQ7920_BUCK2_REG_B 0x08
#define MPQ7920_BUCK2_REG_C 0x09
#define MPQ7920_BUCK2_REG_D 0x0a
#define MPQ7920_BUCK3_REG_A 0x0b
#define MPQ7920_BUCK3_REG_B 0x0c
#define MPQ7920_BUCK3_REG_C 0x0d
#define MPQ7920_BUCK3_REG_D 0x0e
#define MPQ7920_BUCK4_REG_A 0x0f
#define MPQ7920_BUCK4_REG_B 0x10
#define MPQ7920_BUCK4_REG_C 0x11
#define MPQ7920_BUCK4_REG_D 0x12
#define MPQ7920_LDO1_REG_A 0x13
#define MPQ7920_LDO1_REG_B 0x0
#define MPQ7920_LDO2_REG_A 0x14
#define MPQ7920_LDO2_REG_B 0x15
#define MPQ7920_LDO2_REG_C 0x16
#define MPQ7920_LDO3_REG_A 0x17
#define MPQ7920_LDO3_REG_B 0x18
#define MPQ7920_LDO3_REG_C 0x19
#define MPQ7920_LDO4_REG_A 0x1a
#define MPQ7920_LDO4_REG_B 0x1b
#define MPQ7920_LDO4_REG_C 0x1c
#define MPQ7920_LDO5_REG_A 0x1d
#define MPQ7920_LDO5_REG_B 0x1e
#define MPQ7920_LDO5_REG_C 0x1f
#define MPQ7920_REG_MODE 0x20
#define MPQ7920_REG_REGULATOR_EN1 0x22
#define MPQ7920_REG_REGULATOR_EN 0x22
#define MPQ7920_MASK_VREF 0x7f
#define MPQ7920_MASK_BUCK_ILIM 0xd0
#define MPQ7920_MASK_LDO_ILIM BIT(6)
#define MPQ7920_MASK_DISCHARGE BIT(5)
#define MPQ7920_MASK_MODE 0xc0
#define MPQ7920_MASK_SOFTSTART 0x0c
#define MPQ7920_MASK_SWITCH_FREQ 0x30
#define MPQ7920_MASK_BUCK_PHASE_DEALY 0x30
#define MPQ7920_MASK_DVS_SLEWRATE 0xc0
#define MPQ7920_DISCHARGE_ON 0x1
#define MPQ7920_REGULATOR_EN_OFFSET 7
/* values in mV */
#define MPQ7920_BUCK_VOLT_MIN 400000
#define MPQ7920_LDO_VOLT_MIN 650000
#define MPQ7920_VOLT_MAX 3587500
#define MPQ7920_VOLT_STEP 12500
#endif /* __MPQ7920_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