All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
@ 2022-07-11 14:15 Quentin Schulz
  2022-07-11 18:22 ` Xavier Drudis Ferran
  2022-08-27  2:18 ` Kever Yang
  0 siblings, 2 replies; 13+ messages in thread
From: Quentin Schulz @ 2022-07-11 14:15 UTC (permalink / raw)
  Cc: sjg, philipp.tomsich, kever.yang, alpernebiyasak, hanetzer,
	email2tema, pbrobinson, u-boot, Quentin Schulz, Quentin Schulz

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+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---

Sorry for resend, was not yet subscribed.

 arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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" },
 	};
 
-- 
2.36.1


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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-11 14:15 [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name Quentin Schulz
@ 2022-07-11 18:22 ` Xavier Drudis Ferran
  2022-07-12  3:01   ` Art Nikpal
                     ` (2 more replies)
  2022-08-27  2:18 ` Kever Yang
  1 sibling, 3 replies; 13+ messages in thread
From: Xavier Drudis Ferran @ 2022-07-11 18:22 UTC (permalink / raw)
  To: Quentin Schulz
  Cc: sjg, philipp.tomsich, kever.yang, alpernebiyasak, hanetzer,
	email2tema, pbrobinson, u-boot, Quentin Schulz

El Mon, Jul 11, 2022 at 04:15:33PM +0200, Quentin Schulz deia:
> 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.
>

Yes, I also saw that. I changed and tested it at some time, but since there
were other changes, I hesitate to send a Tested by for your patch. FWIW:

Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>

 
> Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
> Cc: Quentin Schulz <foss+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
> 
> Sorry for resend, was not yet subscribed.
> 
>  arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 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" },

Not related to this patch, but I also changed "/spi@ff1d0000" -> "/spi@ff1d0000/flash@0".
Not sure whether it needs to be different in both arrays in some case for some reason.

>  	};
>  
> -- 
> 2.36.1
> 

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-11 18:22 ` Xavier Drudis Ferran
@ 2022-07-12  3:01   ` Art Nikpal
  2022-07-12  7:53     ` Quentin Schulz
  2022-07-12  7:51   ` Quentin Schulz
  2022-07-18  9:18   ` Quentin Schulz
  2 siblings, 1 reply; 13+ messages in thread
From: Art Nikpal @ 2022-07-12  3:01 UTC (permalink / raw)
  To: Xavier Drudis Ferran
  Cc: Quentin Schulz, Simon Glass, philipp.tomsich, Kever Yang,
	alpernebiyasak, hanetzer, pbrobinson, U-Boot Mailing List,
	Quentin Schulz

Yes ! need to apply this patch

dts was changed

grep @fe330000 arch/arm/dts/*.dtsi
arch/arm/dts/rk3399.dtsi:    sdhci: mmc@fe330000 {

same need to change  boot_devices in rk3399.c to /mmc@fe320000

Reviewed-by: Artem Lapkin  <email2tema@gmail.com>
Tested-by: Artem Lapkin  <email2tema@gmail.com>

On Tue, Jul 12, 2022 at 2:22 AM Xavier Drudis Ferran <xdrudis@tinet.cat> wrote:
>
> El Mon, Jul 11, 2022 at 04:15:33PM +0200, Quentin Schulz deia:
> > 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.
> >
>
> Yes, I also saw that. I changed and tested it at some time, but since there
> were other changes, I hesitate to send a Tested by for your patch. FWIW:
>
> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
>
>
> > Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
> > Cc: Quentin Schulz <foss+uboot@0leil.net>
> > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> > ---
> >
> > Sorry for resend, was not yet subscribed.
> >
> >  arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > 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" },
>
> Not related to this patch, but I also changed "/spi@ff1d0000" -> "/spi@ff1d0000/flash@0".
> Not sure whether it needs to be different in both arrays in some case for some reason.
>
> >       };
> >
> > --
> > 2.36.1
> >

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-11 18:22 ` Xavier Drudis Ferran
  2022-07-12  3:01   ` Art Nikpal
@ 2022-07-12  7:51   ` Quentin Schulz
  2022-07-18  9:18   ` Quentin Schulz
  2 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2022-07-12  7:51 UTC (permalink / raw)
  To: Xavier Drudis Ferran, Quentin Schulz
  Cc: sjg, philipp.tomsich, kever.yang, alpernebiyasak, hanetzer,
	email2tema, pbrobinson, u-boot

Hi Xavier,

On 7/11/22 20:22, Xavier Drudis Ferran wrote:
> El Mon, Jul 11, 2022 at 04:15:33PM +0200, Quentin Schulz deia:
>> 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.
>>
> 
> Yes, I also saw that. I changed and tested it at some time, but since there
> were other changes, I hesitate to send a Tested by for your patch. FWIW:
> 
> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
> 
>   
>> Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
>> Cc: Quentin Schulz <foss+uboot@0leil.net>
>> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>> ---
>>
>> Sorry for resend, was not yet subscribed.
>>
>>   arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> 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" },
> 
> Not related to this patch, but I also changed "/spi@ff1d0000" -> "/spi@ff1d0000/flash@0".
> Not sure whether it needs to be different in both arrays in some case for some reason.
> 

Will look into that because I don't think I had an issue with this one. 
Thanks for the heads up. Will make a separate commit of there's 
something to fix.

Cheers,
Quentin

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-12  3:01   ` Art Nikpal
@ 2022-07-12  7:53     ` Quentin Schulz
  0 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2022-07-12  7:53 UTC (permalink / raw)
  To: Art Nikpal, Xavier Drudis Ferran
  Cc: Quentin Schulz, Simon Glass, philipp.tomsich, Kever Yang,
	alpernebiyasak, hanetzer, pbrobinson, U-Boot Mailing List

Hi Artem,

On 7/12/22 05:01, Art Nikpal wrote:
> Yes ! need to apply this patch
> 
> dts was changed
> 
> grep @fe330000 arch/arm/dts/*.dtsi
> arch/arm/dts/rk3399.dtsi:    sdhci: mmc@fe330000 {
> 
> same need to change  boot_devices in rk3399.c to /mmc@fe320000
> 

Already changed in commit 97de3935aabfe8632e6c737a9ecadabead802f04 
("rockchip: Fix spl mmc boot device ofpath") :)

Cheers,
Quentin

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-11 18:22 ` Xavier Drudis Ferran
  2022-07-12  3:01   ` Art Nikpal
  2022-07-12  7:51   ` Quentin Schulz
