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.

AM5728: dra7-pcie: probe of 51800000.pcie_ep failed with error -22

Part Number: AM5728

Hi

We have setup AM5728 processor (PHYTEC SoM) to communicate with Xilinx Zynq FPGA through PCIe Endpoint (PCIe Lane 2).

It was working in older BSP build (18.x), After we updated to latest BSP (20.1.2), The Endpoint is not being detected on FPGA side.
And also dmesg showed this error message:

[    0.572031] dra7-pcie 51800000.pcie_ep: Linked as a consumer to phy-4a095000.pciephy.2
[    0.572207] dra7-pcie 51800000.pcie_ep: GPIO lookup for consumer pcie-clk-oe
[    0.572215] dra7-pcie 51800000.pcie_ep: using device tree for GPIO lookup
[    0.572235] of_get_named_gpiod_flags: can't parse 'pcie-clk-oe-gpios' property of node '/ocp/axi@1/pcie_ep@51800000[0]'
[    0.572251] of_get_named_gpiod_flags: can't parse 'pcie-clk-oe-gpio' property of node '/ocp/axi@1/pcie_ep@51800000[0]'
[    0.572260] dra7-pcie 51800000.pcie_ep: using lookup tables for GPIO lookup
[    0.572269] dra7-pcie 51800000.pcie_ep: No GPIO consumer pcie-clk-oe found
[    0.572278] dra7-pcie 51800000.pcie_ep: GPIO lookup for consumer pcie-reset
[    0.572285] dra7-pcie 51800000.pcie_ep: using device tree for GPIO lookup
[    0.572301] of_get_named_gpiod_flags: can't parse 'pcie-reset-gpios' property of node '/ocp/axi@1/pcie_ep@51800000[0]'
[    0.572316] of_get_named_gpiod_flags: can't parse 'pcie-reset-gpio' property of node '/ocp/axi@1/pcie_ep@51800000[0]'
[    0.572323] dra7-pcie 51800000.pcie_ep: using lookup tables for GPIO lookup
[    0.572331] dra7-pcie 51800000.pcie_ep: No GPIO consumer pcie-reset found
[    0.572469] dra7-pcie 51800000.pcie_ep: Dropping the link to phy-4a095000.pciephy.2
[    0.572511] dra7-pcie: probe of 51800000.pcie_ep failed with error -22

Any suggestions ?

Thanks & Regards,
Sujan

  • Hello Sujan,

    My initial recommendation is to reach out to Phytec through their support channel at http://support.phytec.com/ as the quickest path to resolution.

    From the TI viewpoint, we are not very familiar with their software, nor do we have the HW to attempt to reproduce issue.

    From a glance at the traces you have provided, maybe you could look into what changes were made the PCIe driver 

    dra7-pcie
    and also check the device tree for any changes as well. It seems like the issue is related to the device tree proving function.

    I hope that helps!

    Best,

    Josue

  • Hi Josue,
    Thanks for responding,

    We have contacted PHYTEC support & they are working on it.

    Meanwhile I found that in Documentation/devicetree/bindings/pci/ti-pci.txt , The compatible field shows that

    TI PCI Controllers
    
    PCIe DesignWare Controller
     - compatible: Should be "ti,dra7-pcie" for RC (deprecated)
                   Should be "ti,dra7-pcie-ep" for EP (deprecated)
                   Should be "ti,dra746-pcie-rc" for dra74x/dra76 in RC mode
                   Should be "ti,dra746-pcie-ep" for dra74x/dra76 in EP mode
                   Should be "ti,dra726-pcie-rc" for dra72x in RC mode
                   Should be "ti,dra726-pcie-ep" for dra72x in EP mode
    

    The "ti,dra7-pcie-ep"  has been depreciated, but in our device tree we are still using this value only by default.

    Here is our device tree : 

    /* NOTE: support added for pcie2 in endpoint mode
     *       additionally, setting axi1 { status = "okay" };
     *       is necessary for any pcie2 use.
     *
     *       pcie2_rc/ep are incompatible with PCM-948
     */
    &axi1 {
            status = "okay";
            pcie2_ep: pcie_ep@51800000 {
                    compatible = "ti,dra7-pcie-ep"; // default value - unchanged 
                    reg = <0x51800000 0x28>, <0x51802000 0x14c>,
                          <0x51801000 0x28>, <0x1000 0x10000000>;
                    reg-names = "ep_dbics", "ti_conf", "ep_dbics2", "addr_space";
                    interrupts = <0 355 0x4>;
                    num-lanes = <1>;
                    num-ib-windows = <4>;
                    num-ob-windows = <16>;
                    ti,hwmods = "pcie2";
                    phys = <&pcie2_phy>; //since we are using pcie lane 2
                    //phy-names = "pcie-phy1";
                    phy-names = "pcie-phy0";
                    syscon-legacy-mode = <&scm_conf1 0x14 1>;
    
                    reset-delay-us = <20000>;
                    status = "okay";
            };
    };

    Any thoughts ?

    Best Regards,
    Sujan

  • Hello Sujan,

    Possibly using the the newer driver would help but its hard to say what the effort would be. It seems BSP (20.1.2) corresponds to our SDK release 06.02.00.81 so you could look into that one and the following release as a resource. 

    Hope that helps.

    -Josue

  • Hello Josue,

    We noticed that the probe error is being registered when : 

    phy-names = "pcie-phy0"; 

    and not 

    phy-names = "pcie-phy1";

    Although from ti_pci.txt, its mentioned that : 

    - phy-names : must be "pcie-phy0", "pcie-phy1", "pcie-phyN".. based on the
    number of PHYs as specified in *phys* property. 

    as our *phys* property does consist of only one &pcie2_phy, so it should have been pcie-phy0 and not pcie-phy1 by default.

    Also Note that setting the phy-names = "pcie-phy1";  does eliminate the probe error, but its not creating a 51800000.pcie_ep  device in /sys/kernel/config/pci_ep/controllers/. 
    Which is required to bind the controller.

    Any Suggestions ?

    Regards,
    Sujan

  • Hi Sujan,

    I was looking through some threads related to: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1289771/am5728-no-ep-controller-created-at-sys-kernel-config-pci_ep-controllers/4895274?tisearch=e2e-sitesearch&keymatch=%20user%3A578515#4895274 and found this current thread.

    I assume this is the same topic and issue, but could we close this thread and move all further conversations to the other thread, so that we can have 1 thread that has all of the debug information?

    Regards,

    Takuma

  • Hi Takuma,

    Sorry for opening two threads,

    We were previously getting dra7-pcie: probe of 51800000.pcie_ep failed with error -22

    I thought it was resolved, from the reply I had given before this. So I just wanted to continue where we left off.

    I will close the thread and we can continue in the other thread.

    Thanks,

    Sujan