Add support for Linux upstream compatible

Change-Id: Ieff863ee8da09d5bfdbcc1a70cdd1face7ae22da
Signed-off-by: Gurumoorthy Santhakumar <quic_gsanthak@quicinc.com>
This commit is contained in:
Vandhiadevan Karunamoorthy 2023-04-28 15:37:29 +05:30 committed by Gerrit - the friendly Code Review server
parent eacadbad95
commit 5de75873f5
13 changed files with 45 additions and 23 deletions

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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

View file

@ -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";

View file

@ -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 */
};

View file

@ -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;
}

View file

@ -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;
}