Commit 1e224850 authored by Thomas Schäfer's avatar Thomas Schäfer
Browse files

pitx-imx8m: fix UART RTS/CTS lines for rev2 and rev3 boards



- add setup for UART3 RTS and CTS lines.
- check hw revision and swap RTS and CTS lines for old rev2 modules.
Signed-off-by: Thomas Schäfer's avatarThomas Schaefer <thomas.schaefer@kontron.com>
parent d27d159c
......@@ -88,6 +88,8 @@ int board_qspi_init(void)
static iomux_v3_cfg_t const uart_pads[] = {
IMX8MQ_PAD_UART3_RXD__UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
IMX8MQ_PAD_UART3_TXD__UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
IMX8MQ_PAD_ECSPI1_SS0__UART3_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
IMX8MQ_PAD_ECSPI1_MISO__UART3_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL),
};
int board_early_init_f(void)
......@@ -491,8 +493,13 @@ int board_mmc_get_env_dev(int devno)
#define TPM_RESET IMX_GPIO_NR(3, 2)
#define USBHUB_RESET IMX_GPIO_NR(3, 4)
#define IMX8MQ_PAD_ECSPI1_MISO__UART3_RTS_B IOMUX_PAD(0x0464, 0x01FC, 1, 0x0500, 0, UART_PAD_CTRL)
#define IMX8MQ_PAD_ECSPI1_SS0__UART3_CTS_B IOMUX_PAD(0x0468, 0x0200, 1, 0x0000, 0, UART_PAD_CTRL)
int misc_init_r(void)
{
int hw_rev;
#ifdef CONFIG_EMB_EEP_SPI
emb_vpd_init_r();
#endif
......@@ -523,7 +530,12 @@ int misc_init_r(void)
udelay(10000);
gpio_direction_output(USBHUB_RESET, 1);
board_gpio_init();
hw_rev = get_hw_rev();
/* check if hw variant is L120 (7) */
if (hw_rev == 7) {
imx_iomux_v3_setup_pad(IMX8MQ_PAD_ECSPI1_MISO__UART3_RTS_B);
imx_iomux_v3_setup_pad(IMX8MQ_PAD_ECSPI1_SS0__UART3_CTS_B);
}
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment