From patchwork Tue Oct 1 12:31:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mark-MC.Lee" X-Patchwork-Id: 11168643 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEFF213BD for ; Tue, 1 Oct 2019 12:32:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C234121A4A for ; Tue, 1 Oct 2019 12:32:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gMghwy9w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C234121A4A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=WVqCLyfykzXE48hQ6OzbJS7nDC8hTJ7OOZbPS61u+4o=; b=gMghwy9wjbtf/A En1RxFNFOuLtn6Cbcj6k1xD1Xsm4Y0gpir28JYJHFl8GHAGUQBrwQtm82mNBIn+voseh64+ts+QYG xFGpnQ9QzXFZmD27i+NPjwFCspQkhxqgn0gcdIVpUh3AxchF5mYdns3YHIAFKtk/Xry9VPQ7YKz8c wkEYalsVnIDvHtqaJ3LUpNQ0tf95sFdsh3CKAV3ZMzGWamqbTh0vKUqGXOS/bSM3fIKPY4p7855xv s4LsmcM81XLVZdfTDCpnn4Pl9RaEmCL+i/7Kx4m1ISY6zrchfOcbaIsdHmCX5pbk6tCiwFxzF5eZM N0GK1Gg5IHchXv6boz2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFHKd-000427-1E; Tue, 01 Oct 2019 12:32:43 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFHKa-00040p-HL; Tue, 01 Oct 2019 12:32:41 +0000 X-UUID: acdfceb8cf8142fa9abaaa87cd529de2-20191001 X-UUID: acdfceb8cf8142fa9abaaa87cd529de2-20191001 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 386999651; Tue, 01 Oct 2019 04:32:30 -0800 Received: from MTKMBS01N2.mediatek.inc (172.21.101.79) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 1 Oct 2019 05:32:28 -0700 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 1 Oct 2019 20:32:18 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 1 Oct 2019 20:32:17 +0800 From: MarkLee To: "David S. Miller" , Sean Wang , John Crispin , Felix Fietkau , Nelson Chang , Matthias Brugger Subject: [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support Date: Tue, 1 Oct 2019 20:31:49 +0800 Message-ID: <20191001123150.23135-2-Mark-MC.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191001123150.23135-1-Mark-MC.Lee@mediatek.com> References: <20191001123150.23135-1-Mark-MC.Lee@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 69F1E331B29365995878096379C70BE41545FD0A32930813DB7CCFFED2A424322000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191001_053240_579495_02ED32F9 X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rene van Dorst , Rob Herring , linux-mediatek@lists.infradead.org, MarkLee , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Add missing configuration for mt7629 gmii mode support Signed-off-by: MarkLee --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index c61069340f4f..703adb96429e 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -261,6 +261,7 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode, ge_mode = 0; switch (state->interface) { case PHY_INTERFACE_MODE_MII: + case PHY_INTERFACE_MODE_GMII: ge_mode = 1; break; case PHY_INTERFACE_MODE_REVMII: From patchwork Tue Oct 1 12:31:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mark-MC.Lee" X-Patchwork-Id: 11168681 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9180414DB for ; Tue, 1 Oct 2019 12:47:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EC1C21872 for ; Tue, 1 Oct 2019 12:47:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xksv5cFB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EC1C21872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=ko2jkCeWWDaeaeX0+Jw27uisP3yPekWxLz1FjMg82Ew=; b=Xksv5cFBa3hPPR RgNCIIu8SGS+zWzlrOjHKhf9OfIv6JZ9E1kArL9hLB0Fgl+povzw8x39VuTIKE4iuV13XnY0Rnt1Y A//wXA2r7Mn83WQrYJFUq0DeAx927AITA1s960J9/2qJZhzHhVJaSaxHbp55YIEvmbyOxtcOfAceb 7f8o7dLyjSghO6QuCcxxmrPQyrDy2sJ6+0G4KfQg8rrjpg2Cx3tB6K7N7JA2m8M165ot2s37RL7dk Kd50TDpIrLrDo+PHO5MFyQn+sZgw7BviKfKXoDsznVm+FCjy7yGYQ4uNlMuiSXiaCLy+yD0BeIqa2 y2XFAHWfwap8sI7GjxoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFHYy-0002ic-IG; Tue, 01 Oct 2019 12:47:32 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFHYv-0002h7-Ow; Tue, 01 Oct 2019 12:47:31 +0000 X-UUID: 858236b822bd4c588383b7f0be712bf2-20191001 X-UUID: 858236b822bd4c588383b7f0be712bf2-20191001 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 964390308; Tue, 01 Oct 2019 04:47:22 -0800 Received: from mtkmbs05n1.mediatek.inc (172.21.101.15) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 1 Oct 2019 05:47:22 -0700 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 1 Oct 2019 20:32:17 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 1 Oct 2019 20:32:18 +0800 From: MarkLee To: "David S. Miller" , Sean Wang , John Crispin , Felix Fietkau , Nelson Chang , Matthias Brugger Subject: [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding Date: Tue, 1 Oct 2019 20:31:50 +0800 Message-ID: <20191001123150.23135-3-Mark-MC.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191001123150.23135-1-Mark-MC.Lee@mediatek.com> References: <20191001123150.23135-1-Mark-MC.Lee@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191001_054729_817786_7B073F41 X-CRM114-Status: UNSURE ( 9.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rene van Dorst , Rob Herring , linux-mediatek@lists.infradead.org, MarkLee , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org * Removes mediatek,physpeed property from dtsi that is useless in PHYLINK * Set gmac0 to fixed-link sgmii 2.5Gbit mode * Set gmac1 to gmii mode that connect to a internal gphy Signed-off-by: MarkLee --- arch/arm/boot/dts/mt7629-rfb.dts | 13 ++++++++++++- arch/arm/boot/dts/mt7629.dtsi | 2 -- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/mt7629-rfb.dts b/arch/arm/boot/dts/mt7629-rfb.dts index 3621b7d2b22a..6bf1f7d8ddb5 100644 --- a/arch/arm/boot/dts/mt7629-rfb.dts +++ b/arch/arm/boot/dts/mt7629-rfb.dts @@ -66,9 +66,21 @@ pinctrl-1 = <&ephy_leds_pins>; status = "okay"; + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "sgmii"; + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + gmac1: mac@1 { compatible = "mediatek,eth-mac"; reg = <1>; + phy-mode = "gmii"; phy-handle = <&phy0>; }; @@ -78,7 +90,6 @@ phy0: ethernet-phy@0 { reg = <0>; - phy-mode = "gmii"; }; }; }; diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..867b88103b9d 100644 --- a/arch/arm/boot/dts/mt7629.dtsi +++ b/arch/arm/boot/dts/mt7629.dtsi @@ -468,14 +468,12 @@ compatible = "mediatek,mt7629-sgmiisys", "syscon"; reg = <0x1b128000 0x3000>; #clock-cells = <1>; - mediatek,physpeed = "2500"; }; sgmiisys1: syscon@1b130000 { compatible = "mediatek,mt7629-sgmiisys", "syscon"; reg = <0x1b130000 0x3000>; #clock-cells = <1>; - mediatek,physpeed = "2500"; }; }; };