From patchwork Thu Feb 9 15:16:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13134721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9B7D6C636D6 for ; Thu, 9 Feb 2023 15:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=SomNI1/Tr0wdHDdeeL3FhpSVQR19zYSfSq+eQ0Cga/Q=; b=sWp3/5all31u8Q 7a0vqsna98NWmkefm/7jZnyeEQKQYGVu5NQMM6g58ndBWP3g5uIZMb9gJogIi6af+feVXwDkezJW+ N0r0w6dawxOTS86zOwUsf4pM/D24i2c4HZLfYPRDzoceAS36cSi2J4vHE0FkPUOl02iFiorEjr5Fs 9X7YByc35snGRI4eORDz9T7mNK1NbhPTdA6D4shvXOO3SQW0gt8nzkoXjniYRw6M3aGuif7BrIdV6 lmAhCFqo2itzm1pIQ67KHxVqvXGKEHOHNz0GLJRT78QaPDs8TbuqGRzj1moxsRZVfwQ+RWBS6p4qq yvXYi4Z1rfGvwdeG6xIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ8cz-0028FF-9l; Thu, 09 Feb 2023 15:14:25 +0000 Received: from relay11.mail.gandi.net ([2001:4b98:dc4:8::231]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ8ct-0028Cc-Ql for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2023 15:14:21 +0000 Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5DDF2100004; Thu, 9 Feb 2023 15:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675955654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVOvYQa9qOIWTUDpJqNiGlDU/+I5voPK1qjEvEaieaY=; b=Y7+wp6Xw0fNNsld9rdLaqiHWFAYyK3efTcjSVW0j0yaKHFk0EUmpSzre8SqIgEh+tj1fkn l/v9rbwzPUv6+Gxtgim0bKbjjnIh5RVRU1E8kJeg8f4wrieipoJ75fp8bn9vsB0yIDELL2 I71Vqc9nU5nT1l+XCNJp9aWBhsSlqJLr6yyaLKQLP4YeA4TyfFZDuyQUuP9xCAjyJyRNyB j2Mn0YerZl36xgXbgHPKAgfbYO7BxvSyWfQ+z5aPbqIvHzV1LKOyQTAc0Xaxm+HUJzW/sw QXbzZYm/3yGpm1l7rz4cFRQotcY6+TuxU8VGDMH9HMXKFRXvngjvcvLMexvjrA== From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Sergey Shtylyov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Russell King , Wong Vee Khee , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Kurt Kanzenbach , Revanth Kumar Uppala , Tan Tee Min Cc: Thomas Petazzoni , Herve Codina , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Milan Stevanovic , Jimmy Lalande , Pascal Eberhard , Mohammad Athari Bin Ismail , Jon Hunter , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v3 0/6] net: stmmac: add renesas,rzn1-gmac support Date: Thu, 9 Feb 2023 16:16:26 +0100 Message-Id: <20230209151632.275883-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_071420_199978_DDBFDB6F X-CRM114-Status: GOOD ( 15.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rzn1-gmac instance is connected to a PCS (MIIC). In order to use this pcs, add support in the sttmac driver to set a generic phylink pcs device instead of the xpcs only. Moreover, it adds support to provide a phylink pcs device from the stmmac platform data and use it with the driver. It also adds the bindings and the new rzn1-gmac driver that retrieve this pcs from the device-tree. --- V3: - Sort out the bindings compatible V2: - Remove patch that moves phylink_start() earlier in init - Add miic_early_qsetup() which allows initializing some miic port earlier to provide a RX clock to stmmac IP - Call miic_early_setup() in rzn1 stmmac driver - Fix bindings Clément Léger (6): net: pcs: rzn1-miic: add pcs_early_setup() function net: stmmac: add support to use a generic phylink_pcs as PCS net: stmmac: add support to provide pcs from platform data dt-bindings: net: renesas,rzn1-gmac: Document RZ/N1 GMAC support net: stmmac: add support for RZ/N1 GMAC ARM: dts: r9a06g032: describe GMAC1 .../bindings/net/renesas,rzn1-gmac.yaml | 67 ++++++++++ arch/arm/boot/dts/r9a06g032.dtsi | 18 +++ drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/common.h | 2 + .../net/ethernet/stmicro/stmmac/dwmac-rzn1.c | 120 ++++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +- .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 + drivers/net/pcs/pcs-rzn1-miic.c | 12 ++ include/linux/pcs-rzn1-miic.h | 3 + include/linux/stmmac.h | 1 + 11 files changed, 240 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/renesas,rzn1-gmac.yaml create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c