AnsweredAssumed Answered

i.MX6SoloLite Custom Board Debug Uart4 Enabled

Question asked by changyonglee on Jul 15, 2015
Latest reply on Jul 16, 2015 by igorpadykov

Hi.

 

Use i.MX6SoloLite EVK Board. and run u-boot-2009-08 & linux-3.0.35.

use debug uart port  uart1. I want to use debug uart port uart4.

Now Setting is

 

- u-boot

u-boot/board/freescale/lmx6sl_evk/mx6sl_evk.c

 

static void setup_uart(void)

{

  /* UART4 TXD */

  mxc_iomux_v3_setup_pad(MX6SL_PAD_SD1_DAT5__UART4_TXD);

 

  /* UART4 RXD */

  mxc_iomux_v3_setup_pad(MX6SL_PAD_SD1_DAT4__UART4_RXD);

}

 

...

 

iomux_v3_cfg_t usdhc1_pads[] = {

  /* 8 bit SD */

  MX6SL_PAD_SD1_CLK__USDHC1_CLK,

  MX6SL_PAD_SD1_CMD__USDHC1_CMD,

  MX6SL_PAD_SD1_DAT0__USDHC1_DAT0,

  MX6SL_PAD_SD1_DAT1__USDHC1_DAT1,

  MX6SL_PAD_SD1_DAT2__USDHC1_DAT2,

  MX6SL_PAD_SD1_DAT3__USDHC1_DAT3,

#if 0 // Custom Debug Uart Port

  MX6SL_PAD_SD1_DAT4__USDHC1_DAT4,

  MX6SL_PAD_SD1_DAT5__USDHC1_DAT5,

#endif

  MX6SL_PAD_SD1_DAT6__USDHC1_DAT6,

  MX6SL_PAD_SD1_DAT7__USDHC1_DAT7,

};

 

u-boot/include/configs/mx6sl_evk_mfg.h (mx6sl_evk.h)

/*

* Hardware drivers

*/

#define CONFIG_MXC_UART

#if 0 //Original. Custom Debug Uart Port define

#define CONFIG_UART_BASE_ADDR UART1_IPS_BASE_ADDR

#else

#define CONFIG_UART_BASE_ADDR UART4_IPS_BASE_ADDR

#endif

 

...

 

#if 0//Original. Custom Debug Uart Port define.

#define CONFIG_BOOTARGS         "console=ttymxc0,115200 rdinit=/linuxrc nosmp"

#else

#define CONFIG_BOOTARGS         "console=ttymxc3,115200 rdinit=/linuxrc nosmp"

 

- kernel

kernel/arch/arm/mach-mx6/board-mx6sl_common.h

 

#if 0 //Original. Custom Debug Uart Port. define

  /* UART1 */

  MX6SL_PAD_UART1_RXD__UART1_RXD,

  MX6SL_PAD_UART1_TXD__UART1_TXD,

#else

  /* UART4 */

  MX6SL_PAD_SD1_DAT4__UART4_RXD,

  MX6SL_PAD_SD1_DAT5__UART4_TXD,

#endif

 

kernel/arch/arm/mach-mx6/board-mx6sl_evk.c

static inline void mx6_evk_init_uart(void)

{

#if 0 //Original. Custom Debug Uart Port. define

  imx6q_add_imx_uart(0, NULL); /* DEBUG UART1 */

#else

  imx6q_add_imx_uart(3, NULL); /* DEBUG UART4 */

#endif

}

 

...

 

static void __init mx6_timer_init(void)

{

  struct clk *uart_clk;

#ifdef CONFIG_LOCAL_TIMERS

  twd_base = ioremap(LOCAL_TWD_ADDR, SZ_256);

  BUG_ON(!twd_base);

#endif

  mx6sl_clocks_init(32768, 24000000, 0, 0);

#if 1 //Original !!!!! Custom Debug Uart Port

  uart_clk = clk_get_sys("imx-uart.0", NULL);

  early_console_setup(UART1_BASE_ADDR, uart_clk);

#else

uart_clk = clk_get_sys("imx-uart.3", NULL);

  early_console_setup(UART4_BASE_ADDR, uart_clk);

#endif

}

 

Please. source patch or information Doc.(i.MX6SoloLite)

How to enabled Debug port uart4 From the i.MX6SoloLIte evk custom board .

 

Thank you.

Outcomes