Hi, everyone. This video demonstrates how to enable the End Point mode on AM57x platforms using Processor Software Development Kits, also known as the Processor SDK. Starting from Proc SDK 3.2 release, PCIe End Point mode is supported on selected devices. The AM57x platforms are the first to be supported for PCIe End Point mode, and we'll show you how that is done in this video.
We will start by identifying the required hardware and how to set up the demonstrations. Then we will discuss what software is required, how to configure the kernel to be in End Point mode, and finally, how to run the basic test to verify the functionality of PCIe End Point mode.
Now, here we displayed the required hardwares, including a PCIe bus extender. Then we have an AM572x IDK on the left, the mini PCIe to PCIe adapter, and finally, the AM572 GP EVM.
Because different EVMs have different PCIe connectors-- the IDK has a standard PCIe connector, but the AM57 GP EVM has a mini PCIe3 connector, so we need the adapter to convert it. So first we plug in the adapter to the PCIe port of the GP EVM, then connect both EVM with the bus extenders.
Proc SDK is released with the PCIe default as a rule complex. To run the End Point mode, we need to download the kernel, the release package, modify the kernel configurations, and rebuild it as an End Point mode. The Proc SDK can be installed by running the installer. There are more detailed information in the Get Started Guide and the Kernel Users Guide.
On the Linux machine, I have pre-downloaded and installed the Linux Proc SDK 3.2 release. And I set up the cross-compiler path. Then we need to configure the kernel as the TISDK AM57XX EVM default configurations, then run the menu config to enable the End Point mode.
In the menu config, we go to the bus support PCIe End Point, then select the PCIe End Point Support and also the PCIe End Point Test Drive. Then we get all of it, then go to PCIe controller drivers, then go into PCIe mode and select End Point Only mode. Exit the menu config and save the change.
Then we need to modify the device tree by disabling the root complex node and enabling the End Point, then save the change of the device tree. Then we can build the kernel image in the device tree, then copy them to the SD card of the End Point side.
To copy to the SD card, we need to mount the SD card as a type EXT i. It will be under the boot directory. Copy both the kernel image and the device tree under it. Then mount the SD card. That's it.
On the root complex site, we need to build the PCIe test executables. The source code is under Tools, PCIe Directory. And we can cross-compile it then copy that, the same method, to the root complex SD card. Then all the SD card images are ready to be tested.
In the two EVM connection scenarios, the End Point EVM need to come up first. So once it comes up, then we have to use sysfs to configure the End Point mode. There are some more details in the PCIe End Point Users Guide. In the Kernel Users Guide, there's a link to it.
First you need to configure the function device instance. Then bind it to a function driver, which can be found using the ls commands at the directory of sysbus PCIe-epf-drivers. That will list the function drivers. Then we need to bind the function driver to the controller driver.
When you find the controller drivers, you will see some errors, say, in the bar 4 and bar 5 are not available. There are some bad addresses. That's due to the non-availability of free inbound windows.
So the function drivers in DRh7 can use only four bars, that is from bar 0 to bar 3. Once we bind this, then the End Point is ready. Then we can bring up the root complex EVM.
When root complex kernel boots up, we have the PCIe test executable copied earlier to the file system. And we can create a script file to run different tests. Here is examples that we use to test base address registers, the interrupts, the rewrite and copy operations. And run it. PCIe End Point is functional.
Thank you for taking the time to watch this demonstration. Additional information are provided here for references. If you have any questions, please post them on the Texas Instrument E2E forum at e2e.ti.com.

Details

Date:
March 17, 2017

This video demonstrates how to enable the PCIe EndPoint (EP) mode on the Sitara AM57x devices using Processor Software Development Kit (SDK) for Linux. We start by identifying and setting up the required hardware. Then we discuss required software, show how to configure the Kernel for PCIe EP mode, and how to run basic tests to verify functionality. The commands and scripts used in this demonstration are available in the PDF download.