All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
@ 2023-07-03 17:59 Pegorer Massimo
  2023-07-03 18:29 ` Peter Robinson
  0 siblings, 1 reply; 8+ messages in thread
From: Pegorer Massimo @ 2023-07-03 17:59 UTC (permalink / raw)
  To: Simon Glass, Philipp Tomsich, Kever Yang, john, Akash Gajjar; +Cc: u-boot

Value "same-as-spl" in uboot,spl-boot-order attribute is not working for
boards based on rk3308 due to mismatch between definitions in rk3308.c
and those in rk3308.dtsi: in the first file boot devices are defined as
"/mcc@ff4....", while in the DTSI they are "dwmmc@ff4...".

Of course it could be fixed updating rk3308.c to match DTSI definitions.
Anyway, I've noticed that almost all rockchip DTS/DTSI files, in the past,
have been moved from using "dwmmc" to "mmc". And rk3308.dtsi in Linux
kernel sources too, it has been already updated to "mmc".

Therefore, other two alternative ways to fix the problem are: replace
"dwmmc" with "mmc" in rk3308.dtsi; align rk3308.dtsi with Linux kernel
one. Which do you suggest? I would prefer the last, but there are several
other differences between u-boot and linux DTSI files.

A second point is: I need to add bootph-all to sdmmc because some models
of Rock Pi S are missing of SDNAND/eMMC and the only bootable device is the
uSD. Is it preferrable to add it in the common rk3308-u-boot.dsi or in the
board specific rk3308-rock-pi-s-u-boot.dtsi?

Thanks. Regards,
Massimo


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

* Re: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-03 17:59 [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order Pegorer Massimo
@ 2023-07-03 18:29 ` Peter Robinson
  2023-07-11 16:04   ` R: " Pegorer Massimo
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Robinson @ 2023-07-03 18:29 UTC (permalink / raw)
  To: Pegorer Massimo
  Cc: Simon Glass, Philipp Tomsich, Kever Yang, john, Akash Gajjar, u-boot

On Mon, Jul 3, 2023 at 6:59 PM Pegorer Massimo
<Massimo.Pegorer@vimar.com> wrote:
>
> Value "same-as-spl" in uboot,spl-boot-order attribute is not working for
> boards based on rk3308 due to mismatch between definitions in rk3308.c
> and those in rk3308.dtsi: in the first file boot devices are defined as
> "/mcc@ff4....", while in the DTSI they are "dwmmc@ff4...".
>
> Of course it could be fixed updating rk3308.c to match DTSI definitions.
> Anyway, I've noticed that almost all rockchip DTS/DTSI files, in the past,
> have been moved from using "dwmmc" to "mmc". And rk3308.dtsi in Linux
> kernel sources too, it has been already updated to "mmc".
>
> Therefore, other two alternative ways to fix the problem are: replace
> "dwmmc" with "mmc" in rk3308.dtsi; align rk3308.dtsi with Linux kernel
> one. Which do you suggest? I would prefer the last, but there are several
> other differences between u-boot and linux DTSI files.

Sync the linux rk3308* dt files and update the drivers appropriately
if needed to match.

> A second point is: I need to add bootph-all to sdmmc because some models
> of Rock Pi S are missing of SDNAND/eMMC and the only bootable device is the
> uSD. Is it preferrable to add it in the common rk3308-u-boot.dsi or in the
> board specific rk3308-rock-pi-s-u-boot.dtsi?

A common rk3308-u-boot.dtsi is probably the most straight forward.

Peter

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

* R: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-03 18:29 ` Peter Robinson
@ 2023-07-11 16:04   ` Pegorer Massimo
  2023-07-11 17:13     ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Pegorer Massimo @ 2023-07-11 16:04 UTC (permalink / raw)
  To: Simon Glass, Tom Rini, Kever Yang, Peter Robinson
  Cc: Philipp Tomsich, john, Akash Gajjar, Heiko Stuebner, u-boot

> Da: Peter Robinson <pbrobinson@gmail.com>
> Inviato: lunedì 3 luglio 2023 20:29
> 
> On Mon, Jul 3, 2023 at 6:59 PM Pegorer Massimo
> <Massimo.Pegorer@vimar.com> wrote:
> >
> > Value "same-as-spl" in uboot,spl-boot-order attribute is not working
> > for boards based on rk3308 due to mismatch between definitions in
> > rk3308.c and those in rk3308.dtsi: in the first file boot devices are
> > defined as "/mcc@ff4....", while in the DTSI they are "dwmmc@ff4...".
> >
> > Of course it could be fixed updating rk3308.c to match DTSI definitions.
> > Anyway, I've noticed that almost all rockchip DTS/DTSI files, in the
> > past, have been moved from using "dwmmc" to "mmc". And rk3308.dtsi in
> > Linux kernel sources too, it has been already updated to "mmc".
> >
> > Therefore, other two alternative ways to fix the problem are: replace
> > "dwmmc" with "mmc" in rk3308.dtsi; align rk3308.dtsi with Linux kernel
> > one. Which do you suggest? I would prefer the last, but there are
> > several other differences between u-boot and linux DTSI files.
> 
> Sync the linux rk3308* dt files and update the drivers appropriately if needed
> to match.
> 
> > A second point is: I need to add bootph-all to sdmmc because some
> > models of Rock Pi S are missing of SDNAND/eMMC and the only bootable
> > device is the uSD. Is it preferrable to add it in the common
> > rk3308-u-boot.dsi or in the board specific rk3308-rock-pi-s-u-boot.dtsi?
> 
> A common rk3308-u-boot.dtsi is probably the most straight forward.
> 
> Peter

Simon, Tom, Kever, any opinion or preference?

Peter, thanks for your feedback.

I had a look at, and changes needed by sync'ing DTS seems limited.
Of course I will be able to test just on Rock Pi S board. Other affected
boards will be Rockchip RK3308 EVB and Firefly roc-rk3308-cc.

If you agree, I can try to provide a patch with sync'd DTS.

Thanks. Regards,

Massimo


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

* Re: R: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-11 16:04   ` R: " Pegorer Massimo
@ 2023-07-11 17:13     ` Tom Rini
  2023-07-11 18:01       ` Fabio Estevam
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2023-07-11 17:13 UTC (permalink / raw)
  To: Pegorer Massimo
  Cc: Simon Glass, Kever Yang, Peter Robinson, Philipp Tomsich, john,
	Akash Gajjar, Heiko Stuebner, u-boot

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

