diff --git a/arch/arm/dts/ipq5332-mi01.3.dts b/arch/arm/dts/ipq5332-mi01.3.dts index 2b9c9b26bb..a5ef3688aa 100644 --- a/arch/arm/dts/ipq5332-mi01.3.dts +++ b/arch/arm/dts/ipq5332-mi01.3.dts @@ -17,7 +17,7 @@ #include "ipq5332-soc.dtsi" / { machid = <0x8060002>; - config_name = "config@mi01.3"; + config_name = "config@mi01.3", "config@rdp442"; aliases { console = "/serial@78AF000"; diff --git a/arch/arm/dts/ipq5332-mi01.6.dts b/arch/arm/dts/ipq5332-mi01.6.dts index d522a6833d..43aadb579d 100644 --- a/arch/arm/dts/ipq5332-mi01.6.dts +++ b/arch/arm/dts/ipq5332-mi01.6.dts @@ -1,7 +1,7 @@ /* * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -17,7 +17,7 @@ #include "ipq5332-soc.dtsi" / { machid = <0x8060000>; - config_name = "config@mi01.6"; + config_name = "config@mi01.6", "config@rdp468"; aliases { console = "/serial@78AF000"; diff --git a/arch/arm/dts/ipq9574-al02-c1.dts b/arch/arm/dts/ipq9574-al02-c1.dts index ac06adf9b0..5d2f8de610 100644 --- a/arch/arm/dts/ipq9574-al02-c1.dts +++ b/arch/arm/dts/ipq9574-al02-c1.dts @@ -1,6 +1,8 @@ /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. @@ -15,7 +17,7 @@ #include "ipq9574-soc.dtsi" / { machid = <0x8050001>; - config_name = "config@al02-c1"; + config_name = "config@al02-c1", "config@rdp418"; aliases { console = "/serial@78B1000"; diff --git a/arch/arm/dts/ipq9574-al02-c13.dts b/arch/arm/dts/ipq9574-al02-c13.dts index d8804e1bb3..b2aa6a18d8 100644 --- a/arch/arm/dts/ipq9574-al02-c13.dts +++ b/arch/arm/dts/ipq9574-al02-c13.dts @@ -16,7 +16,7 @@ #include "ipq9574-al02-c4.dts" / { machid = <0x8050C01>; - config_name = "config@al02-c13"; + config_name = "config@al02-c13", "config@459"; aliases { pci0 = "/pci@28000000"; diff --git a/arch/arm/dts/ipq9574-al02-c17.dts b/arch/arm/dts/ipq9574-al02-c17.dts index 381acacb2d..76ea7e46b3 100644 --- a/arch/arm/dts/ipq9574-al02-c17.dts +++ b/arch/arm/dts/ipq9574-al02-c17.dts @@ -16,7 +16,7 @@ #include "ipq9574-soc.dtsi" / { machid = <0x8051001>; - config_name = "config@al02-c17"; + config_name = "config@al02-c17", "config@469"; aliases { console = "/serial@78B1000"; diff --git a/arch/arm/dts/ipq9574-al02-c2.dts b/arch/arm/dts/ipq9574-al02-c2.dts index c44b0e71ad..3ac40c2817 100644 --- a/arch/arm/dts/ipq9574-al02-c2.dts +++ b/arch/arm/dts/ipq9574-al02-c2.dts @@ -1,6 +1,8 @@ /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. @@ -15,7 +17,7 @@ #include "ipq9574-al02-c1.dts" / { machid = <0x8050101>; - config_name = "config@al02-c2"; + config_name = "config@al02-c2", "config@rdp418-emmc"; aliases { mmc = "/sdhci@7804000"; diff --git a/arch/arm/dts/ipq9574-al02-c4.dts b/arch/arm/dts/ipq9574-al02-c4.dts index deac7ee7e7..3f7ec74177 100644 --- a/arch/arm/dts/ipq9574-al02-c4.dts +++ b/arch/arm/dts/ipq9574-al02-c4.dts @@ -1,6 +1,7 @@ /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -16,7 +17,7 @@ #include "ipq9574-al02-c1.dts" / { machid = <0x8050301>; - config_name = "config@al02-c4"; + config_name = "config@al02-c4","config@rdp433"; aliases { pci1 = "/pci@10000000"; diff --git a/arch/arm/dts/ipq9574-al02-c7.dts b/arch/arm/dts/ipq9574-al02-c7.dts index f3b7776096..769d6a7227 100644 --- a/arch/arm/dts/ipq9574-al02-c7.dts +++ b/arch/arm/dts/ipq9574-al02-c7.dts @@ -16,7 +16,7 @@ #include "ipq9574-al02-c4.dts" / { machid = <0x8050601>; - config_name = "config@al02-c7"; + config_name = "config@al02-c7", "config@rdp433-emmc"; aliases { mmc = "/sdhci@7804000"; diff --git a/arch/arm/dts/ipq9574-al02-c8.dts b/arch/arm/dts/ipq9574-al02-c8.dts index 21a0cc507a..9e7f4a9751 100644 --- a/arch/arm/dts/ipq9574-al02-c8.dts +++ b/arch/arm/dts/ipq9574-al02-c8.dts @@ -16,7 +16,7 @@ #include "ipq9574-al02-c4.dts" / { machid = <0x8050701>; - config_name = "config@al02-c8"; + config_name = "config@al02-c8", "config@rdp453"; ess-switch { /* Overriding config to support QCA8084 PHY instead of diff --git a/arch/arm/dts/ipq9574-al02-c9.dts b/arch/arm/dts/ipq9574-al02-c9.dts index f5497ac327..2dd2bfa440 100644 --- a/arch/arm/dts/ipq9574-al02-c9.dts +++ b/arch/arm/dts/ipq9574-al02-c9.dts @@ -16,7 +16,7 @@ #include "ipq9574-al01-c1.dts" / { machid = <0x8050801>; - config_name = "config@al02-c9"; + config_name = "config@al02-c9", "config@454"; aliases { pci0 = "/pci@28000000"; diff --git a/board/qca/arm/common/fdt_fixup.c b/board/qca/arm/common/fdt_fixup.c index 316d2474bf..c02a865d1c 100644 --- a/board/qca/arm/common/fdt_fixup.c +++ b/board/qca/arm/common/fdt_fixup.c @@ -78,8 +78,12 @@ int ipq_fdt_fixup_spi_nor_params(void *blob) nodeoff = fdt_node_offset_by_compatible(blob, -1, "n25q128a11"); if (nodeoff < 0) { - printf("fdt-fixup: unable to find compatible node\n"); - return nodeoff; + nodeoff = fdt_node_offset_by_compatible(blob, + -1, "micron,n25q128a11"); + if (nodeoff < 0) { + printf("fdt-fixup: unable to find compatible node\n"); + return nodeoff; + } } val = cpu_to_fdt32(sfi.flash_block_size); @@ -339,6 +343,7 @@ void ipq_fdt_fixup_mtdparts(void *blob, struct flash_node_info *ni) for (; ni->compat; ni++) { noff = fdt_node_offset_by_compatible(blob, -1, ni->compat); + while (noff != -FDT_ERR_NOTFOUND) { dev = device_find(ni->type, ni->idx); if (dev) { @@ -1075,6 +1080,8 @@ int ft_board_setup(void *blob, bd_t *bd) { "spinand,mt29f", MTD_DEV_TYPE_NAND, 1 }, { "n25q128a11", MTD_DEV_TYPE_NAND, CONFIG_IPQ_SPI_NOR_INFO_IDX }, + { "micron,n25q128a11", MTD_DEV_TYPE_NAND, + CONFIG_IPQ_SPI_NOR_INFO_IDX}, { "s25fl256s1", MTD_DEV_TYPE_NAND, 1 }, { NULL, 0, -1 }, /* Terminator */ }; diff --git a/board/qca/arm/ipq5332/ipq5332.c b/board/qca/arm/ipq5332/ipq5332.c index 948a19f252..0c96f73336 100644 --- a/board/qca/arm/ipq5332/ipq5332.c +++ b/board/qca/arm/ipq5332/ipq5332.c @@ -40,7 +40,9 @@ #define FLASH_SEL_BIT 7 #define LINUX_NAND_DTS "/soc/nand@79b0000/" +#define LINUX6_1_NAND_DTS "/soc@0/nand@79b0000/" #define LINUX_MMC_DTS "/soc/sdhci@7804000/" +#define LINUX6_1_MMC_DTS "/soc@0/mmc@7804000/" #define STATUS_OK "status%?okay" #define STATUS_DISABLED "status%?disabled" @@ -109,13 +111,19 @@ int dump_entries_n = ARRAY_SIZE(dumpinfo_n); void fdt_fixup_flash(void *blob) { uint32_t flash_type = SMEM_BOOT_NO_FLASH; + int nand_nodeoff = fdt_path_offset(blob, LINUX_NAND_DTS); + int mmc_nodeoff = fdt_path_offset(blob, LINUX_MMC_DTS); get_current_flash_type(&flash_type); if (flash_type == SMEM_BOOT_NORPLUSEMMC || flash_type == SMEM_BOOT_MMC_FLASH ) { - parse_fdt_fixup(LINUX_NAND_DTS"%"STATUS_DISABLED, blob); - parse_fdt_fixup(LINUX_MMC_DTS"%"STATUS_OK, blob); - + (nand_nodeoff >= 0) ? + parse_fdt_fixup(LINUX_NAND_DTS"%"STATUS_DISABLED, blob) : + parse_fdt_fixup(LINUX6_1_NAND_DTS"%"STATUS_DISABLED, + blob); + (mmc_nodeoff >= 0) ? + parse_fdt_fixup(LINUX_MMC_DTS"%"STATUS_OK, blob) : + parse_fdt_fixup(LINUX6_1_MMC_DTS"%"STATUS_OK, blob); } return; } diff --git a/board/qca/arm/ipq9574/ipq9574.c b/board/qca/arm/ipq9574/ipq9574.c index 7fdc3bd11f..e73059b85f 100644 --- a/board/qca/arm/ipq9574/ipq9574.c +++ b/board/qca/arm/ipq9574/ipq9574.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. @@ -1385,25 +1387,25 @@ void ipq_uboot_fdt_fixup(void) config = "config@al02-c5"; break; case MACH_TYPE_IPQ9574_AP_AL02_C6: - config = "config@al02-c6"; + config = "config@al02-c6", "config@rdp449"; break; case MACH_TYPE_IPQ9574_AP_AL02_C11: - config = "config@al02-c11"; + config = "config@al02-c11", "config@rdp467"; break; case MACH_TYPE_IPQ9574_AP_AL02_C12: - config = "config@al02-c12"; + config = "config@al02-c12", "config@rdp455"; break; case MACH_TYPE_IPQ9574_AP_AL02_C14: config = "config@al02-c14"; break; case MACH_TYPE_IPQ9574_AP_AL02_C15: - config = "config@al02-c15"; + config = "config@al02-c15", "config@rdp457"; break; case MACH_TYPE_IPQ9574_AP_AL02_C16: - config = "config@al02-c16"; + config = "config@al02-c16", "config@rdp456"; break; case MACH_TYPE_IPQ9574_AP_AL03_C2: - config = "config@al03-c2"; + config = "config@al03-c2", "config@rdp458"; break; }