From patchwork Tue Dec 11 19:33:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10724561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BF3015A6 for ; Tue, 11 Dec 2018 19:34:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BF122ADA3 for ; Tue, 11 Dec 2018 19:34:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F4822B454; Tue, 11 Dec 2018 19:34:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 95C682ADA3 for ; Tue, 11 Dec 2018 19:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=K3KLg3eKRrK8dkmDC4RCHhQb4q/QaALFR5L+7YaCf0g=; b=kYrdA5nfY/7fGZbac89uf8WIcL QvSBUAD/pL+hx+/hNqlbJvpTl0Jy7PimzJBhj4Mrqakl1H4TDJKP6TgDdSCwbVJXJgsT+K/2lkAuH NXxDW8RiM72leMkZMOcWzsqGzW5LEX8MXsTzvsQWEznsVPLJVO04X1F7l50KZyX459mOpLYrdIKeO LP+282GvLEA32rLiGRpF7oIRVagkqHu6K0s3qfgXSefTyH/Da6JeSW38p65TO+VdSgZwsOAyO2lGd DEpb+GPsHteqVbkfqJa0x8uI9aXpW98Kxxl/h6f7AI2ARKr+l2Buak0715Irs2Wqmrc3j6/8Xaata +FQq55ag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWnnX-0000hm-29; Tue, 11 Dec 2018 19:34:27 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWnnG-0000RV-9W; Tue, 11 Dec 2018 19:34:12 +0000 Received: from localhost.localdomain ([91.14.83.44]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M08ia-1hR7Ou3at2-00uML8; Tue, 11 Dec 2018 20:33:36 +0100 From: Frank Wunderlich To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Matthias Brugger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 4/7] [DSA] add support for GMAC2 wired to ext Date: Tue, 11 Dec 2018 20:33:11 +0100 Message-Id: <20181211193314.10695-4-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181211193314.10695-1-frank-w@public-files.de> References: <20181211193314.10695-1-frank-w@public-files.de> X-Provags-ID: V03:K1:mNf+lMJ6ZYyVAuGoQxrUK+NE4jg2KXrE9YW3eDBUMs0VsSBu+ru 7NDUQwiFjxltR9n9InSwmxnPcc7O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X6 TOiDpqwg5zUqtSn9pLAlBYN8VwXh/TNQ72GkM40PR9LLyjjrAkzpn5GbMqZTZ5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181211_113410_695537_D9DD135B X-CRM114-Status: UNSURE ( 8.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP based on https://github.com/openwrt/openwrt/blob/master/target/linux/mediatek/patches-4.14/0032-net-dsa-mediatek-add-support-for-GMAC2-wired-to-ext-.patch Signed-off-by: Frank Wunderlich --- drivers/net/dsa/mt7530.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index a5de9bffe5be..a6a15a063e3e 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1277,6 +1277,11 @@ mt7530_setup(struct dsa_switch *ds) val = mt7530_read(priv, MT7530_MHWTRAP); val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS; val |= MHWTRAP_MANUAL; + if (!dsa_is_cpu_port(ds, 5)) { + val |= MHWTRAP_P5_DIS; + val |= MHWTRAP_P5_MAC_SEL; + val |= MHWTRAP_P5_RGMII_MODE; + } mt7530_write(priv, MT7530_MHWTRAP, val); /* Enable and reset MIB counters */