I have a KSZ8873RLL connected to the ethernet RMII interface on the Colibri iMX8X. I’m happy to report that everything functions, I can transmit and receive.
I do have a question regarding the device tree and MUX. SODIMM Pin 76, “ESAI0_FSR”, is set to Alt 1 (CONN_ENET1_RCLK50M_OUT). The Colibri outputs the 50Mhz reference clock to the KZS8873. I needed to set “SW_CONFIG” to “IN_OUT” to make things function. The question is why do I need to have “IN-OUT” instead of “DEFAULT” (output)?
The reference clock has to go to the PHY and to the MAC (i.e. the FEC inside the i.MX 8X).
If you configure the i.MX 8X clocking to provide the clock, that clock goes to the reference clock pad.
From the pad it goes outside the chip to the external PHY and also with the input driver switched on to the FEC inside the chip.
So if you don’t configure the pad to have the input switched on the FEC will not get the reference clock.
Unfortunately, NXP missed documenting any such in the
i.MX8 QM/i.MX8 QXP Hardware Developer’s Guide aka IMX8HDG V1.0 but you may find some similar explanation in the section
10.3 Generating the reference clock of the
Hardware Development Guide for i.MX 6QuadPlus, 6Quad, 6DualPlus, 6Dual, 6DualLite, 6Solo Families of Applications Processors aka IMX6DQ6SDLHDG rev. 4 on page 109 and following.