@ 2022-07-18  9:18   ` Quentin Schulz
  2022-07-29  0:32     ` Art Nikpal
  2 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2022-07-18  9:18 UTC (permalink / raw)
  To: Xavier Drudis Ferran, Quentin Schulz
  Cc: sjg, philipp.tomsich, kever.yang, alpernebiyasak, hanetzer,
	email2tema, pbrobinson, u-boot

On 7/11/22 20:22, Xavier Drudis Ferran wrote:
> El Mon, Jul 11, 2022 at 04:15:33PM +0200, Quentin Schulz deia:
>> 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.
>>
> 
> Yes, I also saw that. I changed and tested it at some time, but since there
> were other changes, I hesitate to send a Tested by for your patch. FWIW:
> 
> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
> 
>   
>> Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
>> Cc: Quentin Schulz <foss+uboot@0leil.net>
>> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>> ---
>>
>> Sorry for resend, was not yet subscribed.
>>
>>   arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> 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" },
> 
> Not related to this patch, but I also changed "/spi@ff1d0000" -> "/spi@ff1d0000/flash@0".
> Not sure whether it needs to be different in both arrays in some case for some reason.
> 

Thanks for the heads up, it seems that our board was the only (upstream) 
one impacted by this oversight because it's the only one reading 
u-boot,spl-boot-device DT property that is set using this table.

See patch here: 
https://lore.kernel.org/u-boot/20220715151552.953654-2-foss+uboot@0leil.net/

You can add your Suggested-by: I forgot to add it before sending.

