Skip to contentSkip to conversation

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

PATCH In review Tony Dinh 3 participants 5 messages Mar 15, 2023 – Mar 16, 2023 Arm (32-bit)

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

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

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

---

 arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi +6 -3
index f9e127234c..9bb97c6b6b 100644
@@ -1,7 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2023 Tony Dinh <[email protected]>
- */
-&uart0 {
-	u-boot,dm-pre-reloc;
+*/
+
+/ {
+	chosen {
+		stdout-path = &uart0;
+	};
 };
Signature · 1 line
2.30.2
#1 lore raw
Quoted 2 lines · 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?

Quoted 31 lines

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

---

 arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi +6 -3
index f9e127234c..9bb97c6b6b 100644
@@ -1,7 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2023 Tony Dinh <[email protected]>
- */
-&uart0 {
-	u-boot,dm-pre-reloc;
+*/
+
+/ {
+	chosen {
+		stdout-path = &uart0;
+	};
 };
Signature · 1 line
2.30.2
author
#2 lore raw

Hi Pali,

Quoted 6 lines · Pali Rohár
Quoted 2 lines · 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

Quoted 31 lines
Quoted 31 lines

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

---

 arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi +6 -4
index f9e127234c..9bb97c6b6b 100644
@@ -1,7 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2023 Tony Dinh <[email protected]>
- */
-&uart0 {
-     u-boot,dm-pre-reloc;
+*/
+
+/ {
+     chosen {
+             stdout-path = &uart0;
+     };
 };
--

2.30.2

#3 lore raw
Quoted 17 lines · Tony Dinh

Hi Pali,

Quoted 6 lines · Pali Rohár
Quoted 2 lines · 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.

Quoted 3 lines

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.

Signature · 1 line
Tom
#4 lore raw
In reply to Tony Dinh
Quoted 17 lines · On Wednesday 15 March 2023 16:11:27 Tony Dinh wrote:

Hi Pali,

Quoted 6 lines · Pali Rohár
Quoted 2 lines · 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.

Quoted 3 lines

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?

Quoted 34 lines

Thanks,
Tony

Quoted 31 lines
Quoted 31 lines

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

---

 arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/dts/kirkwood-pogoplug-series-4-u-boot.dtsi +6 -4
index f9e127234c..9bb97c6b6b 100644
@@ -1,7 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2023 Tony Dinh <[email protected]>
- */
-&uart0 {
-     u-boot,dm-pre-reloc;
+*/
+
+/ {
+     chosen {
+             stdout-path = &uart0;
+     };
 };
--

2.30.2