Skip to content

Commit 1c33541

Browse files
committed
docs(linux): AM64x: Update CPSW documentation
CPSW interface associated with DP83869 PHY in AM642-EVM needs to be brought up by adding a systemctl script. Update the documentation to mention the same. Signed-off-by: Chintan Vankar <[email protected]>
1 parent 4fe1623 commit 1c33541

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,50 @@ The network interface can be configured automatically depending on root file sys
1212
1313
ifconfig eth0 <ip> netmask <mask> up
1414
15+
.. ifconfig:: CONFIG_part_variant in ('AM64X')
16+
17+
.. note::
18+
19+
The DP83869 PHY (associated with the eth1 CPSW interface for AM642-EVM) is not built into the kernel image. It is not available during early boot as a result, and must be brought up by adding a systemctl service as below:
20+
21+
Assuming the root directory of the file system is ``/``.
22+
23+
Create a service file named ``network_up.service`` in the directory ``/etc/systemd/system/`` and add the following into that file:
24+
25+
.. code-block:: console
26+
27+
[Unit]
28+
Description=Service to bring up network interfaces
29+
30+
[Service]
31+
ExecStart=/bin/sh /usr/bin/network_up.sh
32+
33+
[Install]
34+
WantedBy=default.target
35+
36+
Create a shell script file named ``network_up.sh`` in the directory ``/usr/bin/`` and add the following into that file:
37+
38+
.. code-block:: console
39+
40+
#!/bin/sh
41+
ETH1_DIR=/sys/class/net/eth1
42+
while [ ! -d "$ETH1_DIR" ]
43+
do
44+
sleep 1;
45+
done
46+
if_state=$(ifconfig eth1 up |& grep ERROR)
47+
while [ -n $if_state ]
48+
do
49+
if_state=$(ifconfig eth1 up |& grep ERROR)
50+
sleep 1;
51+
done
52+
53+
Now run the below command to enable the service, and from the next boot, interface will be UP automatically.
54+
55+
.. code-block:: console
56+
57+
systemctl enable network_up.service
58+
1559
.. rubric:: Get driver information
1660
:name: k3-ethtool-i-driver
1761

0 commit comments

Comments
 (0)