I've just upgraded our software to 4.0.0. Nice release, noticeable fixes for things like UART5 and HDMI sound!
I'm having a little trouble with UART5 as console however. Shortly after the kernel boots, during the kernel boot messages, the output turns to garbage characters. This persists even after the boot is complete and a getty has been applied to the port. The following are the changes I made to the kernel to make UART5 our only serial port and the console:
These changes map the proper pads to the UART5 lines.
diff mx6q_sabresd.h mx6q_sabresd.h.orig
< // MX6Q_PAD_KEY_COL1__ECSPI1_MISO,
< // MX6Q_PAD_KEY_ROW1__GPIO_4_9,
< // <added>
< /* UART5 for external serial port */
< // </added>
< // MX6Q_PAD_KEY_COL4__GPIO_4_14, /* PCIE_DIS */
> MX6Q_PAD_KEY_COL4__GPIO_4_14, /* PCIE_DIS */
Here I'm dropping UART3 support so I only have one serial line and its my console. I'm also setting up UART5 as the early console.
diff mx6q_sabresd.c mx6q_sabresd.c.orig
< // imx6q_add_imx_uart(2, NULL);
> imx6q_add_imx_uart(2, NULL);
< // uart_clk = clk_get_sys("imx-uart.0", NULL);
< // early_console_setup(UART1_BASE_ADDR, uart_clk);
< uart_clk = clk_get_sys("imx-uart.4", NULL);
< early_console_setup(UART5_BASE_ADDR, uart_clk);
> uart_clk = clk_get_sys("imx-uart.0", NULL);
> early_console_setup(UART1_BASE_ADDR, uart_clk);
Here I'm mapping UART5 to ttymxc0
diff platform-imx-uart.c platform-imx-uart.c.orig
< imx6q_imx_uart_data_entry(0, 5),
These changes worked fine in the previous code base. Is there something that has changed in 4.0.0 that I'm missing or that I did wrong?
Another piece of information. I found some message board posts saying that there is likely a conflict in baud rates between what I'm setting on the kernel parameters and the "inittab" baud rates. However, Ubuntu does not have a /etc/inittab file. Where would the equivalent information be in /etc/init?
K, some additional information. I saw somewhere else that if you do a "setserial -a /dev/ttymxc0" that is fixes things. I tried that and it does work to fix the console after boot has finished and getty is working on the port. Now the question is, how can I cause a similar thing to happen earlier and automatically during the boot?
Actually, this did not work, not sure what I did.
When I run setserial -a /dev/ttymxc0 I get:
/dev/ttymxc0, Line 0, UART: undefined, Port: 0x0000, IRQ: 62
Baud_base: 5000000, close_delay: 50, divisor: 0
This doesn't look right to me. Thoughts?
Does anyone have any ideas on this? As I mentioned I was not having this problem with the 1.1.0 code base. Also, I noticed that in the 4.0.0 release, I'm now getting kernel boot message out the UART5 serial port which was not happening before. Perhaps whatever was done to enable that has something to do with this?