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.

How to use UART0 and UAR1 at the same time on DM365?

Hello

I am trying to use UART0 and UART1.

UART0 is for just debug port which is currenty working well.

Now I am adding UART1 (GPIO34: RX, GPIO25: TX) to communicate with other device but I can't get it work.

I can see /dev/ttyS1

but on booting log message show there are two ports but it only enabed uart0.
====================================================
boot log
====================================================
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
====================================================

Also cat /proc/tty/driver/serial show unknown device for UART1
====================================================
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x01C20000 irq:40 tx:2593 rx:34 RTS|CTS|DTR|DSR
1: uart:unknown mmio:0x01C20400 irq:41
====================================================


I changed pin mux as follow in dm365.c

MUX_CFG(DM365, UART1_TXD, 3,   29,    3,    3,     false)   // GPIO 25 : UART1_TXD
MUX_CFG(DM365, UART1_RXD, 4,   14,    3,    3,  false)     // GPIO 34 : UART1_RXD


and changed in board-dm365-evm.c
static struct davinci_uart_config uart_config __initdata = {
 .enabled_uarts = (1 << 0) | (1 << 1),
};

What's am I missing?

Thank you for your help in advance.

 

====================================================
Version:
dvsdk_3_10_00_19
Linux dm365-evm 2.6.32-rc2-davinci1
====================================================

  • There are two place you should change

    1.As you memtioned above, you shoud configure GPIO25 and GPIO34 to UART function

    MUX_CFG(DM365, UART1_TXD, 3,   29,    3,    3,     false)   // GPIO 25 : UART1_TXD
    MUX_CFG(DM365, UART1_RXD, 4,   14,    3,    3,  false)     // GPIO 34 : UART1_RXD

    2.DAVINCI_UART1_BASE  defined in mach/serial.h  should change from (IO_PHYS + 0x20400) to (IO_PHYS + 0x106000)

  • Thank you very much.

    I never thought the release source code for memory map would be wrong.

    but many things were wrong...