public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Robinson <pbrobinson@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 7/8] ARM: embestmx6boards: convert mars/riot boards to DM_ETH
Date: Fri,  2 Apr 2021 15:52:32 +0100	[thread overview]
Message-ID: <20210402145233.918645-7-pbrobinson@gmail.com> (raw)
In-Reply-To: <20210402145233.918645-1-pbrobinson@gmail.com>

Convert the boards to use DM_ETH.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: "Eric B?nard" <eric@eukrea.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 board/embest/mx6boards/mx6boards.c | 26 +-------------------------
 configs/marsboard_defconfig        |  2 ++
 configs/riotboard_defconfig        |  2 ++
 include/configs/embestmx6boards.h  |  6 ------
 4 files changed, 5 insertions(+), 31 deletions(-)

diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c
index c3bbcff0cf..dda8502c6f 100644
--- a/board/embest/mx6boards/mx6boards.c
+++ b/board/embest/mx6boards/mx6boards.c
@@ -91,24 +91,6 @@ static void setup_iomux_uart(void)
 }
 
 iomux_v3_cfg_t const enet_pads[] = {
-	MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	/* GPIO16 -> AR8035 25MHz */
-	MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(NO_PAD_CTRL),
-	MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	/* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
-	MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL_CLK),
-	MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL),
-	MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD),
-	MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD),
-	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_PD),
 	/* AR8035 PHY Reset */
 	MX6_PAD_EIM_D31__GPIO3_IO31 | MUX_PAD_CTRL(ENET_PAD_CTRL_PD),
 	/* AR8035 PHY Interrupt */
@@ -376,13 +358,6 @@ int overwrite_console(void)
 	return 1;
 }
 
-int board_eth_init(struct bd_info *bis)
-{
-	setup_iomux_enet();
-
-	return cpu_eth_init(bis);
-}
-
 int board_early_init_f(void)
 {
 	u32 cputype = cpu_type(get_cpu_rev());
@@ -460,6 +435,7 @@ int board_late_init(void)
 	else if (board_type == BOARD_IS_RIOTBOARD)
 		add_board_boot_modes(marsboard_boot_modes);
 #endif
+	setup_iomux_enet();
 
 	return 0;
 }
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index 3e7b8ef0f5..2759c291da 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -40,6 +40,8 @@ CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_SPI_FLASH_SST=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ATHEROS=y
+CONFIG_DM_ETH=y
+CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index 1e5dc39318..12af407400 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -52,6 +52,8 @@ CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_SPI_FLASH_SST=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ATHEROS=y
+CONFIG_DM_ETH=y
+CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h
index c49d4dc0e4..a29eec00ae 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -36,12 +36,6 @@
 /* MMC Configs */
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 
-#define CONFIG_FEC_MXC
-#define IMX_FEC_BASE			ENET_BASE_ADDR
-#define CONFIG_FEC_XCV_TYPE		RGMII
-#define CONFIG_ETHPRIME			"FEC"
-#define CONFIG_FEC_MXC_PHYADDR		4
-
 #define CONFIG_ARP_TIMEOUT     200UL
 
 /* Physical Memory Map */
-- 
2.31.1

  parent reply	other threads:[~2021-04-02 14:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 14:52 [PATCH 1/8] ARM: embestmx6boards: Import the marsboard/riotboard. dts files Peter Robinson
2021-04-02 14:52 ` [PATCH 2/8] ARM: marsboard: Enable OF_CONTROL and DM gpio/pin control Peter Robinson
2021-04-08 20:59   ` sbabic at denx.de
2021-04-02 14:52 ` [PATCH 3/8] ARM: embestmx6boards: merge the riotboard's configs together Peter Robinson
2021-04-08 20:58   ` sbabic at denx.de
2021-04-02 14:52 ` [PATCH 4/8] ARM: riotboard: Enable OF_CONTROL and DM gpio/pin control Peter Robinson
2021-04-08 20:57   ` sbabic at denx.de
2021-04-02 14:52 ` [PATCH 5/8] ARM: embestmx6boards: convert the mars/riot boards to DM_MMC Peter Robinson
2021-04-08 20:58   ` sbabic at denx.de
2021-04-02 14:52 ` [PATCH 6/8] ARM: embestmx6boards: convert mars/riot boards to DM_USB Peter Robinson
2021-04-08 20:58   ` sbabic at denx.de
2021-04-02 14:52 ` Peter Robinson [this message]
2021-04-08 20:59   ` [PATCH 7/8] ARM: embestmx6boards: convert mars/riot boards to DM_ETH sbabic at denx.de
2021-04-02 14:52 ` [PATCH 8/8] ARM: embestmx6boards: convert the mars/riot boards to DM SPI Peter Robinson
2021-04-08 20:58   ` sbabic at denx.de
2021-04-03 14:13 ` [PATCH 1/8] ARM: embestmx6boards: Import the marsboard/riotboard. dts files Fabio Estevam
2021-04-08 20:58 ` sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210402145233.918645-7-pbrobinson@gmail.com \
    --to=pbrobinson@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox