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

KSZ8567 and KSZ8873MLL #39

Open dayanola opened 4 years ago

dayanola commented 4 years ago

Hello,

I would like to add drivers and device tree entries for KSZ8567 and KSZ8873MLL. I'm running Linux kernel 4.14.98 on an NXP IMX8 SOM.

Can you please recommend which driver is compatible with these ethernet switches and hopefully a device tree entrée example?

Thanks, Amit

triha2work commented 4 years ago

There are examples in at91-sama5d3_xplained_ung8087.dts.

dayanola commented 4 years ago

Thank you for this information.

I couldn't find an example for 8567 and 8873. Do you know which driver is compatible with them?

triha2work commented 4 years ago

KSZ8567 is just a variant of KSZ9567, which uses "microchip,ksz9567." KSZ8873 is about the same as KSZ8863, and uses "microchip,ksz8873." The only requirements in the device tree are "compatible", "reg", and "spi-max_frequency." The "ports" is only used for DSA driver.

dayanola commented 4 years ago

Thanks, the Ethernet switches are connected via I2C. any instructions on that? Also , looking at the code here, 9567 is compatible with 9897. (couldn't find 9567 code)

triha2work commented 4 years ago

KSZ9897 is the main chip with minimum features; KSZ9477 is the chip with maximum features. Other chips have features in the middle. I2C is just an access mechanism and there is I2C driver provided, in addition to SPI driver. The device tree needs to select the correct bus number. The device created will be #-005f. In U-Boot I2C support can be enabled to access the chip directly without special command. Command formats are "i2c md 5f .2" and "i2c mw 5f .2 ."