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.

omapl138 linux系统下串口对应设备节点是哪个?



linux系统下,有 ttyS0  ttyS1  ttyS2  ttyS3  ttyS4  ttyS5  ttyS6  ttyS7  ttyS8  ttyS9 这些设备节点,只有ttyS2可以打开读写,ttyS2用作调试串口,剩下的都无法读写。但是板子还有一个串口,默认驱动在哪里,生成设备节点是哪个?

  • 您可以参考下面帖子里要修改的地方
    e2e.ti.com/.../684102

    arch/arm/boot/dts/da850-lcdk.dts

    aliases {
    serial2 = &serial2;
    ethernet0 = &eth0;
    };

    chosen {
    stdout-path = "serial2:115200n8";
    };

    u-boot/include/configs/omapl138_lcdk.h
    /*
    * Serial Driver info
    */
    #define CONFIG_SYS_NS16550_SERIAL
    #define CONFIG_SYS_NS16550_REG_SIZE -4 /* NS16550 register size */
    #define CONFIG_SYS_NS16550_COM1 DAVINCI_UART2_BASE /* Base address of UART2 */
    #define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
    #define CONFIG_CONS_INDEX 1 /* use UART0 for console */
    #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }



    #define CONFIG_EXTRA_ENV_SETTINGS \
    DEFAULT_LINUX_BOOT_ENV \
    DEFAULT_MMC_TI_ARGS \
    "bootpart=0:2\0" \
    "bootdir=/boot\0" \
    "bootfile=zImage\0" \
    "fdtfile=da850-lcdk.dtb\0" \
    "boot_fdt=yes\0" \
    "boot_fit=0\0" \
    "console=ttyS2,115200n8\0"

    In kernel you need to modify da850-lcdk.dts:
    chosen {
    stdout-path = "serial2:115200n8";
    };