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.

PROCESSOR-SDK-J721E: PCIe setup Initial Questions for J721E EVM with TDA4VMx/DRA829Vx SoM

Part Number: PROCESSOR-SDK-J721E
Other Parts Discussed in Thread: TDA4VM, DRA829

Hi,

My goal is to perform the loopback test as described in these two parts of the documentation between a J721E EVM (as RC) and J721E EVM + fusion daughter card (as EP): https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_00_00_08/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_Root_Complex.html and https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_00_00_08/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_End_Point.html

As part of getting ready to configure the EVM to be an endpoint, I noticed some discrepancies and have a few questions on the user guide I'm hoping to get clarified here.

1. I have Adex Electronics cable to connect the 2 boards with part number PE-FLEX1-MM-12", while the example uses PE-FLEX1-MM-CX-3". Initially we obtained this cable based on recommendations, but after noticing this different, I'm curious if the lack of "CX"  function in the cable will be an issue. Additionally, the user guide recommends removing the resistors CK+, CK-, and RST. However, I don't have these resistors, and my cable also doesn't have B side. Pictures attached below.

2. Under DTS modification, it lists steps to configure dra7-evm, dra72-evm, arm572x-idk, am65x-evm, and am65x-idk, but no mention of dra82x/tda4vm, which is the SoM I'm mounting on top of the J721E. Which instruction should I follow for configuring DTS?

3. Right under DTS mod, the guide describes patches to apply to alpha/beta boards for different SDK and Kernel versions. The listed versions are 6.x SDK (4.19 Kernel) and 7.x SDK (5.4 Kernel), but I am using 8.0 SDK with Kernel version 5.10.41. Is there another patch I need to apply, or does the 7.x SDK (5.4 Kernel) version suffice? Similarly, for setting up pci-epf-test device, it only addresses up to Kernel 4.14.

4. Where are the Linux Driver Configuration variables (such as CONFIG_PCI_ENDPOINT) located? I navigated into the /sys/kernel/config path, but could not figure out where to proceed next. Unless, are we supposed to follow the 3.2.1 section of user guide on customizing the configuration using the command: make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- <config type>? Where <config_type> is CONFIG_PCI_ENDPOINT, CONFIG_PCI_J721E, etc.?

