• Chris Zhong's avatar
    regulator: rk808: fixed the overshoot when adjust voltage · bad47ad2
    Chris Zhong authored
    There is a overshoot in DCDC1/DCDC2, we have 2 method to workaround:
    1st is use dvs pin to switch the voltage between value in BUCKn_ON_VSEL
    and BUCKn_DVS_VSEL. If DVS pin is inactive, the voltage of DCDC1/DCDC2
    are controlled by BUCKn_ON_VSEL, when we pull dvs1/dvs2 pin to active,
    they would be controlled by BUCKn_DVS_VSEL. In this case, the ramp rate
    is same as the value programmed in BUCKn_RATE, and the fastest rate is
    10mv/us.
    2nd method is gradual adjustment, adjust the voltage to a target value
    step by step via i2c, each step is set to 100 mA. If you write the
    voltage directly using an i2c write the rk808 will always ramp as fast
    as it possibly can, about 100mv/us.
    Signed-off-by: default avatarChris Zhong <zyw@rock-chips.com>
    Reviewed-by: default avatarDoug Anderson <dianders@chromium.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    bad47ad2
rk808-regulator.c 17.6 KB