Skip to content

Commit b6e7d71

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 71959b7 commit b6e7d71

File tree

4 files changed

+90
-42
lines changed

4 files changed

+90
-42
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: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The CPSW Ethernet Subsystem is capable of supporting MAC mode, Switch mode, VLAN
1111
standard TSN features such as PTP, EST, CBS and IET.
1212

1313
.. note::
14+
1415
To operate in switch mode, at least two external ports are required.
1516

1617
Instances of the CPSW Subsystem
@@ -29,24 +30,35 @@ of the CPSW Ethernet Subsystem:
2930

3031
.. ifconfig:: CONFIG_part_family in ('J7_family')
3132

32-
The CPSW2g instance is controlled by the am65-cpsw-nuss driver in Linux.
33-
For further details regarding the CPSW2g instance, refer :ref:`cpsw2g`
33+
The CPSW2g instance is controlled by the am65-cpsw-nuss driver in Linux.
34+
For further details regarding the CPSW2g instance, refer :ref:`cpsw2g`
3435

3536
.. ifconfig:: CONFIG_part_variant in ('J721E','J7200','J784S4','J742S2')
3637

37-
The CPSWng instance can be configured to operate in two ways:
38-
#. CPSWng Virtual Client
39-
#. CPSWng Native Ethernet
38+
The CPSWng instance can be configured to operate in two ways:
39+
#. CPSWng Virtual Client
40+
#. CPSWng Native Ethernet
4041

41-
For further details regarding the CPSWng instance, refer :ref:`cpswng`
42+
For further details regarding the CPSWng instance, refer :ref:`cpswng`
4243

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

4546
CPSW3g
4647

47-
The CPSW3g instance is a part of the Main domain and is controlled by the am65-cpsw-nuss
48-
driver in Linux.
49-
For further details regarding the CPSW3g instance, refer :ref:`cpsw3g`
48+
The CPSW3g instance is a part of the Main domain and is controlled by the am65-cpsw-nuss
49+
driver in Linux.
50+
For further details regarding the CPSW3g instance, refer :ref:`cpsw3g`
51+
52+
.. ifconfig:: CONFIG_part_family in ('AM62PX_family')
53+
54+
CPSW3g
55+
56+
The CPSW3g instance can be configured to operate in two ways:
57+
#. CPSW3g Virtual Client
58+
#. CPSW3g Native Ethernet
59+
60+
To generalize, CPSW3g instance can be referred to as CPSWng with 'n' being '3'.
61+
For further details regarding the CPSW3g instance, refer :ref:`cpswng`
5062

5163
TSN Documentation and Testing
5264
""""""""""""""""""""""""""""""
@@ -60,11 +72,11 @@ The CPSW Ethernet Subsystem supports TSN features in the following configuration
6072
.. ifconfig:: CONFIG_part_variant in ('J721E','J7200','J784S4','J742S2')
6173

6274
2. The CPSWng Native Ethernet configuration of the CPSWng instance supports both MAC mode
63-
and Switch mode TSN features.
75+
and Switch mode TSN features with Linux.
6476

6577
.. ifconfig:: CONFIG_part_family in ('AM62X_family','AM62AX_family','AM64X_family','AM62PX_family','AM62LX_family')
6678

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

6981
For further details regarding the TSN features and testing, refer :ref:`tsn_with_cpsw`
7082

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

Lines changed: 21 additions & 15 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,23 +89,29 @@ 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

94-
.. code-block:: text
100+
.. code-block:: text
95101
96-
name_overlays="ti/k3-j721e-evm-ethfw.dtbo"
102+
name_overlays="ti/k3-j721e-evm-ethfw.dtbo"
97103
98104
.. ifconfig:: CONFIG_part_variant in ('J7200')
99105

100-
.. code-block:: text
106+
.. code-block:: text
101107
102-
name_overlays="ti/k3-j7200-evm-ethfw.dtbo"
108+
name_overlays="ti/k3-j7200-evm-ethfw.dtbo"
103109
104110
.. ifconfig:: CONFIG_part_variant in ('J784S4','J742S2')
105111

106-
.. code-block:: text
112+
.. code-block:: text
107113
108-
name_overlays="ti/k3-j784s4-evm-ethfw.dtbo"
114+
name_overlays="ti/k3-j784s4-evm-ethfw.dtbo"
109115
110116
.. note::
111117

@@ -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: 43 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,23 @@ 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+
61+
| Enabling the CPSW Proxy Client configuration or the CPSWng Native Ethernet configuration
62+
| requires applying a Linux device-tree overlay at U-Boot using the **name_overlays** U-Boot environment variable.
63+
| For details regarding applying CPSW Proxy Client overlay, refer :ref:`cpsw_proxy_client_enable`.
64+
| For details regarding applying CPSWng Native Ethernet overlay, refer :ref:`cpswng_native_eth_overlays`.
65+
66+
67+
.. ifconfig:: CONFIG_part_family in ('AM62PX_family')
68+
69+
.. note::
70+
71+
| Enabling the CPSW Proxy Client configuration requires applying a Linux device-tree overlay
72+
| at U-Boot using the **name_overlays** U-Boot environment variable.
73+
| For details regarding applying CPSW Proxy Client overlay, refer :ref:`cpsw_proxy_client_enable`.
5274
5375
CPSW Proxy Client
5476
"""""""""""""""""
@@ -73,7 +95,13 @@ with other cores.
7395

7496
This configuration supports MAC mode, Switch mode and TSN features on Linux.
7597

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

78106
.. toctree::
79107
:hidden:

0 commit comments

Comments
 (0)