When supporting GMII interface for HPS EMAC, there are three clocks exported to FPGA:
emac_tx_clk_i(input), emac_rx_clk_i(input), emac_gtx_clk(output)
The Linux would report below error if the emac_tx_clk_i clock is not connected correctly:
......
[ 4.291414] socfpga-dwmac ff802000.ethernet: Failed to reset the dma
[ 4.297785] socfpga-dwmac ff802000.ethernet eth1: stmmac_hw_setup: DMA engine initialization failed
[ 4.306806] socfpga-dwmac ff802000.ethernet eth1: stmmac_open: Hw setup failed
......
Besides connecting the emac_rx_clk_i(125MHz) for GMII, the emac_tx_clk_i also needs to be connected correctly (2.5MHz or 25MHz), although it is not used in GMII mode.
The emac_tx_clk_i requirement information has been added in the HPS document beginning with version 21.2.