Need iMX6 fec driver for ksz8863 ethernet switch

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

Need iMX6 fec driver for ksz8863 ethernet switch

6,797 Views
naveen_bathula
Contributor I

Hi,

I am working on ksz8863 ethernet swicth, which is connected to iMX6 processor on spi interface.

I am working on linux kernel 4.9 and I am looking for the fec driver which supports communicating with this switch. 

1. Is any fec driver designed to support this switch or similar micrel family?

2. Any suggestions that I can quickly do modifications in existing fec driver.

3. Microchip integrated the KSZ8863 chip with Atmel AT91 processor and there driver is on macb, EVB-KSZ9477/KSZ/kernels/linux-4.9.143 at master · Microchip-Ethernet/EVB-KSZ9477 · GitHub I am trying to port that driver to fec. But it's requires lot of efforts. Is it a correct approach? 

Regards,

Naveen.

Labels (3)
8 Replies

4,819 Views
matt67
Contributor III

Hello,

Is there a way at the end to have the driver support for FEC with KS8863 and also the DSA ?

What are the limitation of this solution ?

Thank you,

0 Kudos

4,819 Views
vacaliucb
Contributor I

Hi Matt,

Hmm. Not sure about DSA. In our case, we have all the function we needed with KSZ9893 with NO FEC modifications at all. What we needed to do was to get the SPI bus working so that we could program the ‘RGMII Ingress Internal Delay (RGMII_ID_ig)’ to add the 1.5ns clock delay. We did not need to go further and attempt to get DSA working. We are planning another project to use the KSZ8794 switch in roughly the same way, and expect success. From what I can tell, the same group of drivers support multiple families of chips.

I’m happy to help with any questions about getting the release drivers to compile, if that’s what you need help with. But I gather your question is more of a strategic one. Anyway, all I can offer is that the chip works fine with unmodified FEC code, so if that works for you then great!

-bogdan

0 Kudos

4,819 Views
vacaliucb
Contributor I

Hi Naveen,

We are fighting this battle as well, but with the KSZ9893 switch.  It is an all-out war between the hardware issues, the configuration difficulty, the edits to the kernel drivers, the kernel panics, etc. etc.  Perhaps you and the good people on this forum would like to help us.  We are working in these branches:

https://github.com/uvdl/linux-imx/tree/project/ksz9897-microchip

https://github.com/uvdl/linux-imx/tree/feature/enable-ksz9893

This is the issue tracking:

https://github.com/uvdl/meta/issues/3

We might try the DSA path described above next.

Best Regards,

-bogdan

4,819 Views
bnaveen222
Contributor I

Dear Bogdan,

Thanks for the reply.

I replicated all the changes suggested in macb.c file, but no luck. Need to debug more, as os is crashing when enabling ethernet interface.

Vendor is telling it takes time to implement the drivers for linux and they do so only in a case where multiple customers are requesting for linux drivers or bulk orders.And there is no dsa support available for this switch. We selected this switch by asumming linux drivers are already available and we planned our product release deadlines, so now are thinking about other alternatives.We are also not sure how much time it will take to bring this switch up.

Regards,

Naveen,

9441808082.

0 Kudos

4,819 Views
bnaveen222
Contributor I

Hi,

Is any fec drivers available to support ksz8863 switch/similar ethernet switch.

Regards,

Naveen.

4,819 Views
naveen_bathula
Contributor I

Dear Igor, 

I already did the changes in dts file for chip detection.

My current scenario is, I'm trying to make ethernet switch working on my board. KSZ8863 is connected to processor on SPI interface.

I have added the driver code available in https://github.com/Microchip-Ethernet/EVB-KSZ9477/tree/master/KSZ/linux-drivers/ksz8863/linux-4.9/dr... section to my linux kernel 4.9 path and defined dts files changes to spi mode. Device is detected on spi successfully.

image

below is my config file changes:

CONFIG_NET_VENDOR_MICROCHIP=y
CONFIG_KSZ_SWITCHES=y
CONFIG_KSZ_SWITCH=y
CONFIG_KSZ_DSA is not set
CONFIG_KSZ_SMI is not set
CONFIG_KSZ_SWITCH_EMBEDDED is not set
CONFIG_HAVE_KSZ8863=y
CONFIG_HAVE_SPI_KSZ8863=y
CONFIG_I2C_KSZ8863 is not set
CONFIG_SPI_KSZ8863=y
CONFIG_DEBUG_FS=y

Without doing any fec changes, my kernel log looks like as below
image

Now my question is how to do fec driver modifications.

1. Is any fec driver designed to support this switch or similar micrel family?

2. Any suggestions that I can quickly do modifications in existing fec driver.

3. Microchip integrated the KSZ8863 chip with Atmel AT91 processor and there driver is on macb, EVB-KSZ9477/KSZ/kernels/linux-4.9.143 at master · Microchip-Ethernet/EVB-KSZ9477 · GitHub I am trying to port that driver to fec. But it's requires lot of efforts. Is it a correct approach? 

As per suggestions in the issue raised at microchip github, dsa option is not advisable/suggested.

KSZ8863 Support · Issue #13 · Microchip-Ethernet/EVB-KSZ9477 · GitHub 

Regards,
Naveen.

37 Views
somejoe
Contributor I
Naveen,
I have the same configuration as you. The KSZ8863 switch operates as is, out of the box, using the fec driver, but I need to reconfigure it in two-port mode (two separate ethernet addresses) instead of a switch.
I have not been able to find any mention of fec patches / support for KSZ parts.
Were you able to resolve this issue? Or, can you suggest an alternate solution?
Regards,
josé
0 Kudos

4,819 Views
igorpadykov
NXP Employee
NXP Employee

Hi Naveen

nxp linux releases do not support it, may be useful to check

[RFC] Update documentation for KSZ DSA drivers so that new drivers can be added - Patchwork 

https://community.nxp.com/thread/463677 

IMX6UL - RMII to marvell switch  

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

0 Kudos