diff mbox series

rockchip: rk3399: boot_devices: fix eMMC node name

Message ID 20220711140233.121200-1-foss+uboot@0leil.net
State Accepted
Delegated to: Kever Yang
Headers show
Series rockchip: rk3399: boot_devices: fix eMMC node name | expand

Commit Message

Quentin Schulz July 11, 2022, 2:02 p.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

When idbloader.img is flashed on the eMMC, the SPL still tries to load
from SPI-NOR first.

This is due to an incorrect look-up in the Device Tree. Since commit
822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux"), the
node name (but not label) changed from sdhci@fe330000 to mmc@fe330000
meaning U-Boot SPL is not looking for the correct node name anymore and
fails to find the "same-as-spl" node when eMMC is the medium from which
the SPL booted.

Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
Cc: Quentin Schulz <foss+u-boot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jagan Teki July 28, 2022, 1:15 p.m. UTC | #1
On Mon, Jul 11, 2022 at 7:54 PM Quentin Schulz <foss+uboot@0leil.net> wrote:
>
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> When idbloader.img is flashed on the eMMC, the SPL still tries to load
> from SPI-NOR first.
>
> This is due to an incorrect look-up in the Device Tree. Since commit
> 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux"), the
> node name (but not label) changed from sdhci@fe330000 to mmc@fe330000
> meaning U-Boot SPL is not looking for the correct node name anymore and
> fails to find the "same-as-spl" node when eMMC is the medium from which
> the SPL booted.
>
> Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
> Cc: Quentin Schulz <foss+u-boot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---

Is any news on this fix to merge? it certainly breaks eMMC boot on the last rc1.

Jagan.
Jagan Teki July 29, 2022, 2:37 p.m. UTC | #2
On Thu, Jul 28, 2022 at 6:45 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Mon, Jul 11, 2022 at 7:54 PM Quentin Schulz <foss+uboot@0leil.net> wrote:
> >
> > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> >
> > When idbloader.img is flashed on the eMMC, the SPL still tries to load
> > from SPI-NOR first.
> >
> > This is due to an incorrect look-up in the Device Tree. Since commit
> > 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux"), the
> > node name (but not label) changed from sdhci@fe330000 to mmc@fe330000
> > meaning U-Boot SPL is not looking for the correct node name anymore and
> > fails to find the "same-as-spl" node when eMMC is the medium from which
> > the SPL booted.
> >
> > Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
> > Cc: Quentin Schulz <foss+u-boot@0leil.net>
> > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> > ---

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>

Tom, can you apply this on master?

Jagan.
Tom Rini July 29, 2022, 3:15 p.m. UTC | #3
On Fri, Jul 29, 2022 at 08:07:27PM +0530, Jagan Teki wrote:
> On Thu, Jul 28, 2022 at 6:45 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > On Mon, Jul 11, 2022 at 7:54 PM Quentin Schulz <foss+uboot@0leil.net> wrote:
> > >
> > > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> > >
> > > When idbloader.img is flashed on the eMMC, the SPL still tries to load
> > > from SPI-NOR first.
> > >
> > > This is due to an incorrect look-up in the Device Tree. Since commit
> > > 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux"), the
> > > node name (but not label) changed from sdhci@fe330000 to mmc@fe330000
> > > meaning U-Boot SPL is not looking for the correct node name anymore and
> > > fails to find the "same-as-spl" node when eMMC is the medium from which
> > > the SPL booted.
> > >
> > > Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
> > > Cc: Quentin Schulz <foss+u-boot@0leil.net>
> > > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> > > ---
> 
> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
> 
> Tom, can you apply this on master?

Kever, should I be expecting a rockchip PR soon?  There's a lot of
outstanding changes at the moment.
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index 01a05599cd..de11a3fa30 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -27,7 +27,7 @@  DECLARE_GLOBAL_DATA_PTR;
 #define GRF_BASE	0xff770000
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-	[BROM_BOOTSOURCE_EMMC] = "/sdhci@fe330000",
+	[BROM_BOOTSOURCE_EMMC] = "/mmc@fe330000",
 	[BROM_BOOTSOURCE_SPINOR] = "/spi@ff1d0000/flash@0",
 	[BROM_BOOTSOURCE_SD] = "/mmc@fe320000",
 };
@@ -181,7 +181,7 @@  const char *spl_decode_boot_device(u32 boot_device)
 		const char *ofpath;
 	} spl_boot_devices_tbl[] = {
 		{ BOOT_DEVICE_MMC1, "/mmc@fe320000" },
-		{ BOOT_DEVICE_MMC2, "/sdhci@fe330000" },
+		{ BOOT_DEVICE_MMC2, "/mmc@fe330000" },
 		{ BOOT_DEVICE_SPI, "/spi@ff1d0000" },
 	};