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.

TDA4VM: PSDKRA7.2 : Ethfw UART port change in Vision_apps firmware

Part Number: TDA4VM

Hi TI members:

We have one customer TDA4 board, which have three UART ports ( MAIN_UART0 / MCU_UART0 / WKUP_UART0).

Because MAIN_UART0 is used for A72 linux print log,

we would like to change the ethfw log print on MCU_UART0 or WKUP_UART0.

Right now we migrate our code to PSDKRA7.2,

I already modify below pdk code for change ethfw UART port

--- a/packages/ti/drv/enet/examples/utils/V1/enet_appboardutils_j721e_evm.c
+++ b/packages/ti/drv/enet/examples/utils/V1/enet_appboardutils_j721e_evm.cVM board pinmux
@@ -231,8 +231,10 @@ static void EnetBoard_boardInit(Board_initCfg *boardCfg)
     /* mcu2_0 UART instances:83b3d9390f99ba4cf
      *  - J721E EVM: UART2inen.Chen@quantatw.com>
      *  - J7200 EVM: UART3 */21 +0000
-    initParams.uartInst      = ENET_UTILS_MCU2_0_UART_INSTANCE;
-    initParams.uartSocDomain = BOARD_SOC_DOMAIN_MAIN;
+    //initParams.uartInst      = ENET_UTILS_MCU2_0_UART_INSTANCE;es/ti/drv/enet/
+    //initParams.uartSocDomain = BOARD_SOC_DOMAIN_MAIN;packages/ti/drv/enet$ ls -l
+    initParams.uartInst      = 0;
+    initParams.uartSocDomain = BOARD_SOC_DOMAIN_WKUP;
     /* Use non-exclusive mode in board lib when accessing the module for clock enable
      * to let Linux also access the module */fg.h
     initParams.pscMode = BOARD_PSC_DEVICE_MODE_NONEXCLUSIVE;
@@ -270,7 +272,8 @@ void EnetBoard_initEthFw(void)nent.mk
     uint32_t clkModuleId[] = { TISCI_DEV_DDR0,
                                TISCI_DEV_TIMER12,
                                TISCI_DEV_TIMER13,xdt
-                               TISCI_DEV_UART2, };
+                              TISCI_DEV_WKUP_UART0, };
+                               //TISCI_DEV_UART2, };

I also update the WKUP_UART0 pins pinmux in pdk/packages/ti/drv/enet/examples/utils/V1/enet_board_pinmux.c  ,

and confirm it after linux login:

J28 : WKUP_UART0_TXD 00010000 (pin 41 (PIN41) 4301c0a4 00010000 pinctrl-single)

J29 : WKUP_UART0_RXD 00050000 (pin 40 (PIN40) 4301c0a0 00050000 pinctrl-single)

But now I still can't see the ethfw log print on WKUP_UART0.

Do you have any idea about this request?

BR