On Tue, Jul 11, 2023 at 04:04:57PM +0000, Pegorer Massimo wrote:
> > Da: Peter Robinson <pbrobinson@gmail.com>
> > Inviato: lunedì 3 luglio 2023 20:29
> > 
> > On Mon, Jul 3, 2023 at 6:59 PM Pegorer Massimo
> > <Massimo.Pegorer@vimar.com> wrote:
> > >
> > > Value "same-as-spl" in uboot,spl-boot-order attribute is not working
> > > for boards based on rk3308 due to mismatch between definitions in
> > > rk3308.c and those in rk3308.dtsi: in the first file boot devices are
> > > defined as "/mcc@ff4....", while in the DTSI they are "dwmmc@ff4...".
> > >
> > > Of course it could be fixed updating rk3308.c to match DTSI definitions.
> > > Anyway, I've noticed that almost all rockchip DTS/DTSI files, in the
> > > past, have been moved from using "dwmmc" to "mmc". And rk3308.dtsi in
> > > Linux kernel sources too, it has been already updated to "mmc".
> > >
> > > Therefore, other two alternative ways to fix the problem are: replace
> > > "dwmmc" with "mmc" in rk3308.dtsi; align rk3308.dtsi with Linux kernel
> > > one. Which do you suggest? I would prefer the last, but there are
> > > several other differences between u-boot and linux DTSI files.
> > 
> > Sync the linux rk3308* dt files and update the drivers appropriately if needed
> > to match.
> > 
> > > A second point is: I need to add bootph-all to sdmmc because some
> > > models of Rock Pi S are missing of SDNAND/eMMC and the only bootable
> > > device is the uSD. Is it preferrable to add it in the common
> > > rk3308-u-boot.dsi or in the board specific rk3308-rock-pi-s-u-boot.dtsi?
> > 
> > A common rk3308-u-boot.dtsi is probably the most straight forward.
> > 
> > Peter
> 
> Simon, Tom, Kever, any opinion or preference?
> 
> Peter, thanks for your feedback.
> 
> I had a look at, and changes needed by sync'ing DTS seems limited.
> Of course I will be able to test just on Rock Pi S board. Other affected
> boards will be Rockchip RK3308 EVB and Firefly roc-rk3308-cc.
> 
> If you agree, I can try to provide a patch with sync'd DTS.

