arm64: rockchip: rk808: Add remaining regulators
The RK808 driver was missing the LDO and switch regulators. Add support for them. Reviewed by: mmel MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D22852
This commit is contained in:
parent
135b723803
commit
b68dfe6949
@ -221,6 +221,114 @@ static struct rk805_regdef rk808_regdefs[] = {
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 16,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO1,
|
||||
.name = "LDO_REG1",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x1,
|
||||
.voltage_reg = RK805_LDO1_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 1800000,
|
||||
.voltage_max = 3400000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 17,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO2,
|
||||
.name = "LDO_REG2",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x2,
|
||||
.voltage_reg = RK805_LDO2_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 1800000,
|
||||
.voltage_max = 3400000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 17,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO3,
|
||||
.name = "LDO_REG3",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x4,
|
||||
.voltage_reg = RK805_LDO3_ON_VSEL,
|
||||
.voltage_mask = 0xF,
|
||||
.voltage_min = 800000,
|
||||
.voltage_max = 2500000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 18,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO4,
|
||||
.name = "LDO_REG4",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x8,
|
||||
.voltage_reg = RK808_LDO4_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 1800000,
|
||||
.voltage_max = 3400000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 17,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO5,
|
||||
.name = "LDO_REG5",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x10,
|
||||
.voltage_reg = RK808_LDO5_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 1800000,
|
||||
.voltage_max = 3400000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 17,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO6,
|
||||
.name = "LDO_REG6",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x20,
|
||||
.voltage_reg = RK808_LDO6_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 800000,
|
||||
.voltage_max = 2500000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 18,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO7,
|
||||
.name = "LDO_REG7",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x40,
|
||||
.voltage_reg = RK808_LDO7_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 800000,
|
||||
.voltage_max = 2500000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 18,
|
||||
},
|
||||
{
|
||||
.id = RK808_LDO8,
|
||||
.name = "LDO_REG8",
|
||||
.enable_reg = RK808_LDO_EN,
|
||||
.enable_mask = 0x80,
|
||||
.voltage_reg = RK808_LDO8_ON_VSEL,
|
||||
.voltage_mask = 0x1F,
|
||||
.voltage_min = 1800000,
|
||||
.voltage_max = 3400000,
|
||||
.voltage_step = 100000,
|
||||
.voltage_nstep = 17,
|
||||
},
|
||||
{
|
||||
.id = RK808_SWITCH1,
|
||||
.name = "SWITCH_REG1",
|
||||
.enable_reg = RK805_DCDC_EN,
|
||||
.enable_mask = 0x20,
|
||||
},
|
||||
{
|
||||
.id = RK808_SWITCH2,
|
||||
.name = "SWITCH_REG2",
|
||||
.enable_reg = RK805_DCDC_EN,
|
||||
.enable_mask = 0x40,
|
||||
},
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -58,6 +58,16 @@
|
||||
#define RK805_LDO2_SLEEP_VSEL 0x3E
|
||||
#define RK805_LDO3_ON_VSEL 0x3F
|
||||
#define RK805_LDO3_SLEEP_VSEL 0x40
|
||||
#define RK808_LDO4_ON_VSEL 0x41
|
||||
#define RK808_LDO4_SLEEP_VSEL 0x42
|
||||
#define RK808_LDO5_ON_VSEL 0x43
|
||||
#define RK808_LDO5_SLEEP_VSEL 0x44
|
||||
#define RK808_LDO6_ON_VSEL 0x45
|
||||
#define RK808_LDO6_SLEEP_VSEL 0x46
|
||||
#define RK808_LDO7_ON_VSEL 0x47
|
||||
#define RK808_LDO7_SLEEP_VSEL 0x48
|
||||
#define RK808_LDO8_ON_VSEL 0x49
|
||||
#define RK808_LDO8_SLEEP_VSEL 0x4A
|
||||
|
||||
enum rk805_regulator {
|
||||
RK805_DCDC1 = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user