Skip to content

Commit 5645056

Browse files
feat(linux): Add CPSW Proxy Client documentation for AM62PX
The CPSW3G instance of CPSW on the AM62P SoC supports Native Ethernet by default where Linux running on A53 configures CPSW3G. An alternative to this is that of CPSW3G being configured by Ethernet Switch Firmware (EthFw) running on R5. The CPSW Proxy Client driver in Linux interfaces with EthFw to enable Ethernet functionality in the alternate configuration. EthFw enables Ethernet traffic sharing among various cores on the SoC. Signed-off-by: Siddharth Vadapalli <[email protected]>
1 parent 63143fa commit 5645056

File tree

4 files changed

+72
-27
lines changed

4 files changed

+72
-27
lines changed

configs/AM62PX/AM62PX_linux_toc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/MCAN
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/MCRC64
5858
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-Ethernet
5959
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW3g
60+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSWng
61+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-Proxy-Client
6062
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-TSN
6163
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-PTP
6264
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-EST

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-Ethernet.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,25 @@ of the CPSW Ethernet Subsystem:
4040

4141
For further details regarding the CPSWng instance, refer :ref:`cpswng`
4242

43-
.. ifconfig:: CONFIG_part_family in ('AM62X_family','AM62AX_family','AM64X_family','AM62PX_family','AM62LX_family')
43+
.. ifconfig:: CONFIG_part_family in ('AM62X_family','AM62AX_family','AM64X_family','AM62LX_family')
4444

4545
CPSW3g
4646

4747
The CPSW3g instance is a part of the Main domain and is controlled by the am65-cpsw-nuss
4848
driver in Linux.
4949
For further details regarding the CPSW3g instance, refer :ref:`cpsw3g`
5050

51+
.. ifconfig:: CONFIG_part_family in ('AM62PX_family')
52+
53+
CPSW3g
54+
55+
The CPSW3g instance can be configured to operate in two ways:
56+
#. CPSW3g Virtual Client
57+
#. CPSW3g Native Ethernet
58+
59+
To generalize, CPSW3g instance can be referred to as CPSWng with 'n' being '3'.
60+
For further details regarding the CPSW3g instance, refer :ref:`cpswng`
61+
5162
TSN Documentation and Testing
5263
""""""""""""""""""""""""""""""
5364

@@ -60,11 +71,11 @@ The CPSW Ethernet Subsystem supports TSN features in the following configuration
6071
.. ifconfig:: CONFIG_part_variant in ('J721E','J7200','J784S4','J742S2')
6172

6273
2. The CPSWng Native Ethernet configuration of the CPSWng instance supports both MAC mode
63-
and Switch mode TSN features.
74+
and Switch mode TSN features with Linux.
6475

6576
.. ifconfig:: CONFIG_part_family in ('AM62X_family','AM62AX_family','AM64X_family','AM62PX_family','AM62LX_family')
6677

67-
The CPSW3g instance supports MAC mode and Switch mode TSN features.
78+
The CPSW3g instance supports MAC mode and Switch mode TSN features with Linux.
6879

6980
For further details regarding the TSN features and testing, refer :ref:`tsn_with_cpsw`
7081

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-Proxy-Client.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Introduction
1212
The CPSW Proxy Client driver in Linux interfaces with Ethernet Switch Firmware (EthFw)
1313
via RPMsg using the Linux Remoteproc framework. The CPSW Ethernet Switch on the SoC
1414
is configured by EthFw which acts as the Server and provides services to Clients on
15-
remote cores with the Linux Client on A72 core being the CPSW Proxy Client and the
16-
driver corresponding to it located at:
15+
remote cores with the Linux Client on A53 / A72 core being the CPSW Proxy Client and
16+
the driver corresponding to it located at:
1717
drivers/net/ethernet/ti/cpsw-proxy-client.c
1818
in the SDK's Linux Source.
1919

@@ -89,6 +89,12 @@ overlay at U-Boot prompt.
8989

9090
To enable Linux CPSW Proxy Client functionality, save the following command in uEnv.txt:
9191

92+
.. ifconfig:: CONFIG_part_variant in ('AM62PX')
93+
94+
.. code-block:: text
95+
96+
name_overlays="ti/k3-am62p5-sk-ethfw.dtbo"
97+
9298
.. ifconfig:: CONFIG_part_variant in ('J721E')
9399

94100
.. code-block:: text
@@ -140,14 +146,14 @@ Interpreting the boot logs
140146

141147
The CPSW Proxy Client driver logs can be filtered using the command:
142148

143-
.. code-block:: bash
149+
.. code-block:: console
144150
145151
dmesg | grep ti_cpsw_proxy_client
146152
147153
If the driver is probed successfully, something similar to the following content will show up in the filtered logs
148154
based on the configuration performed on EthFw for the allocation of Virtual Ports to the Linux Client:
149155

150-
.. code-block:: bash
156+
.. code-block:: console
151157
152158
ti_cpsw_proxy_client virtio2.ti.ethfw.ethdevice.-1.101: 1 Virtual Switch Port(s), 1 Virtual MAC Only P
153159
ti_cpsw_proxy_client virtio2.ti.ethfw.ethdevice.-1.101: Virt Port: 0, Type: Switch Port, Iface: eth1, Num TX: 2, Num RX: 1, Token: 0
@@ -168,13 +174,13 @@ Fetching/Setting IP Address
168174

169175
Each interface can either get an IP address dynamically allocated to it by a DHCP server using the command:
170176

