diff mbox series

arm: kirkwood: pogo v4: Use a more common format for stdout-path

Message ID 20230315215653.2047-1-mibodhi@gmail.com
State New
Delegated to: Stefan Roese
Headers show
Series arm: kirkwood: pogo v4: Use a more common format for stdout-path | expand

Commit Message

Tony Dinh March 15, 2023, 9:56 p.m. UTC
The mainline Pogo V4 DTS uses a stdout-path format that is not
recognizable by u-boot. Change it to a commonly used format.

Note that this patch removes the previous workaround for this board
as discussed here:
https://lists.denx.de/pipermail/u-boot/2023-February/508936.html

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
---

 arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Pali Rohár March 15, 2023, 9:58 p.m. UTC | #1
On Wednesday 15 March 2023 14:56:52 Tony Dinh wrote:
> The mainline Pogo V4 DTS uses a stdout-path format that is not
> recognizable by u-boot. Change it to a commonly used format.

Cannot we teach u-boot to understand also currently used format?

> Note that this patch removes the previous workaround for this board
> as discussed here:
> https://lists.denx.de/pipermail/u-boot/2023-February/508936.html
> 
> Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> ---
> 
>  arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> index f9e127234c..9bb97c6b6b 100644
> --- a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> +++ b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> @@ -1,7 +1,10 @@
>  // SPDX-License-Identifier: GPL-2.0+
>  /*
>   * Copyright (C) 2023 Tony Dinh <mibodhi@gmail.com>
> - */
> -&uart0 {
> -	u-boot,dm-pre-reloc;
> +*/
> +
> +/ {
> +	chosen {
> +		stdout-path = &uart0;
> +	};
>  };
> -- 
> 2.30.2
>
Tony Dinh March 15, 2023, 11:11 p.m. UTC | #2
Hi Pali,

On Wed, Mar 15, 2023 at 2:58 PM Pali Rohár <pali@kernel.org> wrote:
>
> On Wednesday 15 March 2023 14:56:52 Tony Dinh wrote:
> > The mainline Pogo V4 DTS uses a stdout-path format that is not
> > recognizable by u-boot. Change it to a commonly used format.
>
> Cannot we teach u-boot to understand also currently used format?

I assume it is good to document the fact that perhaps using
dm-pre-reloc tag (and later boot-phase tag) will overcome many odd
properties format in Linux DTS. We said dm-pre-reloc is a workaround,
but IMHO the tags are really good for u-boot, since u-boot is a
multi-phase boot loader. If a device like UART is needed in a certain
phase, we should say so.

Also at the moment, modifying the serial-uclass.c is something more
than I can chew. If I must do it myself, it will be a while. If
anybody wants to give it a try, please do so.

Thanks,
Tony

> > Note that this patch removes the previous workaround for this board
> > as discussed here:
> > https://lists.denx.de/pipermail/u-boot/2023-February/508936.html
> >
> > Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> > ---
> >
> >  arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> > index f9e127234c..9bb97c6b6b 100644
> > --- a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> > +++ b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> > @@ -1,7 +1,10 @@
> >  // SPDX-License-Identifier: GPL-2.0+
> >  /*
> >   * Copyright (C) 2023 Tony Dinh <mibodhi@gmail.com>
> > - */
> > -&uart0 {
> > -     u-boot,dm-pre-reloc;
> > +*/
> > +
> > +/ {
> > +     chosen {
> > +             stdout-path = &uart0;
> > +     };
> >  };
> > --
> > 2.30.2
> >
Tom Rini March 16, 2023, 6:15 p.m. UTC | #3
On Wed, Mar 15, 2023 at 04:11:27PM -0700, Tony Dinh wrote:
> Hi Pali,
> 
> On Wed, Mar 15, 2023 at 2:58 PM Pali Rohár <pali@kernel.org> wrote:
> >
> > On Wednesday 15 March 2023 14:56:52 Tony Dinh wrote:
> > > The mainline Pogo V4 DTS uses a stdout-path format that is not
> > > recognizable by u-boot. Change it to a commonly used format.
> >
> > Cannot we teach u-boot to understand also currently used format?
> 
> I assume it is good to document the fact that perhaps using
> dm-pre-reloc tag (and later boot-phase tag) will overcome many odd
> properties format in Linux DTS. We said dm-pre-reloc is a workaround,
> but IMHO the tags are really good for u-boot, since u-boot is a
> multi-phase boot loader. If a device like UART is needed in a certain
> phase, we should say so.
> 
> Also at the moment, modifying the serial-uclass.c is something more
> than I can chew. If I must do it myself, it will be a while. If
> anybody wants to give it a try, please do so.

Note that the boot phase tags are now upstream, so those dts changes can
also go upstream now.
Pali Rohár March 16, 2023, 6:25 p.m. UTC | #4
On Wednesday 15 March 2023 16:11:27 Tony Dinh wrote:
> Hi Pali,
> 
> On Wed, Mar 15, 2023 at 2:58 PM Pali Rohár <pali@kernel.org> wrote:
> >
> > On Wednesday 15 March 2023 14:56:52 Tony Dinh wrote:
> > > The mainline Pogo V4 DTS uses a stdout-path format that is not
> > > recognizable by u-boot. Change it to a commonly used format.
> >
> > Cannot we teach u-boot to understand also currently used format?
> 
> I assume it is good to document the fact that perhaps using
> dm-pre-reloc tag (and later boot-phase tag) will overcome many odd
> properties format in Linux DTS. We said dm-pre-reloc is a workaround,
> but IMHO the tags are really good for u-boot, since u-boot is a
> multi-phase boot loader. If a device like UART is needed in a certain
> phase, we should say so.
> 
> Also at the moment, modifying the serial-uclass.c is something more
> than I can chew. If I must do it myself, it will be a while. If
> anybody wants to give it a try, please do so.

Simon could help there?

> Thanks,
> Tony
> 
> > > Note that this patch removes the previous workaround for this board
> > > as discussed here:
> > > https://lists.denx.de/pipermail/u-boot/2023-February/508936.html
> > >
> > > Signed-off-by: Tony Dinh <mibodhi@gmail.com>
> > > ---
> > >
> > >  arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
> > >  1 file changed, 6 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> > > index f9e127234c..9bb97c6b6b 100644
> > > --- a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> > > +++ b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
> > > @@ -1,7 +1,10 @@
> > >  // SPDX-License-Identifier: GPL-2.0+
> > >  /*
> > >   * Copyright (C) 2023 Tony Dinh <mibodhi@gmail.com>
> > > - */
> > > -&uart0 {
> > > -     u-boot,dm-pre-reloc;
> > > +*/
> > > +
> > > +/ {
> > > +     chosen {
> > > +             stdout-path = &uart0;
> > > +     };
> > >  };
> > > --
> > > 2.30.2
> > >
diff mbox series

Patch

diff --git a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
index f9e127234c..9bb97c6b6b 100644
--- a/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
+++ b/arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi
@@ -1,7 +1,10 @@ 
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2023 Tony Dinh <mibodhi@gmail.com>
- */
-&uart0 {
-	u-boot,dm-pre-reloc;
+*/
+
+/ {
+	chosen {
+		stdout-path = &uart0;
+	};
 };