One thing I would say is that the bootph changes can go to the upstream
kernel dts files, so that they aren't lost in the future, and we can
reduce the -u-boot.dtsi files.  A common -u-boot.dtsi file for now is
fine, and ideally one that the logic we have to automatically find and
include one (see u_boot_dtsi_options in scripts/Makefile.lib) will use
rather than one each board must #include.

-- 
Tom

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

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

* Re: R: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-11 17:13     ` Tom Rini
@ 2023-07-11 18:01       ` Fabio Estevam
  2023-07-11 20:04         ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2023-07-11 18:01 UTC (permalink / raw)
  To: Tom Rini
  Cc: Pegorer Massimo, Simon Glass, Kever Yang, Peter Robinson,
	Philipp Tomsich, john, Akash Gajjar, Heiko Stuebner, u-boot

On Tue, Jul 11, 2023 at 2:14 PM Tom Rini <trini@konsulko.com> wrote:

> One thing I would say is that the bootph changes can go to the upstream
> kernel dts files, so that they aren't lost in the future, and we can

Are you sure? I don't see bootph devicetree properties being supported
in 6.5-rc1.

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

* Re: R: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-11 18:01       ` Fabio Estevam
@ 2023-07-11 20:04         ` Tom Rini
  2023-07-11 20:11           ` Fabio Estevam
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2023-07-11 20:04 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Pegorer Massimo, Simon Glass, Kever Yang, Peter Robinson,
	Philipp Tomsich, john, Akash Gajjar, Heiko Stuebner, u-boot

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

On Tue, Jul 11, 2023 at 03:01:28PM -0300, Fabio Estevam wrote:
> On Tue, Jul 11, 2023 at 2:14 PM Tom Rini <trini@konsulko.com> wrote:
> 
> > One thing I would say is that the bootph changes can go to the upstream
> > kernel dts files, so that they aren't lost in the future, and we can
> 
> Are you sure? I don't see bootph devicetree properties being supported
> in 6.5-rc1.

$ git grep -l bootph arch/arm64/
arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
arch/arm64/boot/dts/xilinx/zynqmp.dtsi
$ git describe HEAD
v6.5-rc1-6-g3f01e9fed845

-- 
Tom

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

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

* Re: R: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-11 20:04         ` Tom Rini
@ 2023-07-11 20:11           ` Fabio Estevam
  2023-07-11 20:14             ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2023-07-11 20:11 UTC (permalink / raw)
  To: Tom Rini
  Cc: Pegorer Massimo, Simon Glass, Kever Yang, Peter Robinson,
	Philipp Tomsich, john, Akash Gajjar, Heiko Stuebner, u-boot

On Tue, Jul 11, 2023 at 5:04 PM Tom Rini <trini@konsulko.com> wrote:

> $ git grep -l bootph arch/arm64/
> arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi
> arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> $ git describe HEAD
> v6.5-rc1-6-g3f01e9fed845

but where is bootph documented?

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

* Re: R: [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order
  2023-07-11 20:11           ` Fabio Estevam
@ 2023-07-11 20:14             ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2023-07-11 20:14 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Pegorer Massimo, Simon Glass, Kever Yang, Peter Robinson,
	Philipp Tomsich, john, Akash Gajjar, Heiko Stuebner, u-boot

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

On Tue, Jul 11, 2023 at 05:11:15PM -0300, Fabio Estevam wrote:
> On Tue, Jul 11, 2023 at 5:04 PM Tom Rini <trini@konsulko.com> wrote:
> 
> > $ git grep -l bootph arch/arm64/
> > arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi
> > arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> > arch/arm64/boot/dts/xilinx/zynqmp.dtsi
> > $ git describe HEAD
> > v6.5-rc1-6-g3f01e9fed845
> 
> but where is bootph documented?

I don't know where Rob is with how the schema stuff is being handled
itself, but it's:
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/bootph.yaml

And I also believe some of the TI parts have the bootph properties
merged, but not in time for v6.5-rc1.

-- 
Tom

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

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

end of thread, other threads:[~2023-07-11 20:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 17:59 [RFC] rockchip: rk3308: fix "same-as-spl" bug in boot devices order Pegorer Massimo
2023-07-03 18:29 ` Peter Robinson
2023-07-11 16:04   ` R: " Pegorer Massimo
2023-07-11 17:13     ` Tom Rini
2023-07-11 18:01       ` Fabio Estevam
2023-07-11 20:04         ` Tom Rini
2023-07-11 20:11           ` Fabio Estevam
2023-07-11 20:14             ` 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.