[imx8mn ddr3l evk] how to setup console port uart1 frm default uart2

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

[imx8mn ddr3l evk] how to setup console port uart1 frm default uart2

Jump to solution
783 Views
justin-inno
Contributor I

HI, All

 

I am tring to setup console port with uart1 from default uart2 on u-boot.

I read similar article on this cummunity. but it does't work.
So, Here is my changes from original github.

my dev environment:  imx-6.1.55-2.2.1
(repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.55-2.2.1.xml)

let me know how to fix this issue...

diff --git a/arch/arm/dts/imx8mn-evk.dtsi b/arch/arm/dts/imx8mn-evk.dtsi
index 475d2886ded..c3922b87d66 100644
--- a/arch/arm/dts/imx8mn-evk.dtsi
+++ b/arch/arm/dts/imx8mn-evk.dtsi
@@ -10,7 +10,7 @@
/ {
chosen {
bootargs = "console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200";
- stdout-path = &uart2;
+ stdout-path = &uart1;
};

gpio-leds {
@@ -412,7 +412,13 @@
status = "okay";
};

-&uart2 { /* console */
+&uart1 { /* console */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ status = "okay";
+};
+
+&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
@@ -606,6 +612,13 @@
>;
};

+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
+ MX8MN_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
+ >;
+ };
+
pinctrl_uart2: uart2grp {
fsl,pins = <
MX8MN_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index 10bede5fdbe..8908412c41d 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.c
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
@@ -28,8 +28,8 @@ DECLARE_GLOBAL_DATA_PTR;
#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)

static iomux_v3_cfg_t const uart_pads[] = {
- IMX8MN_PAD_UART2_RXD__UART2_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
- IMX8MN_PAD_UART2_TXD__UART2_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
+ IMX8MN_PAD_UART1_RXD__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
+ IMX8MN_PAD_UART1_TXD__UART1_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
};

static iomux_v3_cfg_t const wdog_pads[] = {
@@ -96,7 +96,7 @@ int board_early_init_f(void)

imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));

- init_uart_clk(1);
+ init_uart_clk(0);

#ifdef CONFIG_NAND_MXS
setup_gpmi_nand(); /* SPL will call the board_early_init_f */
diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
index 6c5c6406d6f..af7f367562d 100644
--- a/include/configs/imx8mn_evk.h
+++ b/include/configs/imx8mn_evk.h
@@ -72,7 +72,7 @@
"bsp_script=boot.scr\0" \
"image=Image\0" \
"splashimage=0x50000000\0" \
- "console=ttymxc1,115200\0" \
+ "console=ttymxc0,115200\0" \
"fdt_addr_r=0x43000000\0" \
"fdt_addr=0x43000000\0" \
"fdt_high=0xffffffffffffffff\0" \
--
2.25.1

0 Kudos
Reply
1 Solution
762 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @justin-inno!

I never try to change the uart2 from uart1 I have  tried before change from uart2 to uart4.

You can get based on this community post.

 

Should be the same process but using the UART1 instead of UART4.

 

You only have to add the next line to the imx_rdc_cfg rdc structure on imx8mm_bl31_setup.c

 

RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W)

 

 

Best Regards!

Chavira

View solution in original post

0 Kudos
Reply
2 Replies
741 Views
justin-inno
Contributor I

Hi, @Chavira 

it works well.

I have to add new configuration  u-boot,dm-spl in dts file. then, u-boot spl message show up.

+&uart1 { /* console */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ u-boot,dm-spl;
+ status = "okay";
+};

 

but atf message doesn't show. So I added  imx_rdc_cfg rdc in imx8mm_bl31_setup.c as you mentioned.

and modify imx-atf_2.8.bb like this

# EXTRA_OEMAKE += 'IMX_BOOT_UART_BASE=${ATF_BOOT_UART_BASE}'
EXTRA_OEMAKE += 'IMX_BOOT_UART_BASE=0x30860000'

Now, All of message works well via uart1.

thanks again @Chavira

justin

-Best Regards-

0 Kudos
Reply
763 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @justin-inno!

I never try to change the uart2 from uart1 I have  tried before change from uart2 to uart4.

You can get based on this community post.

 

Should be the same process but using the UART1 instead of UART4.

 

You only have to add the next line to the imx_rdc_cfg rdc structure on imx8mm_bl31_setup.c

 

RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W)

 

 

Best Regards!

Chavira

0 Kudos
Reply