From: Arturo Buzarra <arturo.buzarra@digi.com>
Date: Thu, 29 Apr 2021 14:56:47 +0200
Subject: [PATCH] imx8mn: Define UART1 as console for boot stage

UART1 is the default console for ConnectCore i.MX8M Nano

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
---
 plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 2 +-
 plat/imx/imx8m/imx8mn/platform.mk         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
index c87748a1888a..2dd3ab409e97 100644
--- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
@@ -106,7 +106,7 @@ static const struct imx_rdc_cfg rdc[] = {
 
 	/* peripherals domain permission */
 	RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
-	RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
+	RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
 	RDC_PDAPn(RDC_PDAP_RDC, D0R | D0W | D1R),
 
 	/* memory region */
diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
index 8da9b298cfba..90c8bd0bab6b 100644
--- a/plat/imx/imx8m/imx8mn/platform.mk
+++ b/plat/imx/imx8m/imx8mn/platform.mk
@@ -63,7 +63,7 @@ $(eval $(call add_define,BL32_BASE))
 BL32_SIZE		?=	0x2000000
 $(eval $(call add_define,BL32_SIZE))
 
-IMX_BOOT_UART_BASE	?=	0x30890000
+IMX_BOOT_UART_BASE	?=	0x30860000
 $(eval $(call add_define,IMX_BOOT_UART_BASE))
 
 $(eval $(call add_define,IMX8M_DDR4_DVFS))
