Skip to content

Commit 8a7cbf2

Browse files
committed
fix(linux): Enhance PCIe Backplane documentation for multiple SoCs
Improve the PCIe backplane documentation to accommodate information for all the supported SoCs (J721E, J784S4, J742S2). Update the DTB overlay file used to test the backplane functionality. Signed-off-by: Aksh Garg <a-garg7@ti.com>
1 parent 9810762 commit 8a7cbf2

1 file changed

Lines changed: 44 additions & 33 deletions

File tree

source/linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_Backplane.rst

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ endpoint controller. Each host should be connected to a separate endpoint
1414
controller instance and each host will enumerate the other host as an
1515
independent 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 NTB (Non Transparent Bridge) 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 provide 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

2323
In the below diagram, PCI NTB function configures the SoC with multiple
2424
PCIe Endpoint (EP) instances in such a way that transaction from one EP
@@ -63,6 +63,12 @@ the endpoint side NTB architecture.
6363
The following picture shows J721E EVM connected to two DRA7 EVMs. Here the two
6464
DRA7x boards communicate with each other using J721E as backplane.
6565

66+
.. ifconfig:: CONFIG_part_variant in ('J784S4','J742S2')
67+
68+
Similarly, |__PART_FAMILY_DEVICE_NAMES__| can be connected 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,34 @@ 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 DTS 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
87+
.. ifconfig:: CONFIG_part_variant not in ('J784S4','J742S2')
88+
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+
In order to apply the dts overlay files, the following command should be given
8293
in u-boot prompt:
8394

84-
::
95+
.. ifconfig:: CONFIG_part_variant in ('J784S4','J742S2')
8596

86-
#setenv name_overlays ti/k3-j721e-pcie-backplane.dtbo
97+
.. code-block:: console
8798
88-
.. rubric:: *EP Side Configuration (J721E Backplane)*
99+
setenv name_overlays ti/k3-j784s4-evm-pcie0-pcie1-ep.dtbo
100+
101+
.. ifconfig:: CONFIG_part_variant not in ('J784S4','J742S2')
102+
103+
.. code-block:: console
104+
105+
setenv name_overlays ti/k3-j721e-evm-pcie0-ep.dtbo ti/k3-j721e-evm-pcie1-ep.dtbo
106+
107+
.. rubric:: *EP Side Configuration (Backplane)*
89108
:name: ep-side-configuration
90109

91110
.. rubric:: **Dip switch settings**
@@ -100,9 +119,9 @@ in u-boot prompt:
100119
Both PCIe instances should be configured in EP mode by setting
101120
PCIE_1L_MODE_SEL (switch 5) and PCIE_2L_MODE_SEL (switch 6) in sw3 to '1'.
102121

103-
.. rubric:: **8.x SDK (5.10 Kernel)**
122+
.. rubric:: **EP Backplane Configuration Steps**
104123

105-
The following set of steps is required only for 5.10 Kernel
124+
The following steps are required to configure the PCIe endpoints as a backplane:
106125

107126
.. rubric:: Creating pci-epf-ntb device
108127

@@ -111,6 +130,7 @@ The following set of steps is required only for 5.10 Kernel
111130

112131
::
113132

133+
# modprobe pci_epf_ntb
114134
# mount -t configfs none /sys/kernel/config
115135
# cd /sys/kernel/config/pci_ep/
116136
# mkdir functions/pci_epf_ntb/func1
@@ -151,15 +171,8 @@ The following set of steps is required only for 5.10 Kernel
151171
# echo 0x104c > functions/pci_epf_ntb/func1/vendorid
152172
# echo 0xb00d > functions/pci_epf_ntb/func1/deviceid
153173

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
174+
The NTB function driver also populates func1/pci_epf_ntb.0 directory with
175+
various attributes that can be configured by the user
163176

164177
::
165178

@@ -188,13 +201,13 @@ The following set of steps is required only for 5.10 Kernel
188201

189202
::
190203

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
204+
# ln -s controllers/2900000.pcie-ep/ functions/pci_epf_ntb/func1/primary
205+
# ln -s controllers/2910000.pcie-ep/ functions/pci_epf_ntb/func1/secondary
193206

194207
Once the above step is completed, both the PCI endpoint controllers are ready to
195208
establish a link with the host.
196209

197-
.. rubric:: Start the Link: 7.x and 8.x SDK (5.4 and 5.10 Kernel)
210+
.. rubric:: Start the Link:
198211

199212
In order for the endpoint device to establish a link with the host, the _start_
200213
field should be populated with '1'. For NTB, both the PCI endpoint controllers
@@ -205,9 +218,6 @@ The following set of steps is required only for 5.10 Kernel
205218
# echo 1 > controllers/2900000.pcie-ep/start
206219
# echo 1 > controllers/2910000.pcie-ep/start
207220

208-
(PCIe2 can also be configured for NTB, but that is not
209-
tested yet).
210-
211221
.. rubric:: *RC Side Configuration*
212222
:name: rc-side-configuration
213223

@@ -221,6 +231,7 @@ existing driver.
221231

222232
::
223233

234+
modprobe ntb_hw_epf
224235
echo 0000:01:00.0 > /sys/bus/pci/devices/0000\:01\:00.0/driver/unbind
225236

226237
After unbinding from existing driver, it should be bound to ntb_hw_epf driver.
@@ -241,14 +252,14 @@ hosts.
241252
.. rubric:: **Kernel Configs**
242253
:name: kernel-configs
243254

244-
.. rubric:: *EP Side (J721E Backplane)*
255+
.. rubric:: *EP Side (Backplane)*
245256
:name: ep-side-configs
246257

247258
::
248259

249260
CONFIG_PCI_ENDPOINT=y
250261
CONFIG_PCI_ENDPOINT_CONFIGFS=y
251-
CONFIG_PCI_EPF_NTB=y
262+
CONFIG_PCI_EPF_NTB=m
252263
CONFIG_PCI_J721E=y
253264
CONFIG_PCIE_CADENCE=y
254265
CONFIG_PCIE_CADENCE_EP=y
@@ -274,5 +285,5 @@ For additional information, please refer to:
274285

275286
::
276287

277-
<Processor_SDK_install_dir>/board-support/linux-[ver]/Documentation/PCI/endpoint/pci-test-ntb.txt
288+
<Processor_SDK_install_dir>/board-support/linux-[ver]/Documentation/PCI/endpoint/pci-ntb-function.rst
278289

0 commit comments

Comments
 (0)