From: Markus Niebel Date: Tue, 2 Mar 2021 17:44:25 +0000 (+0100) Subject: feat(imx8): add support for debug uart on lpuart1 X-Git-Tag: baikal/aarch64/sdk5.10~1^2~81^2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=8406447f13c65fe93aab7ed641b7e8fe3eb47a0b;p=arm-tf.git feat(imx8): add support for debug uart on lpuart1 Needed for TQMa8Xx on MBa8Xx. With this changes it is possible to build: $ make PLAT=imx8qx IMX_DEBUG_UART=1 DEBUG_CONSOLE=1 bl31 Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Change-Id: If380845b254f30fe919ebb33c86130597c4b8ad3 --- diff --git a/plat/imx/imx8qx/imx8qx_bl31_setup.c b/plat/imx/imx8qx/imx8qx_bl31_setup.c index 1da8d296c..13e80fb37 100644 --- a/plat/imx/imx8qx/imx8qx_bl31_setup.c +++ b/plat/imx/imx8qx/imx8qx_bl31_setup.c @@ -51,6 +51,16 @@ static entry_point_info_t bl33_image_ep_info; #define IMX_PAD_UART_RX SC_P_UART0_RX #define IMX_PAD_UART_TX SC_P_UART0_TX +#elif defined(IMX_USE_UART1) +#define UART_PAD_CTRL (PADRING_IFMUX_EN_MASK | PADRING_GP_EN_MASK | \ + (SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | \ + (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \ + (SC_PAD_28FDSOI_DSE_DV_LOW << PADRING_DSE_SHIFT) | \ + (SC_PAD_28FDSOI_PS_PD << PADRING_PULL_SHIFT)) +#define IMX_RES_UART SC_R_UART_1 +#define IMX_PAD_UART_RX SC_P_UART1_RX +#define IMX_PAD_UART_TX SC_P_UART1_TX + /* * On Toradex Colibri i.MX8QXP UART3 on the FLEXCAN2. * Use custom pad control for this diff --git a/plat/imx/imx8qx/include/platform_def.h b/plat/imx/imx8qx/include/platform_def.h index b880e1bc7..29f6f7c7f 100644 --- a/plat/imx/imx8qx/include/platform_def.h +++ b/plat/imx/imx8qx/include/platform_def.h @@ -41,6 +41,8 @@ #if defined(IMX_USE_UART0) #define IMX_BOOT_UART_BASE 0x5a060000 +#elif defined(IMX_USE_UART1) +#define IMX_BOOT_UART_BASE 0x5a070000 #elif defined(IMX_USE_UART3) #define IMX_BOOT_UART_BASE 0x5a090000 #else