Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200
@ 2026-06-11 18:12 Ahmad Fatoum
  2026-06-11 18:12 ` [PATCH 1/3] ARM: dts: stm32: lxa-mc1: " Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 18:12 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Leonard Göhrs,
	Marc Kleine-Budde
  Cc: Alexandre Torgue, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, kernel, Ahmad Fatoum

The LXA boards are the only STM32 boards that set stdout-path = &uart*
instead of explicitly specifying a baud rate.

This would mean the default of 9600 is used, but it goes unnoticed when
booting normally as barebox fixes up a console= line that includes a
baud rate.

When EFI booting GRUB however, GRUB will not pass along the console=
line and thus the board ends up with a 9600 baud Linux console,
confusing users.

This series fixes this. As the device trees were added at different
times, they are fixed each in a separate commit with its own Fixes: tag.

---
Ahmad Fatoum (3):
      ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200
      ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200
      ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200

 arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
 arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts        | 2 +-
 arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
base-commit: 4549871118cf616eecdd2d939f78e3b9e1dddc48
change-id: 20260611-lxa-stdout-path-baudrate-7cf454cdae07

Best regards,
--  
Ahmad Fatoum <a.fatoum@pengutronix.de>



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

* [PATCH 1/3] ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200
  2026-06-11 18:12 [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
@ 2026-06-11 18:12 ` Ahmad Fatoum
  2026-06-11 18:12 ` [PATCH 2/3] ARM: dts: stm32: lxa-tac: " Ahmad Fatoum
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 18:12 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Leonard Göhrs,
	Marc Kleine-Budde
  Cc: Alexandre Torgue, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, kernel, Ahmad Fatoum

The default baud rate when none is specified is up to the DT consumer.

In the case of the Linux STM32 serial driver, it defaults to 9600 baud,
which differs from the 115200 baud that this board's barebox bootloader
configured.

This went unnoticed, because barebox automatically fixes up a console=
command-line option that looks like this on the LXA boards:

  console=ttySTM0,115200n8

This had precedence over the 9600 fallback baud rate.

But when EFI booting a kernel via GRUB, we run into this issue, because
the barebox-provided command-line is disregarded by GRUB.

Fix this by explicitly setting the baud rate to the correct 115200.

Fixes: 666b5ca85cd3 ("ARM: dts: stm32: add STM32MP1-based Linux Automation MC-1 board")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts
index eada9cf257be..b3d8eb57aa24 100644
--- a/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts
+++ b/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts
@@ -33,7 +33,7 @@ backlight: backlight {
 	};
 
 	chosen {
-		stdout-path = &uart4;
+		stdout-path = "serial0:115200n8";
 	};
 
 	led-controller-0 {

-- 
2.47.3



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

* [PATCH 2/3] ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200
  2026-06-11 18:12 [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
  2026-06-11 18:12 ` [PATCH 1/3] ARM: dts: stm32: lxa-mc1: " Ahmad Fatoum
@ 2026-06-11 18:12 ` Ahmad Fatoum
  2026-06-11 18:12 ` [PATCH 3/3] ARM: dts: stm32: fairytux2: " Ahmad Fatoum
  2026-06-11 19:43 ` [PATCH 0/3] ARM: dts: stm32: lxa: " David Laight
  3 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 18:12 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Leonard Göhrs,
	Marc Kleine-Budde
  Cc: Alexandre Torgue, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, kernel, Ahmad Fatoum

The default baud rate when none is specified is up to the DT consumer.

In the case of the Linux STM32 serial driver, it defaults to 9600 baud,
which differs from the 115200 baud that this board's barebox bootloader
configured.

This went unnoticed, because barebox automatically fixes up a console=
command-line option that looks like this on the LXA boards:

  console=ttySTM0,115200n8

This had precedence over the 9600 fallback baud rate.

But when EFI booting a kernel via GRUB, we run into this issue, because
the barebox-provided command-line is disregarded by GRUB.

Fix this by explicitly setting the baud rate to the correct 115200.

Fixes: 518272af37b2 ("ARM: dts: stm32: lxa-tac: add Linux Automation GmbH TAC")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi b/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi
index ab13f0c39892..ddb1657cd785 100644
--- a/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi
@@ -33,7 +33,7 @@ aliases {
 	};
 
 	chosen {
-		stdout-path = &uart4;
+		stdout-path = "serial0:115200n8";
 	};
 
 	led-controller-0 {

-- 
2.47.3



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

* [PATCH 3/3] ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200
  2026-06-11 18:12 [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
  2026-06-11 18:12 ` [PATCH 1/3] ARM: dts: stm32: lxa-mc1: " Ahmad Fatoum
  2026-06-11 18:12 ` [PATCH 2/3] ARM: dts: stm32: lxa-tac: " Ahmad Fatoum
@ 2026-06-11 18:12 ` Ahmad Fatoum
  2026-06-11 19:43 ` [PATCH 0/3] ARM: dts: stm32: lxa: " David Laight
  3 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 18:12 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Leonard Göhrs,
	Marc Kleine-Budde
  Cc: Alexandre Torgue, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, kernel, Ahmad Fatoum

The default baud rate when none is specified is up to the DT consumer.

In the case of the Linux STM32 serial driver, it defaults to 9600 baud,
which differs from the 115200 baud that this board's barebox bootloader
configured.

This went unnoticed, because barebox automatically fixes up a console=
command-line option that looks like this on the LXA boards:

  console=ttySTM0,115200n8

This had precedence over the 9600 fallback baud rate.

But when EFI booting a kernel via GRUB, we run into this issue, because
the barebox-provided command-line is disregarded by GRUB.

Fix this by explicitly setting the baud rate to the correct 115200.

Fixes: 8c6d469f5249 ("ARM: dts: stm32: lxa-fairytux2: add Linux Automation GmbH FairyTux 2")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi b/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi
index 7d3a6a3b5d09..d30b626a18c2 100644
--- a/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi
@@ -28,7 +28,7 @@ aliases {
 	};
 
 	chosen {
-		stdout-path = &uart4;
+		stdout-path = "serial0:115200n8";
 	};
 
 	backlight: backlight {

-- 
2.47.3



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

* Re: [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200
  2026-06-11 18:12 [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2026-06-11 18:12 ` [PATCH 3/3] ARM: dts: stm32: fairytux2: " Ahmad Fatoum
