IMX8MM default console is uart3. Need to use uart1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MM default console is uart3. Need to use uart1

790 Views
AndersGnistrup
Contributor II

Hi

I am using yocto as a build system.

The cpu used is a imx8mm sl

Our HW team has wired the uart4 for console, but the current console is uart3. So I need to change the console from uart3 to uart4. How is that done in the u-boot code?

I have figured out that I need to change the device tree (dtsi) for the u-boot.

Since it is very hard to debug I am using a develepment board to see if I can make it work there. I have tried using this patch.

 
diff --git a/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
index 0019d5a7858bf0bb29c9d38caebc166281b31faa..855a05c99230ba3e7264d52ee1a255edfe48dd80 100644
--- a/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
@@ -54,7 +54,7 @@
 	bootph-pre-ram;
 };
 
-&pinctrl_uart3 {
+&pinctrl_uart4 {
 	bootph-pre-ram;
 	bootph-all;
 };
@@ -107,7 +107,7 @@
 	bootph-pre-ram;
 };
 
-&uart3 {
+&uart4 {
 	bootph-pre-ram;
 	bootph-all;
 };
-- 
2.43.0

but the bard simple stops booting, it is stucked.

Labels (2)
0 Kudos
Reply
4 Replies

676 Views
AndersGnistrup
Contributor II

Solved.


My patch is fine and is working. The problem was the fdt in the kernel.

There are two methods for setting up HW in u-boot, using code, i.e, setting up the MUX'es in code or by using a flatten device tree.  This is same method introduced for the Linux kernel some years ago.

The u-boot driver must support this (i think this marked by DM_<something>.)
The above patch is using the device tree and depends on the driver supporting FDT.

I am using a kontron imx8mm-ked board and the yocto system from kontron. The above patch does the job and during compilation when IMX_BOOT_UART_BASE and ATF_BOOT_UART_BASE is both set to "0x30860000", i.e. uart 1.

Doing so does the job for the bootloader but info is not forwarded to the Linux kernel, it is still using uart3. The reason is that kontron is not using the device tree available in u-boot but has the fdt compiled into the Linux kernel.  In the FDT the chosen section was still set to uart3. When i fixed the FDT in the kernel all booted just fine. I will try to make an update post with all the important changed.

761 Views
AndersGnistrup
Contributor II

I got a bit further. I have made a patch for this repo:
remote.origin.url=https://git.kontron-electronics.de/sw/misc/u-boot.git

It now boots the SPL on uart1 and then tells the kernel to boot on uart3. I gees I need to do some cleanup (remove uart2 from spl completly) and tell kernel to use uart1 for console.

The main problem was that the clock to uart1 was not enabled.

This is the patch:

From b75832d89818e7f1963febccf45046d4ec2094cc Mon Sep 17 00:00:00 2001
From: Anders Gnistrup <ag@wegsol.io>
Date: Wed, 4 Feb 2026 10:45:58 +0100
Subject: [PATCH] Use uart1 instead of uart3

Sort of work, but it seems that the kernel config needs to be told to
boot from uart1 also.
---
 .../dts/imx8mm-kontron-bl-common-u-boot.dtsi  | 10 ++++++++++
 arch/arm/dts/imx8mm-kontron-osm-s.dtsi        |  7 ++++---
 arch/arm/dts/imx8mm-kontron-sl.dtsi           | 20 ++++++++++++++++---
 board/kontron/sl-mx8mm/spl.c                  |  1 +
 4 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
index 0019d5a7858bf0bb29c9d38caebc166281b31faa..99093484c45b91114b2074147693d20c009e7b67 100644
--- a/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
@@ -54,6 +54,11 @@
 	bootph-pre-ram;
 };
 
+&pinctrl_uart1 {
+	bootph-pre-ram;
+	bootph-all;
+};
+
 &pinctrl_uart3 {
 	bootph-pre-ram;
 	bootph-all;
@@ -107,6 +112,11 @@
 	bootph-pre-ram;
 };
 
