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.

AM6548: Setup for SERDES0 = PCIe0 Lane 0, SERDES1 = PCIe1 Lane0

Part Number: AM6548
Other Parts Discussed in Thread: PCA9555

Hi,

I have my two serdes channels connected to two different devices. What modifications are needed to get SERDES0 = PCIe0 Lane 0, SERDES1 = PCIe1 Lane0?

I've been trying to modify the existing 2 lane pcie0 k3_am654-pcie-usb2.dtso overlay to do this, but in most cases where I've attempted to declare the serdes1 as <&serdes1 PHY_TYPE_PCIE 0> (from ti,phy-am654-serdes.txt), I lose the PCIe 1 channel on boot and PCIe0 does not connect to the device downstream. With the original dtso, the device on serdes1 connected reasonably reliably. Serdes0 does not come up unless the serdes1 device did not come up. 

My best guess so far is that I can leave the &serdes0 declaration as is, delete the &serdes1 declaration to go to the default in the main.dtsi so that assigned-clock-parents is no longer <&serdes0 AM654_SERDES_RO_REFCLK>, split the pcie0_rc into a pcie0_rc and pcie1_rc, and split the pcie0_ep to pcie0_ep and pcie1_ep. I also have a second reset line available for pcie1. Copied at the bottom is the dts with these modifications, but it didn't work.

I'm definitely missing something, any pointers on where to look next would be appreciated. 

Thanks,

Andrea

// 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";
};

&pcie0_rc {
num-lanes = <1>;
phys = <&serdes0 PHY_TYPE_PCIE 1>
phy-names = "pcie-phy0"";
reset-gpios = <&pca9555 15 GPIO_ACTIVE_HIGH>;
status = "okay";
};

&pcie1_rc {
num-lanes = <1>;
phys = <&serdes1 PHY_TYPE_PCIE 0>;
phy-names =  "pcie-phy1";
reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>;
status = "okay";
};

&pcie0_ep {
num-lanes = <1>;
phys = <&serdes0 PHY_TYPE_PCIE 1>;
phy-names = "pcie-phy0";
};

&pcie1_ep {
num-lanes = <1>;
phys = <&serdes1 PHY_TYPE_PCIE 0>;
phy-names = "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";
};

  • Hi,

    Any ideas? Is the pcie0 lane 0 + pcie1 lane 0 serdes configuration described in the TRM confirmed operational?

    Thanks,

    Andrea

  • "My best guess so far is that I can leave the &serdes0 declaration as is, delete the &serdes1 declaration to go to the default in the main.dtsi so that assigned-clock-parents is no longer <&serdes0 AM654_SERDES_RO_REFCLK>, split the pcie0_rc into a pcie0_rc and pcie1_rc, and split the pcie0_ep to pcie0_ep and pcie1_ep. I also have a second reset line available for pcie1. Copied at the bottom is the dts with these modifications, but it didn't work."

    Can you clarify the what you meant by split pcie0_rc into a pcie0_rc and pcie1_rc? There should already by separate DT nodes for pcie0_rc and pcie1_rc no?

    Can you also clarify what didn't work? Only pcie0 or only pcie1 or both?

    Can you also clarify which version of kernel you are using?

    The configuration that you are trying is expected to work.

    Thanks,

    Kishon

  • Hi Kishon,

    It does not look like there are separate DT nodes for pcie0_rc and pcie1_rc in the original dtso files (k3-am654-pcie-usb2 and k3-am65-pcie-usb3). The usb2 overlay configures pcie0_rc for two lane pcie operation. The usb3 overlay uses SERDES0 for usb3 and SERDES1 for pcie.

    Using the TI provided overlays, I can get SERDES1 (PCIe1 Lane 0) to work. SERDES0 does not communicate over PCIe. With the modified overlay above, I was able to occasionally get SERDES0 to communicate, but would not have SERDES1 communication. 

    I'm running SDK 7.1 and want SERDES0 configured as PCIe0 Lane 0 and SERDES1 configured as PCIe1 Lane 0. 

    Thanks,

    Andrea

  • Hi Andrea,

    Please try configuring something like below. Please fix the reset-gpios property based on how it is connected in your board.

    &serdes1 {
    status = "okay";
    };

    &pcie1_rc {
    num-lanes = <1>;
    phys = <&serdes1 PHY_TYPE_PCIE 0>;
    phy-names = "pcie-phy0";
    reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>;
    status = "okay";
    };

    &serdes0 {
    status = "okay";
    };

    &pcie0_rc {
    num-lanes = <1>;
    phys = <&serdes0 PHY_TYPE_PCIE 1>;
    phy-names = "pcie-phy0";
    reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; /* Fix it based on how it is connected in EVM */
    status = "okay";
    };

    Thanks

    Kishon

  • Looks like this is working pretty well. Thank you!