From patchwork Wed Feb 8 16:41:57 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: 13133250 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 898B6C636CC for ; Wed, 8 Feb 2023 16:41:35 +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=8z64n1UBbKCRn9dJtSGjN82jMcKMNHFtpLSAn/yfykw=; b=uY3tUO5oEZ3l2q /aLBxn6+vGh2615U6xt/30ev2DNwCy0JhH3PuC0l6Vz/iuvkCpfJv3o8ax5KxKYFNvRzIn/NUS2JT axufp5nhK56hmgiYxm6zeZYaOJ9fJJQiaoMQi8COX0gQ8zy0xiLq9t9/c3vrwpPNiFjitn+xsGtMd GWk265NU4eJT7+pFXbAwONGsqasExXBsefKnHn2G5bk4pfotiN2XMDjEwHNNPC5vVTPcZnty6ciNq X0rP9MPeiDaIT6uM3HqD33tJ/2nCAbGyXLt5QRFLw8eES8zAXfiBgfZ6Fui4EB7dumT6Inw7LgF4J cq1ChmH/sIPBA/5ayT7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPnUj-00GHru-V0; Wed, 08 Feb 2023 16:40:30 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPnUf-00GHmf-0u for linux-arm-kernel@lists.infradead.org; Wed, 08 Feb 2023 16:40:27 +0000 Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 3F2E61BF203; Wed, 8 Feb 2023 16:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675874417; 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=5IY2oVgOi4BwHuNcg4KU4s9e+YaMLKjv+djWjs2zE1w=; b=YHiMew4DDTZtKpK+kkFnUpmCk7lw8g0jZdCSDsSaqdQQq41UeOHj64XUJU2xIzLcRCqk5j ryzVtL4vpTCRqV3n2+qLfHTGZjD0m/jWjwkw3FJonsPB/4yOPW0igeoUc22KYAMTqjZAWN y9odpyZZD91wXeqcpp1YzOWp2KlTXlaAlgDL96uMKAeN9dESGXYi07M78eMb+lP7lJ7ILK 48xEeUMt8Hs2pYz8mEvdJqPc+/LWJREwJrEA7L/NwacSCeA4Ak25IIYXcZZQos0Q4o52fA zzxCB8Giv06zfY5pokELEaoquFEDxYHpbBPqXfFmHRAKjAFrjtCNqlW8ZQROOw== 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 v2 0/6] net: stmmac: add renesas,rzn1-gmac support Date: Wed, 8 Feb 2023 17:41:57 +0100 Message-Id: <20230208164203.378153-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-20230208_084025_415009_4E78EF7D X-CRM114-Status: GOOD ( 15.66 ) 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. --- 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