+&uart1 {
+	bootph-pre-ram;
+	bootph-all;
+};
+
 &uart3 {
 	bootph-pre-ram;
 	bootph-all;
diff --git a/arch/arm/dts/imx8mm-kontron-osm-s.dtsi b/arch/arm/dts/imx8mm-kontron-osm-s.dtsi
index d4554296523058b7230e826c72680b0a416bc316..eb71d8abc6461b4b3c9e1830e652657434b5e5b9 100644
--- a/arch/arm/dts/imx8mm-kontron-osm-s.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-osm-s.dtsi
@@ -27,7 +27,7 @@
 	};
 
 	chosen {
-		stdout-path = &uart3;
+		stdout-path = &uart1;
 	};
 
 	reg_vdd_carrier: regulator-vdd-carrier {
@@ -394,9 +394,10 @@
 	pinctrl-0 = <&pinctrl_pwm3>;
 };
 
-&uart1 {
+&uart1 { /* console */
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
+	status = "okay";
 };
 
 &uart2 {
@@ -404,7 +405,7 @@
 	pinctrl-0 = <&pinctrl_uart2>;
 };
 
-&uart3 { /* console */
+&uart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart3>;
 	status = "okay";
diff --git a/arch/arm/dts/imx8mm-kontron-sl.dtsi b/arch/arm/dts/imx8mm-kontron-sl.dtsi
index 2076148e08627a167b3b34d886ec5456bb5e18eb..a7a3ff64ce7480872e299895a990423aa5bc8475 100644
--- a/arch/arm/dts/imx8mm-kontron-sl.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-sl.dtsi
@@ -20,7 +20,7 @@
 	};
 
 	chosen {
-		stdout-path = &uart3;
+		stdout-path = &uart1;
 	};
 };
 
@@ -200,12 +200,17 @@
 	};
 };
 
-&uart3 { /* console */
+&uart1 { /* console */
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_uart3>;
+	pinctrl-0 = <&pinctrl_uart1>;
 	status = "okay";
 };
 
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart3>;
+};
+
 &usdhc1 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc1>;
@@ -248,6 +253,15 @@
 		>;
 	};
 
