@@ -15,10 +15,11 @@ controller instance and each host will enumerate the other host as an
1515independent function.
1616
1717PCIe 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.
18+ other. Though |__PART_FAMILY_DEVICE_NAMES__ | doesn't have an explicit NTB
19+ controller, NTB functionality can be achieved using multiple endpoint controller
20+ instances. And for PCIe backplane (to connect more than 2 hosts), aggregation of
21+ NTB controllers can be modeled using multiple instances of multi-function
22+ endpoint controller.
2223
2324In the below diagram, PCI NTB function configures the SoC with multiple
2425PCIe Endpoint (EP) instances in such a way that transaction from one EP
@@ -63,6 +64,12 @@ the endpoint side NTB architecture.
6364The following picture shows J721E EVM connected to two DRA7 EVMs. Here the two
6465DRA7x boards communicate with each other using J721E as backplane.
6566
67+ .. ifconfig :: CONFIG_part_variant in ('J784S4','J742S2')
68+
69+ Similarly, |__PART_FAMILY_DEVICE_NAMES__ | can be connected to two hosts, who
70+ can communicate with each other using |__PART_FAMILY_DEVICE_NAMES__ |
71+ as backplane.
72+
6673.. Image :: /images/j721e-backplane.jpg
6774
6875
@@ -71,21 +78,38 @@ DRA7x boards communicate with each other using J721E as backplane.
7178
7279.. rubric :: *Backplane DTS Overlay File*
7380
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 :
81+ The following DTS overlay files configure both the PCIe controller in EP mode
82+ required for NTB functionality :
7683
77- ::
84+ .. ifconfig :: CONFIG_part_variant in ('J784S4','J742S2')
85+
86+ ::
7887
79- arch/arm64/boot/dts/ti/k3-j721e-pcie-backplane .dtso
88+ arch/arm64/boot/dts/ti/k3-j784s4-evm-pcie0-pcie1-ep .dtso
8089
81- In order to apply the dts overlay file, the following command should be given
90+ .. ifconfig :: CONFIG_part_variant not in ('J784S4','J742S2')
91+
92+ ::
93+
94+ arch/arm64/boot/dts/ti/k3-j721e-evm-pcie0-ep.dtso
95+ arch/arm64/boot/dts/ti/k3-j721e-evm-pcie1-ep.dtso
96+
97+ In order to apply the dts overlay files, the following command should be given
8298in u-boot prompt:
8399
84- ::
100+ .. ifconfig :: CONFIG_part_variant in ('J784S4','J742S2')
101+
102+ ::
103+
104+ #setenv name_overlays ti/k3-j784s4-evm-pcie0-pcie1-ep.dtbo
105+
106+ .. ifconfig :: CONFIG_part_variant not in ('J784S4','J742S2')
107+
108+ ::
85109
86- #setenv name_overlays ti/k3-j721e-pcie-backplane .dtbo
110+ #setenv name_overlays ti/k3-j721e-evm-pcie0-ep.dtbo ti/k3-j721e-evm-pcie1-ep .dtbo
87111
88- .. rubric :: *EP Side Configuration (J721E Backplane)*
112+ .. rubric :: *EP Side Configuration (Backplane)*
89113 :name: ep-side-configuration
90114
91115.. rubric :: **Dip switch settings**
@@ -100,9 +124,9 @@ in u-boot prompt:
100124 Both PCIe instances should be configured in EP mode by setting
101125 PCIE_1L_MODE_SEL (switch 5) and PCIE_2L_MODE_SEL (switch 6) in sw3 to '1'.
102126
103- .. rubric :: **8.x SDK (5.10 Kernel) **
127+ .. rubric :: **EP Backplane Configuration Steps **
104128
105- The following set of steps is required only for 5.10 Kernel
129+ The following steps are required to configure the PCIe endpoints as a backplane:
106130
107131 .. rubric :: Creating pci-epf-ntb device
108132
@@ -111,6 +135,7 @@ The following set of steps is required only for 5.10 Kernel
111135
112136 ::
113137
138+ # modprobe pci_epf_ntb
114139 # mount -t configfs none /sys/kernel/config
115140 # cd /sys/kernel/config/pci_ep/
116141 # mkdir functions/pci_epf_ntb/func1
@@ -151,15 +176,8 @@ The following set of steps is required only for 5.10 Kernel
151176 # echo 0x104c > functions/pci_epf_ntb/func1/vendorid
152177 # echo 0xb00d > functions/pci_epf_ntb/func1/deviceid
153178
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
179+ The NTB function driver also populates func1/pci_epf_ntb.0 directory with
180+ various attributes that can be configured by the user
163181
164182 ::
165183
@@ -188,13 +206,13 @@ The following set of steps is required only for 5.10 Kernel
188206
189207 ::
190208
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
209+ # ln -s controllers/2900000.pcie-ep/ functions/pci_epf_ntb /func1/primary
210+ # ln -s controllers/2910000.pcie-ep/ functions/pci_epf_ntb /func1/secondary
193211
194212 Once the above step is completed, both the PCI endpoint controllers are ready to
195213 establish a link with the host.
196214
197- .. rubric :: Start the Link: 7.x and 8.x SDK (5.4 and 5.10 Kernel)
215+ .. rubric :: Start the Link:
198216
199217 In order for the endpoint device to establish a link with the host, the _start_
200218 field should be populated with '1'. For NTB, both the PCI endpoint controllers
@@ -205,9 +223,6 @@ The following set of steps is required only for 5.10 Kernel
205223 # echo 1 > controllers/2900000.pcie-ep/start
206224 # echo 1 > controllers/2910000.pcie-ep/start
207225
208- (PCIe2 can also be configured for NTB, but that is not
209- tested yet).
210-
211226.. rubric :: *RC Side Configuration*
212227 :name: rc-side-configuration
213228
@@ -221,6 +236,7 @@ existing driver.
221236
222237::
223238
239+ modprobe ntb_hw_epf
224240 echo 0000:01:00.0 > /sys/bus/pci/devices/0000\:01\:00.0/driver/unbind
225241
226242After unbinding from existing driver, it should be bound to ntb_hw_epf driver.
@@ -241,14 +257,14 @@ hosts.
241257.. rubric :: **Kernel Configs**
242258 :name: kernel-configs
243259
244- .. rubric :: *EP Side (J721E Backplane)*
260+ .. rubric :: *EP Side (Backplane)*
245261 :name: ep-side-configs
246262
247263::
248264
249265 CONFIG_PCI_ENDPOINT=y
250266 CONFIG_PCI_ENDPOINT_CONFIGFS=y
251- CONFIG_PCI_EPF_NTB=y
267+ CONFIG_PCI_EPF_NTB=m
252268 CONFIG_PCI_J721E=y
253269 CONFIG_PCIE_CADENCE=y
254270 CONFIG_PCIE_CADENCE_EP=y
@@ -274,5 +290,5 @@ For additional information, please refer to:
274290
275291::
276292
277- <Processor_SDK_install_dir>/board-support/linux-[ver]/Documentation/PCI/endpoint/pci-test- ntb.txt
293+ <Processor_SDK_install_dir>/board-support/linux-[ver]/Documentation/PCI/endpoint/pci-ntb-function.rst
278294
0 commit comments