Hi,
I've been trying to get the Uart1 port to display the console data, whilst Uart0 is also displaying it. The aim is for me to understand how to setup the uarts, as I wish to later read in data from a device via Uart1. I'm currently connected to the EVM serial port (uart 0) and all results below come from that interface:
This is what I've done so far:
In U-Boot I added the following:
setenv bootargs 'console=ttyS0,115200n8 noinitrd rw console=ttyS1,115200n8 noinitrd rw ip=192.168.....
In MontaVista (v5.0) I checked the following:
# dmesg | grep tty
this gave me the:
serial8250.0 : ttyS0 at MIMO map 0x1c20000 mem 0xfbc20000 irq:40 is a 16550A
serial8250.0 : ttyS1 at MIMO map 0x1d06000 mem 0xfbd06000 irq:41 is a 16550A
I checked the above with setserial -b /dev/ttyS1 and it returned
/dev/ttyS1 at 0x1d06000 (irq=41) is 16550A (Without the "console=ttyS1.." line in uboot, this returned not port map, i.e. 0x0000 (irq 41))
then i ran
# /proc/tty/driver
# cat serial
which showed that zero rx bytes had been transmitted. I then typed
# echo testdata > ttyS1
and re-ran "cat serial", which showed me then that 9 bytes had been transmitted. So to me it seems as if data is being transmitted to the Uart1 RX pin, however on my scope I pick-up nothing (0V to GND). My pin_mux is as follows (and unchanged from the original), however, as far as I could determine the mux is correct, making GPIO17=UART1_RXD, and GPIO16=UART1_TXD:
/ti-davinci/linux-2.6.18_pro500/arch/arm/mach-davinci/mux_cfg.c
const struct pin_config __initdata_or_module davinci_dm365_pinmux[] = {
/*
* description mux mode mode mux dbg
* reg offset mask mode
*/
......
MUX_CFG("UART0_RXD", 3, 20, 1, 1, 0)
MUX_CFG("UART0_TXD", 3, 19, 1, 1, 0)
MUX_CFG("UART1_RXD", 3, 17, 3, 2, 0)
MUX_CFG("UART1_TXD", 3, 15, 3, 2, 0)
MUX_CFG("UART1_RTS", 3, 23, 3, 1, 0)
MUX_CFG("UART1_CTS", 3, 21, 3, 1, 0)
MUX_CFG("EMAC_TX_EN", 3, 17, 3, 1, 0)
MUX_CFG("EMAC_TX_CLK", 3, 15, 3, 1, 0)
.....
};
I have also changed the serial clk for UART1 which I believe is wrong (but I'm not sure of), however even if incorrect there should still be some response on the scope. This was done as follows:
/ti-davinci/linux-2.6.18_pro500/arch/arm/mach-davinci/board-dm365-evm.c
static struct plat_serial8250_port serial_platform_data[] = {
{
.membase = (char *) IO_ADDRESS(DAVINCI_UART0_BASE),
.mapbase = (unsigned long) DAVINCI_UART0_BASE,
.irq = IRQ_UARTINT0,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = 24000000,
},
{
.membase = (char *) IO_ADDRESS(DM365_UART1_BASE),
.mapbase = (unsigned long) DM365_UART1_BASE,
.irq = IRQ_UARTINT1,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = 12150000, (was 24MHz)
},
{
.flags = 0
},
};
And I also added getty to serial 1
workdir/filesys/etc/inittab
# should replace it with the proper getty lines below.
con:2345:respawn:/sbin/getty console
s1:2345:respawn:/sbin/getty -L -f /etc/issue2 115200 ttyS1 vt100
This brings me to my questions:
1) What pin (on the EVM) is Uart1_RXD on. I've tried tracing the signal in the circuit board (rev. e) schematic, however, could not locate it. I can't find any documentation that gives me a jumper/pin on the EVM that I can connect to Uart1_RX with. I tried J10,C9 and J10,C10 (GIO_MD17 and GIO_MD16), but I don't believe this is correct.
2) What else do I need to do in order to set-up the Uart1 port on the EVM and get some sort of data flow going?
Regards
Manfred