+	pinctrl_uart1: uart1grp {
+		fsl,pins = <
+			MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_RX		0x0 /* UART_A_RX */
+			MX8MM_IOMUXC_SAI2_RXFS_UART1_DCE_TX		0x0 /* UART_A_TX */
+			MX8MM_IOMUXC_SAI2_RXD0_UART1_DCE_RTS_B		0x0 /* UART_A_CTS */
+			MX8MM_IOMUXC_SAI2_TXFS_UART1_DCE_CTS_B		0x0 /* UART_A_RTS */
+		>;
+	};
+
 	pinctrl_uart3: uart3grp {
 		fsl,pins = <
 			MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX		0x140
diff --git a/board/kontron/sl-mx8mm/spl.c b/board/kontron/sl-mx8mm/spl.c
index 50eb0eb13e10d8ae980ef0e51e0a5f13b6dec432..4d5b18f6dd890759bfe728cc5ff5febab35c8150 100644
--- a/board/kontron/sl-mx8mm/spl.c
+++ b/board/kontron/sl-mx8mm/spl.c
@@ -212,6 +212,7 @@ void board_init_f(ulong dummy)
 
 	arch_cpu_init();
 
+	init_uart_clk(0);
 	init_uart_clk(2);
 
 	timer_init();
-- 
2.43.0

 

719 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products, as for the patch,

You can confirm the code that needs to be changed from the following post.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-93-91-debug-console-relocation-with... 

I based on the code that needed to be modified for i.MX 8M series, I think you can confirm missing code in your setup.

Regards

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2305910%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX8MM%20default%20console%20is%20uart3.%20Need%20to%20use%20uart1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2305910%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EI%20am%20using%20yocto%20as%20a%20build%20system.%3C%2FP%3E%3CP%3EThe%20cpu%20used%20is%20a%20imx8mm%20sl%3C%2FP%3E%3CP%3EOur%20HW%20team%20has%20wired%20the%20uart4%20for%20console%2C%20but%20the%20current%20console%20is%20uart3.%20So%20I%20need%20to%20change%20the%20console%20from%20uart3%20to%20uart4.%20How%20is%20that%20done%20in%20the%20u-boot%20code%3F%3C%2FP%3E%3CP%3EI%20have%20figured%20out%20that%20I%20need%20to%20change%20the%20device%20tree%20(dtsi)%20for%20the%20u-boot.%3C%2FP%3E%3CP%3ESince%20it%20is%20very%20hard%20to%20debug%20I%20am%20using%20a%20develepment%20board%20to%20see%20if%20I%20can%20make%20it%20work%20there.%20I%20have%20tried%20using%20this%20patch.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ediff%20--git%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%0Aindex%200019d5a7858bf0bb29c9d38caebc166281b31faa..855a05c99230ba3e7264d52ee1a255edfe48dd80%20100644%0A---%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%0A%2B%2B%2B%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%0A%40%40%20-54%2C7%20%2B54%2C7%20%40%40%0A%20%09bootph-pre-ram%3B%0A%20%7D%3B%0A%20%0A-%26amp%3Bpinctrl_uart3%20%7B%0A%2B%26amp%3Bpinctrl_uart4%20%7B%0A%20%09bootph-pre-ram%3B%0A%20%09bootph-all%3B%0A%20%7D%3B%0A%40%40%20-107%2C7%20%2B107%2C7%20%40%40%0A%20%09bootph-pre-ram%3B%0A%20%7D%3B%0A%20%0A-%26amp%3Buart3%20%7B%0A%2B%26amp%3Buart4%20%7B%0A%20%09bootph-pre-ram%3B%0A%20%09bootph-all%3B%0A%20%7D%3B%0A--%20%0A2.43.0%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ebut%20the%20bard%20simple%20stops%20booting%2C%20it%20is%20stucked.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2305910%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2307783%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX8MM%20default%20console%20is%20uart3.%20Need%20to%20use%20uart1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2307783%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20got%20a%20bit%20further.%20I%20have%20made%20a%20patch%20for%20this%20repo%3A%3CBR%20%2F%3Eremote.origin.url%3D%3CA%20href%3D%22https%3A%2F%2Fgit.kontron-electronics.de%2Fsw%2Fmisc%2Fu-boot.git%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgit.kontron-electronics.de%2Fsw%2Fmisc%2Fu-boot.git%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EIt%20now%20boots%20the%20SPL%20on%20uart1%20and%20then%20tells%20the%20kernel%20to%20boot%20on%20uart3.%20I%20gees%20I%20need%20to%20do%20some%20cleanup%20(remove%20uart2%20from%20spl%20completly)%20and%20tell%20kernel%20to%20use%20uart1%20for%20console.%3C%2FP%3E%3CP%3EThe%20main%20problem%20was%20that%20the%20clock%20to%20uart1%20was%20not%20enabled.%3C%2FP%3E%3CP%3EThis%20is%20the%20patch%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EFrom%20b75832d89818e7f1963febccf45046d4ec2094cc%20Mon%20Sep%2017%2000%3A00%3A00%202001%0AFrom%3A%20Anders%20Gnistrup%20%3CAG%3E%0ADate%3A%20Wed%2C%204%20Feb%202026%2010%3A45%3A58%20%2B0100%0ASubject%3A%20%5BPATCH%5D%20Use%20uart1%20instead%20of%20uart3%0A%0ASort%20of%20work%2C%20but%20it%20seems%20that%20the%20kernel%20config%20needs%20to%20be%20told%20to%0Aboot%20from%20uart1%20also.%0A---%0A%20...%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%20%20%7C%2010%20%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%0A%20arch%2Farm%2Fdts%2Fimx8mm-kontron-osm-s.dtsi%20%20%20%20%20%20%20%20%7C%20%207%20%2B%2B%2B%2B---%0A%20arch%2Farm%2Fdts%2Fimx8mm-kontron-sl.dtsi%20%20%20%20%20%20%20%20%20%20%20%7C%2020%20%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B---%0A%20board%2Fkontron%2Fsl-mx8mm%2Fspl.c%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%201%20%2B%0A%204%20files%20changed%2C%2032%20insertions(%2B)%2C%206%20deletions(-)%0A%0Adiff%20--git%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%0Aindex%200019d5a7858bf0bb29c9d38caebc166281b31faa..99093484c45b91114b2074147693d20c009e7b67%20100644%0A---%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%0A%2B%2B%2B%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-bl-common-u-boot.dtsi%0A%40%40%20-54%2C6%20%2B54%2C11%20%40%40%0A%20%09bootph-pre-ram%3B%0A%20%7D%3B%0A%20%0A%2B%26amp%3Bpinctrl_uart1%20%7B%0A%2B%09bootph-pre-ram%3B%0A%2B%09bootph-all%3B%0A%2B%7D%3B%0A%2B%0A%20%26amp%3Bpinctrl_uart3%20%7B%0A%20%09bootph-pre-ram%3B%0A%20%09bootph-all%3B%0A%40%40%20-107%2C6%20%2B112%2C11%20%40%40%0A%20%09bootph-pre-ram%3B%0A%20%7D%3B%0A%20%0A%2B%26amp%3Buart1%20%7B%0A%2B%09bootph-pre-ram%3B%0A%2B%09bootph-all%3B%0A%2B%7D%3B%0A%2B%0A%20%26amp%3Buart3%20%7B%0A%20%09bootph-pre-ram%3B%0A%20%09bootph-all%3B%0Adiff%20--git%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-osm-s.dtsi%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-osm-s.dtsi%0Aindex%20d4554296523058b7230e826c72680b0a416bc316..eb71d8abc6461b4b3c9e1830e652657434b5e5b9%20100644%0A---%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-osm-s.dtsi%0A%2B%2B%2B%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-osm-s.dtsi%0A%40%40%20-27%2C7%20%2B27%2C7%20%40%40%0A%20%09%7D%3B%0A%20%0A%20%09chosen%20%7B%0A-%09%09stdout-path%20%3D%20%26amp%3Buart3%3B%0A%2B%09%09stdout-path%20%3D%20%26amp%3Buart1%3B%0A%20%09%7D%3B%0A%20%0A%20%09reg_vdd_carrier%3A%20regulator-vdd-carrier%20%7B%0A%40%40%20-394%2C9%20%2B394%2C10%20%40%40%0A%20%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_pwm3%26gt%3B%3B%0A%20%7D%3B%0A%20%0A-%26amp%3Buart1%20%7B%0A%2B%26amp%3Buart1%20%7B%20%2F*%20console%20*%2F%0A%20%09pinctrl-names%20%3D%20%22default%22%3B%0A%20%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart1%26gt%3B%3B%0A%2B%09status%20%3D%20%22okay%22%3B%0A%20%7D%3B%0A%20%0A%20%26amp%3Buart2%20%7B%0A%40%40%20-404%2C7%20%2B405%2C7%20%40%40%0A%20%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart2%26gt%3B%3B%0A%20%7D%3B%0A%20%0A-%26amp%3Buart3%20%7B%20%2F*%20console%20*%2F%0A%2B%26amp%3Buart3%20%7B%0A%20%09pinctrl-names%20%3D%20%22default%22%3B%0A%20%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart3%26gt%3B%3B%0A%20%09status%20%3D%20%22okay%22%3B%0Adiff%20--git%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-sl.dtsi%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-sl.dtsi%0Aindex%202076148e08627a167b3b34d886ec5456bb5e18eb..a7a3ff64ce7480872e299895a990423aa5bc8475%20100644%0A---%20a%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-sl.dtsi%0A%2B%2B%2B%20b%2Farch%2Farm%2Fdts%2Fimx8mm-kontron-sl.dtsi%0A%40%40%20-20%2C7%20%2B20%2C7%20%40%40%0A%20%09%7D%3B%0A%20%0A%20%09chosen%20%7B%0A-%09%09stdout-path%20%3D%20%26amp%3Buart3%3B%0A%2B%09%09stdout-path%20%3D%20%26amp%3Buart1%3B%0A%20%09%7D%3B%0A%20%7D%3B%0A%20%0A%40%40%20-200%2C12%20%2B200%2C17%20%40%40%0A%20%09%7D%3B%0A%20%7D%3B%0A%20%0A-%26amp%3Buart3%20%7B%20%2F*%20console%20*%2F%0A%2B%26amp%3Buart1%20%7B%20%2F*%20console%20*%2F%0A%20%09pinctrl-names%20%3D%20%22default%22%3B%0A-%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart3%26gt%3B%3B%0A%2B%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart1%26gt%3B%3B%0A%20%09status%20%3D%20%22okay%22%3B%0A%20%7D%3B%0A%20%0A%2B%26amp%3Buart3%20%7B%0A%2B%09pinctrl-names%20%3D%20%22default%22%3B%0A%2B%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart3%26gt%3B%3B%0A%2B%7D%3B%0A%2B%0A%20%26amp%3Busdhc1%20%7B%0A%20%09pinctrl-names%20%3D%20%22default%22%2C%20%22state_100mhz%22%2C%20%22state_200mhz%22%3B%0A%20%09pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_usdhc1%26gt%3B%3B%0A%40%40%20-248%2C6%20%2B253%2C15%20%40%40%0A%20%09%09%26gt%3B%3B%0A%20%09%7D%3B%0A%20%0A%2B%09pinctrl_uart1%3A%20uart1grp%20%7B%0A%2B%09%09fsl%2Cpins%20%3D%20%26lt%3B%0A%2B%09%09%09MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_RX%09%090x0%20%2F*%20UART_A_RX%20*%2F%0A%2B%09%09%09MX8MM_IOMUXC_SAI2_RXFS_UART1_DCE_TX%09%090x0%20%2F*%20UART_A_TX%20*%2F%0A%2B%09%09%09MX8MM_IOMUXC_SAI2_RXD0_UART1_DCE_RTS_B%09%090x0%20%2F*%20UART_A_CTS%20*%2F%0A%2B%09%09%09MX8MM_IOMUXC_SAI2_TXFS_UART1_DCE_CTS_B%09%090x0%20%2F*%20UART_A_RTS%20*%2F%0A%2B%09%09%26gt%3B%3B%0A%2B%09%7D%3B%0A%2B%0A%20%09pinctrl_uart3%3A%20uart3grp%20%7B%0A%20%09%09fsl%2Cpins%20%3D%20%26lt%3B%0A%20%09%09%09MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX%09%090x140%0Adiff%20--git%20a%2Fboard%2Fkontron%2Fsl-mx8mm%2Fspl.c%20b%2Fboard%2Fkontron%2Fsl-mx8mm%2Fspl.c%0Aindex%2050eb0eb13e10d8ae980ef0e51e0a5f13b6dec432..4d5b18f6dd890759bfe728cc5ff5febab35c8150%20100644%0A---%20a%2Fboard%2Fkontron%2Fsl-mx8mm%2Fspl.c%0A%2B%2B%2B%20b%2Fboard%2Fkontron%2Fsl-mx8mm%2Fspl.c%0A%40%40%20-212%2C6%20%2B212%2C7%20%40%40%20void%20board_init_f(ulong%20dummy)%0A%20%0A%20%09arch_cpu_init()%3B%0A%20%0A%2B%09init_uart_clk(0)%3B%0A%20%09init_uart_clk(2)%3B%0A%20%0A%20%09timer_init()%3B%0A--%20%0A2.43.0%3C%2FAG%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2313839%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX8MM%20default%20console%20is%20uart3.%20Need%20to%20use%20uart1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2313839%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20interest%20in%20NXP%20Semiconductor%20products%2C%26nbsp%3Bas%20for%20the%20patch%2C%3C%2FP%3E%0A%3CP%3EYou%20can%20confirm%20the%20code%20that%20needs%20to%20be%20changed%20from%20the%20following%20post.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2Fi-MX-93-91-debug-console-relocation-with-Yocto-Project%2Fta-p%2F2084904%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2Fi-MX-93-91-debug-console-relocation-with-Yocto-Project%2Fta-p%2F2084904%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20based%20on%20the%20code%20that%20needed%20to%20be%20modified%20for%20i.MX%208M%20series%2C%20I%20think%20you%20can%20confirm%20missing%20code%20in%20your%20setup.%3C%2FP%3E%0A%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2314147%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX8MM%20default%20console%20is%20uart3.%20Need%20to%20use%20uart1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2314147%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESolved.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EMy%20patch%20is%20fine%20and%20is%20working.%20The%20problem%20was%20the%20fdt%20in%20the%20kernel.%3C%2FP%3E%3CP%3EThere%20are%20two%20methods%20for%20setting%20up%20HW%20in%20u-boot%2C%20using%20code%2C%20i.e%2C%20setting%20up%20the%20MUX'es%20in%20code%20or%20by%20using%20a%20flatten%20device%20tree.%26nbsp%3B%20This%20is%20same%20method%20introduced%20for%20the%20Linux%20kernel%20some%20years%20ago.%3C%2FP%3E%3CP%3EThe%20u-boot%20driver%20must%20support%20this%20(i%20think%20this%20marked%20by%20DM_%3CSOMETHING%3E.)%3CBR%20%2F%3EThe%20above%20patch%20is%20using%20the%20device%20tree%20and%20depends%20on%20the%20driver%20supporting%20FDT.%3C%2FSOMETHING%3E%3C%2FP%3E%3CP%3EI%20am%20using%20a%20kontron%20imx8mm-ked%20board%20and%20the%20yocto%20system%20from%20kontron.%20The%20above%20patch%20does%20the%20job%20and%20during%20compilation%20when%20IMX_BOOT_UART_BASE%20and%20ATF_BOOT_UART_BASE%20is%20both%20set%20to%20%220x30860000%22%2C%20i.e.%20uart%201.%3C%2FP%3E%3CP%3EDoing%20so%20does%20the%20job%20for%20the%20bootloader%20but%20info%20is%20not%20forwarded%20to%20the%20Linux%20kernel%2C%20it%20is%20still%20using%20uart3.%20The%20reason%20is%20that%20kontron%20is%20not%20using%20the%20device%20tree%20available%20in%20u-boot%20but%20has%20the%20fdt%20compiled%20into%20the%20Linux%20kernel.%26nbsp%3B%20In%20the%20FDT%20the%20chosen%20section%20was%20still%20set%20to%20uart3.%20When%20i%20fixed%20the%20FDT%20in%20the%20kernel%20all%20booted%20just%20fine.%20I%20will%20try%20to%20make%20an%20update%20post%20with%20all%20the%20important%20changed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2314033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX8MM%20default%20console%20is%20uart3.%20Need%20to%20use%20uart1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2314033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259538%22%20target%3D%22_blank%22%3E%40AndersGnistrup%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20guide%20is%20very%20similar.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Tech-Blog%2FHow-to-Change-i-MX8MM-evk-Linux-Debug-UART%2Fba-p%2F1243938%23M40%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Tech-Blog%2FHow-to-Change-i-MX8MM-evk-Linux-Debug-UART%2Fba-p%2F1243938%23M40%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E