From patchwork Fri Aug 23 13:45:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_van_Dorst?= X-Patchwork-Id: 11111777 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 5E8D51709 for ; Fri, 23 Aug 2019 13:45:56 +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 3280F22CE3 for ; Fri, 23 Aug 2019 13:45:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NRSbHQWO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=vdorst.com header.i=@vdorst.com header.b="VphKtHb6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3280F22CE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=vdorst.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: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:In-Reply-To:References: List-Owner; bh=65TXt2oR72RXD3iwfrG/g1tgzBnWQOzBnk/u6XeT9jM=; b=NRSbHQWOEwzGEG GekAfS8FkPJxxY++L645eCNdr1alXgJTodMuu9Rp9uluidYfdCXCbCYPNcXBhU2IjPQjf304x4DQv P7GF59HaIR2hZupvzHKXfJKzUhVxkzWRj0RIBaOeYOm7XbxESPnixu4JViY/gc7EfmD6exeX128ms hAUIxU2rjCtIrtcsokrALBw8n1xIbGWjMb33psyM7d6k3Qt/CvQpQ96PxErolMtgMagOSgnoudnOm jyOE6Zr6TbedsBMlXva6QDuqNQFFMR5DD7Qsf6963bJaeMyGCivFHKJU/Qg4Ip86Oj/AOuMIoIxWn Zs3BvutvTB0rXe5W7oUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i19t5-0003oS-7y; Fri, 23 Aug 2019 13:45:55 +0000 Received: from mx.0dd.nl ([2a04:52c0:101:921::25]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i19ss-0003Te-Nn; Fri, 23 Aug 2019 13:45:44 +0000 Received: from mail.vdorst.com (mail.vdorst.com [IPv6:fd01::250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.0dd.nl (Postfix) with ESMTPS id AA80F5FA7B; Fri, 23 Aug 2019 15:45:39 +0200 (CEST) Authentication-Results: mx.0dd.nl; dkim=pass (2048-bit key; secure) header.d=vdorst.com header.i=@vdorst.com header.b="VphKtHb6"; dkim-atps=neutral Received: from pc-rene.vdorst.com (pc-rene.vdorst.com [192.168.2.125]) by mail.vdorst.com (Postfix) with ESMTPA id 6DD951D89681; Fri, 23 Aug 2019 15:45:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.vdorst.com 6DD951D89681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vdorst.com; s=default; t=1566567939; bh=4DXT2J8mfFRCiwxSqy0mkdAE2qhxEDwsE+v9BSRv9mo=; h=From:To:Cc:Subject:Date:From; b=VphKtHb6a42eRPTzPTxmHYEDVRgcxRQVC/UGv7HMIqdMhJNRa0YhE0DdufZxZXWr9 6mNhvtcx23q2xZH35r4DFHDRuoEAOP62k2vFBE0sx+tlzT6XV6dk9s77a57krT6ONk JDXw+9lPhGJR8tJDKztkexhSlH0MP0Kd1W7zEBRYJMkI8SZka+IO4iCDn4akory5qJ 8ui8zWa/x2ozqxrTgtZnyzHwl/kRTBxpIalSuSW3B2UwngipsfpubRaOysC8CH2vFY XiRJtIJuxCwaf6ZbR+pjPOaW4Fr8//fBFqpBArHPm8+cdlzRdSVoRJGZVTrF4sFEZN +OV+M5caJdarw== From: =?utf-8?q?Ren=C3=A9_van_Dorst?= To: John Crispin , Sean Wang , Nelson Chang , "David S . Miller" , Matthias Brugger Subject: [PATCH net-next v3 0/3] net: ethernet: mediatek: convert to PHYLINK Date: Fri, 23 Aug 2019 15:45:13 +0200 Message-Id: <20190823134516.27559-1-opensource@vdorst.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_064543_079817_672A33E1 X-CRM114-Status: UNSURE ( 8.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 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.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: Frank Wunderlich , netdev@vger.kernel.org, linux-mips@vger.kernel.org, Russell King , =?utf-8?q?Ren=C3=A9_van_Dorst?= , linux-mediatek@lists.infradead.org, Stefan Roese , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org These patches converts mediatek driver to PHYLINK API. v2->v3: * Phylink improvements and clean-ups after review v1->v2: * Rebase for mt76x8 changes * Phylink improvements and clean-ups after review * SGMII port doesn't support 2.5Gbit in SGMII mode only in BASE-X mode. Refactor the code. René van Dorst (3): net: ethernet: mediatek: Add basic PHYLINK support net: ethernet: mediatek: Re-add support SGMII dt-bindings: net: ethernet: Update mt7622 docs and dts to reflect the new phylink API .../arm/mediatek/mediatek,sgmiisys.txt | 2 - .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 28 +- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 - drivers/net/ethernet/mediatek/Kconfig | 2 +- drivers/net/ethernet/mediatek/mtk_eth_path.c | 75 +-- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 529 ++++++++++++------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 68 ++- drivers/net/ethernet/mediatek/mtk_sgmii.c | 65 ++- 8 files changed, 477 insertions(+), 293 deletions(-) Tested-by: Frank Wunderlich