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.

[参考译文] J784S4XEVM:在4x 中启用 J784S4 PCIe1端口

Guru**** 2387080 points
Other Parts Discussed in Thread: J784S4XEVM
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1500116/j784s4xevm-enable-j784s4-pcie1-port-in-4x

器件型号:J784S4XEVM

工具/软件:

您好:  

我们尝试使 J784S4 EVM 的两个 PCIe 端口都能在4x 中工作、但遗憾的是、我们无法 ATM。

此处的设置:

  • 2个 J784S4XEVM:
    • 第一个(EVM #A)在 RC 中配置了两个 PCIe 端口。
    • 第二个(EVM #B)在 EP 中配置了两个 PCIe 端口。
  • EVM #A 端口1之间的一个线束连接到 EVM #B 端口0。
  • SW11设置为100000010。
  • SW7设置为00000000。

  • SW2设置为100001101。 (RC 中的两个 PCIe 端口)。

  • Linux SDK 版本:10.01.00.05

在 EVM #A 上进行硬件修改以避免使用 USB、但应改为使用2个 PCIe 通道:

  • 组装的组件:
    • C696、C697。
    • C683、C684。
    • R891、R892。
    • R876、R877。
    • R168、R169。
    • C125、C129。

  • 未组装的元件:
    • C694、C695。
    • C679、C680。
    • R885、R886。
    • R867、R868。
    • R170、R171。
    • R152、R155。

软件修改:

  • k3-j784s4-evm.dts:

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
index 56a037532..dd92863be 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
@@ -13,7 +13,7 @@
 
 / {
 	compatible = "ti,j784s4-evm", "ti,j784s4";
-	model = "Texas Instruments J784S4 EVM";
+	model = "Texas Instruments J784S4 EVM (PCIe1 4X)";
 
 	chosen {
 		stdout-path = "serial2:115200n8";
@@ -458,13 +458,6 @@ J784S4_IOPAD(0x010, PIN_INPUT_PULLUP, 8) /* (AH33) MCAN13_RX.I2C4_SDA */
 		>;
 	};
 
-	main_usbss0_pins_default: main-usbss0-default-pins {
-		bootph-all;
-		pinctrl-single,pins = <
-			J784S4_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AN37) TIMER_IO1.USB0_DRVVBUS */
-		>;
-	};
-
 	main_mcan4_pins_default: main-mcan4-default-pins {
 		pinctrl-single,pins = <
 			J784S4_IOPAD(0x088, PIN_INPUT, 0) /* (AF36) MCAN4_RX */
@@ -1372,40 +1365,6 @@ &dss {
 				 <&k3_clks 218 22>;
 };
 
-&serdes0 {
-	status = "okay";
-
-	serdes0_usb_link: phy@3 {
-		reg = <3>;
-		cdns,num-lanes = <1>;
-		#phy-cells = <0>;
-		cdns,phy-type = <PHY_TYPE_USB3>;
-		resets = <&serdes_wiz0 4>;
-	};
-};
-
-&serdes_wiz0 {
-	status = "okay";
-};
-
-&usb_serdes_mux {
-	idle-states = <0>; /* USB0 to SERDES lane 3 */
-};
-
-&usbss0 {
-	status = "okay";
-	pinctrl-0 = <&main_usbss0_pins_default>;
-	pinctrl-names = "default";
-	ti,vbus-divider;
-};
-
-&usb0 {
-	dr_mode = "otg";
-	maximum-speed = "super-speed";
-	phys = <&serdes0_usb_link>;
-	phy-names = "cdns3,usb3-phy";
-};
-
 &serdes_wiz4 {
 	status = "okay";
 };

  • k3-j784s4-main.dtsi:

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
index 105a8fd39..69e7e5a6d 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi
@@ -159,8 +159,8 @@ serdes_ln_ctrl: mux-controller@4080 {
 					<0x28 0x3>, <0x2c 0x3>; /* SERDES2 lane2/3 select */
 			idle-states = <J784S4_SERDES0_LANE0_PCIE1_LANE0>,
 				      <J784S4_SERDES0_LANE1_PCIE1_LANE1>,
-				      <J784S4_SERDES0_LANE2_IP3_UNUSED>,
-				      <J784S4_SERDES0_LANE3_USB>,
+				      <J784S4_SERDES0_LANE2_PCIE1_LANE2>,
+				      <J784S4_SERDES0_LANE3_PCIE1_LANE3>,
 				      <J784S4_SERDES1_LANE0_PCIE0_LANE0>,
 				      <J784S4_SERDES1_LANE1_PCIE0_LANE1>,
 				      <J784S4_SERDES1_LANE2_PCIE0_LANE2>,

下面是我们启用 EVM #B 后获得的结果:

和链接大写和状态:

我们遗漏了什么?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [报价 userid="638713" url="~/support/processors-group/processors/f/processors-forum/1500116/j784s4xevm-enable-j784s4-pcie1-port-in-4x
    • 组装的组件:
      • C696、C697。
      • C683、C684。
      • R891、R892。
      • R876、R877。
      • R168、R169。
      • C125、C129。

    • 未组装的元件:
      • C694、C695。
      • C679、C680。
      • R885、R886。
      • R867、R868。
      • R170、R171。
      • R152、R155。
    [/报价]

    此器件错误、我调换了未组装/已组装的元件。 以下是 th 正确版本:

    • 未组装 组件:
      • C696、C697。
      • C683、C684。
      • R891、R892。
      • R876、R877。
      • R168、R169。
      • C125、C129。

    • 已填充 组件:
      • C694、C695。
      • C679、C680。
      • R885、R886。
      • R867、R868。
      • R170、R171。
      • R152、R155。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Cedric:

    您能否从"dmesg"发送整个日志? 长度有点长、但我可以解析它以查看哪个 PCIe 端口作为2个通道出现。

    然而、就我目前所看到的情况而言:

    1. SERDES_ln_ctrl 看起来正确
    2. 删除 USB 节点看起来是正确的
    3. serdes0节点需要进行一些更改、以便以前用于 USB 的通道现在用于 PCIe
    4. pcie1_RC 节点将需要更改4个通道的数字通道

    下面的补丁 应该修复第3点和第4点:

    e2e.ti.com/.../0001_2D00_PCIe_2D00_x4_2D00_lane_2D00_changes_2D00_for_2D00_PCIe1.patch

    我还没有检查硬件更改、但尝试在软件中执行上述更改、并告诉我是否可以修复这些更改。 如果它没有修复、那么我还将查看原理图、以防问题与硬件相关。

    此致、

    Takuma

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Takuma:

    我会尽快提供内核日志。 无论如何,我确实尝试了你在写这篇文章之前展示的补丁:

    也把 serdes0通道4 ,但不幸的是它没有改变。

    我将以最快的速度返回。

    Cedric

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    刚刚尝试了您的补丁、我们方面更糟糕:

    以下是 dmesg 日志(仅限 PCIe 器件):

    root@j784s4-evm:~# dmesg | grep pci
    [    2.140232] j721e-pcie 2900000.pcie: host bridge /bus@100000/pcie@2900000 ranges:
    [    2.147717] j721e-pcie 2900000.pcie: Parsing ranges property...
    [    2.153635] j721e-pcie 2900000.pcie:       IO 0x0010001000..0x0010010fff -> 0x0010001000
    [    2.161716] j721e-pcie 2900000.pcie:      MEM 0x0010011000..0x0017ffffff -> 0x0010011000
    [    2.169793] j721e-pcie 2900000.pcie: Parsing dma-ranges property...
    [    2.176049] j721e-pcie 2900000.pcie:   IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000
    [    2.394526] j721e-pcie 2900000.pcie: Link up
    [    2.399129] j721e-pcie 2900000.pcie: PCI host bridge to bus 0000:00
    [    2.405390] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    2.410863] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x10001000-0x10010fff])
    [    2.420323] pci_bus 0000:00: root bus resource [mem 0x10011000-0x17ffffff]
    [    2.427183] pci_bus 0000:00: scanning bus
    [    2.431204] pci 0000:00:00.0: [104c:b012] type 01 class 0x060400
    [    2.437200] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
    [    2.446941] pci 0000:00:00.0: supports D1
    [    2.450940] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    [    2.456675] pci 0000:00:00.0: PME# disabled
    [    2.461011] pci 0000:00:00.0: vgaarb: pci_notify
    [    2.467395] pci_bus 0000:00: fixups for bus
    [    2.471572] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
    [    2.478258] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
    [    2.486249] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
    [    2.492983] pci_bus 0000:01: scanning bus
    [    2.498016] pci 0000:01:00.0: [10ee:9034] type 00 class 0x058000
    [    2.504606] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
    [    2.511702] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
    [    2.518943] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x001fffff]
    [    2.532764] pci 0000:01:00.0: vgaarb: pci_notify
    [    2.538057] pci_bus 0000:01: fixups for bus
    [    2.542229] pci_bus 0000:01: bus scan returning with max=01
    [    2.547794] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
    [    2.554399] pci_bus 0000:00: bus scan returning with max=01
    [    2.559969] pci 0000:00:00.0: BAR 14: assigned [mem 0x10100000-0x104fffff]
    [    2.566830] pci 0000:01:00.0: BAR 2: assigned [mem 0x10200000-0x103fffff]
    [    2.575567] pci 0000:01:00.0: BAR 0: assigned [mem 0x10100000-0x101fffff]
    [    2.582808] pci 0000:01:00.0: BAR 1: assigned [mem 0x10400000-0x1040ffff]
    [    2.589661] pci 0000:00:00.0: PCI bridge to [bus 01]
    [    2.594615] pci 0000:00:00.0:   bridge window [mem 0x10100000-0x104fffff]
    [    2.601441] pcieport 0000:00:00.0: vgaarb: pci_notify
    [    2.606493] pcieport 0000:00:00.0: of_irq_parse_pci: failed with rc=-22
    [    2.613093] pcieport 0000:00:00.0: assign IRQ: got 0
    [    2.618051] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
    [    2.624144] pcieport 0000:00:00.0: enabling bus mastering
    [    2.629698] pcieport 0000:00:00.0: PME: Signaling with IRQ 490
    [    2.635722] pcieport 0000:00:00.0: AER: enabled with IRQ 490
    [    2.641411] pcieport 0000:00:00.0: save config 0x00: 0xb012104c
    [    2.647319] pcieport 0000:00:00.0: save config 0x04: 0x00100406
    [    2.653224] pcieport 0000:00:00.0: save config 0x08: 0x06040000
    [    2.659129] pcieport 0000:00:00.0: save config 0x0c: 0x00010000
    [    2.665034] pcieport 0000:00:00.0: save config 0x10: 0x00000000
    [    2.670939] pcieport 0000:00:00.0: save config 0x14: 0x00000000
    [    2.676844] pcieport 0000:00:00.0: save config 0x18: 0x00010100
    [    2.682749] pcieport 0000:00:00.0: save config 0x1c: 0x000001f1
    [    2.688654] pcieport 0000:00:00.0: save config 0x20: 0x10401010
    [    2.694559] pcieport 0000:00:00.0: save config 0x24: 0x0001fff1
    [    2.700463] pcieport 0000:00:00.0: save config 0x28: 0x00000000
    [    2.706368] pcieport 0000:00:00.0: save config 0x2c: 0x00000000
    [    2.712273] pcieport 0000:00:00.0: save config 0x30: 0x00000000
    [    2.718177] pcieport 0000:00:00.0: save config 0x34: 0x00000080
    [    2.724082] pcieport 0000:00:00.0: save config 0x38: 0x00000000
    [    2.729987] pcieport 0000:00:00.0: save config 0x3c: 0x00020100
    [    2.735939] pcieport 0000:00:00.0: vgaarb: pci_notify
    [    2.741182] j721e-pcie 2910000.pcie: host bridge /bus@100000/pcie@2910000 ranges:
    [    2.748658] j721e-pcie 2910000.pcie: Parsing ranges property...
    [    2.754571] j721e-pcie 2910000.pcie:       IO 0x0018001000..0x0018010fff -> 0x0018001000
    [    2.762653] j721e-pcie 2910000.pcie:      MEM 0x0018011000..0x001fffffff -> 0x0018011000
    [    2.770727] j721e-pcie 2910000.pcie: Parsing dma-ranges property...
    [    2.776984] j721e-pcie 2910000.pcie:   IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000
    [    2.994520] j721e-pcie 2910000.pcie: Link up
    [    2.998853] j721e-pcie 2910000.pcie: PCI host bridge to bus 0001:00
    [    3.005108] pci_bus 0001:00: root bus resource [bus 00-ff]
    [    3.010581] pci_bus 0001:00: root bus resource [io  0x10000-0x1ffff] (bus address [0x18001000-0x18010fff])
    [    3.020213] pci_bus 0001:00: root bus resource [mem 0x18011000-0x1fffffff]
    [    3.027072] pci_bus 0001:00: scanning bus
    [    3.031089] pci 0001:00:00.0: [104c:b012] type 01 class 0x060400
    [    3.037087] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
    [    3.046826] pci 0001:00:00.0: supports D1
    [    3.050824] pci 0001:00:00.0: PME# supported from D0 D1 D3hot
    [    3.056559] pci 0001:00:00.0: PME# disabled
    [    3.060875] pci 0001:00:00.0: vgaarb: pci_notify
    [    3.067282] pci_bus 0001:00: fixups for bus
    [    3.071456] pci 0001:00:00.0: scanning [bus 00-00] behind bridge, pass 0
    [    3.078141] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
    [    3.086133] pci 0001:00:00.0: scanning [bus 00-00] behind bridge, pass 1
    [    3.092870] pci_bus 0001:01: scanning bus
    [    3.096924] pci 0001:01:00.0: [10ee:9034] type 00 class 0x058000
    [    3.102956] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
    [    3.109227] pci 0001:01:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
    [    3.115496] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x001fffff]
    [    3.122140] pci 0001:01:00.0: 7.876 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x1 link at 0001:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
    [    3.137177] pci 0001:01:00.0: vgaarb: pci_notify
    [    3.141809] pci_bus 0001:01: fixups for bus
    [    3.145982] pci_bus 0001:01: bus scan returning with max=01
    [    3.151543] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
    [    3.158147] pci_bus 0001:00: bus scan returning with max=01
    [    3.163710] pci 0001:00:00.0: BAR 14: assigned [mem 0x18100000-0x184fffff]
    [    3.170572] pci 0001:01:00.0: BAR 2: assigned [mem 0x18200000-0x183fffff]
    [    3.177352] pci 0001:01:00.0: BAR 0: assigned [mem 0x18100000-0x181fffff]
    [    3.184131] pci 0001:01:00.0: BAR 1: assigned [mem 0x18400000-0x1840ffff]
    [    3.190910] pci 0001:00:00.0: PCI bridge to [bus 01]
    [    3.195865] pci 0001:00:00.0:   bridge window [mem 0x18100000-0x184fffff]
    [    3.202676] pcieport 0001:00:00.0: vgaarb: pci_notify
    [    3.207726] pcieport 0001:00:00.0: of_irq_parse_pci: failed with rc=-22
    [    3.214325] pcieport 0001:00:00.0: assign IRQ: got 0
    [    3.219280] pcieport 0001:00:00.0: enabling device (0000 -> 0002)
    [    3.225372] pcieport 0001:00:00.0: enabling bus mastering
    [    3.230911] pcieport 0001:00:00.0: PME: Signaling with IRQ 492
    [    3.236890] pcieport 0001:00:00.0: AER: enabled with IRQ 492
    [    3.242575] pcieport 0001:00:00.0: save config 0x00: 0xb012104c
    [    3.248483] pcieport 0001:00:00.0: save config 0x04: 0x00100406
    [    3.254387] pcieport 0001:00:00.0: save config 0x08: 0x06040000
    [    3.260292] pcieport 0001:00:00.0: save config 0x0c: 0x00010000
    [    3.266197] pcieport 0001:00:00.0: save config 0x10: 0x00000000
    [    3.272102] pcieport 0001:00:00.0: save config 0x14: 0x00000000
    [    3.278006] pcieport 0001:00:00.0: save config 0x18: 0x00010100
    [    3.283911] pcieport 0001:00:00.0: save config 0x1c: 0x000001f1
    [    3.289817] pcieport 0001:00:00.0: save config 0x20: 0x18401810
    [    3.295722] pcieport 0001:00:00.0: save config 0x24: 0x0001fff1
    [    3.301626] pcieport 0001:00:00.0: save config 0x28: 0x00000000
    [    3.307530] pcieport 0001:00:00.0: save config 0x2c: 0x00000000
    [    3.313435] pcieport 0001:00:00.0: save config 0x30: 0x00000000
    [    3.319340] pcieport 0001:00:00.0: save config 0x34: 0x00000080
    [    3.325244] pcieport 0001:00:00.0: save config 0x38: 0x00000000
    [    3.331149] pcieport 0001:00:00.0: save config 0x3c: 0x00020100
    [    3.337101] pcieport 0001:00:00.0: vgaarb: pci_notify
    
    

    告诉我是否足够或您是否需要完整的 dmesg 日志。

    此致、

    Cedric

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Cedric:

    您能否发送完整的 dmesg 日志?  

    到目前为止、观察到的行为非常奇怪。 例如:

    • 我在原始日志中看到、它是2个通道、但速度似乎会降级到每 通道2.5GT/s 的 PCIe 第1代速度。 如果您施加了软件限制或信号完整性、则可能会发生这种情况、但我怀疑第3代速度在最新日志中是可以实现的。
    • 原始日志还提到、链路能够以63Gb/s 的速度与8.0 GT x8链路连接。 如果 J784S4是 EP 和 RC、这也很奇怪、因为这两个器件都仅支持多达4个通道
    • 最新的 dmesg 日志以每通道8.0GT/s 的 PCIe Gen 3速度协商到1通道。 这看起来是最正常的日志、并不是所需的结果、因为只有1个通道正常

    PCIe 内核驱动程序中有一项检查、该检查在 触发时 将回退到1个通道。 这可能是在最新日志中以某种方式命中: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/pci/controller/cadence/pci-j721e.c?h=ti-linux-6.6.y#n514。 或者、它可能在串行器/解串器内核驱动程序中、因为我认为有类似的检查。 但无论如何,完整的 dmesg 日志可能会让我对正在发生的事情有更多的想法。

    此致、

    Takuma

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Takuma、

    今天上午我又做了一些测试、现在工作正常。

    硬件问题导致链路降级至1x。

    现在、我们将使2个 PCIe RC 链路在4倍的时间内正常运行:

    此致、

    Cedric

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Cedric:

    感谢您的更新。 很高兴听到它正在工作!

    此致、

    Takuma