@ 2026-06-11 19:43 ` David Laight
  2026-06-11 20:33   ` Ahmad Fatoum
  3 siblings, 1 reply; 6+ messages in thread
From: David Laight @ 2026-06-11 19:43 UTC (permalink / raw)
  To: Ahmad Fatoum
  Cc: Alexandre Torgue, Maxime Coquelin, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Leonard Göhrs,
	Marc Kleine-Budde, Alexandre Torgue, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, kernel

On Thu, 11 Jun 2026 20:12:32 +0200
Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:

> The LXA boards are the only STM32 boards that set stdout-path = &uart*
> instead of explicitly specifying a baud rate.
> 
> This would mean the default of 9600 is used, but it goes unnoticed when
> booting normally as barebox fixes up a console= line that includes a
> baud rate.
> 
> When EFI booting GRUB however, GRUB will not pass along the console=
> line and thus the board ends up with a 9600 baud Linux console,
> confusing users.

Is it possible to determine the current baud rate (by reading the hardware
register) and default to that value.
Then if grub has initialised the uart the kernel will use the same
baud rate.

	David

> 
> This series fixes this. As the device trees were added at different
> times, they are fixed each in a separate commit with its own Fixes: tag.
> 
> ---
> Ahmad Fatoum (3):
>       ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200
>       ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200
>       ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200
> 
>  arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
>  arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts        | 2 +-
>  arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi       | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> ---
> base-commit: 4549871118cf616eecdd2d939f78e3b9e1dddc48
> change-id: 20260611-lxa-stdout-path-baudrate-7cf454cdae07
> 
> Best regards,
> --  
> Ahmad Fatoum <a.fatoum@pengutronix.de>
> 
> 



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

* Re: [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200
  2026-06-11 19:43 ` [PATCH 0/3] ARM: dts: stm32: lxa: " David Laight
@ 2026-06-11 20:33   ` Ahmad Fatoum
  0 siblings, 0 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 20:33 UTC (permalink / raw)
  To: David Laight
  Cc: Alexandre Torgue, Maxime Coquelin, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Leonard Göhrs,
	Marc Kleine-Budde, Alexandre Torgue, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, kernel

Hi David,

On 6/11/26 21:43, David Laight wrote:
> On Thu, 11 Jun 2026 20:12:32 +0200
> Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
> 
>> The LXA boards are the only STM32 boards that set stdout-path = &uart*
>> instead of explicitly specifying a baud rate.
>>
>> This would mean the default of 9600 is used, but it goes unnoticed when
>> booting normally as barebox fixes up a console= line that includes a
>> baud rate.
>>
>> When EFI booting GRUB however, GRUB will not pass along the console=
>> line and thus the board ends up with a 9600 baud Linux console,
>> confusing users.
> 
> Is it possible to determine the current baud rate (by reading the hardware
> register) and default to that value.
> Then if grub has initialised the uart the kernel will use the same
> baud rate.

I think so, yes. In addition to the register divider configuration, one
would need the input clock rate as well, but that's not a problem.

Do you know if any drivers already do this?

Nevertheless, I would like the LXA device trees changed, even if only
to align them with all other existing STM32 device trees.

Cheers,
Ahmad


> 
> 	David
> 
>>
>> This series fixes this. As the device trees were added at different
>> times, they are fixed each in a separate commit with its own Fixes: tag.
>>
>> ---
>> Ahmad Fatoum (3):
>>       ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200
>>       ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200
>>       ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200
>>
>>  arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
>>  arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts        | 2 +-
>>  arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi       | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>> ---
>> base-commit: 4549871118cf616eecdd2d939f78e3b9e1dddc48
>> change-id: 20260611-lxa-stdout-path-baudrate-7cf454cdae07
>>
>> Best regards,
>> --  
>> Ahmad Fatoum <a.fatoum@pengutronix.de>
>>
>>
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

end of thread, other threads:[~2026-06-11 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 18:12 [PATCH 0/3] ARM: dts: stm32: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
2026-06-11 18:12 ` [PATCH 1/3] ARM: dts: stm32: lxa-mc1: " Ahmad Fatoum
2026-06-11 18:12 ` [PATCH 2/3] ARM: dts: stm32: lxa-tac: " Ahmad Fatoum
2026-06-11 18:12 ` [PATCH 3/3] ARM: dts: stm32: fairytux2: " Ahmad Fatoum
2026-06-11 19:43 ` [PATCH 0/3] ARM: dts: stm32: lxa: " David Laight
2026-06-11 20:33   ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox