rockchip: rv1126: init the i2c0 iomux
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I0d9854f3d22eaa42fb3a196cc58d429339532f1e
This commit is contained in:
parent
c90ee5c73d
commit
a0c4f82828
|
|
@ -102,6 +102,9 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
#define OTP_S_BASE 0xFF5D0000
|
#define OTP_S_BASE 0xFF5D0000
|
||||||
#define OTP_NVM_TRWH 0x28
|
#define OTP_NVM_TRWH 0x28
|
||||||
|
|
||||||
|
#define PMU_GRF_BASE 0xFE020000
|
||||||
|
#define PMUGRF_GPIO0B_IOMUX_H 0xc
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GPIO1A7_SHIFT = 12,
|
GPIO1A7_SHIFT = 12,
|
||||||
GPIO1A7_MASK = GENMASK(14, 12),
|
GPIO1A7_MASK = GENMASK(14, 12),
|
||||||
|
|
@ -672,6 +675,14 @@ int arch_cpu_init(void)
|
||||||
/* enable dynamic priority */
|
/* enable dynamic priority */
|
||||||
writel(0x1, ISP_PRIORITY_EX_REG);
|
writel(0x1, ISP_PRIORITY_EX_REG);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init the i2c0 iomux and use it to control electronic voltmeter
|
||||||
|
* to detect voltage.
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_SPL_KERNEL_BOOT) && defined(CONFIG_SPL_DM_FUEL_GAUGE)
|
||||||
|
writel(0x00770011, PMU_GRF_BASE + PMUGRF_GPIO0B_IOMUX_H);
|
||||||
|
#endif
|
||||||
|
|
||||||
#elif defined(CONFIG_SUPPORT_USBPLUG)
|
#elif defined(CONFIG_SUPPORT_USBPLUG)
|
||||||
/* Just set region 0 to unsecure */
|
/* Just set region 0 to unsecure */
|
||||||
writel(0, FIREWALL_APB_BASE + FW_DDR_CON_REG);
|
writel(0, FIREWALL_APB_BASE + FW_DDR_CON_REG);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue