regulator-initial-state = <3>;
regulator-state-mem {
regulator-state-enabled;
- regulator-state-uv = <1200000>;
+ regulator-state-uv = <1000000>;
};
};
regulator-state-uv = <1800000>;
};
};
+
+ rk808_ldo9_reg: regulator@12{
+ reg = <12>;
+ regulator-compatible = "rk_ldo9";
+ regulator-initial-state = <3>;
+ regulator-state-mem {
+ regulator-state-enabled;
+ };
+ };
+
+ rk808_ldo10_reg: regulator@13{
+ reg = <13>;
+ regulator-compatible = "rk_ldo10";
+ regulator-initial-state = <3>;
+ regulator-state-mem {
+ regulator-state-enabled;
+ };
+ };
};
};
{
struct rk808 *rk808 = rdev_get_drvdata(dev);
int ldo= rdev_get_id(dev) - RK808_LDO1;
-
- return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG2, 1 << ldo, 0);
+
+ if(ldo == 8)
+ return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG1, 1 << 5, 0);
+ else if(ldo ==9)
+ return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG1, 1 << 6, 0);
+ else
+ return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG2, 1 << ldo, 0);
}
static int rk808_ldo_suspend_disable(struct regulator_dev *dev)
struct rk808 *rk808 = rdev_get_drvdata(dev);
int ldo= rdev_get_id(dev) - RK808_LDO1;
+ if(ldo == 8)
+ return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG1, 1 << 5, 1 << 5);
+ else if(ldo ==9)
+ return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG1, 1 << 6, 1 << 6);
+ else
return rk808_set_bits(rk808, RK808_SLEEP_SET_OFF_REG2, 1 << ldo, 1 << ldo);
}
int ldo= rdev_get_id(dev) - RK808_LDO1;
u16 reg = 0;
int val;
- reg = rk808_reg_read(rk808,rk808_LDO_SET_VOL_REG(ldo));
- reg &= LDO_VOL_MASK;
- if (ldo ==2){
- val = 1000 * ldo3_voltage_map[reg];
- }
- else if (ldo == 5 || ldo ==6){
- val = 1000 * ldo6_voltage_map[reg];
+
+ if ((ldo ==8 ) || (ldo ==9)){
+ reg = rk808_reg_read(rk808,rk808_BUCK_SET_VOL_REG(3));
+ reg &= BUCK_VOL_MASK;
+ val = 1000 * buck4_voltage_map[reg];
}
else{
- val = 1000 * ldo_voltage_map[reg];
+ reg = rk808_reg_read(rk808,rk808_LDO_SET_VOL_REG(ldo));
+ reg &= LDO_VOL_MASK;
+ if (ldo ==2){
+ val = 1000 * ldo3_voltage_map[reg];
+ }
+ else if (ldo == 5 || ldo ==6){
+ val = 1000 * ldo6_voltage_map[reg];
+ }
+ else{
+ val = 1000 * ldo_voltage_map[reg];
+ }
}
return val;
}
.type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE,
},
+ {
+ .name = "RK_LDO9",
+ .id = 12,
+ .ops = &rk808_ldo_ops,
+ .n_voltages = ARRAY_SIZE(buck4_voltage_map),
+ .type = REGULATOR_VOLTAGE,
+ .owner = THIS_MODULE,
+ },
+ {
+ .name = "RK_LDO10",
+ .id = 13,
+ .ops = &rk808_ldo_ops,
+ .n_voltages = ARRAY_SIZE(buck4_voltage_map),
+ .type = REGULATOR_VOLTAGE,
+ .owner = THIS_MODULE,
+ },
};
{ .name = "rk_ldo6", .driver_data = (void *)9 },
{ .name = "rk_ldo7", .driver_data = (void *)10 },
{ .name = "rk_ldo8", .driver_data = (void *)11 },
+ { .name = "rk_ldo9", .driver_data = (void *)12 },
+ { .name = "rk_ldo10", .driver_data = (void *)13 },
};
static struct rk808_board *rk808_parse_dt(struct rk808 *rk808)