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.

Kernel Problem on OMAPL137 based custom board

Other Parts Discussed in Thread: DA8XX

Hello everyone.

On my custom board I used UART0 as serial console instead of UART2.

First I edited uboot related files and changed the bootargs: "console=ttyS0,115200n8", the uboot could run right:

U-Boot 1.3.3 (Jul 2 2012 - 16:51:32)

I2C: ready
DRAM: 128 MB
NAND: NAND Manufacturer id: ec
NAND Device id: f1
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bi
t)
128 MiB
In: serial
Out: serial
Err: serial
ARM Clock : 300000000 Hz
Hit any key to stop autoboot: 0
U-Boot >

Second, I edited some kernel related files:

   1, /include/asm/arch-davinci/uncompress.h:

    #define CONSOLE_UART_BASE     DA8XX_UART0_BASE

  2,board-evm.c:

static const short evm_uart0_pins[] = {

      DA8XX_UART0_RXD, DA8XX_UART0_TXD,

      -1

};

When downloading the kernel, the console displayed:

TFTP from server 192.168.1.99; our IP address is 192.168.1.100
Filename 'uImage'.
Load address: 0xc0700000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###############
done
Bytes transferred = 1737680 (1a83d0 hex)
Automatic boot of image at addr 0xC0700000 ...
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-2.6.18_pro500-da830_omapl1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1737616 Bytes = 1.7 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
....................................................... done, booting the kernel
.
€?

Are there any other configurations in kernel that should be changed to UART0?

  • Some other changes.

    arch/arm/mach-davinci/board-da830-evm.c
    static __init void da830_evm_init(void)
    {
    ...
     ret = davinci_cfg_reg_list(da830_uart0_pins);
     if (ret)
       pr_warning("da830_evm_init: uart1 mux setup failed: %d\n", ret);
    ...
    }
    ...
    #ifdef CONFIG_SERIAL_8250_CONSOLE
    static int __init da830_evm_console_init(void)
    {
    ...
      return add_preferred_console("ttyS", 0, "115200");/* Was 2 */
    }
    console_initcall(da830_evm_console_init);
    #endif

    Note that da830_uart0_pins specifies 4 pins.

    arch/arm/mach-davinci/da830.c
    ...
    const short da830_uart0_pins[] __initdata = {
      DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
      -1
    };

    static const struct mux_config da830_pins[] = {
    ...
    MUX_CFG(DA830, NUART0_CTS,   7, 24, 0xf, 2, false)
    MUX_CFG(DA830, NSPI0_ENA,    7, 24, 0xf, 1, false)
    MUX_CFG(DA830, EQEP0A,       7, 24, 0xf, 4, false)
    MUX_CFG(DA830, GPIO5_3,      7, 24, 0xf, 8, false)
    ...
    MUX_CFG(DA830, NUART0_RTS,   7, 28, 0xf, 2, false)
    MUX_CFG(DA830, NSPI0_SCS_0,  7, 28, 0xf, 1, false)
    MUX_CFG(DA830, EQEP0B,       7, 28, 0xf, 4, false)
    MUX_CFG(DA830, GPIO5_4,      7, 28, 0xf, 8, false)
    ...
    MUX_CFG(DA830, UART0_RXD,    8, 12, 0xf, 1, false)
    MUX_CFG(DA830, I2C0_SDA,     8, 12, 0xf, 2, false)
    MUX_CFG(DA830, TM64P0_IN12,  8, 12, 0xf, 4, false)
    MUX_CFG(DA830, GPIO5_8,      8, 12, 0xf, 8, false)
    ...
    MUX_CFG(DA830, UART0_TXD,    8, 16, 0xf, 1, false)
    MUX_CFG(DA830, I2C0_SCL,     8, 16, 0xf, 2, false)
    MUX_CFG(DA830, TM64P0_OUT12, 8, 16, 0xf, 4, false)
    MUX_CFG(DA830, GPIO5_9,      8, 16, 0xf, 8, false)
    ...
    };
    ...

    Note that UART0 might share pins with other peripherals. You will need to disable I2C0, SPI0, etc. to avoid conflict with UART0. You might need to change UART0 to be 2 pin without CTS or RTS. Not quite sure where in the code that would be.

    You might have to modify /etc/inittab to attach the login shell to the desired terminal.