mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
arm: dts: Add MI01.2-C2 dts support
This change adds MI01.2-C2 (RDP484) which is a derivative of RDP441 with PON SFP connected and ethernet SFP plugged out. Change-Id: Iccbbcc429346aaea1a16942f5781fac89807347b Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
This commit is contained in:
parent
eb09594ed4
commit
792e91319e
2 changed files with 59 additions and 0 deletions
|
|
@ -1175,6 +1175,8 @@ extern unsigned int __machine_arch_type;
|
||||||
#define MACH_TYPE_IPQ9574_AP_AL03_C1 0x8050002
|
#define MACH_TYPE_IPQ9574_AP_AL03_C1 0x8050002
|
||||||
#define MACH_TYPE_IPQ9574_AP_AL03_C2 0x8050102
|
#define MACH_TYPE_IPQ9574_AP_AL03_C2 0x8050102
|
||||||
#define MACH_TYPE_IPQ5332_EMULATION 0xF060000
|
#define MACH_TYPE_IPQ5332_EMULATION 0xF060000
|
||||||
|
#define MACH_TYPE_IPQ5332_AP_MI01_2 0x8060001
|
||||||
|
#define MACH_TYPE_IPQ5332_AP_MI01_2_C2 0x8060201
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_EBSA110
|
#ifdef CONFIG_ARCH_EBSA110
|
||||||
# ifdef machine_arch_type
|
# ifdef machine_arch_type
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define CONFIG_NAME_MAX_LEN 128
|
||||||
#define FLASH_SEL_BIT 7
|
#define FLASH_SEL_BIT 7
|
||||||
#define LINUX_NAND_DTS "/soc/nand@79b0000/"
|
#define LINUX_NAND_DTS "/soc/nand@79b0000/"
|
||||||
#define LINUX_MMC_DTS "/soc/sdhci@7804000/"
|
#define LINUX_MMC_DTS "/soc/sdhci@7804000/"
|
||||||
|
|
@ -826,6 +827,62 @@ int ipq_board_usb_init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unsigned int get_dts_machid(unsigned int machid)
|
||||||
|
{
|
||||||
|
switch (machid)
|
||||||
|
{
|
||||||
|
case MACH_TYPE_IPQ5332_AP_MI01_2_C2:
|
||||||
|
return MACH_TYPE_IPQ5332_AP_MI01_2;
|
||||||
|
default:
|
||||||
|
return machid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ipq_uboot_fdt_fixup(void)
|
||||||
|
{
|
||||||
|
int ret, len = 0, config_nos = 0;
|
||||||
|
char config[CONFIG_NAME_MAX_LEN];
|
||||||
|
char *config_list[6] = { NULL };
|
||||||
|
|
||||||
|
switch (gd->bd->bi_arch_number)
|
||||||
|
{
|
||||||
|
case MACH_TYPE_IPQ5332_AP_MI01_2_C2:
|
||||||
|
config_list[config_nos++] = "config@mi01.2-c2";
|
||||||
|
config_list[config_nos++] = "config@rdp484";
|
||||||
|
config_list[config_nos++] = "config-rdp484";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config_nos)
|
||||||
|
{
|
||||||
|
while (config_nos--) {
|
||||||
|
strlcpy(&config[len], config_list[config_nos],
|
||||||
|
CONFIG_NAME_MAX_LEN - len);
|
||||||
|
len += strnlen(config_list[config_nos],
|
||||||
|
CONFIG_NAME_MAX_LEN) + 1;
|
||||||
|
if (len > CONFIG_NAME_MAX_LEN) {
|
||||||
|
printf("skipping uboot fdt fixup err: "
|
||||||
|
"config name len-overflow\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open in place with a new length.
|
||||||
|
*/
|
||||||
|
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||||
|
fdt_totalsize(gd->fdt_blob) + len);
|
||||||
|
if (ret)
|
||||||
|
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||||
|
|
||||||
|
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||||
|
config, len);
|
||||||
|
if (ret)
|
||||||
|
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
__weak int ipq_get_tz_version(char *version_name, int buf_size)
|
__weak int ipq_get_tz_version(char *version_name, int buf_size)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue