]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8mp_evk: Simplify Ethernet initialization
authorFabio Estevam <festevam@denx.de>
Thu, 19 Oct 2023 21:51:12 +0000 (18:51 -0300)
committerFabio Estevam <festevam@gmail.com>
Wed, 13 Dec 2023 12:54:00 +0000 (09:54 -0300)
With DM enabled, there is no need for board code to initialize
the Ethernet interfaces.

The RTL8211FDI Ethernet PHYs have 25MHz oscillator, so there is no
need to enable the RGMII TX clk output.

Also, there is no need for describing the deprecated phy-reset FEC
properties, nor passing reset properties to the EQOS interface in
u-boot.dtsi.

Remove all these unneeded pieces.

Tested both Ethernet interfaces after these changes.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
arch/arm/dts/imx8mp-evk-u-boot.dtsi
board/freescale/imx8mp_evk/imx8mp_evk.c

index 0bf489b46248c87ebd317bd52903fd0f9b1ed827..51c84383673cbe5d5906f003b9c05dcd5ae9bf52 100644 (file)
 &wdog1 {
        bootph-pre-ram;
 };
-
-&ethphy0 {
-       reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
-       reset-delay-us = <15000>;
-       reset-post-delay-us = <100000>;
-};
-
-&fec {
-       phy-reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
-       phy-reset-duration = <15>;
-       phy-reset-post-delay = <100>;
-};
-
-
index a24b8c1d86083f09d1bb9944d0fce115620bb184..42291c958e39d877b9aecb1100e8b04f1405e7f4 100644 (file)
@@ -7,8 +7,6 @@
 #include <env.h>
 #include <errno.h>
 #include <init.h>
-#include <miiphy.h>
-#include <netdev.h>
 #include <linux/delay.h>
 #include <asm/global_data.h>
 #include <asm/mach-imx/iomux-v3.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static void setup_fec(void)
-{
-       struct iomuxc_gpr_base_regs *gpr =
-               (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR;
-
-       /* Enable RGMII TX clk output */
-       setbits_le32(&gpr->gpr[1], BIT(22));
-}
-
-#if CONFIG_IS_ENABLED(NET)
-int board_phy_config(struct phy_device *phydev)
-{
-       if (phydev->drv->config)
-               phydev->drv->config(phydev);
-       return 0;
-}
-#endif
-
 int board_init(void)
 {
-       int ret = 0;
-
-       if (IS_ENABLED(CONFIG_FEC_MXC)) {
-               setup_fec();
-       }
-
-       return ret;
+       return 0;
 }
 
 int board_late_init(void)