From 85bbd16750ed7a4907666bfa01effc39ef1f4c0c Mon Sep 17 00:00:00 2001 From: Maheedhar Bollapalli Date: Tue, 10 Feb 2026 12:02:06 +0100 Subject: arm64: versal2: fix GICD/GICR base addresses for Versal Gen 2 Versal2 was using wrong GIC base mappings, causing GICR_TYPER reads to not match EL1 MPIDR. This led U-Boot to walk beyond the per-CPU GICR frames, access out-of-range addresses, and hit a synchronous exception during early gic init percpu while booting up on alternate core i.e., non cpu0. Update Versal Gen 2 headers to the correct Versal Gen 2 bases. Signed-off-by: Maheedhar Bollapalli Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/d0bc3fe1af8409fcfe505e55fb7042a33b845a4e.1770721325.git.michal.simek@amd.com --- include/configs/amd_versal2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/amd_versal2.h b/include/configs/amd_versal2.h index 05ddd4eabe1..404af2cd4c6 100644 --- a/include/configs/amd_versal2.h +++ b/include/configs/amd_versal2.h @@ -16,8 +16,8 @@ /* #define CONFIG_ARMV8_SWITCH_TO_EL1 */ /* Generic Interrupt Controller Definitions */ -#define GICD_BASE 0xF9000000 -#define GICR_BASE 0xF9060000 +#define GICD_BASE 0xe2000000 +#define GICR_BASE 0xe2060000 /* Serial setup */ #define CFG_SYS_BAUDRATE_TABLE \ -- cgit v1.3.1 From e7ef80f670760b88f99847db9c98ac473edcba8b Mon Sep 17 00:00:00 2001 From: Siddharth Vadapalli Date: Mon, 2 Feb 2026 19:40:56 +0530 Subject: board: ti: j721e,j7200: fix do_main_cpsw0_qsgmii_phyinit Since commit 27cc5951c862 ("include: env: ti: add default for do_main_cpsw0_qsgmii_phyinit"), the value of the environment variable do_main_cpsw0_qsgmii_phyinit happened to remain '0' and couldn't be changed without user intervention. This behavior is due to the following cyclic dependency: A) ti_common.env sets do_main_cpsw0_qsgmii_phyinit to '0' and its value can only be updated automatically by main_cpsw0_qsgmii_phyinit. B) main_cpsw0_qsgmii_phyinit is defined in j721e.env and it can run only if 'do_main_cpsw0_qsgmii_phyinit' is already '1' which isn't possible unless the user manually assigns the value. Fix the aforementioned cyclic dependency by using board_late_init() to detect the QSGMII Daughtercard and set do_main_cpsw0_qsgmii_phyinit. Additionally, to address the issue of do_main_cpsw0_qsgmii_phyinit being 'undefined' for other platforms, replace: if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1; with: if env exists do_main_cpsw0_qsgmii_phyinit; in ti_common.env. Fixes: 27cc5951c862 ("include: env: ti: add default for do_main_cpsw0_qsgmii_phyinit") Signed-off-by: Siddharth Vadapalli Reviewed-by: Anshul Dalal --- board/ti/j7200/j7200.env | 1 - board/ti/j721e/evm.c | 16 ++++++++++++++++ board/ti/j721e/j721e.env | 3 --- include/env/ti/ti_common.env | 3 +-- 4 files changed, 17 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/board/ti/j7200/j7200.env b/board/ti/j7200/j7200.env index 292fc72fd58..e22a954d8db 100644 --- a/board/ti/j7200/j7200.env +++ b/board/ti/j7200/j7200.env @@ -26,7 +26,6 @@ bootdir=/boot rd_spec=- #if CONFIG_TARGET_J7200_A72_EVM -do_main_cpsw0_qsgmii_phyinit=1 init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17; gpio clear gpio@22_16 main_cpsw0_qsgmii_phyinit= diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index e030fe7dc87..d9be9ce2ed7 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -403,6 +403,19 @@ static void setup_serial(void) env_set("serial#", serial_string); } +static void qsgmii_daughtercard_env_update(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ext_cards); i++) { + if (!strcmp(ext_cards[i].card_name, "J7X-VSC8514-ETH") && + daughter_card_detect_flags[i]) { + env_set("do_main_cpsw0_qsgmii_phyinit", "1"); + return; + } + } +} + int board_late_init(void) { if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) { @@ -412,6 +425,9 @@ int board_late_init(void) /* Check for and probe any plugged-in daughtercards */ if (board_is_j721e_som() || board_is_j7200_som()) probe_daughtercards(); + + /* Update env for power-on-reset of the QSGMII Daughtercard */ + qsgmii_daughtercard_env_update(); } return 0; diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env index ead7fbdb212..34f5f63d60a 100644 --- a/board/ti/j721e/j721e.env +++ b/board/ti/j721e/j721e.env @@ -29,9 +29,6 @@ rd_spec=- init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17; gpio clear gpio@22_16 main_cpsw0_qsgmii_phyinit= - if test $board_name = J721EX-PM1-SOM || test $board_name = J721EX-PM2-SOM || test $board_name = j721e; then - do_main_cpsw0_qsgmii_phyinit=1; else - do_main_cpsw0_qsgmii_phyinit=0; fi; if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && test ${boot} = mmc; then run init_main_cpsw0_qsgmii_phy; \ fi; diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env index 03e3267ef8a..a0ed83f52ac 100644 --- a/include/env/ti/ti_common.env +++ b/include/env/ti/ti_common.env @@ -22,11 +22,10 @@ get_fit_overlaystring= done; get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} -do_main_cpsw0_qsgmii_phyinit=0 bootcmd_ti_mmc= run init_${boot}; #if CONFIG_CMD_REMOTEPROC - if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1; + if env exists do_main_cpsw0_qsgmii_phyinit; then run main_cpsw0_qsgmii_phyinit; fi; run boot_rprocs; -- cgit v1.3.1