From patchwork Wed Jul 24 19:17:23 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: 11057521 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 CE70914DB for ; Wed, 24 Jul 2019 19:18:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEF6B285EC for ; Wed, 24 Jul 2019 19:18:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1ADF288AD; Wed, 24 Jul 2019 19:18:47 +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 E0ADA285EC for ; Wed, 24 Jul 2019 19:18:46 +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: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=BVh01Eb258TPwH5HydZ5OqOn9aII9GTsgv+IgI8gAso=; b=NuD/TI1G8N+eVD 6K8T32BCzHcnegpab2CU0SkPiVwr+UdvFTeSglQ0yc4HO/pbMBrflyNMrk9HtMqA76N6ZqoO6hm/i HVv12+C3Uo/FB28h0o2UHbvCmHPsmtsyOfiXeSA6sZ1E8+hozJZz13lAA3WacQuC8V1plDH0mZQad 4qolz7S/t32O5z6kUjgjNaV8HodmPzh5UraDfkyoNkkJOQYU1B+b7fSI5/6BLOGtygPaI+NoOWc+U qZS8xwHNYEsM7Vp1OfaglZLi7wpkdPMUpZZXGXRi+vT4qIPDx4dOcE2FAhJIbQ3qI3xproR0EozA0 8XBwM03KGdxm6+S9+wRQ==; 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 1hqMmk-0000q7-KA; Wed, 24 Jul 2019 19:18:46 +0000 Received: from mx.0dd.nl ([5.2.79.48]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqMmg-0000p9-5g for linux-mediatek@lists.infradead.org; Wed, 24 Jul 2019 19:18:45 +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 0FA3B5FD5A; Wed, 24 Jul 2019 21:18:38 +0200 (CEST) Authentication-Results: mx.0dd.nl; dkim=pass (2048-bit key; secure) header.d=vdorst.com header.i=@vdorst.com header.b="qk4AZsEl"; 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 B55091D25CA9; Wed, 24 Jul 2019 21:18:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.vdorst.com B55091D25CA9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vdorst.com; s=default; t=1563995917; bh=weikOzuhvuizQxHFtpYezAOwp5TBaaOl/uv7IuspKpQ=; h=From:To:Cc:Subject:Date:From; b=qk4AZsEllY3v75JVxR6ajoFWPeuoPeo2b6yXCZTaYGB8drhLwBYb6jjhjdejvvZ8i XX/8uhoWK57x3pVsZjs/vBQyo1Ghxy5qYRSesADZgTRsKt9i8TUbEpHjfaoy5Fgqx2 BwLEt2NsYOUnEiXi8ZD7fiYuvop1rEDc4M/nrMD5f3EHxIv3wfla0tQqKcyUzmjZat pmE92U+n8xil0eXTHse1/d580opj0BS6+6P6ZIalndBhHrWbtypE9Q8qSWufBiu9Sb GXdZYezkOylEG7wHzkfG/FL7mGfh5WTYuAz/YcIBgj5yV0ePzP1ECBE6DUpCA5NbOw b6GxLdGQ+0TNA== From: =?utf-8?q?Ren=C3=A9_van_Dorst?= To: netdev@vger.kernel.org Subject: [PATCH net-next 0/3] net: ethernet: mediatek: convert to phylink. Date: Wed, 24 Jul 2019 21:17:23 +0200 Message-Id: <20190724191725.3903-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-20190724_121842_775535_EB53F533 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. 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: Andrew Lunn , Frank Wunderlich , Florian Fainelli , devicetree@vger.kernel.org, Sean Wang , Russell King , linux-mips@vger.kernel.org, =?utf-8?q?Ren=C3=A9_van_Dorst?= , Rob Herring , linux-mediatek@lists.infradead.org, John Crispin , "David S . Miller" Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP These patches converts mediatek driver to phylink api. SGMII support is only tested with fixed speed of 2.5Gbit on a Bananapi R64. Frank tested these patches on this Bananapi R64 (mt7622) and Bananapi R2 (mt7623). Tested on hardware: mt7621, mt7622 and mt7623. 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 | 72 +-- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 486 ++++++++++++------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 67 ++- drivers/net/ethernet/mediatek/mtk_sgmii.c | 65 ++- 8 files changed, 436 insertions(+), 287 deletions(-) To: Cc: Sean Wang Cc: Andrew Lunn Cc: David S. Miller Cc: Florian Fainelli Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: Frank Wunderlich Cc: Russell King Cc: linux-mediatek@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: John Crispin