How to change default serial UART1 to UART2 in uboot for Colibri imx6ull using iris base board

Hello,

How to change default serial UART1 to UART2 in uboot for Colibri imx6ull using iris base board?

I’m using U-Boot 2016.11-2.7.4+g1b121c6 and done following changes for enabling UART2 as a debug serial console.

/board/toradex/colibri-imx6ull/colibri_imx6ull.c

static iomux_v3_cfg_t const uart2_pads[] = {
	MX6_PAD_UART2_TX_DATA__UART2_DTE_RX	| MUX_PAD_CTRL(UART_PAD_CTRL),
	MX6_PAD_UART2_RX_DATA__UART2_DTE_TX	| MUX_PAD_CTRL(UART_PAD_CTRL),
	MX6_PAD_UART2_RTS_B__UART2_DTE_CTS	| MUX_PAD_CTRL(UART_PAD_CTRL),
	MX6_PAD_UART2_CTS_B__UART2_DTE_RTS	| MUX_PAD_CTRL(UART_PAD_CTRL),
};

static void setup_iomux_uart(void)
{
	setup_dtemode_uart();
	imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));
}
static struct mxc_serial_platdata mxc_serial_plat = {
	.reg = (struct mxc_uart *)UART2_BASE,
	.use_dte = 1,
};

imx6ull.dtsi

chosen {
    		stdout-path = &uart2;
    	};

Do I need to change any other code for configuring UART2 as debug UART?

hi @rahul12789

Could you provide the version of the software of your module?

Unfortunately I did not get what is your issue. Could you explain it again, please?
Further you might read this to configure the console.

Thanks and best regards, Jaski

@jaski.tx : I have updated question please help

The changes you made look pretty good already. The default U-Boot scripts also set the console through kernel parameters. You can change that by adjusting include/configs/colibri-imx6ull.h (replace tymxc0 with tymxc1).

The Configuring Serial Port Debug Console (Linux/U-Boot) article might be helpful too.

Ya, that will also work. I have changed below and its working now

#define CONFIG_MXC_UART_BASE		UART2_BASE

Perfect that it works. Thanks for the feedback.