For our design, we use an external clock source for the RMII interface. So I have to configure GPR1[21] bit to zero to pick the external clock as a clock source. This works by changing mach-imx6q.c:
* If enet_ref from ANATOP/CCM is the PTP clock source, we need to
* set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad
* (external OSC), and we need to clear the bit.
*/
gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
if (!IS_ERR(gpr))
regmap_update_bits(gpr, IOMUXC_GPR1,
IMX6Q_GPR1_ENET_CLK_SEL_MASK,
0 /*IMX6Q_GPR1_ENET_CLK_SEL_ANATOP*/);
But if possible, I prefer not to patch the kernel itself by something like that...
Is there another possibility to do this via devicetree?
I already found patch [PATCH] ARM: imx6q: support ptp and rmii clock from pad
However, that's already rather old, and already mostly in the kernel. (I wonder why not completely)
Anybody knows?