Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
76 stars 78 forks source link

How to properly setup port 7, eth0.207 when using the SGMII/SERDES port #44

Open kimtommy opened 4 years ago

kimtommy commented 4 years ago

Hi

I'm struggling configuring the EVB-KSZ9477S properly for SFP port use. I'm able to send traffic to and from the Linux through the SFP port after setting up the registers manually through regs_bin to enable SERDES/negotiation. However, I can not manage to forward data between any other switch ports and the SFP port. I've tried to set the port control registers as well, but no luck. Is there a way to make linux see port7 (eth0.207) as it does with port 1-6?

If someone made Switch-2-Switch SGMII/SERDES working with forwarding to other ports could you give a short guide on configuration change needed?

BR Kim T Humborstad (PS: I know this is more likely a config issue than a code issue, but as documentation is also supplied in git and I've been through it all I hope this is still relevant as an issue)

triha2work commented 4 years ago

Which PHY module are you using? The PHY module looks like this when you search for FCLF8522P2BTL. The driver can auto-detect copper PHY module being used, but not fiber PHY module. You need to set the sgmii driver parameter to select the type: 0=direct, 1=fiber, 2=copper. To debug the problem you need to use the sysfs mechanism located either at /sys/class/net/eth0 or /sys/bus/spi/devices/spi0.0 to access the switch through files. Check the port speed: cat sw6/6_speed For copper module it can be 1000, 100, or 10. Check the port MIB counters: cat sw6/6_mib If there are no transmit counts then the switch considers the port is not connected. Check other port MIB counters for forwarding: cat sw5/5_mib Note please use the "multi_dev=0" driver parameter for a simple switch setup to debug these kinds of problems.

kimtommy commented 4 years ago

It is copper, 1000mbps only module. We found that setting the port control register through spi1.0 actually does work. But since port 0-5 control register is auto updated and port 6 isn't it is quickly overwritten upon any port changes. As you said there is no transmit counts so probably we're missing some sort of detection and activation of the port. Will look into setting SGMII driver parameters and see if that changes anything. Thanks.