diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index c289d54be2..64bc55bd6d 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -124,6 +124,8 @@ dtb-$(CONFIG_ARCH_IPQ9574) += ipq9574-al01-c1.dtb \ ipq9574-al02-c17.dtb \ ipq9574-al02-c18.dtb \ ipq9574-al02-c19.dtb \ + ipq9574-al05.dtb \ + ipq9574-al06.dtb \ ipq9574-db-al01-c1.dtb \ ipq9574-db-al01-c2.dtb \ ipq9574-db-al01-c3.dtb \ diff --git a/arch/arm/dts/ipq9574-al05.dts b/arch/arm/dts/ipq9574-al05.dts new file mode 100644 index 0000000000..2aa1d64171 --- /dev/null +++ b/arch/arm/dts/ipq9574-al05.dts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2016-2021, The Linux Foundation. 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 + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +#include "ipq9574-al02-c4.dts" +/ { + machid = <0x8050003>; + config_name = "config@al05"; +}; diff --git a/arch/arm/dts/ipq9574-al06.dts b/arch/arm/dts/ipq9574-al06.dts new file mode 100644 index 0000000000..0084f75694 --- /dev/null +++ b/arch/arm/dts/ipq9574-al06.dts @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2016-2021, The Linux Foundation. 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 + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +#include "ipq9574-al02-c4.dts" +/ { + machid = <0x8050004>; + config_name = "config@al06"; + + ess-switch { + /* Overriding config to support QCA8084 PHY instead of + * QCA8075 PHY + */ + /delete-property/qca807x_gpio; + /delete-property/qca807x_gpio_cnt; + qca808x_gpio = <60>; + qca808x_gpio_cnt = <1>; + switch_mac_mode0 = ; + port_phyinfo { + port@0 { + phy_address = <1>; + phy_type = ; + }; + port@1 { + phy_address = <2>; + phy_type = ; + }; + port@2 { + phy_address = <3>; + phy_type = ; + }; + port@3 { + phy_address = <4>; + phy_type = ; + }; + }; + }; +}; diff --git a/board/qca/arm/ipq9574/ipq9574.c b/board/qca/arm/ipq9574/ipq9574.c index 7fdc3bd11f..5618fe4903 100644 --- a/board/qca/arm/ipq9574/ipq9574.c +++ b/board/qca/arm/ipq9574/ipq9574.c @@ -1426,6 +1426,16 @@ void ipq_uboot_fdt_fixup(void) return; } +void fdt_fixup_for_atf(void *blob) +{ + if (fdt_path_offset(blob, "/soc/dma@704000") >= 0) { + parse_fdt_fixup("/soc/dma@704000%qcom,controlled-remotely%0", + blob); + parse_fdt_fixup("/soc/dma@704000%qti,config-pipe-trust-reg%2", + blob); + } +} + int do_dpr(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { int ret; diff --git a/common/bootm.c b/common/bootm.c index 3526eb6de4..64edcc59fe 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -442,7 +442,7 @@ int bootm_load_os(bootm_headers_t *images, unsigned long *load_end, bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE); return err; } - flush_cache(load, (*load_end - load) * sizeof(ulong)); + flush_cache(load, *load_end - load); debug(" %s loaded at 0x%08lx, end = 0x%08lx\n", genimg_get_type_name(os.type), load, *load_end); diff --git a/drivers/mtd/nand/qpic_nand.c b/drivers/mtd/nand/qpic_nand.c index 38d4775644..604583e7d0 100644 --- a/drivers/mtd/nand/qpic_nand.c +++ b/drivers/mtd/nand/qpic_nand.c @@ -205,6 +205,22 @@ static struct qpic_serial_nand_params qpic_serial_nand_tbl[] = { .check_quad_config = true, .name = "GD5F1GM7REYIG", }, + { + .id = { 0xc8, 0x82 }, + .page_size = 2048, + .erase_blk_size = 0x00020000, + .pgs_per_blk = 64, + .no_of_blocks = 2048, + .spare_size = 128, + .density = 0x10000000, + .otp_region = 0x5000, + .no_of_addr_cycle = 0x3, + .num_bits_ecc_correctability = 8, + .timing_mode_support = 0, + .quad_mode = true, + .check_quad_config = true, + .name = "GD5F2GM7REYIG", + }, { .id = { 0xc8, 0x21 }, .page_size = 2048, diff --git a/tools/pack.py b/tools/pack.py index ebae72195b..848bf961ab 100644 --- a/tools/pack.py +++ b/tools/pack.py @@ -2262,7 +2262,7 @@ class Pack(object): flinfo.chipsize, blocksize, chipsize, root_part) self.partitions = mibib_qcn9224.get_parts() - script.append('if test "$machid" = "8050301" || test "$machid" = "8050501" || test "$machid" = "8050601" || test "$machid" = "8050701" || test "$machid" = "8050801" || test "$machid" = "8050901" || test "$machid" = "8050a01" || test "$machid" = "8050b01" || test "$machid" = "8050c01" || test "$machid" = "8050d01" || test "$machid" = "8050e01" || test "$machid" = "8050f01" || test "$machid" = "8051001" || test "$machid" = "0x8051101" || test "$machid" = "8051201" || test "$machid" = "8050002" || test "$machid" = "8050102"; then\n', fatal=False) + script.append('if test "$machid" = "8050301" || test "$machid" = "8050501" || test "$machid" = "8050601" || test "$machid" = "8050701" || test "$machid" = "8050801" || test "$machid" = "8050901" || test "$machid" = "8050a01" || test "$machid" = "8050b01" || test "$machid" = "8050c01" || test "$machid" = "8050d01" || test "$machid" = "8050e01" || test "$machid" = "8050f01" || test "$machid" = "8051001" || test "$machid" = "0x8051101" || test "$machid" = "8051201" || test "$machid" = "8050002" || test "$machid" = "8050102" || test "$machid" = "8050003" || test "$machid" = "8050004"; then\n', fatal=False) ret = self.__gen_flash_script(script, flinfo, root, True) if ret == 0: return 0 #Issue in packing al+wkk single-image @@ -2288,7 +2288,7 @@ class Pack(object): gpt = GPT(part_fname_qcn9224, flinfo.pagesize, flinfo.blocksize, flinfo.chipsize) self.partitions = gpt.get_parts() - script.append('if test "$machid" = "8050301" || test "$machid" = "8050501" || test "$machid" = "8050601" || test "$machid" = "8050701" || test "$machid" = "8050801" || test "$machid" = "8050901" || test "$machid" = "8050a01" || test "$machid" = "8050b01" || test "$machid" = "8050c01" || test "$machid" = "8050d01" || test "$machid" = "8050e01" || test "$machid" = "8050f01" || test "$machid" = "8051001" || test "$machid" = "0x8051101" || test "$machid" = "8051201" || test "$machid" = "8050002" || test "$machid" = "8050102"; then\n', fatal=False) + script.append('if test "$machid" = "8050301" || test "$machid" = "8050501" || test "$machid" = "8050601" || test "$machid" = "8050701" || test "$machid" = "8050801" || test "$machid" = "8050901" || test "$machid" = "8050a01" || test "$machid" = "8050b01" || test "$machid" = "8050c01" || test "$machid" = "8050d01" || test "$machid" = "8050e01" || test "$machid" = "8050f01" || test "$machid" = "8051001" || test "$machid" = "0x8051101" || test "$machid" = "8051201" || test "$machid" = "8050002" || test "$machid" = "8050102" || test "$machid" = "8050003" || test "$machid" = "8050004"; then\n', fatal=False) ret = self.__gen_flash_script(script, flinfo, root, True) if ret == 0: return 0 #Issue in packing al+wkk single-image diff --git a/tools/pack_v2.py b/tools/pack_v2.py index 39f159dc78..1eb941c0cf 100644 --- a/tools/pack_v2.py +++ b/tools/pack_v2.py @@ -903,8 +903,10 @@ class Pack(object): script.append("flashinit nand") elif flinfo.type == "emmc" or self.flash_type == "norplusemmc": script.append("flashinit mmc") + if flinfo.type == "emmc": + script.append("flupdate set mmc") - if flinfo.type != "emmc": + if flinfo.type != "emmc" and image_type != "hlos": self.__gen_script_mibib(script, flinfo, parts, parts_length, "mibib_reload") for index in range(parts_length): @@ -1068,6 +1070,9 @@ class Pack(object): continue + if flinfo.type == "emmc": + script.append("flupdate clear") + return 1 def __gen_script_cdt(self, images, flinfo, root, section_conf, partition):