I’m trying to switch the output and console of U-boot from UART A to UART B or C on an iMX7. I’d prefer to use UART C, but UART B would be a step in the right direction. I found this question which is very similar and tried to follow the patch provided there:
But the U-boot source code for the iMX6 and iMX7 are different enough that this doesn’t seem to work, for example the iMX6 source code defines CONFIG_MXC_UART and CONFIG_MXC_UART_BASE but the iMX7 code does not.
Following the patch for the iMX6 in the other question I changed the pin mux code in the file board/toradex/colibri_imx7/colibri_imx7.c from:
static iomux_v3_cfg_t const uart1_pads[] = {
MX7D_PAD_UART1_RX_DATA__UART1_DTE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_UART1_TX_DATA__UART1_DTE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_SAI2_TX_BCLK__UART1_DTE_CTS | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_SAI2_TX_SYNC__UART1_DTE_RTS | MUX_PAD_CTRL(UART_PAD_CTRL),
}
to:
static iomux_v3_cfg_t const uart2_pads[] = {
MX7D_PAD_UART2_RX_DATA__UART2_DTE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_UART2_TX_DATA__UART2_DTE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_SAI2_TX_DATA__UART2_DTE_CTS | MUX_PAD_CTRL(UART_PAD_CTRL),
MX7D_PAD_SAI2_RX_DATA__UART2_DTE_RTS | MUX_PAD_CTRL(UART_PAD_CTRL),
};
and I also updated this function as shown:
static void setup_iomux_uart(void)
{
imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));
}
But this didn’t have any effect, U-boot’s output still appeared on UART A. I must be missing something else.
I am able to edit the U-boot source code to remove all the output on UART A by enabling the silent feature, which gives me confidence that I am able to edit, build and deploy U-boot. But I would like to preserve U-boot’s functionality for future use - just not on UART A.
Can you provide a patch file for the iMX7D which is equivalent to the one in the other question for the iMX6?