How to fix console on /dev/ttyS0 node?

Hello,

In dts when i init only “UARTD :7000:6300” , then console is enabled on /dev/ttyS0. and debug logs are printed on that.

Now if i init other serial port “UARTC : 7000:6200” , then console is shifted to /dev/ttyS1, and now i can see debug logs on /dev/ttyS1 not on /dev/ttyS0.

If i init third serial port “UARTB- 7000:6040”, then console is shifted to /dev/ttyS2.

Is there any way to fix console on /dev/ttyS0? Because on initialization of another serial port my console node is shifted.

Rqegards.
Rahul Shah

It is unclear as to what has changed. Is this a custom carrier? Are you trying to use an alternate UART for serial console, or to set serial console to a new UART?

Here is a thread talking about alternate serial console, but it is for a TX2 so there would be differences (for example, device tree would have similar changes, but details would differ…plus a TX2 is running a much different release although U-Boot is probably the same):
https://devtalk.nvidia.com/default/topic/1025894/jetson-tx2/uart1-acts-as-default-debug-port-on-tx2-r28-1/post/5220368/#5220368

Hi,

Sorry for the unclearity of question.

As per my hardware design , My serial debug console is at UART-D.

case 1 :
when i enable only UART-D in dts as follows , then my serial console is at /dev/ttyS0. -> OK for me.

serial@70006300 {
status = “okay”;
};

case 2 :
Now i have another UART peripheral-1 which is connected on UART-C.so i enable UART-C for peripheral-1 and UART-D for console in dts as follows:

serial@70006300 {
status = “okay”;
};

serial@70006200 {
status = “okay”;
};

Now my debug console is shifted to /dev/ttyS1. (because i inited UART-C. so UART-C gets /dev/ttyS0 and UART-D gets /dev/ttyS1)

case 2 :
Now i have another UART peripheral-2 which is connected on UART-B.so i enable UART-B for peripheral-2 , UART-C for peripheral -1 and UART-D for console in dts as follows:

serial@70006300 {
status = “okay”;
};

serial@70006200 {
status = “okay”;
};

serial@70006000 {
status = “okay”;
};

Now my debug console is shifted to /dev/ttyS2. (because i inited UART-B and UART-C . so UART-B gets /dev/ttyS0 , UART-C gets /dev/ttyS1 , AND UART-D gets /dev/ttyS2).

So my problem is, it is not good that my /dev node changed when i init another UART port for other peripheral.

Is it possible that UART-D always gets /dev/ttyS0 irrespective of any other serial port?

As u see in above 3 cases /dev/tty port for UART-D changed for every case.

Regards,
Rahul Shah

I have not modified this for custom hardware, but what usually interferes is that the serial UART for console must be changed both in Linux and in U-Boot. To change in U-Boot you probably have to recompile after making edits, and then install the new U-Boot.

The symptom would be that the original UART has activity early in boot, but then once the Linux kernel loads, the other UART takes over.

Have you edited and reinstalled U-Boot? Is there activity which works with U-Boot on one port, but then switches to another port after Linux takes over?