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 communication in am62a EVM board

Part Number: AM62A7

Tool/software:

root@am62axx-evm:/opt/edgeai-gst-apps# ls /dev/ttyS*
/dev/ttyS0  /dev/ttyS1  /dev/ttyS10  /dev/ttyS11  /dev/ttyS2  /dev/ttyS3  /dev/ttyS4  /dev/ttyS5  /dev/ttyS6  /dev/ttyS7  /dev/ttyS8  /dev/ttyS9

There are uart port form port 0 to port 11. but i can only SOC_UART0/SOC_UART1/WUP_UART0/MCU_UART0 in the evm.

how dose the port link. If i using open the driver /dev/ttyS2 . Which port is open in the board?

  • Hi Meng,

    Please use command "cat /proc/tty/driver/serial" to check.

    # cat /proc/tty/driver/serial
    serinfo:1.0 driver revision:
    0: uart:unknown port:00000000 irq:0
    1: uart:unknown port:00000000 irq:0
    2: uart:8250 mmio:0x02800000 irq:311 tx:20983 rx:225 RTS|CTS|DTR
    3: uart:unknown port:00000000 irq:0
    4: uart:unknown port:00000000 irq:0
    5: uart:unknown port:00000000 irq:0
    6: uart:unknown port:00000000 irq:0
    7: uart:unknown port:00000000 irq:0
    8: uart:unknown port:00000000 irq:0
    9: uart:unknown port:00000000 irq:0
    10: uart:unknown port:00000000 irq:0
    11: uart:unknown port:00000000 irq:0

    In the example above, /dev/ttyS2 is linked to SOC_UART0 (as shown by mmio:0x02800000). The rest of "unknown" /dev/ttyS* are not linked to any real UART port.

  • SOC_UART0 is used for log. And I want to send period message to SOC with the other port. which Uart port should i set. Is the SOC_UART1  avaliable?
    which ttySx should i open?

  • &wkup_uart0 {
            /* WKUP UART0 is used by DM firmware */
            bootph-pre-ram;
            status = "reserved";
            pinctrl-names = "default";
            pinctrl-0 = <&wkup_uart0_pins_default>;
    };

    &main_uart0 {
            bootph-all;
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&main_uart0_pins_default>;
            interrupts-extended = <&gic500 GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
                                   <&main_pmx0 0x1c8>; /* (D14) UART0_RXD PADCONFIG114 */
            interrupt-names = "irq", "wakeup";
    };

    &main_uart1 {
            /* Main UART1 is used by TIFS firmware */
            bootph-pre-ram;
            status = "reserved";
            pinctrl-names = "default";
            pinctrl-0 = <&main_uart1_pins_default>;
    };
    I check the dts file. It seems that the dts of uart1 is reaserved. So i need to set the dts for uart1 to enable this device.
    if there are example for setting the uart1. I have no idea how to set the interrupt? thanks very much

  • You don't need to change the interrupt. Please refer to the link below for enabling an UART in kernel.

    https://dev.ti.com/tirex/explore/node?node=A__AUDMqu6z4X-MtcRNFPmsuw__AM62A-ACADEMY__WeZ9SsL__LATEST&placeholder=true