All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm: dts: J721E Hyperbus Fixes
@ 2023-03-30 17:40 Vaishnav Achath
  2023-03-30 17:40 ` [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node Vaishnav Achath
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vaishnav Achath @ 2023-03-30 17:40 UTC (permalink / raw)
  To: u-boot, trini; +Cc: vigneshr, nm, gadiyar, u-kumar1, vaishnav.a

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(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node
  2023-03-30 17:40 [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Vaishnav Achath
@ 2023-03-30 17:40 ` Vaishnav Achath
  2023-03-30 18:50   ` Nishanth Menon
  2023-03-30 17:40 ` [PATCH 2/2] board: ti: j721e: Disable hyperflash fixup for J721E SK Vaishnav Achath
  2023-03-30 17:43 ` [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Gadiyar, Anand
  2 siblings, 1 reply; 5+ messages in thread
From: Vaishnav Achath @ 2023-03-30 17:40 UTC (permalink / raw)
  To: u-boot, trini; +Cc: vigneshr, nm, gadiyar, u-kumar1, vaishnav.a

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 <vaishnav.a@ti.com>
---

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(+)

diff --git a/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi b/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi
index 22166c7942..b7a0dd2326 100644
--- a/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi
+++ b/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi
@@ -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>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] board: ti: j721e: Disable hyperflash fixup for J721E SK
  2023-03-30 17:40 [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Vaishnav Achath
  2023-03-30 17:40 ` [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node Vaishnav Achath
@ 2023-03-30 17:40 ` Vaishnav Achath
  2023-03-30 17:43 ` [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Gadiyar, Anand
  2 siblings, 0 replies; 5+ messages in thread
From: Vaishnav Achath @ 2023-03-30 17:40 UTC (permalink / raw)
  To: u-boot, trini; +Cc: vigneshr, nm, gadiyar, u-kumar1, vaishnav.a

J721E 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.

Fixes: 66a33f41e9ba ("ti: j721e: enable hyperflash spl fixup for j721e")

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
---
 board/ti/j721e/evm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d4e672a7ac..353422937e 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH 0/2] arm: dts: J721E Hyperbus Fixes
  2023-03-30 17:40 [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Vaishnav Achath
  2023-03-30 17:40 ` [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node Vaishnav Achath
  2023-03-30 17:40 ` [PATCH 2/2] board: ti: j721e: Disable hyperflash fixup for J721E SK Vaishnav Achath
@ 2023-03-30 17:43 ` Gadiyar, Anand
  2 siblings, 0 replies; 5+ messages in thread
From: Gadiyar, Anand @ 2023-03-30 17:43 UTC (permalink / raw)
  To: Achath, Vaishnav, u-boot, trini
  Cc: Raghavendra, Vignesh, Menon, Nishanth, Kumar, Udit

> From: Achath, Vaishnav <vaishnav.a@ti.com>
> 
> 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(+)
> 


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.

Tested-by: Anand Gadiyar <gadiyar@ti.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node
  2023-03-30 17:40 ` [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node Vaishnav Achath
@ 2023-03-30 18:50   ` Nishanth Menon
  0 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2023-03-30 18:50 UTC (permalink / raw)
  To: Vaishnav Achath; +Cc: u-boot, trini, vigneshr, gadiyar, u-kumar1

On 23:10-20230330, Vaishnav Achath wrote:
> 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 <vaishnav.a@ti.com>
> ---
> 
> 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(+)
> 
> diff --git a/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi b/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi
> index 22166c7942..b7a0dd2326 100644
> --- a/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi
> +++ b/arch/arm/dts/k3-j721e-mcu-wakeup.dtsi
> @@ -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>;
> -- 
> 2.17.1
> 

We should just delete the entire node. this does'nt exist in upstream[1]


[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-30 18:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 17:40 [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Vaishnav Achath
2023-03-30 17:40 ` [PATCH 1/2] arm: dts: k3-j721e-mcu-wakeup: Disable hyperbus controller node Vaishnav Achath
2023-03-30 18:50   ` Nishanth Menon
2023-03-30 17:40 ` [PATCH 2/2] board: ti: j721e: Disable hyperflash fixup for J721E SK Vaishnav Achath
2023-03-30 17:43 ` [PATCH 0/2] arm: dts: J721E Hyperbus Fixes Gadiyar, Anand

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.