mediatek/mt8183: Enable RTC eosc calibration feature to save power
When system shuts down, RTC enable eosc calibration feature to save power. Then coreboot RTC driver needs to call rtc_enable_dcxo function at every boot to switch RTC clock source to dcxo. BUG=b:128467245 BRANCH=none TEST=Boots correctly on Kukui Change-Id: Iee21e7611df8959cbbc63b6e6655cfb462147748 Signed-off-by: Ran Bi <ran.bi@mediatek.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32339 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
@@ -91,12 +91,15 @@ int rtc_xosc_write(u16 val)
|
||||
u16 bbpu;
|
||||
|
||||
rtc_write(RTC_OSC32CON, RTC_OSC32CON_UNLOCK1);
|
||||
udelay(200);
|
||||
if (!rtc_busy_wait())
|
||||
return 0;
|
||||
rtc_write(RTC_OSC32CON, RTC_OSC32CON_UNLOCK2);
|
||||
udelay(200);
|
||||
if (!rtc_busy_wait())
|
||||
return 0;
|
||||
|
||||
rtc_write(RTC_OSC32CON, val);
|
||||
udelay(200);
|
||||
if (!rtc_busy_wait())
|
||||
return 0;
|
||||
|
||||
rtc_read(RTC_BBPU, &bbpu);
|
||||
bbpu |= RTC_BBPU_KEY | RTC_BBPU_RELOAD;
|
||||
|
Reference in New Issue
Block a user