This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: Changing console from ttyS2 to ttyS4

Part Number: AM625

Tool/software:

Hi,

I want to change the boot ttyS2 to ttyS4, with the pin configuration still using main_uart0.

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1295252/am623-changing-console-from-uart0-to-uart2/4916153#4916153 
I referred to the configuration method mentioned in the above post, but after making the changes, the U-Boot and Linux boot messages are printed, but the login interface does not appear.

Could you please help take a look? Thanks.

My patch is as follows:

Uboot

diff --git a/arch/arm/dts/k3-am625-r5-sk.dts b/arch/arm/dts/k3-am625-r5-sk.dts
index f64d6362..b7c37a34 100644
--- a/arch/arm/dts/k3-am625-r5-sk.dts
+++ b/arch/arm/dts/k3-am625-r5-sk.dts
@@ -20,7 +20,7 @@
        };

        chosen {
-               stdout-path = "serial2:115200n8";
+               stdout-path = "serial4:115200n8";
                tick-timer = &main_timer0;
        };

diff --git a/arch/arm/dts/k3-am625-sk.dts b/arch/arm/dts/k3-am625-sk.dts
index 0e3b554a..20c781cc
--- a/arch/arm/dts/k3-am625-sk.dts
+++ b/arch/arm/dts/k3-am625-sk.dts
@@ -17,7 +17,7 @@
        model = "Texas Instruments AM625 SK";

        aliases {
-               serial2 = &main_uart0;
+               serial4 = &main_uart0;
                mmc0 = &sdhci0;
                mmc1 = &sdhci1;
                mmc2 = &sdhci2;
@@ -29,8 +29,8 @@
        };

        chosen {
-               stdout-path = "serial2:115200n8";
-               bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
+               stdout-path = "serial4:115200n8";
+               bootargs = "console=ttyS4,115200n8 earlycon=ns16550a,mmio32,0x02800000";
        };

diff --git a/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi b/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi
index a9924604..10d27b75
--- a/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62x-sk-common-u-boot.dtsi
@@ -6,7 +6,7 @@

 / {
        chosen {
-               stdout-path = "serial2:115200n8";
+               stdout-path = "serial4:115200n8";
                tick-timer = &timer1;
        };

diff --git a/arch/arm/dts/k3-am62x-sk-common.dtsi b/arch/arm/dts/k3-am62x-sk-common.dtsi
index 95923508..fbcb42f2
--- a/arch/arm/dts/k3-am62x-sk-common.dtsi
+++ b/arch/arm/dts/k3-am62x-sk-common.dtsi
@@ -12,7 +12,7 @@

 / {
        aliases {
-               serial2 = &main_uart0;
+               serial4 = &main_uart0;
                mmc0 = &sdhci0;
                mmc1 = &sdhci1;
                mmc2 = &sdhci2;
@@ -24,8 +24,8 @@
        };

        chosen {
-               stdout-path = "serial2:115200n8";
-               bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
+               stdout-path = "serial4:115200n8";
+               bootargs = "console=ttyS4,115200n8 earlycon=ns16550a,mmio32,0x02800000";
        };


diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
index 1b6fd397..9176d1db 100644
--- a/board/ti/am62x/am62x.env
+++ b/board/ti/am62x/am62x.env
@@ -7,29 +7,29 @@
                        setenv name_fdt k3-am625-beagleplay.dtb; fi;
        setenv fdtfile ${name_fdt}
 name_kern=Image
-console=ttyS2,115200n8
+console=ttyS4,115200n8
 args_all=
        if test $boot = mmc; then
                setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000;

Linux

diff --git a/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi b/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi
index 95923508..fbcb42f2
--- a/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi
+++ b/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi
@@ -12,2 +12,2 @@
/ {
	aliases {
-		serial2 = &main_uart0;
+		serial4 = &main_uart0;
		mmc0 = &sdhci0;
		mmc1 = &sdhci1;
		mmc2 = &sdhci2;
		spi0 = &ospi0;
		ethernet0 = &cpsw_port1;
		ethernet1 = &cpsw_port2;
		usb0 = &usb0;
		usb1 = &usb1;
	};

	chosen {
-		stdout-path = "serial2:115200n8";
-		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
+		stdout-path = "serial4:115200n8";
+		bootargs = "console=ttyS4,115200n8 earlycon=ns16550a,mmio32,0x02800000";
	};

~# cat /etc/securetty
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
console

# Standard serial ports
ttyS0
ttyS1
ttyS2
ttyS3
ttyS4

# ARM AMBA SoCs
ttyAM0
ttyAM1
ttyAM2
ttyAM3
ttyAMA0
...