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
77 stars 78 forks source link

KSZ8463 failed to read device ID(0x0) #62

Open Stefan12321 opened 3 years ago

Stefan12321 commented 3 years ago

Hello!

I am working on Yocto Linux for iMX6 processor. I am looking for Linux drivers for KSZ8463 switch to work with Linux kernel version 4.14. I tried the files available in EVB-KSZ9477/KSZ/linux-drivers/ksz8463/linux-4.14/drivers/net/ethernet/micrel/ but when the kernel starts i see spi error: ksz8463 spi0.0: failed to read device ID(0x0)

Снимок экрана от 2021-04-01 15-28-22

On the oscilloscope, I can see two 16-bit packets which are splitted into two 8-bit parts. In the datasheet written that both parts have to be single packet of 3-6 bytes in size.

CS MISO CS_MISO First packet CS MISO First_packet_CS_MISO Second packet CS MISO Second_packet_CS_MISO

SCLK MOSI SCLK_MOSI First packet SCLK MOSI First_packet_SCLK_MOSI Second packet SCLK MOSI Second_packet_SCLK_MOSI

Kindly help me in this.

Regards, Denis.

triha2work commented 3 years ago

It is difficult to know whether the CS signal is correct from reading from the scope. It should be down for the whole cycle of SPI transfer of 4 bytes: 2 bytes of command and 2 bytes of data. And these 4 bytes transfer should be close together, not separated into 2 packets. It looks like the MOSI signal is correct: 0x00 0x0C 0x00 0x00. The SPI boot log has such errors so there may be something wrong in the device tree configuration.