Ethernet interface is visible but not usable, device tree

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ethernet interface is visible but not usable, device tree

2,339 Views
kai_wu
Contributor III

Hi, 

I am using ls1012a on my hardware, also I am using ksz9477 ethernet switch connecting to PFE

pastedImage_1.png

                                                                        Figure 1: KSZ9897S                                          

Because ksz9897 doesn't support MDIO (it supports actually, but we chose SPI interface for better performance), so I am using the SPI instead of MDIO. see below.

pastedImage_3.png

I can see eth0 and eth1 when the board is powered onAlso, I can configure eth0 with static ip. But I cannot ping external devices at all. I assume the problem happens on the connection of MAC and PHY. The driver spi-fsl-dspi.ko is not used by any other modules. I think the problem is caused by my device tree configuration.

 

I configured my device tree as below:

pastedImage_5.png

                                                                                        Figure 3: PFE node

pastedImage_8.png

                                                                             Figure 4: SPI node

 port@6   (i.eGMAC7) in the device tree is used as the MAC port connecting to PFE via SGMII. 

 

Also, I can see both eth0 and eth1, but I am only using eth0 and I can configure the eth0 with static ip.

pastedImage_18.png

 

But I cannot ping external devices at all. Is there any problem with my device tree? 

 

Anyone who can help? Thank you

0 Kudos
6 Replies

1,959 Views
Pavel
NXP Employee
NXP Employee

Usually switch does not have IP.

Use switch is used for connection between the LS1012a board and your computer.

Ping your computer from the LS1012a board.

Have a great day,
Pavel Chubakov

0 Kudos

1,959 Views
deepakkeswani03
Contributor I

Hi Pavel,

I am using Microchip KSZ9477 switch to implement IEEE 1588 v2 compliant network. In my network, 2 ports of switch is used to connect Master and Slave ( Port 2 and Port 3). Now I want to do stress testing of network and generate network traffic through other port (Port 4).

However, when i am trying to connect Host port (Port 1) with my computer by assigning its static IP (so as to get switch and computer on save network), I am not able to ping the switch.

For your reference, following are the details 

Switch IP - 192.168.0.201

Subnet Mask - 255.255.255.0

Static IP of Computer :- 192.168.0.203

Gateway - 192.168.0.200

Subnet Mask - 255.255.255.0

Why I am not able to ping switch IP?

Have you faced same problem ? Please help me out if you have any suggestions 

0 Kudos

1,959 Views
Pavel
NXP Employee
NXP Employee

NXP SDK uses MDIO. It looks like that SPI driver was test tested for this task.

Test your board using MDIO instead of SPI.

Usually performance does not produce limitations for MDIO using.

Have a great day,
Pavel Chubakov

0 Kudos

1,959 Views
Pavel
NXP Employee
NXP Employee

This KSZ9897S switch supports MIIM (MDIO).

See the KSZ9897S Datasheet.

See the LED4_1, LED3_1 setting.

Use this interface for connection.

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,959 Views
kai_wu
Contributor III

Hi Pavel,

Thanks for your reply.

Sorry, I think I put the wrong reason why we choose SPI instead of MDIO, the reason is, in the datesheet, it shows that SPI provicdes the highest performance, see below. 

The dspi node is probed successfully, I can see information about dspi in dmesg output. But there is no information about the sub node of dspi which is the KSZ9897.  It seems that the switch node is not probed at all.

pastedImage_5.png

0 Kudos

1,507 Views
romain
Contributor I

Hi @kai_wu ,

I was wondering if you have managed to make the KZS9897 work ? I was trying the same with an IMX8 and used a very similar device tree configuration, has similar dmesg kernel messages but yet it was not working, not mounting the corresponding ethernet adapter.

I would be very interested to know if you have found a solution ?

 

Kind Regards

Romain from New Zealand

0 Kudos