Sentinen Chen

  • Hi,

    Have you looked at this E2E ?

    Regards

    Vineet

  • Hi Vineet:

    Yes, I just follow this thread's rule and try it on PSDKRA_07_02

    1. <SDK>/pdk/packages/ti/drv/enet/examples/utils/include/enet_apputils.h
      • Set initParams.uartInst value in EnetBoard_boardInit() function to new UART instance number.
      • If the new UART instance is not in Main domain, also change initParams.uartSocDomain in the same function.
    2. <SDK>/pdk/packages/ti/drv/enet/examples/utils/V1/enet_board_pinmux_j721e_data.c
      1. Update gUartPinCfg array with the pin mux settings corresponding to the new UART instance

    For the item 1 , I change my pdk code in  pdk/packages/ti/drv/enet/examples/utils/V1/enet_appboardutils_j721e_evm.c :

    + //initParams.uartInst = ENET_UTILS_MCU2_0_UART_INSTANCE;
    + //initParams.uartSocDomain = BOARD_SOC_DOMAIN_MAIN;
    + initParams.uartInst = 0;
    + initParams.uartSocDomain = BOARD_SOC_DOMAIN_WKUP;

    For the item 2, I confirm my WKUP_UART0 pinmx after I log in linux :

    J28 : WKUP_UART0_TXD 00010000 (pin 41 (PIN41) 4301c0a4 00010000 pinctrl-single)

    J29 : WKUP_UART0_RXD 00050000 (pin 40 (PIN40) 4301c0a0 00050000 pinctrl-single)

    BR

    Sentinen Chen

  • Hi,

    You are trying to change to WKUP_UART0 ? Can you try with MCU_UART0 and check ?

    WKUP_UART is used by System Firmware so I am not so sure.

    Regards

    Vineet

  • Hi Vineet:

    Yes, I also try the MCU_UART0 part, but the log still didn't print on MCU_UART0. 

    And I find the ethfw log was print on MAIN_UART0 when I modify log print to MCU_UART0 or WKUP_UART0.

    You can see the below log that I log form MAIN_UART0

    EthApp_[ 12.425772] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0x15
    [ 12.433037] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xe
    initEthFw
    EthFw_initConfigParams
    [ 12.498131] virtio_rpmsg_bus virtio3: creating channel ti.ethfw.notifyservice addr 0x1e
    [ 12.507291] virtio_rpmsg_bus virtio3: creating channel rpmsg-kdrv addr 0x1a
    [ 12.517928] virtio_rpmsg_bus virtio4: creating channel ti.ipc4.ping-pong addr 0xe
    [NIMU[ 12.529932] rpmsg-kdrv-eth-switch rpmsg-kdrv-2-mpu_1_0_ethswitch-device-0: Device info: permissions: 07FFFFFF uart_id: 2
    [ 12.541105] j721e-pcie 2900000.pcie: Failed to init phy
    _N[ 12.548298] rpmsg-kdrv-eth-switch rpmsg-kdrv-2-mpu_1_0_ethswitch-device-0: FW ver 0.1 (rev 1) 14/Apr/2021 SHA:85c62216
    [ 12.559516] platform 5e00000.r5f: assigned reserved memory node vision_apps-r5f-dma-memory@a5000000
    DK] [ 12.580580] j721e-pcie 2900000.pcie: Failed to init phy
    ENET has [b 12.595449] j721e-cpsw-virt-mac main_r5fss_cpsw9g_virt_mac0: virt_cpsw_nuss mac loaded
    een[ 12.605640] j721e-cpsw-virt-mac main_r5fss_cpsw9g_virt_mac0: rdev_features:00000003 rdev_mtu:1522 flow_id:172 tx_psil_dst_id:4A00
    star[ 12.621647] j721e-cpsw-virt-mac main_r5fss_cpsw9g_virt_mac0: local_mac_addr:00:00:00:00:00:00 rdev_mac_addr:70:ff:76:1d:92:c1
    [ 12.636307] j721e-pcie 2900000.pcie: Failed to init phy
    ted [ 12.745768] remoteproc remoteproc6: 5e00000.r5f is available
    su[ 12.796104] virtio_rpmsg_bus virtio3: creating channel ti.ipc4.ping-pong addr 0xe
    ccessfully

     The red part log is ethfw log, and it should print on MCU_UART0 or WKUP_UART0.

    BR

    Sentinen Chen

  • Hi Sentinen,

    I will check and get back

    Regards

    Vineet

  • Hi Vineet:

    I find there is one function we can disable.

    I disable the below part in pdk/packages/ti/drv/uart/src/UART_drv.c

    --- a/packages/ti/drv/uart/src/UART_drv.c
    +++ b/packages/ti/drv/uart/src/UART_drv.c
    @@ -116,10 +116,11 @@ void UART_init(void)
                 UART_config[UART_count].fxnTablePtr->uartInitFxn((UART_Handle)&(UART_config[UART_count]));
             }
         }
    -
    +/*
     #if defined (BUILD_MCU)
         UART_socInit();
     #endif
    +*/
     }
    

    It always overwrite the uartInitCfg configurations to main_doamin.

    After disable this function, I can print log on mcu_uart0 and wkup_uart0 successfully.

    BR

    Sentinen Chen