summaryrefslogtreecommitdiff
path: root/board/phytec
diff options
context:
space:
mode:
authorTeresa Remmet <t.remmet@phytec.de>2021-07-07 15:58:00 +0300
committerStefano Babic <sbabic@denx.de>2021-07-10 17:53:34 +0300
commit60f64bec414e139baa8764b56071eb22a1460c36 (patch)
tree2da1036842597a2feeac8cd1dabe9f6b1f0ccced /board/phytec
parent1feac813fe54ff6466ea2d575960bc1de45b0e5c (diff)
downloadu-boot-60f64bec414e139baa8764b56071eb22a1460c36.tar.xz
board: phytec: phycore_imx8mp: Add fec support
Enable support for the fec ethernet on phyCORE-i.MX8MP. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/phytec')
-rw-r--r--board/phytec/phycore_imx8mp/phycore-imx8mp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/phytec/phycore_imx8mp/phycore-imx8mp.c b/board/phytec/phycore_imx8mp/phycore-imx8mp.c
index 67649078c2..a8f0821437 100644
--- a/board/phytec/phycore_imx8mp/phycore-imx8mp.c
+++ b/board/phytec/phycore_imx8mp/phycore-imx8mp.c
@@ -10,11 +10,25 @@
#include <asm/io.h>
#include <asm/mach-imx/boot_mode.h>
#include <env.h>
+#include <miiphy.h>
DECLARE_GLOBAL_DATA_PTR;
+static int setup_fec(void)
+{
+ struct iomuxc_gpr_base_regs *gpr =
+ (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR;
+
+ /* Use 125M anatop REF_CLK1 for ENET1, not from external */
+ clrsetbits_le32(&gpr->gpr[1], 0x2000, 0);
+
+ return 0;
+}
+
int board_init(void)
{
+ setup_fec();
+
return 0;
}