The pre-production modules had an external crystal to generate the PHY reference clock. Production modules rely on the i.MX6 to output the correct clock. Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> --- arch/arm/boards/solidrun-microsom/board.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/solidrun-microsom/board.c b/arch/arm/boards/solidrun-microsom/board.c index 280653f5b8d1..28a60b9e8c79 100644 --- a/arch/arm/boards/solidrun-microsom/board.c +++ b/arch/arm/boards/solidrun-microsom/board.c @@ -25,6 +25,7 @@ #include <mach/imx6-regs.h> #include <mach/imx6.h> #include <mfd/imx6q-iomuxc-gpr.h> +#include <linux/clk.h> #include <linux/sizes.h> #include <linux/phy.h> @@ -61,13 +62,26 @@ static int ar8035_phy_fixup(struct phy_device *dev) return 0; } +static void microsom_eth_init(void) +{ + void __iomem *iomux = (void *)MX6_IOMUXC_BASE_ADDR; + u32 val; + + clk_set_rate(clk_lookup("enet_ref"), 25000000); + + val = readl(iomux + IOMUXC_GPR1); + val |= IMX6Q_GPR1_ENET_CLK_SEL_ANATOP; + writel(val, iomux + IOMUXC_GPR1); + + phy_register_fixup_for_uid(0x004dd072, 0xffffffef, ar8035_phy_fixup); +} static int hummingboard_device_init(void) { if (!of_machine_is_compatible("solidrun,hummingboard/dl") && !of_machine_is_compatible("solidrun,hummingboard/q")) return 0; - phy_register_fixup_for_uid(0x004dd072, 0xffffffef, ar8035_phy_fixup); + microsom_eth_init(); /* enable USB VBUS */ gpio_direction_output(IMX_GPIO_NR(3, 22), 1); -- 2.6.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox