summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFugang Duan <b38611@freescale.com>2015-01-13 13:45:53 +0800
committerFugang Duan <b38611@freescale.com>2015-02-03 13:54:11 +0800
commit561ecd599f29b428bcf0690f2525309521afcacd (patch)
tree91c3785ae6557ba6a421d053c620a4b4b8bf5bf3
parent1d4e7b28b209aa8ff5e633b5987319e7ff576e2e (diff)
downloadu-boot-imx-561ecd599f29b428bcf0690f2525309521afcacd.zip
u-boot-imx-561ecd599f29b428bcf0690f2525309521afcacd.tar.gz
u-boot-imx-561ecd599f29b428bcf0690f2525309521afcacd.tar.bz2
MLK-10199 mx6q: sabreauto: add enet support for sabreauto cpu2 board.
Add enet support for i.MX6 AI-CPU2 board. Signed-off-by: Fugang Duan <B38611@freescale.com>
-rw-r--r--board/freescale/mx6qsabreauto/mx6qsabreauto.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index f34c796..e12c5bc 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2014 Freescale Semiconductor, Inc.
+ * Copyright (C) 2012-2015 Freescale Semiconductor, Inc.
*
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*
@@ -111,6 +111,7 @@ iomux_v3_cfg_t const enet_pads[] = {
MX6_PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_RGMII_RD3__RGMII_RD3 | MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL),
+ MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL),
};
/* I2C2 PMIC, iPod, Tuner, Codec, Touch, HDMI EDID, MIPI CSI2 card */
@@ -857,6 +858,7 @@ int overwrite_console(void)
return 1;
}
+#ifdef CONFIG_FEC_MXC
int board_eth_init(bd_t *bis)
{
setup_iomux_enet();
@@ -864,6 +866,19 @@ int board_eth_init(bd_t *bis)
return cpu_eth_init(bis);
}
+static int setup_fec(void)
+{
+ int ret;
+
+ mxc_iomux_set_gpr_register(1, 21, 1, 1);
+ ret = enable_fec_anatop_clock(0, ENET_125MHz);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+#endif
+
#define BOARD_REV_B 0x200
#define BOARD_REV_A 0x100
@@ -970,6 +985,10 @@ int board_late_init(void)
board_late_mmc_env_init();
#endif
+#ifdef CONFIG_FEC_MXC
+ setup_fec();
+#endif
+
return 0;
}