Hello,
On our configuration we have a PCIe connection on Lane0 Serdes3 and a USB3.0 on Lane1 Serdes3.
We are trying to get both PCIe and USB3.0 to work simultaniously on each lane. When configuring in Device tree only USB3.0 or only PCIe we get expected behaviour.
Only USB3.0 DTS:
&serdes_wiz3 { lane0-mode = <PHY_TYPE_USB3>; lane1-mode = <PHY_TYPE_USB3>; }; &serdes3 { serdes3_usb_link: link@0 { reg = <0>; cdns,num-lanes = <2>; #phy-cells = <0>; cdns,phy-type = <PHY_TYPE_USB3>; resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>; }; }; &serdes_ln_ctrl { idle-states = <SERDES0_LANE0_PCIE0_LANE0>, <SERDES0_LANE1_PCIE0_LANE1>, <SERDES1_LANE0_PCIE1_LANE0>, <SERDES1_LANE1_PCIE1_LANE1>, <SERDES2_LANE0_PCIE2_LANE0>, <SERDES2_LANE1_PCIE2_LANE1>, <SERDES3_LANE0_USB3_0_SWAP>, <SERDES3_LANE1_USB3_0>, <SERDES4_LANE0_EDP_LANE0>, <SERDES4_LANE1_EDP_LANE1>, <SERDES4_LANE2_EDP_LANE2>, <SERDES4_LANE3_EDP_LANE3>; };
With this configuration we get USB3.0 to work but then we don't have PCIe3_rc.
[ 17.558787] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 17.579153] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 [ 17.628275] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed [ 17.651922] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 17.669149] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04 [ 17.687112] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 17.702442] usb usb2: Product: xHCI Host Controller [ 17.711423] usb usb2: Manufacturer: Linux 5.4.74-g9574bba32a xhci-hcd [ 17.726001] usb usb2: SerialNumber: xhci-hcd.0.auto [ 17.735236] hub 2-0:1.0: USB hub found [ 17.743498] hub 2-0:1.0: 1 port detected [ 17.752044] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller [ 17.759618] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3 [ 17.775708] xhci-hcd xhci-hcd.1.auto: hcc params 0x200073c9 hci version 0x100 quirks 0x0000000000010010 [ 17.785125] xhci-hcd xhci-hcd.1.auto: irq 621, io mem 0x06410000 [ 17.799708] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 [ 17.811569] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 17.823578] usb usb3: Product: xHCI Host Controller [ 17.828451] usb usb3: Manufacturer: Linux 5.4.74-g9574bba32a xhci-hcd [ 17.835607] usb usb3: SerialNumber: xhci-hcd.1.auto [ 17.840810] hub 3-0:1.0: USB hub found [ 17.848648] hub 3-0:1.0: 1 port detected [ 17.854766] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller [ 17.862625] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4 [ 17.876561] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed [ 17.887146] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM. [ 17.895576] usb 1-1: new high-speed USB device number 2 using xhci-hcd [ 17.906241] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04 [ 17.918614] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 17.929924] usb usb4: Product: xHCI Host Controller [ 17.936889] usb usb4: Manufacturer: Linux 5.4.74-g9574bba32a xhci-hcd [ 17.947354] usb usb4: SerialNumber: xhci-hcd.1.auto [ 17.954526] hub 4-0:1.0: USB hub found [ 17.960734] hub 4-0:1.0: 1 port detected [ 18.055894] usb 1-1: New USB device found, idVendor=0451, idProduct=8142, bcdDevice= 1.00 [ 18.067616] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=1 [ 18.078808] usb 1-1: SerialNumber: 4D050081CAFB [ 18.086037] hub 1-1:1.0: USB hub found [ 18.091591] hub 1-1:1.0: 4 ports detected [ 18.187611] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd [ 18.215802] usb 2-1: New USB device found, idVendor=0451, idProduct=8140, bcdDevice= 1.00 [ 18.226011] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 18.237668] hub 2-1:1.0: USB hub found [ 18.243456] hub 2-1:1.0: 4 ports detected root@j7-evm:~# lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 0451:8140 Texas Instruments, Inc. TUSB8041 4-Port Hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
Only PCIe DTS:
&serdes_wiz3 { /* PCIe config */ lane0-mode = <PHY_TYPE_PCIE>; lane1-mode = <PHY_TYPE_PCIE>; }; &serdes3 { /* serdes3 PCIe config */ serdes3_pcie_link: link@0 { reg = <0>; cdns,num-lanes = <2>; #phy-cells = <0>; cdns,phy-type = <PHY_TYPE_PCIE>; resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>; }; }; &serdes_ln_ctrl { idle-states = <SERDES0_LANE0_PCIE0_LANE0>, <SERDES0_LANE1_PCIE0_LANE1>, <SERDES1_LANE0_PCIE1_LANE0>, <SERDES1_LANE1_PCIE1_LANE1>, <SERDES2_LANE0_PCIE2_LANE0>, <SERDES2_LANE1_PCIE2_LANE1>, <SERDES3_LANE0_PCIE3_LANE0>, <SERDES3_LANE1_PCIE3_LANE1>, <SERDES4_LANE0_EDP_LANE0>, <SERDES4_LANE1_EDP_LANE1>, <SERDES4_LANE2_EDP_LANE2>, <SERDES4_LANE3_EDP_LANE3>; };
In this case we have PCIe3 active but no USB3.0
DTS for both USB3.0 and PCIe3 controller:
&serdes_wiz3 { lane0-mode = <PHY_TYPE_PCIE>; lane1-mode = <PHY_TYPE_USB3>; }; /* * lane<0> -> 10G * lane<1> -> USB3.0 hub */ &serdes3 { serdes3_usb_link: link@0 { reg = <1>; cdns,num-lanes = <1>; #phy-cells = <0>; cdns,phy-type = <PHY_TYPE_USB3>; resets = <&serdes_wiz3 2>; }; serdes3_pcie_link: link@0 { reg = <0>; cdns,num-lanes = <1>; #phy-cells = <0>; cdns,phy-type = <PHY_TYPE_PCIE>; resets = <&serdes_wiz3 1>>; }; }; &serdes_ln_ctrl { idle-states = <SERDES0_LANE0_PCIE0_LANE0>, <SERDES0_LANE1_PCIE0_LANE1>, <SERDES1_LANE0_PCIE1_LANE0>, <SERDES1_LANE1_PCIE1_LANE1>, <SERDES2_LANE0_PCIE2_LANE0>, <SERDES2_LANE1_PCIE2_LANE1>, <SERDES3_LANE0_PCIE3_LANE0>, <SERDES3_LANE1_USB3_0>, <SERDES4_LANE0_EDP_LANE0>, <SERDES4_LANE1_EDP_LANE1>, <SERDES4_LANE2_EDP_LANE2>, <SERDES4_LANE3_EDP_LANE3>; }; &pcie3_rc { phys = <&serdes3_pcie_link>; phy-names = "pcie_phy"; num-lanes = <1>; }; &usb0 { dr_mode = "otg"; maximum-speed = "super-speed"; phys = <&serdes3_usb_link>; phy-names = "cdns3,usb3-phy"; };
With this configuration our Linux is still booting but at the end we have an xhci_hcd driver error reported regarding usb.
[ 29.972083] xhci-hcd xhci-hcd.0.auto: can't setup: -110 [ 29.977307] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered [ 29.983007] xhci-hcd: probe of xhci-hcd.0.auto failed with error -110 [ 29.989551] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller [ 29.995046] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1 [ 30.002825] xhci-hcd xhci-hcd.1.auto: hcc params 0x200073c9 hci version 0x100 quirks 0x0000000000010010 [ 30.012234] xhci-hcd xhci-hcd.1.auto: irq 624, io mem 0x06410000 [ 30.018383] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 [ 30.026639] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 30.033853] usb usb1: Product: xHCI Host Controller [ 30.038722] usb usb1: Manufacturer: Linux 5.4.74-g9574bba32a xhci-hcd [ 30.045151] usb usb1: SerialNumber: xhci-hcd.1.auto [ 30.050273] hub 1-0:1.0: USB hub found [ 30.054057] hub 1-0:1.0: 1 port detected [ 30.058187] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller [ 30.063678] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2 [ 30.071333] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed [ 30.077881] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 30.086004] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04 [ 30.094258] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 30.101467] usb usb2: Product: xHCI Host Controller [ 30.106336] usb usb2: Manufacturer: Linux 5.4.74-g9574bba32a xhci-hcd [ 30.112764] usb usb2: SerialNumber: xhci-hcd.1.auto [ 30.117857] hub 2-0:1.0: USB hub found [ 30.121623] hub 2-0:1.0: 1 port detected root@j7-evm:~# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
We can also see all 4 PCIe controllers with lspci command.
Are we doing something wrong with our DTS configuration in case of Serdes3?
Best regards,
Ogi.