This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Serial port not working on OMAP4460-based board

I am working with VAR-SOM-OM44 board with OMAP4460 processor, running the Linux OS (Ubuntu 12.04). According to device documentation, serial port connection is supposed to be RS232 –DTE UART1. I set serial port loopback adapter (tested on another computers) to this connection. I am trying to get it working, using standard Ubuntu programs.

variscite@variscite-desktop:~$ dmesg | grep tty                                
[    0.000000] Kernel command line: ro elevator=noop ro elevator=noop console=tt
yO2,115200n8 mem=1G@0x80000000 root=/dev/mmcblk0p2 fixrtc video=800x480 eth.smsc
=f8:dc:7a:00:ff:1a                                                             
[    1.585540] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0
[    1.586273] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
[    1.586944] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
[    3.248443] console [ttyO2] enabled                                         
[    3.253631] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3

So, possible device names are /dev/ttyO0, /dev/ttyO1, /dev/ttyO2, /dev/ttyO3. Then I use minicom program, setting /dev/ttyO0... /dev/ttyO3 and trying to type some symbols. Since loopback is connected, I expect to see echo on the screeen, but I never see this. (Tested on Ubuntu host computer, this way works with /dev/ttyS0).

So, ttyO0 - ttyO3 look like valid serial ports, they can be opened by a program, but they don't send/receive any information.

  • Alex,

    I believe you would still use "ttyS0" as the serial port in minicom.  "ttyO" is just used in the "console" bootarg.  The x-loader, u-boot, and kernel for the TI OMAP4 releases have the UART port set to UART3 (for Blaze / Blaze Tablet) in the source code, so you would need to change this to UART1 for your board.  If you are using a Variscite board with compatible software package from Variscite, I would expect this to be already taken care of.  If you are still having an issue after using "ttyS0" as the serial port in minicom, please contact Variscite customer support.

    Thank you,
    Gina 

  • Thanks. Of course, I tested ttyS before trying ttyO - it doesn't work. Trying to get help from Variscite...

  • Hi Alex,

    I faced the same problem accessing the UART interface on the VAR-OM44CustomBoard.

    Did you get answered and fixed the problem?

    Thanks,

    Noam Bechor

    Tonson-Labs

  • For Noam Bechor: too late to answer, sorry... Anyway, I got an answer from Variscite support, but this is device-specific, in any case you need to contact them

  • Hi i had same issue. But the problem was simple - they used default pinmux in kernel which not exaclty match with real pins on module...try to check if pinmux set correctly

  • Hi Egor/all,

    thank you for the "suggested" troubleshooting hint. I'm trying to use UART1 (i.e. /dev/ttyO0) on a Variscite OM44-CustomBoard, where there's a RS232 DB9 connector, but it doesn't work.

    For example, I found that its MDR (Mode Definition Register) at address 0x4806A020 has value 7 in the last three bits(default), while the working UART3 (i.e. /dev/ttyO2) used for Linux console has 0 (UART16x mode).

    I tried to change it but it wasn't enough: my loopback test continues to fail. Have you got any other suggestion about registers to fix/check?

    Any help would be appreciated,

    --Luciano

  • Hi.

    If this port marked as disabled you should enable it :)

    Check board file for Variscite custom board.

    It must have somethink like static inline void board_serial_init(void) or similar function where it registers serial devices.

    Inside this function must be call of registration of serial device (this example for my custom device, not for Variscite board)

    omap_serial_init_port(&serial1_data, NULL);
    omap_serial_init_port(&serial2_data, NULL);
    omap_serial_init_port(&serial3_data, NULL);

    Also you shoud check for serial devices registration in kernel output:

    Feb 28 09:21:18 DPP6 kernel: [    2.318786] console [ttyO0] enabled
    Feb 28 09:21:18 DPP6 kernel: [    2.322906] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
    Feb 28 09:21:18 DPP6 kernel: [    2.330871] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
    Feb 28 09:21:18 DPP6 kernel: [    2.339324] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3

    I didn't use Variscite's custom board for ages....so i don't have good example exactly for this board...sorry.

    WBR,

  • Hi Egor,

    thank you for your reply and....I agree to enable it ;-)

    I'm going to check omap_serial_init_port() and the overall pinmux/serial configuration.

    FYI, what follows is my board boot's log for what concern serial ports:

    ...

    [ 1.868560] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [ 1.872406] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0
    [ 1.873077] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
    [ 1.873626] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
    [ 3.638488] console [ttyO2] enabled
    [ 3.642730] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3

    ...

     

    it seems all (4) devices are configured (..or at least they've supposed to have done...)

    WBR,

    --j

  • then check pinmuxes...may be it is wrong....also you can check real pins mexes with devmem2 utility.

    so then you definetly know is pinmux for exact pin like UART function or simple GPIO

    WBR,

  • Hi Egor/All,

    we finally got it!

    We performed the following setup using devmem2 utility:

    - Setting CONTROL_CORE_PAD0_I2C2_SDA_PAD1_I2C3_SCL (phys_addr=0x4A10 0128) to 0x01 (Select uart1_tx);
    - Setting CONTROL_CORE_PAD0_I2C1_SDA_PAD1_I2C2_SCL (phys_addr=0x4A10 0124)

    bits 18-17-16 to 0x01 (Select uart1_rx).

    Hoping this could be useful for community, it's strange that these settings are included in Variscite's kernel-patches, but after kernel booted we found different values (maybe later overwritten by some other setting?).

    Anyway, Egor thank you very much for your suggestions.

    WBR,

    --j