You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
regulator: rk801: Add driver and fix voltage scale issue
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I0fc66ed8e4279a3fbe1ed9d791de745ffaa30891
This commit is contained in:
@@ -217,7 +217,7 @@ static const struct resource rk817_pwrkey_resources[] = {
|
||||
};
|
||||
|
||||
static const struct mfd_cell rk801s[] = {
|
||||
{ .name = "rk808-regulator", },
|
||||
{ .name = "rk801-regulator", },
|
||||
{
|
||||
.name = "rk805-pwrkey",
|
||||
.num_resources = ARRAY_SIZE(rk801_key_resources),
|
||||
|
||||
@@ -1053,6 +1053,15 @@ config REGULATOR_RC5T583
|
||||
through regulator interface. The device supports multiple DCDC/LDO
|
||||
outputs which can be controlled by i2c communication.
|
||||
|
||||
config REGULATOR_RK801
|
||||
tristate "Rockchip RK801 Power regulators"
|
||||
depends on MFD_RK808
|
||||
help
|
||||
Select this option to enable the power regulator of ROCKCHIP
|
||||
PMIC RK801. This driver supports the control of different power rails
|
||||
of device through regulator interface. The device supports multiple DCDC/LDO
|
||||
outputs which can be controlled by i2c communication.
|
||||
|
||||
config REGULATOR_RK806
|
||||
tristate "Rockchip RK806 Power regulator"
|
||||
depends on MFD_RK806
|
||||
|
||||
@@ -126,6 +126,7 @@ obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY) += rpi-panel-attiny-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RK801) += rk801-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RK806) += rk806-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RK808) += rk808-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_RK860X) += rk860x-regulator.o
|
||||
|
||||
669
drivers/regulator/rk801-regulator.c
Normal file
669
drivers/regulator/rk801-regulator.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -22,11 +22,12 @@
|
||||
enum rk801_reg {
|
||||
RK801_ID_DCDC1,
|
||||
RK801_ID_DCDC2,
|
||||
RK801_ID_DCDC3,
|
||||
RK801_ID_DCDC4,
|
||||
RK801_ID_DCDC3,
|
||||
RK801_ID_LDO1,
|
||||
RK801_ID_LDO2,
|
||||
RK801_ID_SWITCH,
|
||||
RK801_ID_MAX,
|
||||
};
|
||||
|
||||
#define RK801_SLP_REG_OFFSET 5
|
||||
@@ -107,6 +108,11 @@ enum rk801_reg {
|
||||
#define RK801_IRQ_VDC_RISE_MSK BIT(5)
|
||||
#define RK801_IRQ_VDC_FALL_MSK BIT(6)
|
||||
|
||||
/* RK801_SLP_LP_CONFIG_REG */
|
||||
#define RK801_BUCK_SLP_LP_EN BIT(3)
|
||||
#define RK801_PLDO_SLP_LP_EN BIT(1)
|
||||
#define RK801_SLP_LP_MASK (RK801_PLDO_SLP_LP_EN | RK801_BUCK_SLP_LP_EN)
|
||||
|
||||
/* RK801_SLEEP_CFG_REG */
|
||||
#define RK801_SLEEP_FUN_MSK 0x3
|
||||
#define RK801_NONE_FUN 0x0
|
||||
|
||||
Reference in New Issue
Block a user