LSDK 19.09 Network Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LSDK 19.09 Network Problem

跳至解决方案
1,873 次查看
carljones
Contributor III

Hello,

I've migrated a running code from LSDK 18.03 to 19.09. The compilation has no errors but when the system boots up, the network interface seemed to malfunction. The dpaa2 object dpni seemed not bound to dpmac

[ 4.912099] fsl_dpaa2_eth dpni.1: Linked as a consumer to dpmcp.15
[ 4.943584] fsl_dpaa2_eth dpni.1: Linked as a consumer to dpcon.2
[ 4.952249] fsl_dpaa2_eth dpni.1: Linked as a consumer to dpio.8
[ 4.958799] fsl_dpaa2_eth dpni.1: Linked as a consumer to dpbp.2
[ 4.979758] fsl_dpaa2_eth dpni.1: Probed interface eth0
[ 4.985639] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpmcp.14
[ 5.017118] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.1
[ 5.025813] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.8
[ 5.032349] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpbp.1
[ 5.053185] fsl_dpaa2_eth dpni.0: Probed interface eth1
[ 5.059023] dpaa2_mac dpmac.2: Linked as a consumer to dpmcp.13
[ 5.070378] dpaa2_mac dpmac.2: Registered fixed PHY.
[ 5.075932] dpaa2_mac dpmac.1: Linked as a consumer to dpmcp.12
[ 5.086694] dpaa2_mac dpmac.1: Registered fixed PHY.

