Skip to contentSkip to conversation

TI: AM64-EVM/SK: Enable MAIN UART1 for SYSFW tracing

PATCH In review Vishal Mahaveer 4 participants 10 messages Jun 5 – Jul 3

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover TI: AM64-EVM/SK: Enable MAIN UART1 for SYSFW tracing

Collecting SYSFW traces from DMSC firmware is broken on the current codebase. These changes enables MAIN_UART1 for collecting SYSFW traces when the trace option is enabled in the boardcfg.

Vishal Mahaveer (2):
arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1
arm: dts: k3-am642-evm/sk: enable MAIN UART1 for SYSFW logs

 arch/arm/dts/k3-am642-r5-evm.dts    | 10 ++++++++++
 arch/arm/dts/k3-am642-r5-sk.dts     | 10 ++++++++++
 arch/arm/mach-k3/am64x/am642_init.c |  4 ++--
 3 files changed, 22 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

The upstream device tree changed the serial alias for MAIN UART1 from serial3 to serial1. Update the board initialization code to match this change by modifying the UCLASS_SERIAL sequence number lookup.

This ensures proper pin control configuration for the UART used by system firmware (SYSFW).

---
 arch/arm/mach-k3/am64x/am642_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-k3/am64x/am642_init.c +2 -2
index a15adf1cb1e..d6cc7a85aae 100644
@@ -212,14 +212,14 @@ void board_init_f(ulong dummy)
 
 #if defined(CONFIG_K3_LOAD_SYSFW)
 	/*
-	 * Process pinctrl for serial3 a.k.a. MAIN UART1 module and continue
+	 * Process pinctrl for serial1 a.k.a. MAIN UART1 module and continue
 	 * regardless of the result of pinctrl. Do this without probing the
 	 * device, but instead by searching the device that would request the
 	 * given sequence number if probed. The UART will be used by the system
 	 * firmware (SYSFW) image for various purposes and SYSFW depends on us
 	 * to initialize its pin settings.
 	 */
-	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 3, &dev);
+	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 1, &dev);
 	if (!ret)
 		pinctrl_select_state(dev, "default");
 
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 1/2] arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

Hi,

Quoted 1 line · Vishal Mahaveer

The upstream device tree changed the serial alias for MAIN UART1 from

upstream where? Can you point me to the related change?

Regards,
Wadim

Quoted 32 lines

serial3 to serial1. Update the board initialization code to match this change by modifying the UCLASS_SERIAL sequence number lookup.

This ensures proper pin control configuration for the UART used by system firmware (SYSFW).

---
 arch/arm/mach-k3/am64x/am642_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-k3/am64x/am642_init.c +2 -2
index a15adf1cb1e..d6cc7a85aae 100644
@@ -212,14 +212,14 @@ void board_init_f(ulong dummy)
 
 #if defined(CONFIG_K3_LOAD_SYSFW)
 	/*
-	 * Process pinctrl for serial3 a.k.a. MAIN UART1 module and continue
+	 * Process pinctrl for serial1 a.k.a. MAIN UART1 module and continue
 	 * regardless of the result of pinctrl. Do this without probing the
 	 * device, but instead by searching the device that would request the
 	 * given sequence number if probed. The UART will be used by the system
 	 * firmware (SYSFW) image for various purposes and SYSFW depends on us
 	 * to initialize its pin settings.
 	 */
-	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 3, &dev);
+	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 1, &dev);
 	if (!ret)
 		pinctrl_select_state(dev, "default");
 
#3 lore raw

Re: [PATCH 1/2] arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

On June 16, 2026 thus sayeth Wadim Egorov:

Quoted 7 lines

Hi,

Quoted 1 line · Vishal Mahaveer

The upstream device tree changed the serial alias for MAIN UART1 from

upstream where? Can you point me to the related change?

Hmm a quick scan through the history nothing seems to be standing out. Serial1 looks to have always been where DMSC put its traces. I wonder if this was ever working.

I'll try to see if older versions worked but I'm thinking we may need:

Fixes d2edabfa8de5 ("arm: mach-k3: am642: Load SYSFW binary and config from boot media")

~Bryan

#4 lore raw

RE: [PATCH 1/2] arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

Quoted 9 lines

On June 16, 2026 thus sayeth Wadim Egorov:

Quoted 8 lines

Hi,

Quoted 2 lines · Vishal Mahaveer

The upstream device tree changed the serial alias for MAIN UART1 from

upstream where? Can you point me to the related change?

During some cleanup, the aliases changed and the code was out of sync.
https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

Hmm a quick scan through the history nothing seems to be standing out. Serial1 looks to have always been where DMSC put its traces. I wonder if this was ever working.

It's true that it may have been broken for a longer period of time.

Quoted 7 lines

I'll try to see if older versions worked but I'm thinking we may need:

