From 8e062e8340ebcf9973505901eea1b98a939310ea Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 7 Feb 2024 13:40:35 +0000 Subject: [PATCH] t23x: nv-public: Fix serial aliases When booting Linux with GRUB, the serial console does not show the kernel boot messages as expected. By default GRUB does not add the 'console' kernel parameter and relies on device-tree to configure the default serial port. Device-tree configures the default serial port by setting the property 'stdout-path=serial0:115200n8' where 'serial0' is an alises to one of the devices serial ports. The default serial port for Tegra234 devices is the TCU0 and so 'serial0' should be mapped to this interface. However, the 'serial0' is being updated to be mapped to a different UART. Fix this by removing the additional 'serialX' aliases in the base overlay file and add any alises that are not already defined to the appropriate board file. This does change the mapping of some aliases but this aligns the boards with the aliases as they are defined upstream. Bug 4264560 Change-Id: Icf6bdb1e7d5c9abf5bdbf5378b4ed8122910b507 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/3072368 (cherry picked from commit 6114a3746691ca287393beb86688c9e09f2070f2) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/3075606 Reviewed-by: Brad Griffis GVS: Gerrit_Virtual_Submit --- nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi | 4 ++++ nv-platform/tegra234-p3740-0002+p3701-0008-nv-common.dtsi | 4 ++++ nv-soc/tegra234-base-overlay.dtsi | 5 +---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi b/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi index e190bbd..6680c35 100644 --- a/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi +++ b/nv-platform/tegra234-p3737-0000+p3701-xxxx-nv-common.dtsi @@ -12,6 +12,10 @@ #include "tegra234-dcb-p3737-0000-p3701-0000.dtsi" / { + aliases { + serial2 = "/bus@0/serial@3110000"; + }; + cpus { idle-states { c7 { diff --git a/nv-platform/tegra234-p3740-0002+p3701-0008-nv-common.dtsi b/nv-platform/tegra234-p3740-0002+p3701-0008-nv-common.dtsi index a24efbb..0a5b6e7 100644 --- a/nv-platform/tegra234-p3740-0002+p3701-0008-nv-common.dtsi +++ b/nv-platform/tegra234-p3740-0002+p3701-0008-nv-common.dtsi @@ -13,6 +13,10 @@ #include "tegra234-dcb-p3737-0000-p3701-0000.dtsi" / { + aliases { + serial2 = "/bus@0/serial@3110000"; + }; + chosen { bootargs = "console=ttyTCU0,115200n8"; }; diff --git a/nv-soc/tegra234-base-overlay.dtsi b/nv-soc/tegra234-base-overlay.dtsi index aab832e..24f2f4a 100644 --- a/nv-soc/tegra234-base-overlay.dtsi +++ b/nv-soc/tegra234-base-overlay.dtsi @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. // This file contains the additional parameters which are missing from DT nodes of T234 // available in base/tegra234.dtsi @@ -22,9 +22,6 @@ / { aliases { - serial0 = "/bus@0/serial@3100000"; - serial1 = "/bus@0/serial@3110000"; - serial2 = "/bus@0/serial@3140000"; i2c0 = "/bus@0/i2c@3160000"; i2c1 = "/bus@0/i2c@c240000"; i2c2 = "/bus@0/i2c@3180000";