Thanks!
Quentin

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-18  9:18   ` Quentin Schulz
@ 2022-07-29  0:32     ` Art Nikpal
  2022-08-12 10:34       ` Quentin Schulz
  0 siblings, 1 reply; 13+ messages in thread
From: Art Nikpal @ 2022-07-29  0:32 UTC (permalink / raw)
  To: Quentin Schulz
  Cc: Xavier Drudis Ferran, Quentin Schulz, Simon Glass,
	philipp.tomsich, Kever Yang, alpernebiyasak, hanetzer,
	pbrobinson, U-Boot Mailing List

On Mon, Jul 18, 2022 at 5:19 PM Quentin Schulz
<quentin.schulz@theobroma-systems.com> wrote:
>
> On 7/11/22 20:22, Xavier Drudis Ferran wrote:
> > El Mon, Jul 11, 2022 at 04:15:33PM +0200, Quentin Schulz deia:
> >> 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.
> >>
> >
> > Yes, I also saw that. I changed and tested it at some time, but since there
> > were other changes, I hesitate to send a Tested by for your patch. FWIW:
> >
> > Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
> >
> >
> >> Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
> >> Cc: Quentin Schulz <foss+uboot@0leil.net>
> >> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> >> ---
> >>
> >> Sorry for resend, was not yet subscribed.
> >>
> >>   arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> 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" },
> >
> > Not related to this patch, but I also changed "/spi@ff1d0000" -> "/spi@ff1d0000/flash@0".
> > Not sure whether it needs to be different in both arrays in some case for some reason.
> >
>

please apply this
Tested-by: Lapkin Artem <email2tema@gmail.com>

> Thanks for the heads up, it seems that our board was the only (upstream)
> one impacted by this oversight because it's the only one reading
> u-boot,spl-boot-device DT property that is set using this table.
>
> See patch here:
> https://lore.kernel.org/u-boot/20220715151552.953654-2-foss+uboot@0leil.net/
>
> You can add your Suggested-by: I forgot to add it before sending.
>

please apply this too, i have send same patch for right spi flash node
name before

Suggested-by: Lapkin Artem <email2tema@gmail.com>
Tested-by: Lapkin Artem <email2tema@gmail.com>

> Thanks!
> Quentin

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-29  0:32     ` Art Nikpal
@ 2022-08-12 10:34       ` Quentin Schulz
  0 siblings, 0 replies; 13+ messages in thread
From: Quentin Schulz @ 2022-08-12 10:34 UTC (permalink / raw)
  To: Art Nikpal
  Cc: Xavier Drudis Ferran, Quentin Schulz, Simon Glass,
	philipp.tomsich, Kever Yang, alpernebiyasak, hanetzer,
	pbrobinson, U-Boot Mailing List

Hi all,

Gentle ping.

Cheers,
Quentin

On 7/29/22 02:32, Art Nikpal wrote:
> On Mon, Jul 18, 2022 at 5:19 PM Quentin Schulz
> <quentin.schulz@theobroma-systems.com> wrote:
>>
>> On 7/11/22 20:22, Xavier Drudis Ferran wrote:
>>> El Mon, Jul 11, 2022 at 04:15:33PM +0200, Quentin Schulz deia:
>>>> 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.
>>>>
>>>
>>> Yes, I also saw that. I changed and tested it at some time, but since there
>>> were other changes, I hesitate to send a Tested by for your patch. FWIW:
>>>
>>> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
>>>
>>>
>>>> Fixes: 822556a93459 ("arm: dts: sync the Rockhip 3399 SoCs from Linux")
>>>> Cc: Quentin Schulz <foss+uboot@0leil.net>
>>>> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>>> ---
>>>>
>>>> Sorry for resend, was not yet subscribed.
>>>>
>>>>    arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> 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" },
>>>
>>> Not related to this patch, but I also changed "/spi@ff1d0000" -> "/spi@ff1d0000/flash@0".
>>> Not sure whether it needs to be different in both arrays in some case for some reason.
>>>
>>
> 
> please apply this
> Tested-by: Lapkin Artem <email2tema@gmail.com>
> 
>> Thanks for the heads up, it seems that our board was the only (upstream)
>> one impacted by this oversight because it's the only one reading
>> u-boot,spl-boot-device DT property that is set using this table.
>>
>> See patch here:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_u-2Dboot_20220715151552.953654-2D2-2Dfoss-2Buboot-400leil.net_&d=DwIBaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=TsF8K1B_cl2VOPRkkGPtRpzBQKwwn-bDUpvuJK5HdOqfnZC1LdVxMACHi1R6b3NT&s=9cXes6CWGj1g_BMo_Ph2Hm6nlBm6iIswzF64hEuvnBg&e=
>>
>> You can add your Suggested-by: I forgot to add it before sending.
>>
> 
> please apply this too, i have send same patch for right spi flash node
> name before
> 
> Suggested-by: Lapkin Artem <email2tema@gmail.com>
> Tested-by: Lapkin Artem <email2tema@gmail.com>
> 
>> Thanks!
>> Quentin

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-11 14:15 [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name Quentin Schulz
  2022-07-11 18:22 ` Xavier Drudis Ferran
