AnsweredAssumed Answered

Cannot ping via eth0 with ls1012a processor

Question asked by Kai Wu on Oct 23, 2019
Latest reply on Nov 25, 2019 by Yiping Wang


I am using the Linux 5.3 from nxp on my board (with ls1012a).  See the Figure 1 below.

Figure 1: Connection between ethernet switch and ls1012a

What I did:

  1. I enabled the spi-fsl-dspiksz9477_spi(compatiable with 9897), fsl-ppfe modules in menuconfig.       
  2. Turned on the dspi node in my device tree source.    
  3. In device treee source, added sub node under dspi node.

When I turned on the board, the dmesg output for dspi is shown as Figure 2.

Figure 2: fsl-dspi output

When the board is turned on, I can see three interfaces lo, eth0 and eth1. See figure 3.

Figure 3: lo, eth0,and eth1

I configured eth0 with a static ip and a proper netmask, also I set up the route table, see Figure 4. 

Figure 4: eth0 with static ip

But when I tried to ping an other device connected to my board directly(in the same network). It failed with +4 errors. See Figure 5.

Figure 5: Ping with errors

I assume the problem is a result of incorrect device tree. I modified fsl-ls1012a-rdb.dts(reference board device tree)  to be my device tree source.  Figure 6 is the pfe node. In my board, I am using dspi to control the ethernet switch(ksz9897), but in ls1012ardb, it uses mdio instead. I am not sure if I should delete the mdio node here or how to connect ethernet switch in device tree.  In the pfe node below, there is mdio sub node.


In dspi node, I added a sub node for the ethernet switch. see Figure 7 below.  So I am not sure where is the problem, is it between PFE and switch or between DSPI and switch. 

Does anyone know how to solve this problem? Thank you.

Figure 7: dspi node with switch sub node