Alan, a huge thanks to you for the tip about the defective header file. I was stuck at the same problem -- my I/O worked fine when I set registers manually at the u-boot prompt, but inside Linux, things were not right.
Following are some notes to ease the journey for others who might come along searching for answers to enable additional serial ports on their MX53 loco/QSB:
- in arch/arm/mach-mx5/board-mx53_loco.c modify the mx53_loco_pads array to add the pad configurations for your UART and remove any other configurations that might conflict for the same pad (add MX53_PAD_CSI0_DAT12__UART4_TXD_MUX and remove MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12 for example, because both use the CSI0_DAT12 pad)
- in case you want hardware flow control, add in board-mx53_loco.c a struct like so:
static const struct imxuart_platform_data mx53_loco_uart_data = {
.flags = IMXUART_HAVE_RTSCTS,
}; - in board-mx53_loco.c mx53_loco_board_init(void) function, find the initialization of ttymxc0 (imx53_add_imx_uart(0, NULL);) and add near it the initialization for your new UART, for example I added UART4/ttymxc3:
imx53_add_imx_uart(3, &mx53_loco_uart_data);
If you want HW flow control then pass a pointer to the struct from step 2 in the initialization, otherwise you can pass NULL as in the ttymxc0 case. - edit arch/arm/plat-mxc/include/mach/iomux-mx53.h as described by Alan above so that the relevant pad definitions have correct offset, register initialization, and MUX_PAD_CTRL() settings.
One other thing to note: my board actually runs 1.8v I/O for UART4, not 3.3v. I had to build a level converter in order to connect the UART with my 3.3v device.