I am trying to move UART serial console on both u-boot and Linux from the default pins (J21, pin 8 and 10) to the J17 connector (called Serial Port Header).
First I identified that UART on J21(8, 10) is UARTA located at regbase 0x70006000. In Linux it is called ttyS0. The UART at J17 is UARTC, located at 0x70006200. Default name in Linux is ttyTHS2.
For the Linux found this way of moving it, though it required a lot more try & error than it seems:
- Found parameter settings and changed to this:
diff --git a/arch/arm64/boot/dts/tegra210-common.dtsi b/arch/arm64/boot/dts/tegra210-common.dtsi
index 4a511df..e5e069b 100644
--- a/arch/arm64/boot/dts/tegra210-common.dtsi
+++ b/arch/arm64/boot/dts/tegra210-common.dtsi
@@ -36,7 +36,8 @@
};
serial@70006200 {
- compatible = "nvidia,tegra114-hsuart";
+ compatible = "nvidia,tegra210-uart", "nvidia,tegra114-hsuart";
+ console-port;
status = "okay";
};
This renamed the ttyTHS2 → ttyS1 and enabled console at boot level.
- In order to get a working console for linux, and not just kernel messages, find this file in the rootfs: /etc/init/ttyS0.conf
Then rename it to ttyS1.conf
and change contents to this:
# ttyS1 - getty
#
# This service maintains a getty on ttyS1
description "Get a getty on ttyS1"
start on stopped rc RUNLEVEL=[2345] and (
not-container or
container CONTAINER=lxc or
container CONTAINER=lxc-libvirt)
stop on runlevel [!2345]
respawn
exec /sbin/getty -a ubuntu -L 115200 ttyS1
This should be enough to get a working console for Linux use.
What about the U-boot console??
Well, I saw that there is a file /arch/arm/dts/tegra210-p2371-2180.dts that contains this node:
chosen {
stdout-path = &uarta;
};
Thought it would be enough to change this to uartc, but no luck here. The initial stage still prints on the default UART. After that, no more output is produced:
...
64b[0001.041] LPDDR4 Training: Number of tables = 10
[0001.046] EMC Training (SRC-freq: 204000; DST-freq: 408000)
[0001.052] EMC Training Successful
[0001.055] EMC Training (SRC-freq: 204000; DST-freq: 665600)
[0001.061] EMC Training Successful
[0001.064] EMC Training (SRC-freq: 204000; DST-freq: 800000)
[0001.075] EMC Training Successful
[0001.078] EMC Training (SRC-freq: 204000; DST-freq: 1065600)
[0001.101] EMC Training Successful
[0001.104] EMC Training (SRC-freq: 204000; DST-freq: 1331200)
[0001.126] EMC Training Successful
[0001.129] EMC Training (SRC-freq: 204000; DST-freq: 1600000)
[0001.148] EMC Training Successful
[0001.152] Switching to 800000 KHz Success
[0001.185] LPDDR4 Training: Number of tables = 10
!!! FOLLOWING IS NOT PRINTED !!!
U-Boot 2015.07-rc2-dirty (Mar 23 2016 - 14:37:38 +0200)
TEGRA210
Model: NVIDIA P2371-2180
DRAM: 4 GiB
...
Any ideas?