soc/mediatek/mt8192: add rtc MT6359P driver

Add rtc MT6359P driver for rtc init and rtc eosc calibration. Refactor
mt8173 and mt8183 code by extracting common API. Move rtc_read and
rtc_write to each SoC folder, because mt8173 and mt8183 access rtc via
pmic wrapper, while mt8192 accesses it via pmif.

Reference datasheet:
  Document No: RH-D-2018-0101.

Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.corp-partner.google.com>
Change-Id: I57d6738fdec148c7458b2024a0a8225415ca2f3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Yuchen Huang
2020-08-18 16:29:29 +08:00
committed by Hung-Te Lin
parent 87c30a064c
commit b0ab41e027
12 changed files with 768 additions and 135 deletions

View File

@@ -6,6 +6,7 @@
#include <soc/mt6359p.h>
#include <soc/pll.h>
#include <soc/pmif.h>
#include <soc/rtc.h>
#include <soc/wdt.h>
void bootblock_soc_init(void)
@@ -16,4 +17,5 @@ void bootblock_soc_init(void)
mtk_pmif_init();
mt6359p_init();
mt6315_init();
rtc_boot();
}