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: Compiling DTB in J721E-TDA4EVM solving conflicts with UART & CAN (PSDK_08_04_00)

Part Number: TDA4VM

Hello,

Using SBL to boot TDA4EVM with Arago and APP in MCU1_0, with DTB included in default Arago fs, I have detected some issues in CAN and UART. I notice that UART and MCU_CAN could be modified by kernel running in A72, because the app I prepared to be executed in R5_MCU1_0 crasshes after a while (this app is similar to CAN_profile and stopped sending correct messages to UART and to CAN when kernel is initialized in A72)

My intention was to recompile DTS assuring MCU_UART and MCU_CAN are not used by Linux. So that, reverse engineering I have applied.

Stopping uboot, I see where is allocated the dtb used for it, so that:  rootfs/boot/k3-j721e-common-proc-board.dtb

Looking for a source in Linux PDK (k3-j721e-common-proc-board.dts) I found 4 different files (all with different content)

If I generate dtb, using "make u-boot-a72" the dts used is "./board-support/u-boot-2021.01+gitAUTOINC+a169f42610-ga169f42610/arch/arm/dts/k3-j721e-common-proc-board.dts", that it has sense, but dtb result is smaller than the included in roofs (I guess is the one generated in linux-dev-kit and also included as prebuilt images).

Here my question: why DTS included in u-boot for J721 is different (there are many differences using diff) than the one included in linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/

What should I do to have Arago with proper modifications in DTS assuring MCU uart and can are not used by A72??

Thanks

  • Hi Pablo,

    Are you seeing that your app having issues after kernel is loaded or U-Boot is loaded?

    In case you have the issue after kernel is loaded then edit the file: ./board-support/u-boot-2021.01+gitAUTOINC+a169f42610-ga169f42610/arch/arm/dts/k3-j721e-common-proc-board.dts

    Add the lines below: 

    &mcu_uart {
            status = "disabled";
    };

    &mcu_mcan0 {
            status = "disabled";
    };

    You should make sure that the all the nodes that depend on this or use this also should be disabled.

    - Keerthy

  • Hello. Many thanks for your quick response

    The issue was happening while kernel is loaded, thus, after U-boot.

    The dts you referred is the one I am modifying (with your proposed changes). It looks like the issue disappeared.

    I would like to understand why prebuilt DTB used in script to generate SD card for EVM (psdk_rtos/scripts/install_to_sd_card.sh, that allocates it in rootfs/boot/k3-j721e-common-proc-board.dtb) is different to the one generated from ./board-support/u-boot-2021.01+gitAUTOINC+a169f42610-ga169f42610/arch/arm/dts/k3-j721e-common-proc-board.dts.

    There are many differences between ./board-support/linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/.pc/0001-arm64-dts-ti-k3-j721e-common-proc-board.dts-Add-the-.patch/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts and ./board-support/u-boot-2021.01+gitAUTOINC+a169f42610-ga169f42610/arch/arm/dts/k3-j721e-common-proc-board.dts?

    Those files have same names, but different content. What is the reason of that?

  • The dts you referred is the one I am modifying (with your proposed changes). It looks like the issue disappeared.

    That is good.

    rootfs/boot/k3-j721e-common-proc-board.dtb

    This for Linux kernel. This will have more nodes present.

    enerated from ./board-support/u-boot-2021.01+gitAUTOINC+a169f42610-ga169f42610/arch/arm/dts/k3-j721e-common-proc-board.dts.

    This is for U-Boot that only needs some minimal nodes to get to U-Boot prompt and then load Linux/dtb.

    Those files have same names, but different content. What is the reason of that

    board-support/u-boot-*/arch/arm/dts/ --> U-Boot device tree

    board-support/linux*/arch/arm64/boot/dts/ti --> Linux kernel dts

    Closing this thread as the original issue is resolved and the outstanding questions answered.

    - Keerthy

  • Just one comment.

    The issue happened AFTER kernel loading, not in U-boot. Thus, the ones that is needed to be changed is board-support/linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts, is not?

    You commented  "... after kernel is loaded then edit the file: ./board-support/u-boot-2021.01+gitAUTOINC+a169f42610-ga169f42610/arch/arm/dts/k3-j721e-common-proc-board.dts"...

    BR

  • Pablo,

    If the non-A72 cores need to control a peripheral then it's best to disable the dt node from both U-Boot and Linux device tree as both of them will reconfigure the peripheral and can cause issues.

    If your boot flow has U-Boot coming into picture then we should disable nodes in the U-Boot dts and if not then disabling kernel dts nodes should be enough. You are correct if the kernel loading those peripherals causes issues then they should be disabled in the kernel as well.

    Best Regards,

    Keerthy