UART5 garbage in 4.0.0

cancel
Showing results for 
Search instead for 
Did you mean: 

UART5 garbage in 4.0.0

484 Views
frankmiller
Contributor IV

Greetings,

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

44,45c44,45

< //    MX6Q_PAD_KEY_COL1__ECSPI1_MISO,

< //    MX6Q_PAD_KEY_ROW1__GPIO_4_9,

---

>     MX6Q_PAD_KEY_COL1__ECSPI1_MISO,

>     MX6Q_PAD_KEY_ROW1__GPIO_4_9,

188,195d187

< // <added>

<     /* UART5 for external serial port */

<     MX6Q_PAD_KEY_COL1__UART5_TXD,

<     MX6Q_PAD_KEY_ROW1__UART5_RXD,

<     MX6Q_PAD_KEY_COL4__UART5_RTS,

<     MX6Q_PAD_KEY_ROW4__UART5_CTS,

< // </added>

<

268c260

< //    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

255c255

< //    imx6q_add_imx_uart(2, NULL);

---

>     imx6q_add_imx_uart(2, NULL);

1955,1958c1955,1956

< //    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

133,134d132

<     imx6q_imx_uart_data_entry(0, 5),

< /*

140d137

< */

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?

Thanks,

FM




Labels (3)
0 Kudos
4 Replies

121 Views
frankmiller
Contributor IV

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?

Thanks,

FM

0 Kudos

121 Views
frankmiller
Contributor IV

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?

Thanks,

FM

0 Kudos

121 Views
frankmiller
Contributor IV

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

     closing_wait: 3000

     Flags: spd_normal

This doesn't look right to me.  Thoughts?

Thanks,

FM

0 Kudos

121 Views
frankmiller
Contributor IV

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?

Thanks,

FM

0 Kudos