@ 2022-08-27  2:18 ` Kever Yang
  1 sibling, 0 replies; 13+ messages in thread
From: Kever Yang @ 2022-08-27  2:18 UTC (permalink / raw)
  To: Quentin Schulz
  Cc: sjg, philipp.tomsich, alpernebiyasak, hanetzer, email2tema,
	pbrobinson, u-boot, Quentin Schulz


On 2022/7/11 22:15, Quentin Schulz 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+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>


Reviewed-by: Kever Yang <kever.yang@rock-chips.com>


Thanks,
- Kever
> ---
>
> Sorry for resend, was not yet subscribed.
>
>   arch/arm/mach-rockchip/rk3399/rk3399.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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" },
>   	};
>   

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-29 14:37   ` Jagan Teki
@ 2022-07-29 15:15     ` Tom Rini
  0 siblings, 0 replies; 13+ messages in thread
From: Tom Rini @ 2022-07-29 15:15 UTC (permalink / raw)
  To: Jagan Teki, kever.yang
  Cc: Quentin Schulz, sjg, philipp.tomsich, alpernebiyasak, hanetzer,
	email2tema, pbrobinson, u-boot, Quentin Schulz, Quentin Schulz

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-28 13:15 ` Jagan Teki
@ 2022-07-29 14:37   ` Jagan Teki
  2022-07-29 15:15     ` Tom Rini
  0 siblings, 1 reply; 13+ messages in thread
From: Jagan Teki @ 2022-07-29 14:37 UTC (permalink / raw)
  To: Quentin Schulz, kever.yang, Tom Rini
  Cc: sjg, philipp.tomsich, alpernebiyasak, hanetzer, email2tema,
	pbrobinson, u-boot, Quentin Schulz, Quentin Schulz

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.

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

* Re: [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
  2022-07-11 14:02 Quentin Schulz
@ 2022-07-28 13:15 ` Jagan Teki
  2022-07-29 14:37   ` Jagan Teki
  0 siblings, 1 reply; 13+ messages in thread
From: Jagan Teki @ 2022-07-28 13:15 UTC (permalink / raw)
  To: Quentin Schulz, kever.yang, Tom Rini
  Cc: sjg, philipp.tomsich, alpernebiyasak, hanetzer, email2tema,
	pbrobinson, u-boot, Quentin Schulz, Quentin Schulz

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.

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

* [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name
@ 2022-07-11 14:02 Quentin Schulz
  2022-07-28 13:15 ` Jagan Teki
  0 siblings, 1 reply; 13+ messages in thread
From: Quentin Schulz @ 2022-07-11 14:02 UTC (permalink / raw)
  Cc: sjg, philipp.tomsich, kever.yang, alpernebiyasak, hanetzer,
	email2tema, pbrobinson, u-boot, Quentin Schulz, Quentin Schulz

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

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" },
 	};
 
-- 
2.36.1


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

end of thread, other threads:[~2022-08-27  2:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 14:15 [PATCH] rockchip: rk3399: boot_devices: fix eMMC node name Quentin Schulz
2022-07-11 18:22 ` Xavier Drudis Ferran
2022-07-12  3:01   ` Art Nikpal
2022-07-12  7:53     ` Quentin Schulz
2022-07-12  7:51   ` Quentin Schulz
2022-07-18  9:18   ` Quentin Schulz
2022-07-29  0:32     ` Art Nikpal
2022-08-12 10:34       ` Quentin Schulz
2022-08-27  2:18 ` Kever Yang
  -- strict thread matches above, loose matches on Subject: below --
2022-07-11 14:02 Quentin Schulz
2022-07-28 13:15 ` Jagan Teki
2022-07-29 14:37   ` Jagan Teki
2022-07-29 15:15     ` Tom Rini

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.