Fixes d2edabfa8de5 ("arm: mach-k3: am642: Load SYSFW binary and config

from boot media")

~Bryan

#5 lore raw

Re: [PATCH 1/2] arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

In reply to Bryan Brattlof
Quoted 4 lines · Bryan Brattlof

On June 16, 2026 thus sayeth Wadim Egorov:

Quoted 3 lines

Hi,

On 6/5/26 9:38 PM, Vishal Mahaveer wrote:

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

The upstream device tree changed the serial alias for MAIN UART1 from

upstream where? Can you point me to the related change?

Hmm a quick scan through the history nothing seems to be standing out. Serial1 looks to have always been where DMSC put its traces. I wonder if this was ever working.

Our boards do not reserve the main_uart1. But so far we never noticed any strange behavior on it. Maybe because no tracing is enabled per default? I wonder if we can change the uart DMSC is using?

Quoted 6 lines

I'll try to see if older versions worked but I'm thinking we may need:

Fixes d2edabfa8de5 ("arm: mach-k3: am642: Load SYSFW binary and config from boot media")

~Bryan

#6 lore raw

RE: [PATCH 1/2] arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

Quoted 12 lines · Bryan Brattlof
Quoted 10 lines

On June 16, 2026 thus sayeth Wadim Egorov:

Quoted 8 lines

Hi,

Quoted 2 lines · Vishal Mahaveer

The upstream device tree changed the serial alias for MAIN UART1 from

upstream where? Can you point me to the related change?

Quoted 7 lines
Quoted 3 lines

Hmm a quick scan through the history nothing seems to be standing out. Serial1 looks to have always been where DMSC put its traces. I wonder if this was ever working.

Our boards do not reserve the main_uart1. But so far we never noticed any strange behavior on it. Maybe because no tracing is enabled per default? I wonder if we can change the uart DMSC is using?

Yes, it is disabled by default. Tracing is only enabled during debug.

The UART used for SYSFW tracing is fixed.
But, there are other means to get traces like trace memory buffer and ITM.

https://software-dl.ti.com/tisci/esd/latest/4_trace/trace.html

Quoted 9 lines
Quoted 9 lines

I'll try to see if older versions worked but I'm thinking we may need:

Fixes d2edabfa8de5 ("arm: mach-k3: am642: Load SYSFW binary and

config from boot media")

~Bryan

#7 lore raw

PATCH 2/2 arm: dts: k3-am642-evm/sk: enable MAIN UART1 for SYSFW logs

In reply to Vishal Mahaveer

Enable MAIN UART1 in the R5 SPL device tree to collect system SYSFW debug traces during early boot.

---
 arch/arm/dts/k3-am642-r5-evm.dts | 10 ++++++++++
 arch/arm/dts/k3-am642-r5-sk.dts  | 10 ++++++++++
 2 files changed, 20 insertions(+)
arch/arm/dts/k3-am642-r5-evm.dts +10 -0
index e3d363a8e39..d1fe7efd006 100644
@@ -23,3 +23,13 @@
 	clocks = <&clk_200mhz>;
 	clock-names = "clk_xin";
 };
+
+&main_uart1_pins_default {
+	bootph-pre-ram;
+};
+
+/* Main UART1 is used for TIFS firmware logs */
+&main_uart1 {
+	bootph-pre-ram;
+	status="okay";
+};
arch/arm/dts/k3-am642-r5-sk.dts +10 -0
index 27f3e87fb90..19435cd1f5c 100644
@@ -18,3 +18,13 @@
 &serdes_wiz0 {
 	status = "okay";
 };
+
+&main_uart1_pins_default {
+	bootph-pre-ram;
+};
+
+/* Main UART1 is used for TIFS firmware logs */
+&main_uart1 {
+	bootph-pre-ram;
+	status="okay";
+};
Signature · 1 line
2.34.1
Reviewed-by on the v1 series
#8 lore raw
In reply to Vishal Mahaveer

On June 5, 2026 thus sayeth Vishal Mahaveer:

Quoted 4 lines

Collecting SYSFW traces from DMSC firmware is broken on the current codebase. These changes enables MAIN_UART1 for collecting SYSFW traces when the trace option is enabled in the boardcfg.

Quoted 8 lines

Vishal Mahaveer (2):
arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1
arm: dts: k3-am642-evm/sk: enable MAIN UART1 for SYSFW logs

 arch/arm/dts/k3-am642-r5-evm.dts    | 10 ++++++++++
 arch/arm/dts/k3-am642-r5-sk.dts     | 10 ++++++++++
 arch/arm/mach-k3/am64x/am642_init.c |  4 ++--
 3 files changed, 22 insertions(+), 2 deletions(-)

We'll probably want to include a fixes tag to get this in -master but I can now see traces. Thanks Vishal :)

~Bryan

#9 lore raw
In reply to Vishal Mahaveer
Quoted 9 lines · Vishal Mahaveer

Collecting SYSFW traces from DMSC firmware is broken on the current codebase. These changes enables MAIN_UART1 for collecting SYSFW traces when the trace option is enabled in the boardcfg.

Vishal Mahaveer (2):
arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1
arm: dts: k3-am642-evm/sk: enable MAIN UART1 for SYSFW logs

[...]

Applied to u-boot/next, thanks!

[1/2] arm: mach-k3: am642: Update MAIN UART1 serial alias from 3 to 1

      commit: c8a3552f7d9e6bd4554730e3dec10ff6c661f07c
[2/2] arm: dts: k3-am642-evm/sk: enable MAIN UART1 for SYSFW logs
      commit: 48b7c05d272747ec4d8f8f7eb53119ef149dcc7a
Signature · 1 line
Tom