[ 6.085792] dpaa2_mac dpmac.2 (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control off
[ 6.117772] dpaa2_mac dpmac.1 (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control off

root@TinyLinux:~# ifconfig eth0 up
[ 393.520834] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
root@TinyLinux:~# ifconfig eth1 up
[ 396.192685] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
root@TinyLinux:~#

Even the restool, ls-listni, ls-listmac api's cannot detect any network interface

root@TinyLinux:~# restool
error: Did not find a device file
root@TinyLinux:~# ls-listni
error: Did not find a device file
Restool wrapper scripts only support the latest major MC version
that currently is MC10.x. Use with caution.
error: Did not find a device file
root@TinyLinux:~# ls-listmac
error: Did not find a device file
Restool wrapper scripts only support the latest major MC version
that currently is MC10.x. Use with caution.
error: Did not find a device file
root@TinyLinux:~#

But the U-boot boot log shows that fsl-mc booted up properly and the dpl & dpc file were loaded.

device 0 offset 0xa00000, size 0x100000
SF: 1048576 bytes @ 0xa00000 Read: OK
device 0 offset 0xe00000, size 0x100000
SF: 1048576 bytes @ 0xe00000 Read: OK
crc32+
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.18.0, boot status: 0x1)
Hit any key to stop autoboot:  0
device 0 offset 0xd00000, size 0x100000
SF: 1048576 bytes @ 0xd00000 Read: OK

Can you help me solve this problem?

Thanks,

Carlos

标记 (2)
0 项奖励
1 解答
1,665 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Carlos,

I have verified your procedure, dpmac.2 worked normally without any problem.

Would you please tried the attached dpl file and the pre-built firmware image which could be downloaded from the following link.

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1I1...

Please refer to the following to boot up the target board with modified DPL file.

=> tftp 0x80001000 b25805/ls1088ardb/dpl-eth.0x1D_0x0D.dtb

=> fsl_mc lazyapply dpl 0x80001000; run qspi_bootcm

Thanks,

Yiping

在原帖中查看解决方案

0 项奖励
4 回复数
1,665 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Carl Jones,

Please download LSDK 19.09 release from Layerscape SDK | NXP , then rebuild u-boot firmware and tiny images.

It seems that you are using the firmware image, I will generate firmware image with you DPL and DTS files, then do verification on the demo board.

Thanks,

Yiping

0 项奖励
1,665 次查看
carljones
Contributor III

Hello yipingwang‌,

Thank you for responding.

As instructed, I downloaded the default LSDK 19.09 release, then rebuild u-boot firmware and tiny images. I loaded it to our LS1088A-RDB and tested the network interface ETH8 (dpmac.5) worked without problem.

However, my intention is to use ETH0, because the PHY behind it (AQR105) is the one we have in our custom board. So I tried to remove the dpni object using restool and created new one with dpmac.2 and tested the newly created network interface but it wasn't able to ping my target ip address.

Next, I tried to edit the DPL file and replace the default connection to dpmac@2, rebuild u-boot firmware and tiny images and reloaded it to our LS1088A-RDB.

/*****************************************************************
* Connections
*****************************************************************/
connections {
connection@2{
endpoint1 = "dpni@0";
endpoint2 = "dpmac@2";
};
};

The result was, I still cannot ping using ETH0.

NXP LSDK tiny 1909 (based on Yocto)
TinyLinux login: root
root@TinyLinux:~# ls-listni
dprc.1/dpni.0 (interface: eth0, end point: dpmac.2)
root@TinyLinux:~# echo dpni.0 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/unbind
[   94.237443] fsl_dpaa2_eth dpni.0: Dropping the link to dpbp.1
[   94.243210] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.8
[   94.250037] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.1
[   94.272094] fsl_dpaa2_eth dpni.0: Dropping the link to dpmcp.16
root@TinyLinux:~# restool dpni destroy dpni.0
dpni.0 is destroyed
[  108.516916] iommu: Removing device dpni.0 from group 7
root@TinyLinux:~# ls-addni dpmac.2
[  117.091677] iommu: Adding device dpbp.0 to group 7
[  117.210647] iommu: Adding device dpmcp.26 to group 7
[  117.333020] iommu: Adding device dpcon.0 to group 7
[  117.456727] iommu: Adding device dpcon.2 to group 7
[  117.581417] iommu: Adding device dpcon.3 to group 7
[  117.708084] iommu: Adding device dpcon.4 to group 7
[  117.836713] iommu: Adding device dpcon.5 to group 7
[  117.968707] iommu: Adding device dpcon.6 to group 7
[  118.101499] iommu: Adding device dpcon.7 to group 7
[  118.237565] iommu: Adding device dpcon.8 to group 7
[  118.446637] iommu: Adding device dpni.0 to group 7
[  118.452035] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpmcp.4
[  118.484432] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.1
[  118.493104] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.8
[  118.499620] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.0
[  118.508223] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.7
[  118.514732] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.2
[  118.523396] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.6
[  118.529930] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.3
[  118.538544] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.5
[  118.545055] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.4
[  118.553721] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.4
[  118.560241] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.5
[  118.568853] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.3
[  118.575363] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.6
[  118.584026] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.2
[  118.590551] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.7
[  118.599153] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.1
[  118.605686] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpbp.1
[  118.651490] fsl_dpaa2_eth dpni.0: Probed interface eth0
Created interface: eth0 (object:dpni.0, endpoint: dpmac.2)
root@TinyLinux:~# ifconfig eth0 10.10.47.89 netmask 255.255.254.0
[  136.567344] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
root@TinyLinux:~# ping 10.10.47.88
PING 10.10.47.88 (10.10.47.88): 56 data bytes
^C

But when I destroy the dpni and recreate it using ETH8 (dpmac.5), the ping test is successful.

root@TinyLinux:~# echo dpni.0 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/unbind
[  175.845486] fsl_dpaa2_eth dpni.0: Dropping the link to dpbp.1
[  175.851249] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.8
[  175.858020] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.1
[  175.863856] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.7
[  175.870626] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.0
[  175.876472] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.6
[  175.883231] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.2
[  175.889079] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.5
[  175.895832] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.3
[  175.901681] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.4
[  175.908450] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.4
[  175.914286] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.3
[  175.921059] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.5
[  175.926896] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.2
[  175.933661] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.6
[  175.939496] fsl_dpaa2_eth dpni.0: Dropping the link to dpio.1
[  175.946262] fsl_dpaa2_eth dpni.0: Dropping the link to dpcon.7
[  175.977387] fsl_dpaa2_eth dpni.0: Dropping the link to dpmcp.4
root@TinyLinux:~# restool dpni destroy dpni.0
dpni.0 is destroyed
[  179.901988] iommu: Removing device dpni.0 from group 7
root@TinyLinux:~# ls-addni dpmac.5
[  187.956615] iommu: Adding device dpbp.2 to group 7
[  188.097385] iommu: Adding device dpmcp.27 to group 7
[  188.241539] iommu: Adding device dpcon.9 to group 7
[  188.384773] iommu: Adding device dpcon.10 to group 7
[  188.532213] iommu: Adding device dpcon.11 to group 7
[  188.679706] iommu: Adding device dpcon.12 to group 7
[  188.831268] iommu: Adding device dpcon.13 to group 7
[  188.982970] iommu: Adding device dpcon.14 to group 7
[  189.136659] iommu: Adding device dpcon.15 to group 7
[  189.292381] iommu: Adding device dpcon.16 to group 7
[  189.524740] iommu: Adding device dpni.0 to group 7
[  189.530184] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpmcp.3
[  189.562621] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.8
[  189.571227] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.8
[  189.577742] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.1
[  189.586413] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.7
[  189.592931] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.0
[  189.601544] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.6
[  189.608053] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.2
[  189.616720] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.5
[  189.623240] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.3
[  189.631844] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.4
[  189.638358] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.4
[  189.647016] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.3
[  189.653551] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.5
[  189.662157] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.2
[  189.668673] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpcon.6
[  189.677334] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpio.1
[  189.683887] fsl_dpaa2_eth dpni.0: Linked as a consumer to dpbp.0
[  189.729695] fsl_dpaa2_eth dpni.0: Probed interface eth0
Created interface: eth0 (object:dpni.0, endpoint: dpmac.5)
root@TinyLinux:~# ifconfig eth0 10.10.47.89 netmask 255.255.254.0
[  193.252330] fsl_dpaa2_eth dpni.0 eth0: Link Event: state up
root@TinyLinux:~# ping 10.10.47.88
PING 10.10.47.88 (10.10.47.88): 56 data bytes
64 bytes from 10.10.47.88: seq=0 ttl=64 time=0.346 ms
64 bytes from 10.10.47.88: seq=1 ttl=64 time=0.165 ms
^C
--- 10.10.47.88 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.165/0.255/0.346 ms
root@TinyLinux:~#

Thanks in advance for your help.

Regards,

Carlos

0 项奖励
1,666 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Hello Carlos,

I have verified your procedure, dpmac.2 worked normally without any problem.

Would you please tried the attached dpl file and the pre-built firmware image which could be downloaded from the following link.

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1I1...

Please refer to the following to boot up the target board with modified DPL file.

=> tftp 0x80001000 b25805/ls1088ardb/dpl-eth.0x1D_0x0D.dtb

=> fsl_mc lazyapply dpl 0x80001000; run qspi_bootcm

Thanks,

Yiping

0 项奖励
1,665 次查看
carljones
Contributor III

Hello Wang,

Thank you for verifying my procedure on your setup.

I couldn't load your pre-built firmware on our LS1088A RDB because ours is already in Secure Boot.

However, the procedure to manually load the DPL file prior to booting tiny linux solved my problem. I was able to load the user space images to the eMMC via network.

Thank you and keep up the good work.

Regards,

Carlos

0 项奖励