};
static const struct udevice_id rk8xx_ids[] = {
+ { .compatible = "rockchip,rk805" },
{ .compatible = "rockchip,rk808" },
{ .compatible = "rockchip,rk816" },
{ .compatible = "rockchip,rk818" },
/*
* Ramp delay
*/
+#define RK805_RAMP_RATE_OFFSET 3
+#define RK805_RAMP_RATE_MASK (3 << RK805_RAMP_RATE_OFFSET)
+#define RK805_RAMP_RATE_3MV_PER_US (0 << RK805_RAMP_RATE_OFFSET)
+#define RK805_RAMP_RATE_6MV_PER_US (1 << RK805_RAMP_RATE_OFFSET)
+#define RK805_RAMP_RATE_12_5MV_PER_US (2 << RK805_RAMP_RATE_OFFSET)
+#define RK805_RAMP_RATE_25MV_PER_US (3 << RK805_RAMP_RATE_OFFSET)
#define RK808_RAMP_RATE_OFFSET 3
+
#define RK808_RAMP_RATE_MASK (3 << RK808_RAMP_RATE_OFFSET)
#define RK808_RAMP_RATE_2MV_PER_US (0 << RK808_RAMP_RATE_OFFSET)
#define RK808_RAMP_RATE_4MV_PER_US (1 << RK808_RAMP_RATE_OFFSET)
struct rk8xx_priv *priv = dev_get_priv(pmic);
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
switch (num) {
case 0:
struct rk8xx_priv *priv = dev_get_priv(pmic);
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
if (buck >= 4) {
buck -= 4;
int ret = 0;
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
if (buck >= 4) {
mask = 1 << (buck - 4);
struct rk8xx_priv *priv = dev_get_priv(pmic);
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
mask = 1 << buck;
ret = pmic_clrsetbits(pmic, RK816_REG_DCDC_SLP_EN, mask,
uint mask;
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
mask = 1 << buck;
val = pmic_reg_read(pmic, RK816_REG_DCDC_SLP_EN);
struct rk8xx_priv *priv = dev_get_priv(pmic);
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
return &rk816_ldo[num];
case RK818_ID:
int ret = 0;
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
if (ldo >= 4) {
mask = 1 << (ldo - 4);
int ret = 0;
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
if (ldo >= 4) {
ldo -= 4;
int ret = 0;
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
mask = 1 << ldo;
ret = pmic_clrsetbits(pmic, RK816_REG_LDO_SLP_EN, mask,
uint mask;
switch (priv->variant) {
+ case RK805_ID:
case RK816_ID:
mask = 1 << ldo;
val = pmic_reg_read(pmic, RK816_REG_LDO_SLP_EN);