- Fix rk3288 tinker and evb SPL boot fail
- Enable get sn from cpuid for rk3399 rockpro64 board
This commit is contained in:
Tom Rini 2019-09-20 17:43:33 -04:00
commit d6c7309f56
9 changed files with 47 additions and 20 deletions

View file

@ -13,20 +13,20 @@
u-boot,dm-pre-reloc; u-boot,dm-pre-reloc;
}; };
&uart2_xfer {
u-boot,dm-pre-reloc;
};
&sdmmc { &sdmmc {
u-boot,dm-pre-reloc; u-boot,dm-spl;
}; };
&emmc { &gpio7 {
u-boot,dm-pre-reloc; u-boot,dm-spl;
}; };
&gpio3 { &vcc_sd {
u-boot,dm-pre-reloc; u-boot,dm-spl;
};
&gpio8 {
u-boot,dm-pre-reloc;
}; };
&pcfg_pull_none_drv_8ma { &pcfg_pull_none_drv_8ma {
@ -37,10 +37,22 @@
u-boot,dm-spl; u-boot,dm-spl;
}; };
&pcfg_pull_none {
u-boot,dm-spl;
};
&pcfg_pull_up {
u-boot,dm-spl;
};
&sdmmc_bus4 { &sdmmc_bus4 {
u-boot,dm-spl; u-boot,dm-spl;
}; };
&sdmmc_cd {
u-boot,dm-spl;
};
&sdmmc_clk { &sdmmc_clk {
u-boot,dm-spl; u-boot,dm-spl;
}; };

View file

@ -104,7 +104,6 @@ config TARGET_POPMETAL_RK3288
config TARGET_VYASA_RK3288 config TARGET_VYASA_RK3288
bool "Vyasa-RK3288" bool "Vyasa-RK3288"
select BOARD_LATE_INIT select BOARD_LATE_INIT
select ROCKCHIP_BROM_HELPER
select TPL select TPL
help help
Vyasa is a RK3288-based development board with 2 USB ports, Vyasa is a RK3288-based development board with 2 USB ports,

View file

@ -134,7 +134,7 @@ void board_boot_order(u32 *spl_boot_list)
/* Try to resolve the config item (or alias) as a path */ /* Try to resolve the config item (or alias) as a path */
node = fdt_path_offset(blob, conf); node = fdt_path_offset(blob, conf);
if (node < 0) { if (node < 0) {
debug("%s: could not find %s in FDT", __func__, conf); debug("%s: could not find %s in FDT\n", __func__, conf);
continue; continue;
} }

View file

@ -5,6 +5,7 @@ CONFIG_ROCKCHIP_RK3288=y
CONFIG_TARGET_EVB_RK3288=y CONFIG_TARGET_EVB_RK3288=y
CONFIG_NR_DRAM_BANKS=1 CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL_SIZE_LIMIT=307200 CONFIG_SPL_SIZE_LIMIT=307200
CONFIG_SPL_STACK_R_ADDR=0x80000
CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART=y
@ -14,7 +15,8 @@ CONFIG_SILENT_CONSOLE=y
CONFIG_DEFAULT_FDT_FILE="rk3288-evb-rk808.dtb" CONFIG_DEFAULT_FDT_FILE="rk3288-evb-rk808.dtb"
# CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_TEXT_BASE=0 CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
CONFIG_CMD_GPIO=y CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y CONFIG_CMD_I2C=y

View file

@ -9,6 +9,7 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000
CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART=y
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb" CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb"
CONFIG_MISC_INIT_R=y
# CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_DISPLAY_BOARDINFO_LATE=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
@ -28,6 +29,8 @@ CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent
CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_MMC=y
CONFIG_ROCKCHIP_GPIO=y CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_ROCKCHIP_EFUSE=y
CONFIG_MMC_DW=y CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI=y

View file

