I have a custom board using an i.MX 8M Mini on an Emcraft SOM, in which there is a KSZ8081RNA PHY used for Ethernet. I am testing in U-boot to verify the connection to the PHY. This is a RMII connection. The failure seems to be occurring in the initial MDIO connection, which then doesn’t load the appropriate driver. When I test MDIO reads, the response is always zeros. This occurs for all PHY addresses (mdio read 0-1f 0-5).
I have verified with another dev kit, that the PHY is functioning, by wiring the dev kit to the custom board MDIO/MDC lines. This produced valid receive responses.
I have verified with a scope that the MDIO/MDC signals exist. The transmit portion of the MDIO command is occurring, but the read portion is always low. This leads me to believe there may be a misconfiguration of the MDIO pin that is keeping the signal low. There is a 1K pull-up on the MDIO signal.
I currently have the MDIO pins set to (PAD_CTL_DSE7 | PAD_CTL_FSEL2 | PAD_CTL_ODE) in imx8mm_som.c (IMX8MM_PAD_ENET_MDIO_ENET1_MDIO, IMX8MM_PAD_ENET_MDC_ENET1_MDC). I also have the MDIO pins set to 0x37 in emcraft-imx8mm-som.dts (MX8MM_IOMUXC_ENET_MDC_ENET1_MDC, MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO). I’m not sure of the order if the dtb loads before the board_init() function, or the other way around.