arm: dts: J721E Hyperbus Fixes
cover arm: dts: J721E Hyperbus Fixes
J721E SoC has a hyperbus controller and OSPI controller muxed and only one of the controllers should be active at a time
While enabling support for hyperflash in J721E, the hyperbus controller was enabled by default in SoC DTS and was kept disabled in board DTS. For J721E SK, the board level DTS does not disable the hyperbus node which causes OSPI and Hyperbus controllers to be active at the same time thus causing boot failure on J721E SK, to avoid situations like this keep the hyperbus controller disabled by default in SoC DTS. Also the fixups for hyperflash enable according to DIP switch settings on EVM is relevant only to J721E EVM and J7200 EVM, thus disable those fixups for other platforms.
Since the hyperbus node is not present in kernel DTS, manual update is needed to fix the issue( J721E SK Boot failure). J721E SK boot failure needs additional fixes on the board DTS which will be sent separately, but hyperbus and OSPI controller being active was also one of the issues causing boot failure.
Changes were tested on J721E EVM and J721E SK for basic boot and hyperflash functionality(EVM).
Vaishnav Achath (2):
arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node
board: ti: j721e: Disable hyperflash fixup for J721E SK
arch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 1 + board/ti/j721e/evm.c | 6 ++++++ 2 files changed, 7 insertions(+)
Signature · 1 line
2.17.1
PATCH 1/2 arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node
J721E SoC has a hyperbus controller and OSPI controller muxed and only one of the controllers can be active at a time. While enabling the support for hyperbus, both the OSPI and hyperbus nodes were enabled by default and hyperbus was disabled in board dts. This causes issues in other J721E based platforms which does not explicitly disable the hbmc node in board dts, thus disable hyperbus node by default.
---
Since this node is not present in corresponding upstream kernel DTS now, a manual fix is needed.
arch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/k3-j721e-mcu-wakeup.dtsi +1 -0
@@ -183,6 +183,7 @@ }; hbmc: hyperbus@47034000 { + status = "disabled"; compatible = "ti,j721e-hbmc", "ti,am654-hbmc"; reg = <0x0 0x47034000 0x0 0x100>, <0x5 0x00000000 0x1 0x0000000>;
Signature · 1 line
2.17.1
Re: [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node
Quoted 33 lines · Vaishnav Achath
J721E SoC has a hyperbus controller and OSPI controller muxed and only one of the controllers can be active at a time. While enabling the support for hyperbus, both the OSPI and hyperbus nodes were enabled by default and hyperbus was disabled in board dts. This causes issues in other J721E based platforms which does not explicitly disable the hbmc node in board dts, thus disable hyperbus node by default.
Fixes 297daac43afb ("arm: dts: k3-j721e-mcu-wakeup: Add HyperBus Controller node")Signed-off-by Vaishnav Achath <[email protected]>---
Since this node is not present in corresponding upstream kernel DTS now, a manual fix is needed.
arch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/k3-j721e-mcu-wakeup.dtsi +1
-0@@ -183,6 +183,7 @@ }; hbmc: hyperbus@47034000 { + status = "disabled"; compatible = "ti,j721e-hbmc", "ti,am654-hbmc"; reg = <0x0 0x47034000 0x0 0x100>, <0x5 0x00000000 0x1 0x0000000>;Signature · 1 line
2.17.1
We should just delete the entire node. this does'nt exist in upstream[1]
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
PATCH 2/2 board: ti: j721e: Disable hyperflash fixup for J721E SK
In reply to Vaishnav AchathJ721E SoM and J7200 SoM has hyperflash connected to the hyperbus interface, other platforms like J721E SK does not have a hyperflash available in the platform, limit the hyperflash fixups to J721E and J7200 SoM only.
--- board/ti/j721e/evm.c | 6 ++++++ 1 file changed, 6 insertions(+)
board/ti/j721e/evm.c +6 -0
@@ -111,6 +111,9 @@ static void __maybe_unused detect_enable_hyperflash(void *blob)struct gpio_desc desc = {0 };char *hypermux_sel_gpio = (board_is_j721e_som ()) ?"8" :"6" ; +if (!board_is_j721e_som () && !board_is_j7200_som ()) +return ; +if (dm_gpio_lookup_name (hypermux_sel_gpio, &desc))return ;
@@ -511,6 +514,9 @@ static int __maybe_unused detect_SW3_1_state(void)int ret;char *hypermux_sel_gpio = (board_is_j721e_som ()) ?"8" :"6" ; +if (!board_is_j721e_som () && !board_is_j7200_som ()) +return -ENODEV ; + ret =dm_gpio_lookup_name (hypermux_sel_gpio, &desc);if (ret) {printf ("error getting GPIO lookup name: %d\n" , ret);
Signature · 1 line
2.17.1
Quoted 23 lines
From: Achath, Vaishnav <[email protected]>
J721E SoC has a hyperbus controller and OSPI controller muxed and only one of the controllers should be active at a time
While enabling support for hyperflash in J721E, the hyperbus controller was enabled by default in SoC DTS and was kept disabled in board DTS. For J721E SK, the board level DTS does not disable the hyperbus node which causes OSPI and Hyperbus controllers to be active at the same time thus causing boot failure on J721E SK, to avoid situations like this keep the hyperbus controller disabled by default in SoC DTS. Also the fixups for hyperflash enable according to DIP switch settings on EVM is relevant only to J721E EVM and J7200 EVM, thus disable those fixups for other platforms.
Since the hyperbus node is not present in kernel DTS, manual update is needed to fix the issue( J721E SK Boot failure). J721E SK boot failure needs additional fixes on the board DTS which will be sent separately, but hyperbus and OSPI controller being active was also one of the issues causing boot failure.
Changes were tested on J721E EVM and J721E SK for basic boot and hyperflash functionality(EVM).
Quoted 8 lines
Vaishnav Achath (2):
arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node
board: ti: j721e: Disable hyperflash fixup for J721E SKarch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 1 + board/ti/j721e/evm.c | 6 ++++++ 2 files changed, 7 insertions(+)
For what it's worth, these were independently tested by me on both J721e EVM and SK boards off the v2023.04-rc5 tag.
An additional patchset is needed for the SK board to boot - it seems to have been broken since at least March 2022, if not earlier. I'll send that out shortly.