171-
.. code-block:: bash
177+
.. code-block:: console
172178
173179
udhcpc -i <ethX>
174180
175181
Or it can be assigned a Static IP address manually using the command:
176182

177-
.. code-block:: bash
183+
.. code-block:: console
178184
179185
ifconfig <ethX> <IP-Address>
180186
@@ -183,7 +189,7 @@ Setting MAC Address
183189

184190
MAC Address can be assigned to interfaces using the commands:
185191

186-
.. code-block:: bash
192+
.. code-block:: console
187193
188194
ifconfig <ethX> down
189195
ifconfig <ethX> hw ether <MAC-Address>
@@ -221,7 +227,7 @@ by EthFw.
221227

222228
Multicast MAC addresses can be added/deleted using the *ip maddr* command:
223229

224-
.. code-block:: bash
230+
.. code-block:: console
225231
226232
# Add Multicast address <Multicast-Address>
227233
ip maddr add <Multicast-Address> dev <ethX>
@@ -260,7 +266,7 @@ Consider the example of the interface eth1 having 2 TX DMA Channels. For the map
260266
261267
the corresponding "tc" command to be run in userspace is:
262268

263-
.. code-block:: bash
269+
.. code-block:: console
264270
265271
tc qdisc add dev eth1 handle 100: parent root mqprio num_tc 2 \
266272
map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 queues 1@0 1@1 hw 0

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSWng.rst

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,25 @@ in managed or learning mode between each of the individual MAC ports.
2424

2525
Depending on the SoC, the value of n in CPSWng varies as follows:
2626

27-
+-----------+----------------+-----------------------------------+
28-
| SoC | n in CPSWng | Number of Ports |
29-
+===========+================+===================================+
30-
| J7200 | n = 5 (CPSW5g) | 5 (1 host port, 4 external ports) |
31-
+-----------+----------------+-----------------------------------+
32-
| J721e | n = 9 (CPSW9g) | 9 (1 host port, 8 external ports) |
33-
+-----------+----------------+-----------------------------------+
34-
| J784S4 | n = 9 (CPSW9g) | 9 (1 host port, 8 external ports) |
35-
+-----------+----------------+-----------------------------------+
27+
.. ifconfig:: CONFIG_part_family in ('J7_family')
28+
29+
+-----------+----------------+-----------------------------------+
30+
| SoC | n in CPSWng | Number of Ports |
31+
+===========+================+===================================+
32+
| J7200 | n = 5 (CPSW5g) | 5 (1 host port, 4 external ports) |
33+
+-----------+----------------+-----------------------------------+
34+
| J721e | n = 9 (CPSW9g) | 9 (1 host port, 8 external ports) |
35+
+-----------+----------------+-----------------------------------+
36+
| J784S4 | n = 9 (CPSW9g) | 9 (1 host port, 8 external ports) |
37+
+-----------+----------------+-----------------------------------+
38+
39+
.. ifconfig:: CONFIG_part_family in ('AM62PX_family')
40+
41+
+-----------+----------------+-----------------------------------+
42+
| SoC | n in CPSWng | Number of Ports |
43+
+===========+================+===================================+
44+
| AM62P | n = 3 (CPSW3g) | 3 (1 host port, 2 external ports) |
45+
+-----------+----------------+-----------------------------------+
3646

3747
The SDK provides support to use the CPSWng ports in two different
3848
configurations:
@@ -44,11 +54,21 @@ configurations:
4454
The two configurations are mutually exclusive. Only one of the two
4555
can be enabled for a build.
4656

47-
.. note::
48-
| Enabling the CPSW Proxy Client configuration or the CPSWng Native Ethernet configuration
49-
| requires applying a Linux device-tree overlay at U-Boot using the **name_overlays** U-Boot environment variable.
50-
| For details regarding applying CPSW Proxy Client overlay, refer :ref:`cpsw_proxy_client_enable`.
51-
| For details regarding applying CPSWng Native Ethernet overlay, refer :ref:`cpswng_native_eth_overlays`.
57+
.. ifconfig:: CONFIG_part_family in ('J7_family')
58+
59+
.. note::
60+
| Enabling the CPSW Proxy Client configuration or the CPSWng Native Ethernet configuration
61+
| requires applying a Linux device-tree overlay at U-Boot using the **name_overlays** U-Boot environment variable.
62+
| For details regarding applying CPSW Proxy Client overlay, refer :ref:`cpsw_proxy_client_enable`.
63+
| For details regarding applying CPSWng Native Ethernet overlay, refer :ref:`cpswng_native_eth_overlays`.
64+
65+
66+
.. ifconfig:: CONFIG_part_family in ('AM62PX_family')
67+
68+
.. note::
69+
| Enabling the CPSW Proxy Client configuration requires applying a Linux device-tree overlay
70+
| at U-Boot using the **name_overlays** U-Boot environment variable.
71+
| For details regarding applying CPSW Proxy Client overlay, refer :ref:`cpsw_proxy_client_enable`.
5272
5373
CPSW Proxy Client
5474
"""""""""""""""""
@@ -73,7 +93,13 @@ with other cores.
7393

7494
This configuration supports MAC mode, Switch mode and TSN features on Linux.
7595

76-
For further details, refer :ref:`cpswng_native_ethernet`
96+
.. ifconfig:: CONFIG_part_family in ('J7_family')
97+
98+
For further details, refer :ref:`cpswng_native_ethernet`
99+
100+
.. ifconfig:: CONFIG_part_family in ('AM62PX_family')
101+
102+
For further details, refer :ref:`cpsw3g`
77103

78104
.. toctree::
79105
:hidden:

0 commit comments

Comments
 (0)