Skip to content

docs(linux): AM64x: Update CPSW documentation #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,50 @@

ifconfig eth0 <ip> netmask <mask> up

.. ifconfig:: CONFIG_part_variant in ('AM64X')

.. note::

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:

Check warning on line 19 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'CPSW') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'CPSW') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst", "range": {"start": {"line": 19, "column": 49}}}, "severity": "INFO"}

Check warning on line 19 in source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Definitions] Define acronyms and abbreviations (such as 'PHY') on first occurrence if they're likely to be unfamiliar. Raw Output: {"message": "[RedHat.Definitions] Define acronyms and abbreviations (such as 'PHY') on first occurrence if they're likely to be unfamiliar.", "location": {"path": "source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/_K3-CPSW-common.rst", "range": {"start": {"line": 19, "column": 19}}}, "severity": "INFO"}

Assuming the root directory of the file system is ``/``.

Create a service file named ``network_up.service`` in the directory ``/etc/systemd/system/`` and add the following into that file:

.. code-block:: console

[Unit]
Description=Service to bring up network interfaces

[Service]
ExecStart=/bin/sh /usr/bin/network_up.sh

[Install]
WantedBy=default.target

Create a shell script file named ``network_up.sh`` in the directory ``/usr/bin/`` and add the following into that file:

.. code-block:: console

#!/bin/sh
ETH1_DIR=/sys/class/net/eth1
while [ ! -d "$ETH1_DIR" ]
do
sleep 1;
done
if_state=$(ifconfig eth1 up |& grep ERROR)
while [ -n $if_state ]
do
if_state=$(ifconfig eth1 up |& grep ERROR)
sleep 1;
done

Now run the below command to enable the service, and from the next boot, interface will be UP automatically.

.. code-block:: console

systemctl enable network_up.service

.. rubric:: Get driver information
:name: k3-ethtool-i-driver

Expand Down