@@ -14,11 +14,11 @@ endpoint controller. Each host should be connected to a separate endpoint
1414controller instance and each host will enumerate the other host as an
1515independent function.
1616
17- PCIe uses NTB (non transparent bridge ) for two hosts to communicate with each
18- other. Though J721E doesn't have an explicit NTB controller, NTB functionality
19- can be achieved using multiple endpoint controller instances. And for PCIe
20- backplane (to connect more than 2 hosts), aggregation of NTB controllers
21- can be modeled using multiple instances of multi-function endpoint controller .
17+ PCIe uses Non Transparent Bridge (NTB ) for two hosts to communicate with each
18+ other. Though | __PART_FAMILY_DEVICE_NAMES__ | does not have an explicit NTB
19+ controller, multiple endpoint controller instances offer NTB functionality.
20+ For PCIe backplane (to connect more than 2 hosts), multiple instances of
21+ multi-function endpoint controller create the aggregation of NTB controllers .
2222
2323In the below diagram, PCI NTB function configures the SoC with multiple
2424PCIe Endpoint (EP) instances in such a way that transaction from one EP
@@ -63,6 +63,12 @@ the endpoint side NTB architecture.
6363The following picture shows J721E EVM connected to two DRA7 EVMs. Here the two
6464DRA7x boards communicate with each other using J721E as backplane.
6565
66+ .. ifconfig :: CONFIG_part_variant in ('J784S4','J742S2')
67+
68+ Similarly, you can connect |__PART_FAMILY_DEVICE_NAMES__ | to two hosts, who
69+ can communicate with each other using |__PART_FAMILY_DEVICE_NAMES__ |
70+ as backplane.
71+
6672.. Image :: /images/j721e-backplane.jpg
6773
6874
@@ -71,21 +77,33 @@ DRA7x boards communicate with each other using J721E as backplane.
7177
7278.. rubric :: *Backplane DTS Overlay File*
7379
74- The following DTS overlay file configures the PCIe controller in EP mode and
75- also contains a device tree node to create a NTB function device :
80+ The following device tree overlay files configure both the PCIe controller in EP mode
81+ required for NTB functionality :
7682
77- ::
83+ .. ifconfig :: CONFIG_part_variant in ('J784S4','J742S2')
7884
79- arch/arm64/boot/dts/ti/k3-j721e-pcie-backplane .dtso
85+ * :file: ` arch/arm64/boot/dts/ti/k3-j784s4-evm-pcie0-pcie1-ep .dtso `
8086
81- In order to apply the dts overlay file, the following command should be given
82- in u-boot prompt:
87+ .. ifconfig :: CONFIG_part_variant not in ('J784S4','J742S2')
8388
84- ::
89+ * :file: `arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso `
90+ * :file: `arch/arm64/boot/dts/ti/k3-j721e-evm-pcie1-ep.dtso `
91+
92+ To apply the device tree overlay files, run the following command in the u-boot prompt:
93+
94+ .. ifconfig :: CONFIG_part_variant in ('J784S4','J742S2')
8595
86- #setenv name_overlays ti/k3-j721e-pcie-backplane.dtbo
96+ .. code-block :: console
8797
88- .. rubric :: *EP Side Configuration (J721E Backplane)*
98+ setenv name_overlays ti/k3-j784s4-evm-pcie0-pcie1-ep.dtbo
99+
100+ .. ifconfig :: CONFIG_part_variant not in ('J784S4','J742S2')
101+
102+ .. code-block :: console
103+
104+ setenv name_overlays ti/k3-j721e-evm-pcie0-ep.dtbo ti/k3-j721e-evm-pcie1-ep.dtbo
105+
106+ .. rubric :: *EP Side Configuration (Backplane)*
89107 :name: ep-side-configuration
90108
91109.. rubric :: **Dip switch settings**
@@ -100,9 +118,9 @@ in u-boot prompt:
100118 Both PCIe instances should be configured in EP mode by setting
101119 PCIE_1L_MODE_SEL (switch 5) and PCIE_2L_MODE_SEL (switch 6) in sw3 to '1'.
102120
103- .. rubric :: **8.x SDK (5.10 Kernel) **
121+ .. rubric :: **EP Backplane Configuration Steps **
104122
105- The following set of steps is required only for 5.10 Kernel
123+ Follow these steps to configure the PCIe endpoints as a backplane:
106124
107125 .. rubric :: Creating pci-epf-ntb device
108126
@@ -111,6 +129,7 @@ The following set of steps is required only for 5.10 Kernel
111129
112130 ::
113131
132+ # modprobe pci_epf_ntb
114133 # mount -t configfs none /sys/kernel/config
115134 # cd /sys/kernel/config/pci_ep/
116135 # mkdir functions/pci_epf_ntb/func1
@@ -151,15 +170,8 @@ The following set of steps is required only for 5.10 Kernel
151170 # echo 0x104c > functions/pci_epf_ntb/func1/vendorid
152171 # echo 0xb00d > functions/pci_epf_ntb/func1/deviceid
153172
154- In order to configure NTB specific attributes, a new sub-directory to func1
155- should be created
156-
157- ::
158-
159- # mkdir functions/pci_epf_ntb/func1/pci_epf_ntb.0/
160-
161- The NTB function driver will populate this directory with various attributes
162- that can be configured by the user
173+ The NTB function driver also populates :file: `func1/pci_epf_ntb.0 ` directory with
174+ various attributes that can be configured by the user
163175
164176 ::
165177
@@ -188,13 +200,13 @@ The following set of steps is required only for 5.10 Kernel
188200
189201 ::
190202
191- # ln -s controllers/2900000.pcie-ep/ functions/pci-epf-ntb /func1/primary
192- # ln -s controllers/2910000.pcie-ep/ functions/pci-epf-ntb /func1/secondary
203+ # ln -s controllers/2900000.pcie-ep/ functions/pci_epf_ntb /func1/primary
204+ # ln -s controllers/2910000.pcie-ep/ functions/pci_epf_ntb /func1/secondary
193205
194206 Once the above step is completed, both the PCI endpoint controllers are ready to
195207 establish a link with the host.
196208
197- .. rubric :: Start the Link: 7.x and 8.x SDK (5.4 and 5.10 Kernel)
209+ .. rubric :: Start the Link:
198210
199211 In order for the endpoint device to establish a link with the host, the _start_
200212 field should be populated with '1'. For NTB, both the PCI endpoint controllers
@@ -205,9 +217,6 @@ The following set of steps is required only for 5.10 Kernel
205217 # echo 1 > controllers/2900000.pcie-ep/start
206218 # echo 1 > controllers/2910000.pcie-ep/start
207219
208- (PCIe2 can also be configured for NTB, but that is not
209- tested yet).
210-
211220.. rubric :: *RC Side Configuration*
212221 :name: rc-side-configuration
213222
@@ -221,6 +230,7 @@ existing driver.
221230
222231::
223232
233+ modprobe ntb_hw_epf
224234 echo 0000:01:00.0 > /sys/bus/pci/devices/0000\:01\:00.0/driver/unbind
225235
226236After unbinding from existing driver, it should be bound to ntb_hw_epf driver.
@@ -241,14 +251,14 @@ hosts.
241251.. rubric :: **Kernel Configs**
242252 :name: kernel-configs
243253
244- .. rubric :: *EP Side (J721E Backplane)*
254+ .. rubric :: *EP Side (Backplane)*
245255 :name: ep-side-configs
246256
247257::
248258
249259 CONFIG_PCI_ENDPOINT=y
250260 CONFIG_PCI_ENDPOINT_CONFIGFS=y
251- CONFIG_PCI_EPF_NTB=y
261+ CONFIG_PCI_EPF_NTB=m
252262 CONFIG_PCI_J721E=y
253263 CONFIG_PCIE_CADENCE=y
254264 CONFIG_PCIE_CADENCE_EP=y
@@ -274,5 +284,5 @@ For additional information, please refer to:
274284
275285::
276286
277- <Processor_SDK_install_dir>/board-support/linux-[ver]/Documentation/PCI/endpoint/pci-test- ntb.txt
287+ <Processor_SDK_install_dir>/board-support/linux-[ver]/Documentation/PCI/endpoint/pci-ntb-function.rst
278288
0 commit comments