@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x01000000
CONFIG_ROCKCHIP_RK3288=y CONFIG_ROCKCHIP_RK3288=y
CONFIG_TARGET_TINKER_RK3288=y CONFIG_TARGET_TINKER_RK3288=y
CONFIG_NR_DRAM_BANKS=1 CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL_STACK_R_ADDR=0x80000
CONFIG_SPL_SIZE_LIMIT=307200 CONFIG_SPL_SIZE_LIMIT=307200
CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART_CLOCK=24000000
@ -15,7 +16,8 @@ CONFIG_CONSOLE_MUX=y
CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb" CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb"
# CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_TEXT_BASE=0 CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
CONFIG_CMD_GPIO=y CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y CONFIG_CMD_I2C=y
@ -47,7 +49,10 @@ CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_FASTBOOT_FLASH_MMC_DEV=0
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y CONFIG_ROCKCHIP_GPIO=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_SPL_POWER_SUPPORT=y
CONFIG_MISC=y CONFIG_MISC=y
CONFIG_I2C_EEPROM=y CONFIG_I2C_EEPROM=y
CONFIG_MMC_DW=y CONFIG_MMC_DW=y
@ -62,7 +67,9 @@ CONFIG_SPL_PINCTRL=y
CONFIG_DM_PMIC=y CONFIG_DM_PMIC=y
CONFIG_PMIC_RK8XX=y CONFIG_PMIC_RK8XX=y
CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_FIXED=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_REGULATOR_RK8XX=y CONFIG_REGULATOR_RK8XX=y
CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_PWM_ROCKCHIP=y CONFIG_PWM_ROCKCHIP=y
CONFIG_RAM=y CONFIG_RAM=y
CONFIG_SPL_RAM=y CONFIG_SPL_RAM=y

View file

@ -15,7 +15,6 @@ CONFIG_SILENT_CONSOLE=y
CONFIG_DEFAULT_FDT_FILE="rk3288-vyasa.dtb" CONFIG_DEFAULT_FDT_FILE="rk3288-vyasa.dtb"
# CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_TEXT_BASE=0xff704000
CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
CONFIG_CMD_GPIO=y CONFIG_CMD_GPIO=y

View file

@ -79,7 +79,8 @@ const int ddrconf_table[] = {
#define DQS_GATE_TRAINING_ERROR_RANK0 (1 << 4) #define DQS_GATE_TRAINING_ERROR_RANK0 (1 << 4)
#define DQS_GATE_TRAINING_ERROR_RANK1 (2 << 4) #define DQS_GATE_TRAINING_ERROR_RANK1 (2 << 4)
#ifdef CONFIG_SPL_BUILD #if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
static void copy_to_reg(u32 *dest, const u32 *src, u32 n) static void copy_to_reg(u32 *dest, const u32 *src, u32 n)
{ {
int i; int i;
@ -1035,7 +1036,8 @@ static int conv_of_platdata(struct udevice *dev)
static int rk3288_dmc_probe(struct udevice *dev) static int rk3288_dmc_probe(struct udevice *dev)
{ {
#ifdef CONFIG_SPL_BUILD #if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
struct rk3288_sdram_params *plat = dev_get_platdata(dev); struct rk3288_sdram_params *plat = dev_get_platdata(dev);
struct udevice *dev_clk; struct udevice *dev_clk;
struct regmap *map; struct regmap *map;
@ -1044,7 +1046,8 @@ static int rk3288_dmc_probe(struct udevice *dev)
struct dram_info *priv = dev_get_priv(dev); struct dram_info *priv = dev_get_priv(dev);
priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
#ifdef CONFIG_SPL_BUILD #if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
#if CONFIG_IS_ENABLED(OF_PLATDATA) #if CONFIG_IS_ENABLED(OF_PLATDATA)
ret = conv_of_platdata(dev); ret = conv_of_platdata(dev);
if (ret) if (ret)
@ -1111,12 +1114,14 @@ U_BOOT_DRIVER(dmc_rk3288) = {
.id = UCLASS_RAM, .id = UCLASS_RAM,
.of_match = rk3288_dmc_ids, .of_match = rk3288_dmc_ids,
.ops = &rk3288_dmc_ops, .ops = &rk3288_dmc_ops,
#ifdef CONFIG_SPL_BUILD #if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
.ofdata_to_platdata = rk3288_dmc_ofdata_to_platdata, .ofdata_to_platdata = rk3288_dmc_ofdata_to_platdata,
#endif #endif
.probe = rk3288_dmc_probe, .probe = rk3288_dmc_probe,
.priv_auto_alloc_size = sizeof(struct dram_info), .priv_auto_alloc_size = sizeof(struct dram_info),
#ifdef CONFIG_SPL_BUILD #if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
.platdata_auto_alloc_size = sizeof(struct rk3288_sdram_params), .platdata_auto_alloc_size = sizeof(struct rk3288_sdram_params),
#endif #endif
}; };

View file

@ -9,7 +9,7 @@
#include <asm/arch-rockchip/hardware.h> #include <asm/arch-rockchip/hardware.h>
#include "rockchip-common.h" #include "rockchip-common.h"
#define CONFIG_SYS_BOOTM_LEN (16 << 20) /* 16MB */ #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* 64MB */
#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
#define CONFIG_SYS_CBSIZE 1024 #define CONFIG_SYS_CBSIZE 1024