All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: ti: j721e: Remove HBMC node from DT when OSPI mode is active
@ 2026-10-14  4:27 Udit Kumar
  0 siblings, 0 replies; only message in thread
From: Udit Kumar @ 2026-10-14  4:27 UTC (permalink / raw)
  To: trini, u-boot; +Cc: vigneshr, u-kumar1

From: Anurag Dutta <a-dutta@ti.com>

When the kernel boots, it invokes sync_state() on the HBMC node, which
powers it down. Due to a power domain dependency between OSPI0 and HBMC,
this also disables the AHB bus, making it inaccessible and causing
indirect writes to the OSPI flash to fail.

Fix this by removing the HBMC node from the DT when switch SW3.1
(WKUP_GPIO0_6) is set to OSPI mode.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---
 board/ti/j721e/evm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 881392bd963..8e2b8f3d47d 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -102,6 +102,7 @@ static void __maybe_unused detect_enable_hyperflash(void *blob)
 {
 	struct gpio_desc desc = {0};
 	char *hypermux_sel_gpio = (board_is_j721e_som()) ? "8" : "6";
+	int offset;
 
 	if (dm_gpio_lookup_name(hypermux_sel_gpio, &desc))
 		return;
@@ -113,14 +114,16 @@ static void __maybe_unused detect_enable_hyperflash(void *blob)
 		return;
 
 	if (dm_gpio_get_value(&desc)) {
-		int offset;
-
 		do_fixup_by_compat(blob, "ti,am654-hbmc", "status",
 				   "okay", sizeof("okay"), 0);
 		offset = fdt_node_offset_by_compatible(blob, -1,
 						       "ti,am654-ospi");
 		fdt_setprop(blob, offset, "status", "disabled",
 			    sizeof("disabled"));
+	} else {
+		offset = fdt_node_offset_by_compatible(blob, -1,
+						       "ti,am654-hbmc");
+		fdt_del_node(blob, offset);
 	}
 }
 #endif
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-14  4:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  4:27 [PATCH] board: ti: j721e: Remove HBMC node from DT when OSPI mode is active Udit Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.