rockchip: rv1126: support usbplug
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Signed-off-by: Yifeng Zhao <zyf@rock-chips.com> Change-Id: I841df666100e78dda2bac4b7ce9a8495a5e4a171
This commit is contained in:
parent
e90e674ffd
commit
f79adc89c3
|
|
@ -423,12 +423,12 @@ endif
|
|||
config ROCKCHIP_RV1126
|
||||
bool "Support Rockchip RV1126"
|
||||
select CPU_V7
|
||||
select GICV2
|
||||
select ARM_SMCCC
|
||||
select BOARD_LATE_INIT
|
||||
select SUPPORT_SPL
|
||||
select GICV2 if !SUPPORT_USBPLUG
|
||||
select ARM_SMCCC if !SUPPORT_USBPLUG
|
||||
select SUPPORT_TPL
|
||||
select SPL
|
||||
select SUPPORT_SPL
|
||||
select SPL if !SUPPORT_USBPLUG
|
||||
select BOARD_LATE_INIT if !SUPPORT_USBPLUG
|
||||
help
|
||||
The Rockchip RV1126 is a ARM-based SoC with a quad-core Cortex-A7
|
||||
and a risc-v core.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
#define SGRF_CON_SCR1_BOOT_ADDR 0x0b0
|
||||
#define SGRF_SOC_CON3 0x00c
|
||||
#define SCR1_START_ADDR 0x208000
|
||||
#define CRU_SOFTRST_CON11 0xFF49032C
|
||||
#define PMUGRF_SOC_CON1 0xFE020104
|
||||
|
||||
void board_debug_uart_init(void)
|
||||
{
|
||||
|
|
@ -64,7 +66,7 @@ void board_debug_uart_init(void)
|
|||
|
||||
int arch_cpu_init(void)
|
||||
{
|
||||
#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)
|
||||
#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) || defined(CONFIG_SUPPORT_USBPLUG)
|
||||
/* Just set region 0 to unsecure */
|
||||
writel(0, FIREWALL_APB_BASE + FW_DDR_CON_REG);
|
||||
#endif
|
||||
|
|
@ -141,6 +143,16 @@ int arch_cpu_init(void)
|
|||
writel(0x101, CRYPTO_PRIORITY_REG);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SUPPORT_USBPLUG)
|
||||
/* reset usbphy_otg usbphypor_otg */
|
||||
writel(((0x1 << 6 | (1 << 8)) << 16) | (0x1 << 6) | (1 << 8), CRU_SOFTRST_CON11);
|
||||
udelay(50);
|
||||
writel(((0x1 << 6 | (1 << 8)) << 16) | (0), CRU_SOFTRST_CON11);
|
||||
|
||||
/* hold pmugrf's io reset */
|
||||
writel(0x1 << 7 | 1 << 23, PMUGRF_SOC_CON1);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@
|
|||
|
||||
#include <configs/rv1126_common.h>
|
||||
|
||||
#ifndef CONFIG_SUPPORT_USBPLUG
|
||||
#define CONFIG_SUPPORT_EMMC_RPMB
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_MMC_ENV_DEV 0
|
||||
|
||||
#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
|
|
|
|||
|
|
@ -15,7 +15,12 @@
|
|||
#define CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#define CONFIG_SYS_NS16550_MEM32
|
||||
|
||||
#ifdef CONFIG_SUPPORT_USBPLUG
|
||||
#define CONFIG_SYS_TEXT_BASE 0x00000000
|
||||
#else
|
||||
#define CONFIG_SYS_TEXT_BASE 0x00400000
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_INIT_SP_ADDR 0x00580000
|
||||
#define CONFIG_SYS_LOAD_ADDR 0x00C00800
|
||||
#define CONFIG_SYS_BOOTM_LEN (64 << 20)
|
||||
|
|
|
|||
Loading…
Reference in New Issue