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.

uart #5 in linux

Guru 20755 points

Hello,

I have a question regarding the UART on linux.
I need to use UART #5 which is used in DM8148. I am using dvr rdk 4.0.1.2

I would like to ask where should I expect to see it. is uart number #X should be expected to be named /dev/ttySX ?

I currently see only: /dev/ttyS0, /dev/ttyS1, /dev/ttyS2, /dev/ttyS3

Where is UART #5 ?

Thanks,

Ran

  • Ran,

    Ran S. said:

    I would like to ask where should I expect to see it. is uart number #X should be expected to be named /dev/ttySX ?

    I currently see only: /dev/ttyS0, /dev/ttyS1, /dev/ttyS2, /dev/ttyS3

    On the latest kernel versions, the ttySx is changed to ttyOx. Thus the serial port associated with UART5 is now referred as ttyO5. The character 'O' in the serial port name stands for "OMAP UART Port".

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#TI814X.2C_TI813X

    Regards,
    Pavel

  • Hi Pavel,

     

    but why there is no tty05 in /dev/ ?


    Regards,

    Ran

  • Ran,

    Ran S. said:
    but why there is no tty05 in /dev/ ?

    In which /dev? In the host machine (desktop PC) /dev or in target machine (DM814x based board) /dev?

    Regards,
    Pavel

  • Hi Pavel,

    I need to use uart #5 in the target machine (DM8148). 

    Currently it is not exported in /dev Linux (I see in /dev only  ttyS0 , ttyS1, ttyS2, ttyS3).

    Thanks,

    Ran

  • Ran,

    In DM814x EVM & EZSDK, UART0 is used for console (ttyO0) and it is exported to /dev

    This is what I have in the linux kernel boot up log:

    Kernel command line: console=ttyO0,115200n8 rootwait root=/dev/mmcblk0p2 rw mem=364M@0x80000000 mem=320M@0x9FC00000 vmalloc=500M notifyk.vpssm3_sva=0xBF900000 ip=off noinitrd

    omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
    console [ttyO0] enabled
    omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5

    Arago Project http://arago-project.org dm814x-evm ttyO0

    Arago 2011.09 dm814x-evm ttyO0

    Then this is what I have in the DM814x /dev folder:

    /dev/ttyO0
    /dev/ttyO1
    /dev/ttyO2
    /dev/ttyO3
    /dev/ttyO4
    /dev/ttyO5
    /dev/ttyS0
    /dev/ttyS1
    /dev/ttyS2
    /dev/ttyS3

    Could you please provide me full boot up log of your linux kernel? Are you aligned with the below wiki page?

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#Using_different_UART_than_the_default_EVM_configuration_as_console

    Regards,
    Pavel

  • You are right, I had some confusion here.

    I actually have the same device as yours, I was mistakenly referring to ttySX (which end at ttyS3) instead of tty0X (which end in tty05).

    Regards,

    Ran

  • By the way, what the ttySX refers to ?

    Thanks,

    Ran

  • Hello,

    I am facing some strange results with UART #5.

    I configure the UART as following (19200, 8 chars, even parity, 1 stop bit, no echo, no flow control):

    stty -F /dev/ttyO5 19200 cs8 parenb -parodd -cstopb

    when doing echo "U" > /dev/tty05 

    I see the "U", but I also see more than one transmission on scope, I don't understand yet what it represent.

    The other strange thing is that the internal UART register are not changed with the above configuraion and register LCR is always 0 (also before using the stty):

    echo "r 0x481aa004 1" > /sys/kernel/debug/prot_reg/mem

    ----------- H E X V I E W -----------
    Address Data
    ------------------------------------------
    481a:a00c : 00000000
    ----------------------------------------

    I meanwhile ignore the above issues,  hopefully, the protocol will function correct on UART #5.

    Thanks,

    Ran

  • Ran,

    Ran S. said:
    By the way, what the ttySX refers to ?

    ttySx (ttyS0, ttyS1, ttyS2, ttyS3) is used for console on some older devices (that use older kernel versions). Starting 2.6.37 kernel, UART driver (console) is changed to use ttyO* instead of ttyS*. See for example the below wiki page:

    http://processors.wiki.ti.com/index.php/Creating_a_Root_File_System_for_Linux_on_OMAP35x#Device_Node_Creation

    In Linux root file systems the /dev directory contains device nodes – special files that give application access to devices on the system. One example is a serial port. The device node for the first serial port on the system could be /dev/ttyS0.

    Regards,
    Pavel

     

  • Hi,

    for anyone with similar issue, better notice that the pinmux are modified in RDK as part of the load.sh script.

    loas.sh script change pinmux for vin0 for 24 bits.

    Changing the pinmux using the script solved this issue for us.

    Thanks,

    Ran