diff options
author | Ran Bi <ran.bi@mediatek.com> | 2019-03-19 11:47:21 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-04-02 10:25:42 +0000 |
commit | b197808852a51243ebbcca502319b1e3e4cb4ddb (patch) | |
tree | a516fe057c6b173f685f9b869d1034fed7f2f3c6 /src/soc/mediatek/mt8183/include | |
parent | 274613303e31bae9bbfdf0994ffd9bd040e38a1a (diff) | |
download | coreboot-b197808852a51243ebbcca502319b1e3e4cb4ddb.tar.xz |
mediatek/mt8183: Fix RTC initialization flow
1. Fix RTC lpd settings. Rewrite powerkeys after lpd init
to enable low power detect function.
2. Rearrange RTC initialization flow.
3. Add return status for rtc_init.
4. Add log if calling pwrap_write or pwrap_read fail.
5. Increase timeout time to resolve unexpected timeout.
BUG=b:127405695
BRANCH=none
TEST=Boots correctly on Kukui
Change-Id: I6f26edd6699c2f6d9af80c285b70742b44407136
Signed-off-by: Ran Bi <ran.bi@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31968
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'src/soc/mediatek/mt8183/include')
-rw-r--r-- | src/soc/mediatek/mt8183/include/soc/rtc.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/soc/mediatek/mt8183/include/soc/rtc.h b/src/soc/mediatek/mt8183/include/soc/rtc.h index 08ebe98913..3d115fec41 100644 --- a/src/soc/mediatek/mt8183/include/soc/rtc.h +++ b/src/soc/mediatek/mt8183/include/soc/rtc.h @@ -77,7 +77,7 @@ enum { RTC_BBPU_RELOAD = 1U << 5, RTC_BBPU_CBUSY = 1U << 6, - RTC_CBUSY_TIMEOUT_US = 800 + RTC_CBUSY_TIMEOUT_US = 8000 }; enum { @@ -106,6 +106,14 @@ enum { RTC_REG_XOSC32_ENB = 1 << 15 }; +enum { + RTC_LPD_OPT_XOSC_AND_EOSC_LPD = 0 << 13, + RTC_LPD_OPT_EOSC_LPD = 1 << 13, + RTC_LPD_OPT_XOSC_LPD = 2 << 13, + RTC_LPD_OPT_F32K_CK_ALIVE = 3 << 13, + RTC_LPD_OPT_MASK = 3 << 13 +}; + /* PMIC TOP Register Definition */ enum { PMIC_RG_SCK_TOP_CON0 = 0x050C |