regulator: cpr3-regulator: fix bug in LDO/BHS transition Vref selection
When switching a cluster from LDO to BHS or BHS to LDO mode,
the LDO Vref setpoint programmed before the regulator mode switch
should correspond to the VDD supply minus LDO headroom voltage.
However, there is a corner case which results in the violation
of this requirement. If an APM crossing occurs as a result of
switching the CPR corner, then the VDD supply is explicitly set
to the APM threshold voltage. If in addition, the VDD voltage is
being decreased, then the VDD voltage existing prior to the APM
switch is incorrectly used to determine the LDO Vref setpoint
requested before switching to BHS or LDO mode. Fix this by passing
the APM threshold voltage to cpr3_regulator_config_ldo() when
VDD voltage is decreasing and an APM switch took place beforehand.
Change-Id: I83a7e6eec17a92ecd4119d1a29791c50585a574c
Signed-off-by:
Osvaldo Banuelos <osvaldob@codeaurora.org>
Loading
Please register or sign in to comment