Skip to content
Permalink
Browse files
soc: rockchip: io-domain: set 3.3V before regulator disable
Do a fix to rockchip io-domain, follow this orders:

* system running state
  -> io-domain vsel to 3.3V (actually is done by pre-disable)
    -> regulator_enable
      -> vsel change according to regulator voltage

* system running state
  -> io-domain vsel to 3.3V
    -> regulator_disable

Found on some Rockchip SoCs, the regulator enable or disable without
care about the io-domain maybe caused soc damaged.

Tested on RV1126 EVB.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
  • Loading branch information
jayxurockchip authored and intel-lab-lkp committed Aug 18, 2021
1 parent b484ae3 commit 883d33a4052a54385679fe84a17345d7083f3a76
Showing 1 changed file with 6 additions and 0 deletions.
@@ -170,6 +170,12 @@ static int rockchip_iodomain_notify(struct notifier_block *nb,
} else if (event & (REGULATOR_EVENT_VOLTAGE_CHANGE |
REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE)) {
uV = (unsigned long)data;
} else if (event & REGULATOR_EVENT_PRE_ENABLE) {
uV = MAX_VOLTAGE_3_3;
} else if (event & REGULATOR_EVENT_PRE_DISABLE) {
uV = MAX_VOLTAGE_3_3;
} else if (event & REGULATOR_EVENT_ENABLE) {
uV = regulator_get_voltage(supply->reg);
} else {
return NOTIFY_OK;
}

0 comments on commit 883d33a

Please sign in to comment.