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.

TMDX654IDKEVM: How to configure EVM Processor Board as an End Point on Linux

Part Number: TMDX654IDKEVM

Hello TI Team,

first of all what i want to do in the end:

I want to connect a Board to a second Board via PCIe. One of them should be an End Point and the other an Root Complex.

Im currently struggling with the endpoint configuration of the TMDX654IDKEVM Board with the Sitara AM65x SR1 with Linux as OS on a SD-Card.
I am using the linux sdk version 7.00.01.06.
I was also following the steps for Kernel/Device Tree configuration:
https://software-dl.ti.com/processor-sdk-linux/esd/AM65X/07_00_01_06/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html

https://software-dl.ti.com/processor-sdk-linux/esd/AM65X/07_00_01_06/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_End_Point.html

I think i did everything like described in the Guides, but i'm not sure if the patchfile provided in the Guide fits for the "k3-am654-pcie-usb2.dtso"-file is correct. Since the provided file makes changes after line 46. And the line which we want to change is in line 27. So can you provide me the correct patchfile?

Anyways, I tried to patch it manually with understanding how a patchfile works. 

/ SPDX-License-Identifier: GPL-2.0

/**

 * DT overlay for SERDES personality card: 2lane PCIe + USB2.0 Host on AM654 EVM

 *

 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/

 */



/dts-v1/;

/plugin/;

#include <dt-bindings/gpio/gpio.h>

#include <dt-bindings/phy/phy.h>

#include <dt-bindings/phy/phy-am654-serdes.h>

#include <dt-bindings/pinctrl/k3.h>



&serdes0 {

	assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>, <&serdes0 AM654_SERDES_RO_REFCLK>;

	assigned-clock-parents = <&k3_clks 153 8>, <&k3_clks 153 4>, <&k3_clks 153 4>;

	status = "okay";

};



&serdes1 {

	assigned-clocks = <&serdes1 AM654_SERDES_CMU_REFCLK>;

	assigned-clock-parents = <&serdes0 AM654_SERDES_RO_REFCLK>;

	status = "okay";

};



&pcie0_ep {

	num-lanes = <2>;

	phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>;

	phy-names = "pcie-phy0", "pcie-phy1";

	status = "okay";

};



&pcie0_ep {

	num-lanes = <2>;

	phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>;

	phy-names = "pcie-phy0", "pcie-phy1";

};



&main_pmx0 {

       usb0_pins_default: usb0_pins_default {

               pinctrl-single,pins = <

                       AM65X_IOPAD(0x02bc, PIN_OUTPUT, 0) /* (AD9) USB0_DRVVBUS */

               >;

       };

};



&dwc3_0 {

	status = "okay";

};



&usb0_phy {

	status = "okay";

};



&usb0 {

	pinctrl-names = "default";

	pinctrl-0 = <&usb0_pins_default>;

	dr_mode = "host";

};

Commands I used:

mount -t configfs none /sys/kernel/config
cd /sys/kernel/config/pci_ep/
mkdir functions/pci_epf_test/func1
echo 0x104c > functions/pci_epf_test/func1/vendorid
echo 0xb00c > functions/pci_epf_test/func1/deviceid
echo 16 > functions/pci_epf_test/func1/msi_interrupts
echo 16 > functions/pci_epf_test/func1/msix_interrupts
ln -s functions/pci_epf_test/func1 controllers/5500000.pcie-ep
echo 1 > controllers/5500000.pcie-ep/start

The ln command does not work, because no controller can be found in the controllers directory. What went wrong?

Could you please help me fixing this issue?

Best regards


  • Karim, could you kindly put Felix on the list of "SE contributors"? He is currently doing a investigation, which should pave the way to our next generation debug interface (also required for our main project which you are aware of). Thanks.

  • Dear TI team,
    could you please kindly take this question as this is currently blocking our progress!

    Thanks.

  • Joern/Felix, 

    Sorry for the delayed response. please let me know if you already had break through over this issue. 

    Otherwise, please note the following:

    1. Your dtso file is fine for the entries, but you had two duplicated pcie0_ep nodes. Please delete one. 

    &pcie0_ep {

    num-lanes = <2>;

    phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>;

    phy-names = "pcie-phy0", "pcie-phy1";

    status = "okay";

    };

    &pcie0_ep {

    num-lanes = <2>;

    phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>;

    phy-names = "pcie-phy0", "pcie-phy1";

    };

    2. You mentioned you did everything as in the SDK user guide, just to be sure, did you set the jumpers on the daughter card as mentioned:

    >>For AM65x boards, remove any jumpers present in the SERDES card when operating in endpoint mode.

    I assume you are using the IDK daughter card that has the x2 PCIe card. 

    regards

    Jian

  • Hello Jian,

    thank you for your answer.

    Yes, i had a break through about a month ago. I changed the dtso file until the 5500000.pcie-ep controller appeared. 

    But i do now struggle with a different problem here

    Regards,

    Felix