ARM: dts: Turn Salvator-X into Multi-DTB config

Bundle DTBs for R8A7795, R8A7796, R8A77965 Salvator-X variants
into the single U-Boot build and let U-Boot choose between them
based on the CPU model.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
Marek Vasut 2018-10-18 20:30:00 +02:00 committed by Marek Vasut
parent 3ba61f0672
commit 14ebe87b58
4 changed files with 28 additions and 0 deletions

View file

@ -99,3 +99,25 @@ void reset_cpu(ulong addr)
writel(RST_CODE, RST_CA57RESCNT); writel(RST_CODE, RST_CA57RESCNT);
#endif #endif
} }
#ifdef CONFIG_MULTI_DTB_FIT
int board_fit_config_name_match(const char *name)
{
/* PRR driver is not available yet */
u32 cpu_type = rmobile_get_cpu_type();
if ((cpu_type == RMOBILE_CPU_TYPE_R8A7795) &&
!strcmp(name, "r8a7795-salvator-x-u-boot"))
return 0;
if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) &&
!strcmp(name, "r8a7796-salvator-x-u-boot"))
return 0;
if ((cpu_type == RMOBILE_CPU_TYPE_R8A77965) &&
!strcmp(name, "r8a77965-salvator-x-u-boot"))
return 0;
return -1;
}
#endif

View file

@ -28,6 +28,8 @@ CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="r8a7795-salvator-x-u-boot" CONFIG_DEFAULT_DEVICE_TREE="r8a7795-salvator-x-u-boot"
CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
CONFIG_MULTI_DTB_FIT=y
CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_MMC=y
CONFIG_REGMAP=y CONFIG_REGMAP=y
CONFIG_SYSCON=y CONFIG_SYSCON=y

View file

@ -29,6 +29,8 @@ CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="r8a77965-salvator-x-u-boot" CONFIG_DEFAULT_DEVICE_TREE="r8a77965-salvator-x-u-boot"
CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
CONFIG_MULTI_DTB_FIT=y
CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_MMC=y
CONFIG_REGMAP=y CONFIG_REGMAP=y
CONFIG_SYSCON=y CONFIG_SYSCON=y

View file

@ -29,6 +29,8 @@ CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="r8a7796-salvator-x-u-boot" CONFIG_DEFAULT_DEVICE_TREE="r8a7796-salvator-x-u-boot"
CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
CONFIG_MULTI_DTB_FIT=y
CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_MMC=y
CONFIG_REGMAP=y CONFIG_REGMAP=y
CONFIG_SYSCON=y CONFIG_SYSCON=y