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:
Joseph Chen
2024-10-16 17:42:29 +08:00
parent 7db526d176
commit ef4c4aba2a
5 changed files with 687 additions and 2 deletions

View File

@@ -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),

View File

@@ -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

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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