NXP LS1088A - NIC setup
Table of Contents
Board LS1088ARDB-PB.
The default config DPL (Data Path Layout) enables only one network interface on
DPAA2, which shows up as eth0
. This document describe howto configure the
hardware to create the network interfaces.
Add/setup DPPA2 network interfaces
The default config DPL (Data Path Layout) enables only one network interface
on DPAA2, which shows up as eth0
.
As described in: "4.1.7.4 Bringing up DPPA2 network interfaces".
To configure/create more interfaces from Linux the tool 'restool' can be used. The doc says it was part of the Ubuntu install, this was not the case for me, so I git-cloned and compiled it on the board:
- https://source.codeaurora.org/external/qoriq/qoriq-components/restool/
- https://lsdk.github.io/components.html
Example output for default config:
root@localhost:~/git/restool# ls-listmac dprc.1/dpmac.10 dprc.1/dpmac.9 dprc.1/dpmac.8 dprc.1/dpmac.7 dprc.1/dpmac.6 dprc.1/dpmac.5 (end point: dpni.0) dprc.1/dpmac.4 dprc.1/dpmac.3 dprc.1/dpmac.2 dprc.1/dpmac.1 root@localhost:~/git/restool# ls-listni dprc.1/dpni.0 (interface: eth0, end point: dpmac.5)
Manual setup
Create interface:
ls-addni dpmac.9 Created interface: eth1 (object:dpni.1, endpoint: dpmac.9)
Info for interface:
# restool dpni info dpni.1 dpni version: 7.9 dpni id: 1 plugged state: plugged endpoint state: 0 endpoint: dpmac.9, link is down link status: 0 - down mac address: ca:b3:a4:6a:c6:53 dpni_attr.options value is: 0 num_queues: 8 num_cgs: 1 num_rx_tcs: 1 num_tx_tcs: 1 mac_entries: 16 vlan_entries: 0 qos_entries: 0 fs_entries: 64 qos_key_size: 0 fs_key_size: 56 ingress_all_frames: 0 ingress_all_bytes: 0 ingress_multicast_frames: 0 ingress_multicast_bytes: 0 ingress_broadcast_frames: 0 ingress_broadcast_bytes: 0 egress_all_frames: 0 egress_all_bytes: 0 egress_multicast_frames: 0 egress_multicast_bytes: 0 egress_broadcast_frames: 0 egress_broadcast_bytes: 0 ingress_filtered_frames: 0 ingress_discarded_frames: 0 ingress_nobuffer_discards: 0 egress_discarded_frames: 0 egress_confirmed_frames: 0
DPL (Data Path Layout) file
The configuration can also be saved into a DPL file, as described in: "4.1.7.4.4 Save configuration to a custom DPL file (Optional)"
I got a new DPL file from NXP.
- dpl-ls1088-2x10-2x1.dts - a Data Path Layout (DPL) file which describes the configuration of the hardware (this should be compiled into a dtb)
Install the compile tool software package:
- Fedora: "dtc" (Device Tree Compiler)
- Ubuntu: device-tree-compiler
Compiling DPL/DTS to DTB
Compiling the file:
dtc -I dts -O dtb dpl-ls1088-2x10-2x1.dts -o dpl-ls1088-2x10-2x1.dtb
File seems to work, but it give some warnings (reduced output):
$ dtc -I dts -O dtb dpl-ls1088-2x10-2x1.dts -o dpl-ls1088-2x10-2x1.dtb dpl-ls1088-2x10-2x1.dtb: Warning (unit_address_vs_reg): /containers/dprc@1: node has a unit name, but no reg property dpl-ls1088-2x10-2x1.dtb: Warning (unit_address_vs_reg): /containers/dprc@1/objects/obj_set@dpbp: node has a unit name, but no reg property [...] dpl-ls1088-2x10-2x1.dtb: Warning (unit_address_vs_reg): /objects/dpbp@0: node has a unit name, but no reg property dpl-ls1088-2x10-2x1.dtb: Warning (unit_address_vs_reg): /objects/dpbp@1: node has a unit name, but no reg property [...] dpl-ls1088-2x10-2x1.dtb: Warning (unit_address_vs_reg): /connections/connection@4: node has a unit name, but no reg property
Loading DPL
The DPL file can be flashed onto the board and used to boot to Linux.
Reset board and "break" in U-Boot.
Copied these files over to board boot partition (but I don't know howto
access and load these files during U-boot). The contents of the SD-card MMC
device can be listed via command: ext4ls mmc 0:2
.
U-Boot setup network with static IP (for dynamic-IP use cmd dhcp
):
setenv ipaddr 192.168.42.10 setenv netmask 255.255.255.0 setenv serverip 192.168.42.3 saveenv
Setup on TFTP server on 192.168.42.3 in /var/lib/tftpboot.
Start service:
sudo systemctl start tftp.service
Loading via TFTP failed as wrong port was used (see "Using DPMAC1@xgmii device"):
=> tftp 0x80010000 dpl-ls1088-2x10-2x1.dtb Using DPMAC1@xgmii device TFTP from server 192.168.42.3; our IP address is 192.168.42.10 Filename 'dpl-ls1088-2x10-2x1.dtb'. Load address: 0x80010000 Loading: * ARP Retry count exceeded; starting again
The port chosen for the connection to the TFTP server dictates the value of the 'ethact' u-boot variable. For example, if using the MAC1, the ethact is DPMAC1@xgmii. If wanting to use MAC5 the port is DPMAC5@qsgmii.
Loading via TFTP:
setenv ethact DPMAC5@qsgmii setenv serverip 192.168.42.3 tftp 0x80010000 dpl-ls1088-2x10-2x1.dtb
After loading use the NXP/freescale command 'fsl_mc' to apply the data path layout (DPL):
=> fsl_mc apply dpl 0x80010000 fsl-mc: Deploying data path layout ... SUCCESS
Saving DPL in SD-card (mmc)
You can load via tftp and apply via fsl_mc
as desc above, but it only
works for a single boot. After reboot/power-cycle the board the DPL setup is
gone.
For storing the DPL on the SD-card/mmc media, reference Chapter "4.4 LSDK Memory Layout" to identify the location. The DPL file should be put starting with block # 0x06800 onto the SD card.
To do this, you can use the following u-boot commands. The first step is to tftp the DPL into the 0x80010000 RAM address and them write from it to the SD card.
Step-1: tftp load into memory as above:
setenv ethact DPMAC5@qsgmii tftp 0x80010000 dpl-ls1088-2x10-2x1.dtb
Step-2: store into SD-card/mmc device. The 0x800 is the size, in blocks of 512 bytes, reserved for the DPL image in the SD memory layout:
mmc write 0x80010000 0x06800 0x800
Ubuntu network setup
Ubuntu netplan setup
From: "4.1.7.4.5 Assign IP addresses to network interfaces".
Static IP addresses can also be assigned using netplan. Create a file called
config.yaml
in /etc/netplan. Using atext editor, add the following lines
to this config file and save it:
File: /etc/netplan/config.yaml
network: version: 2 renderer: networkd ethernets: eth0: addresses: - 192.168.42.10/24
After saving this file, run the following command to apply this netplan configuration and then reboot the board.
netplan apply