Thanks

  • Hi Michelle,

    Here are some clarifications on the software-side for questions 2, 3 and 4.

    2. J721E is another common name used for TDA4VM/DRA829 SoCs. The Linux dts files all follow this name. So, please follow the steps referring to J721E or J7ES from the SDK documentation.

    3. Do you know which version of the J721E EVM you have? Please refer to the J721E EVM Hardware Setup section of the SDK documentation to identify your EVM version. The following are the dtbs used:

        Beta EVM: k3-j721e-common-proc-board.dtb

        Alpha EVM: k3-j721e-proc-board-tps65917.dtb

    The steps listed under 7.x SDK (5.4 kernel) should apply for 8.x SDK (5.10 kernel as well). The Alpha EVM dts file includes the Beta EVM dts file, so changes in k3-j721e-common-proc-board.dts file will be reflected in both dtbs.

    4. The config_type refers to the interface you want to use for doing the kernel configuration. The Linux kernel provides couple of interfaces for this like menuconfig, xconfig, gconfig etc. I recommend you to stick with "menuconfig", the most common usage. 

    You can browse and select the different configs under the appropriate menuitem. PCI options all are under Device Drivers->PCI Support.

    The J721E specific options are under Device Drivers->PCI Support->PCI Controller Drivers->Cadence PCIe controllers support

    Press the backslash key to search for different CONFIG symbols. (/)

    regards

    Suman

  • Hi Suman,

    Thanks for your response.

    To double check, you said:

    2. J721E is another common name used for TDA4VM/DRA829 SoCs. The Linux dts files all follow this name. So, please follow the steps referring to J721E or J7ES from the SDK documentation.

    However, the dts files are named as dra7-evm, dra72-evm, am572x-idk, am65x-evm, and am65x-idk. These don't contain J721E or J7ES, can you clarify which one I should be downloading? And is the directory I should be calling the diff --git command <SDK INSTALL DIR>/board-support/linux-5.10.41+gitAUTOINC+4c2eade9f7-g4c2eade9f7?

    In regards to your response to #4:

    4. The config_type refers to the interface you want to use for doing the kernel configuration. The Linux kernel provides couple of interfaces for this like menuconfig, xconfig, gconfig etc. I recommend you to stick with "menuconfig", the most common usage. 

    I called the command "make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- menuconfig" in the directory <SDK INSTALL DIR>/board-support/linux-5.10.41+gitAUTOINC+4c2eade9f7-g4c2eade9f7. An error came up, saying "scripts/Kconfig.include:39: compiler 'aarch64-none-linux-gnu-gcc' not found".

    I followed the steps in the Linux SDK here  and downloaded the GCC tools from the links in the table and extracted them in my Downloads folder. However, how do I install these tools into the appropriate directory? My understanding was that we can source the environment setup script to have everything set up, but when reading section 3.2.1.3 Preparing to Build, it says to: "that you do NOT source the environment-setup file included with the toolchain when building the kernel. Doing so will cause the compilation of host side components within the kernel tree to fail."

    This is my first time building/configuring the Linux Kernel, so any help will be appreciated. Thanks!

  • Hi Michelle,

    However, the dts files are named as dra7-evm, dra72-evm, am572x-idk, am65x-evm, and am65x-idk. These don't contain J721E or J7ES, can you clarify which one I should be downloading? And is the directory I should be calling the diff --git command <SDK INSTALL DIR>/board-support/linux-5.10.41+gitAUTOINC+4c2eade9f7-g4c2eade9f7?

    The dts file name for J721E used is k3-j721e-common-proc-board.dts file. The Linux kernel installation directory you pointed is correct. The J721E dts file is present in arch/arm64/boot/dts/ti/ folder from the above path.

    If you are referring to the references used in the above documentation link, please scroll down further. Following is a snapshot for J721E:

    I followed the steps in the Linux SDK here  and downloaded the GCC tools from the links in the table and extracted them in my Downloads folder. However, how do I install these tools into the appropriate directory? My understanding was that we can source the environment setup script to have everything set up, but when reading section 3.2.1.3 Preparing to Build, it says to: "that you do NOT source the environment-setup file included with the toolchain when building the kernel. Doing so will cause the compilation of host side components within the kernel tree to fail."

    This is my first time building/configuring the Linux Kernel, so any help will be appreciated. Thanks!

    There are couple of different ways of building the Linux kernel.

    You actually need not download and install the compilers separately, they are already installed under <SDK INSTALL DIR>/linux-devkit/sysroots/  folder. Please see the Linux-Devkit Structure and Location in SDK subsections under the 1.1.4 GCC Toolchain page.

    You can simply follow the steps outlined in the 1.3 Simplified SDK Build using Top-Level Makefile page. You need not source any scripts or environment variables. Following are the commands to build Linux Kernel and dtbs. 

    $ cd <SDK_INSTALL_DIR>

    $ make linux

    $ make linux-dtbs

    Regards

    Suman

  • Hi Michelle,

    Also, w.r.t question #1, you need cross over cables. RX of one EVM should be connected to TX of other EVM. So, you would need the -CX versions of the cables.

    regards

    Suman

  • Hi Suman,

    Thank you, I will try the suggestions and follow up if I run into other questions.

    As for the cables, is there any way/ modification to use none-cross over cables instead of buying the CX version? Thanks.

  • Hi Michelle,

    I don't think there are any workarounds, since the PCIe pins and connector layout is the same on both boards, and we need the Tx and Rx to be swapped.

    regards

    Suman

  • Hi Suman,

    Thank you, we will address the cable issue.

    As for the patches, based on information I gathered from the Internet, the steps for creating a patch file and applying said patch is as follows? Please correct any wrong steps.

    1. Create a patch file (with extension .patch). I made it in my Downloads folder and named it pcie_ep_patchfile.patch with the following content (from Linux SDK):

    @@ -813,6 +813,7 @@
            phys = <&serdes0_pcie_link>;
            phy-names = "pcie_phy";
            num-lanes = <1>;
    +       status = "disabled";
     }; &pcie1_rc {
    @@ -833,7 +834,6 @@
            phys = <&serdes0_pcie_link>;
            phy-names = "pcie_phy";
            num-lanes = <1>;
    -       status = "disabled";
     }; &pcie1_ep {

    2. 

    patch -u arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts -i /home/user/Downloads/pcie_ep_patchfile.patch

    3. Double check the patch is applied using 

    git diff arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts

  • Hi Michelle,

    Yeah, above steps are ok, that's manually creating a patch file but can be prone to some issues. You need not create a patch file and then apply it. You could have just directly modified the dts files as well based on the + (addition) and - (deletion) from the reference.

    The default dtb has the end-point node disabled. And the modifications disable the root-complex node and enable the end-point node. This modified dtb is to be used only on one board while the other board will continue to use the unmodified dtb.

    regards

    Suman