From patchwork Thu Feb 25 08:44:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1444170 X-Patchwork-Delegate: narmstrong@baylibre.com 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=a3McdxQ2; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4DmRFM2JFtz9sVF for ; Thu, 25 Feb 2021 19:45:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8AEA808B2; Thu, 25 Feb 2021 09:45:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="a3McdxQ2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D799B80929; Thu, 25 Feb 2021 09:44:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 D4F52805BC for ; Thu, 25 Feb 2021 09:44:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wr1-x432.google.com with SMTP id n4so4391242wrx.1 for ; Thu, 25 Feb 2021 00:44:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R5T7zBBuAoSamT5fzJg4szJMz7xK6y2iJD0u3Zya85Q=; b=a3McdxQ2qJtLcC2wK1tBvKGzLvH7sClxUKcsZgsKzjkD5Tg5OBq++9a8QrmxSIg/uQ qJd2+ans8NoDTKRD0AvF7RTiOtTz4uTRg1503oG43wk66lqzv+wQ7oOEh4cWPmyYmzlW 0CZ8e70mn2mULm2uzJLZ14ewvkKwmKlWFzMzd86Wz5lpfQDUrFvW1hxsJyAF44wkfqJD UxAbUvriEk7hoPC4BLInSdfzLelawCGEqDjbIXo7Lred/45dS89HB56HaiPrFCbCD1Q5 ymjbtNWxC2scbmcbCq1R0bxwXZ8oia12Z6t3gVU4nTT4FOf64vakKysPO20H6RRpZDaW rzvA== 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=R5T7zBBuAoSamT5fzJg4szJMz7xK6y2iJD0u3Zya85Q=; b=rZwmSG8I8lCX8MO1EH3tvayBMGqWLjzfLRw+hBCHKiCpfIwAxMYhzuJByiTovHK8GL HjDiBXBkbKSHL9168a3ePzO0n0LSK6Fortlrrk12Ot9N585XYeNbFZCSDnllGUAD9HEb 5Qcu+6GK0P3cU7SqFKYo8o3VU9Lw/FWVBSD96nhqLzxr43MUoRH1pHIQTJ9Sl1jvbR8W +BorysSMvxoMmpWfepX08gK0v4xHWB5EDm2i7yT8u/0ZyqdyFM07FrSdixb9BjA5NQOr mCKAhjjlRNRRegcxFd5iuuUnMILfQq/OuL/9qFgDOYwDhTBESrJCsCx+tcWXm7bZGrCj 9E8Q== X-Gm-Message-State: AOAM530cNc0EZmQC1wpHuQUddP0gG1jsMzeL9uEKaTdMDS7cKcHFKORY Ot3zOY6+VQOZmcvRV/ES4kKSPmLVc/2LVw0O X-Google-Smtp-Source: ABdhPJxnZwtcHunpO56dKpvX41vlbJdg38M54qBMYNh8Jc05c7OEdvQPigPb4sNhibnmhdNZVFhitA== X-Received: by 2002:adf:80e7:: with SMTP id 94mr2263707wrl.5.1614242686080; Thu, 25 Feb 2021 00:44:46 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:90c:e290:c3ab:3c03:bb16:99c6]) by smtp.gmail.com with ESMTPSA id t2sm7595705wrx.23.2021.02.25.00.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 00:44:45 -0800 (PST) From: Neil Armstrong To: u-boot@lists.denx.de Cc: u-boot-amlogic@groups.io, christianshewitt@gmail.com, b.galvani@gmail.com, Neil Armstrong Subject: [RFC/RFT 3/7] arm: meson: remove static MDIO mux handling Date: Thu, 25 Feb 2021 09:44:34 +0100 Message-Id: <20210225084438.2964558-4-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210225084438.2964558-1-narmstrong@baylibre.com> References: <20210225084438.2964558-1-narmstrong@baylibre.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 The static MDIO mux handling in mach-meson is no more needed, delete it. Signed-off-by: Neil Armstrong --- arch/arm/mach-meson/board-g12a.c | 33 -------------------------------- arch/arm/mach-meson/board-gx.c | 14 ++------------ 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c index bb75d4f8ad..bfd40fe14f 100644 --- a/arch/arm/mach-meson/board-g12a.c +++ b/arch/arm/mach-meson/board-g12a.c @@ -97,31 +97,6 @@ static struct mm_region g12a_mem_map[] = { struct mm_region *mem_map = g12a_mem_map; -static void g12a_enable_external_mdio(void) -{ - writel(0x0, ETH_PHY_CNTL2); -} - -static void g12a_enable_internal_mdio(void) -{ - /* Fire up the PHY PLL */ - writel(0x29c0040a, ETH_PLL_CNTL0); - writel(0x927e0000, ETH_PLL_CNTL1); - writel(0xac5f49e5, ETH_PLL_CNTL2); - writel(0x00000000, ETH_PLL_CNTL3); - writel(0x00000000, ETH_PLL_CNTL4); - writel(0x20200000, ETH_PLL_CNTL5); - writel(0x0000c002, ETH_PLL_CNTL6); - writel(0x00000023, ETH_PLL_CNTL7); - writel(0x39c0040a, ETH_PLL_CNTL0); - writel(0x19c0040a, ETH_PLL_CNTL0); - - /* Select the internal MDIO */ - writel(0x33000180, ETH_PHY_CNTL0); - writel(0x00074043, ETH_PHY_CNTL1); - writel(0x00000260, ETH_PHY_CNTL2); -} - /* Configure the Ethernet MAC with the requested interface mode * with some optional flags. */ @@ -138,7 +113,6 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags) G12A_ETH_REG_0_TX_RATIO(4) | G12A_ETH_REG_0_PHY_CLK_EN | G12A_ETH_REG_0_CLK_EN); - g12a_enable_external_mdio(); break; case PHY_INTERFACE_MODE_RMII: @@ -146,13 +120,6 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags) out_le32(G12A_ETH_REG_0, G12A_ETH_REG_0_PHY_INTF_RMII | G12A_ETH_REG_0_INVERT_RMII_CLK | G12A_ETH_REG_0_CLK_EN); - - /* Use G12A RMII Internal PHY */ - if (flags & MESON_USE_INTERNAL_RMII_PHY) - g12a_enable_internal_mdio(); - else - g12a_enable_external_mdio(); - break; default: diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c index f5273f42af..876405f0d4 100644 --- a/arch/arm/mach-meson/board-gx.c +++ b/arch/arm/mach-meson/board-gx.c @@ -126,10 +126,6 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags) GX_ETH_REG_0_PHY_CLK_EN | GX_ETH_REG_0_CLK_EN); - /* Reset to external PHY */ - if(!IS_ENABLED(CONFIG_MESON_GXBB)) - writel(0x2009087f, GX_ETH_REG_3); - break; case PHY_INTERFACE_MODE_RMII: @@ -137,14 +133,8 @@ void meson_eth_init(phy_interface_t mode, unsigned int flags) out_le32(GX_ETH_REG_0, GX_ETH_REG_0_INVERT_RMII_CLK | GX_ETH_REG_0_CLK_EN); - /* Use GXL RMII Internal PHY (also on GXM) */ - if (!IS_ENABLED(CONFIG_MESON_GXBB)) { - if ((flags & MESON_USE_INTERNAL_RMII_PHY)) { - writel(0x10110181, GX_ETH_REG_2); - writel(0xe40908ff, GX_ETH_REG_3); - } else - writel(0x2009087f, GX_ETH_REG_3); - } + if (!IS_ENABLED(CONFIG_MESON_GXBB)) + writel(0x10110181, GX_ETH_REG_2); break;