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.

SK-TDA4VM: [TDA4VM] UART2 enable at SK-TDA4VM board

Part Number: SK-TDA4VM


Dear TI teams and other engineers.

Hello, I am naru. I am trying to use UART2 in SK-TDA4VM Edge board,
but my skill (Yocto, Kernel, engineering...) is too low...

How can I add UART2 at SK-TDA4VM yocto ?

I am trying to change dts file, and check cat /proc/tty/driver/serial at board.

===========
ex:

&main_pmx0 {
myuart2_pins_default: myuart2_pins_default {
pinctrl-single,pins = <
J721E_IOPAD(0x148, PIN_INPUT, 14) /* (AA26) PRG0_PRU1_GPO18.UART2_RXD */
J721E_IOPAD(0x11c, PIN_OUTPUT, 14) /* (AA24) PRG0_PRU1_GPO7.UART2_TXD */
J721E_IOPAD(0x13c, PIN_OUTPUT, 14) /* (AF29) PRG0_PRU1_GPO15.UART2_RTSn */
>;
};

};

============

but, my message is

root@tda4vm-sk:/opt/edge_ai_apps# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:unknown port:00000000 irq:0
1: uart:8250 mmio:0x40A00000 irq:15 tx:0 rx:0 DSR
2: uart:8250 mmio:0x02800000 irq:27 tx:38163 rx:49 RTS|CTS|DTR
3: uart:8250 mmio:0x02810000 irq:28 tx:403 rx:0 RTS|DTR|DSR
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:8250 mmio:0x02840000 irq:29 tx:0 rx:0 DSR
7: uart:unknown port:00000000 irq:0
8: uart:unknown port:00000000 irq:0
9: uart:unknown port:00000000 irq:0

===================

I could not add UART2 (0x02820000 ?)...

please help me to set up UART 2 at SK-Edge board.


Thank you for read my question, and May the healthy be with you .

  • &main_pmx0 {
    myuart2_pins_default: myuart2_pins_default {
    pinctrl-single,pins = <
    J721E_IOPAD(0x148, PIN_INPUT, 14) /* (AA26) PRG0_PRU1_GPO18.UART2_RXD */
    J721E_IOPAD(0x11c, PIN_OUTPUT, 14) /* (AA24) PRG0_PRU1_GPO7.UART2_TXD */
    J721E_IOPAD(0x13c, PIN_OUTPUT, 14) /* (AF29) PRG0_PRU1_GPO15.UART2_RTSn */
    >;
    };

    };

    This is just adding the pinmux for UART2. Have you added the main_uart2 node and enabled it? Please check arch/arm64/boot/dts/ti/k3-j721e-main.dtsi for main_uart2 node.
    It should be enabled.

    Regards,
    Keerthy

  • I tried to add patch, but I couldn't find UART2 at /opt/edge_ai_apps# cat /proc/tty/driver/serial

    ****************************************

    patch :

    diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
    index 8f3bdd3f35cb..5b098b0fcdd8 100644
    --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
    +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
    @@ -347,6 +347,15 @@
    >;
    };

    + // knr
    + main_uart2_pins_default: main-uart2-pins-default {
    + pinctrl-single,pins = <
    + J721E_IOPAD(0x148, PIN_INPUT, 14) /* (AA26) PRG0_PRU1_GPO18.UART2_RXD */
    + J721E_IOPAD(0x11c, PIN_OUTPUT, 14) /* (AA24) PRG0_PRU1_GPO7.UART2_TXD */
    + J721E_IOPAD(0x13c, PIN_OUTPUT, 14) /* (AF29) PRG0_PRU1_GPO15.UART2_RTSn */
    + >;
    + };
    +
    main_i2c0_pins_default: main-i2c0-pins-default {
    pinctrl-single,pins = <
    J721E_IOPAD(0x220, PIN_INPUT_PULLUP, 0) /* (AC5) I2C0_SCL */
    @@ -579,8 +588,10 @@
    };

    &main_uart2 {
    - /* Brought out on RPi header */
    - status = "disabled";
    + pinctrl-names = "default";
    + pinctrl-0 = <&main_uart2_pins_default>;
    + power-domains = <&k3_pds 279 TI_SCI_PD_EXCLUSIVE>;
    + status = "okay";
    };

    &main_uart3 {

    ================================
    patch location:

    -source

    /home/kangsky/ti-processor-sdk-linux-j7-evm-08_02_00_04/yocto-build/sources/meta-psdkla/recipes-kernel/linux/linux-ti-staging/j7-evm/0300_naru_k_patch_1.patch

    -work-shared

    /home/kangsky/ti-processor-sdk-linux-j7-evm-08_02_00_04/yocto-build/build/arago-tmp-external-arm-glibc/work-shared/j7-evm/kernel-source/arch/arm64/boot/dts/ti/k3-j721e-sk.dts

    =================================
    root@tda4vm-sk:/opt/edge_ai_apps# cat /proc/tty/driver/serial
    serinfo:1.0 driver revision:
    0: uart:unknown port:00000000 irq:0
    1: uart:8250 mmio:0x40A00000 irq:15 tx:0 rx:0 DSR
    2: uart:8250 mmio:0x02800000 irq:27 tx:38163 rx:49 RTS|CTS|DTR
    3: uart:8250 mmio:0x02810000 irq:28 tx:403 rx:0 RTS|DTR|DSR
    4: uart:unknown port:00000000 irq:0
    5: uart:unknown port:00000000 irq:0
    6: uart:8250 mmio:0x02840000 irq:29 tx:0 rx:0 DSR
    7: uart:unknown port:00000000 irq:0
    8: uart:unknown port:00000000 irq:0
    9: uart:unknown port:00000000 irq:0

    ===================

    Uenv.txt

    psdk_setup_file=.psdk_setup
    check_psdk_setup=load mmc 1:1 ${loadaddr} ${psdk_setup_file}

    # Reset to the default environment
    do_psdk_setup=env default -f -a; saveenv

    # If not previously configured, then configure the environment and indicate this by writing a file
    uenvcmd=if run check_psdk_setup; then echo "Already setup."; else run do_psdk_setup; mw.b ${loadaddr} 0 1; fatwrite mmc 1:1 ${loadaddr} .psdk_setup 1; reset; fi

    dorprocboot=1
    name_overlays=k3-j721e-edgeai-apps.dtbo

    ****************************************

    Well, maybe I can have some hints from SPI enable:

    www.ti.com/.../sprad26.pdf


    I will try (and read manuals, SDK....) to enabel UART2 at SK-TDA4VM board.

    Please let me know some useful hints (articles, doc, tutorial....) for adding UART2.
    it will be great help for TDA4 development.

    Thank yor for your help, Keerthy

    May the Health be with you !!

    Regards,
    naru kang

  • Problem solved !!

    My bitbake process was problem.

    Now I can test UART2.

    Thank you for your help, keerthy !!!

    Regards,

    naru kang