From patchwork Fri Apr 2 14:52:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 1461719 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=nFRCUx4k; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBjjw5dMkz9s1l for ; Sat, 3 Apr 2021 01:53:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D910E81668; Fri, 2 Apr 2021 16:52:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nFRCUx4k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E2F5C81578; Fri, 2 Apr 2021 16:52:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 04060812B2 for ; Fri, 2 Apr 2021 16:52:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pbrobinson@gmail.com Received: by mail-wr1-x434.google.com with SMTP id j9so4948939wrx.12 for ; Fri, 02 Apr 2021 07:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XzNPIVTgjTb57xiohL2V2MRqVhsGVf2FiWUiv0IJAHE=; b=nFRCUx4koFvrv2BHKJCq1NEzJ1Dt0HRpPpOvYTrkGyZocGPepVUVdAyvGv/rgkzZWy fGcbaDo+/4wGPwUpg+T+wY2oteOOB2Ln0Q+b4biFp4UQe7N4DI4xCsrOKI3blgUg4cIw h7R9uLIqROahxl9c3cnTHMZVj6cLctOg/vRfpUgvfpTDO2dycLTMRFdpjQhFQ4b3I4wX vZ1V/PXmT8Bs9ZFaeD0iWSm8tJhDpX45e1muEZxl/VodCPAKlxCHNyTRLjMSdB1Bawuh yGUROUNGUE/IfdkBYJpbYf2GZCShN78cSDrvatI5hao4sNmprIdYuxwIhyrG7vkhxj0Z Phng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XzNPIVTgjTb57xiohL2V2MRqVhsGVf2FiWUiv0IJAHE=; b=RbOL4Mg/m9kY5d5QnAyUJ5PxPClJ8L7580mvAlZxBoPTvYFaqqoCwv2TU2hp9AJawZ 2jtm/V8UlUnSaZzZZyXXUjpYKUXzcJU7BjU1Dspxb7pEuXiUWGnaZLFDhsuxZtdF5RdS Z8eDD/8xzYwAeRDxCTMzEz03t/yktGttxucVfj3+nHPck+as5fJEBE+VWFfqjSWiOU51 14E6R5EMN1KXWZjX3IszIvOianX8VLt0NfNdiJpkZaXqmS8MODcRj3dCYO0PgYJ28+gm UjWlrRkBLPQwt/2D/5zl1VWlt9JDfA1FbClgvXwAj1cU5nCh5l3yg3KXuV64+OztV60E AreA== X-Gm-Message-State: AOAM530rhTEKe0cp4nU2g6geXAodVHvVO6Y6rqkoM+H+I4ynXLKUeDAk WR6Eo5tdyQCFfQVqtcPJByCMwdH+4Uk= X-Google-Smtp-Source: ABdhPJxTzcFPjgqrfner4IqPC6zg3j18FNf+8Syk3Djf7WJ2RWx5lFOg2uqDUJVhFkwkIeT9BESSPA== X-Received: by 2002:a5d:6304:: with SMTP id i4mr15684139wru.155.1617375161551; Fri, 02 Apr 2021 07:52:41 -0700 (PDT) Received: from morpheus.home.roving-it.com (2.e.6.5.c.a.a.1.a.8.0.3.1.e.3.c.1.8.6.2.1.1.b.f.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:fb11:2681:c3e1:308a:1aac:56e2]) by smtp.googlemail.com with ESMTPSA id o7sm15256397wrs.16.2021.04.02.07.52.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 07:52:41 -0700 (PDT) From: Peter Robinson To: u-boot@lists.denx.de Cc: Peter Robinson , =?utf-8?q?Eric_B=C3=A9nard?= , Fabio Estevam , Stefano Babic Subject: [PATCH 7/8] ARM: embestmx6boards: convert mars/riot boards to DM_ETH Date: Fri, 2 Apr 2021 15:52:32 +0100 Message-Id: <20210402145233.918645-7-pbrobinson@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210402145233.918645-1-pbrobinson@gmail.com> References: <20210402145233.918645-1-pbrobinson@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Convert the boards to use DM_ETH. Signed-off-by: Peter Robinson Cc: "Eric BĂ©nard" Cc: Fabio Estevam Cc: Stefano Babic --- 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 */