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