aboutsummaryrefslogtreecommitdiff
path: root/board/dhelectronics
diff options
context:
space:
mode:
authorHarald Seiler <hws@denx.de>2020-04-15 20:04:53 +0200
committerStefano Babic <sbabic@denx.de>2020-04-18 13:00:07 +0200
commit15df6b31b62671d4e2347131bdbf4c07a305cab1 (patch)
tree8988fa4fc121dd8351245f326750fdbfdfd87f63 /board/dhelectronics
parentfe2f432c1c81763e13a5b5f2f9e61c8fd49555d9 (diff)
downloadu-boot-15df6b31b62671d4e2347131bdbf4c07a305cab1.zip
u-boot-15df6b31b62671d4e2347131bdbf4c07a305cab1.tar.gz
u-boot-15df6b31b62671d4e2347131bdbf4c07a305cab1.tar.bz2
ARM: imx6: DHCOM i.MX6 PDK: Convert to DM_ETH
Use DM_ETH instead of legacy networking. Add VIO as a fixed regulator to the relevant device-trees and augment the FEC node with properties for the reset GPIO. It should be noted that the relevant properties for the reset GPIO already exist in the PHY node (reset-gpios, reset-delay-us, reset-post-delay-us) but U-Boot currently ignores those and only supports the bus-level reset properties in the FEC node (phy-reset-gpios, phy-reset-duration, phy-reset-post-delay). Signed-off-by: Harald Seiler <hws@denx.de>
Diffstat (limited to 'board/dhelectronics')
-rw-r--r--board/dhelectronics/dh_imx6/dh_imx6.c51
1 files changed, 2 insertions, 49 deletions
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 33ce7e8..b6f8b11 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -28,10 +28,7 @@
#include <fsl_esdhc_imx.h>
#include <fuse.h>
#include <i2c_eeprom.h>
-#include <miiphy.h>
#include <mmc.h>
-#include <net.h>
-#include <netdev.h>
#include <usb.h>
#include <usb/ehci-ci.h>
@@ -52,24 +49,6 @@ int overwrite_console(void)
return 1;
}
-#ifdef CONFIG_FEC_MXC
-static void eth_phy_reset(void)
-{
- /* Reset PHY */
- gpio_direction_output(IMX_GPIO_NR(5, 0) , 0);
- udelay(500);
- gpio_set_value(IMX_GPIO_NR(5, 0), 1);
-
- /* Enable VIO */
- gpio_direction_output(IMX_GPIO_NR(1, 7) , 0);
-
- /*
- * KSZ9021 PHY needs at least 10 mSec after PHY reset
- * is released to stabilize
- */
- mdelay(10);
-}
-
static int setup_fec_clock(void)
{
struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
@@ -80,34 +59,6 @@ static int setup_fec_clock(void)
return enable_fec_anatop_clock(0, ENET_50MHZ);
}
-int board_eth_init(bd_t *bis)
-{
- uint32_t base = IMX_FEC_BASE;
- struct mii_dev *bus = NULL;
- struct phy_device *phydev = NULL;
-
- gpio_request(IMX_GPIO_NR(5, 0), "PHY-reset");
- gpio_request(IMX_GPIO_NR(1, 7), "VIO");
-
- setup_fec_clock();
-
- eth_phy_reset();
-
- bus = fec_get_miibus(base, -1);
- if (!bus)
- return -EINVAL;
-
- /* Scan PHY 0 */
- phydev = phy_find_by_mask(bus, 0xf, PHY_INTERFACE_MODE_RGMII);
- if (!phydev) {
- printf("Ethernet PHY not found!\n");
- return -EINVAL;
- }
-
- return fec_probe(bis, -1, base, bus, phydev);
-}
-#endif
-
#ifdef CONFIG_USB_EHCI_MX6
static void setup_usb(void)
{
@@ -190,6 +141,8 @@ int board_init(void)
setup_dhcom_mac_from_fuse();
+ setup_fec_clock();
+
return 0;
}