board: ti: j721e: Remove HBMC node from DT when OSPI mode is active
PATCH 1/1 board: ti: j721e: Remove HBMC node from DT when OSPI mode is active
From: Anurag Dutta <[email protected]>
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.
--- board/ti/j721e/evm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
board/ti/j721e/evm.c +5 -2
@@ -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
Signature · 1 line
2.34.1
Quoted 9 lines · Udit Kumar
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.[...]
Applied to u-boot/main, thanks!
[1/1] board: ti: j721e: Remove HBMC node from DT when OSPI mode is active
commit: 6a4ea97571fa7a14739cfed27b4325de665ed370
Signature · 1 line
Tom