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: 5138 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3559508wrn; Wed, 8 Feb 2023 08:41:24 -0800 (PST) X-Google-Smtp-Source: AK7set/Qpx1jPlJorNVe2sDRLtsZtVdcxoSN6VASqXTMcHvjodFFn8t2r4rXIHYesw7FbO4L9G0S X-Received: by 2002:a17:902:d48a:b0:196:6308:c9d3 with SMTP id c10-20020a170902d48a00b001966308c9d3mr8662712plg.0.1675874483945; Wed, 08 Feb 2023 08:41:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675874483; cv=none; d=google.com; s=arc-20160816; b=eK1AYnTpTv9jrLoZDCQ/GJKSfdDiXUQgTzF1mW1Z0TE+DB/2irQqttgKDGkHm/O6xy GG2c251zOsszHFUMa/MsFj2eAq2/Wcq18FcguHefo2m3OSgcggUXe/glo1zTkXwsrqna O+moAQp0pgYFRHAy6Z2DOOpWmXGPdw72EZxKzHYTaIz0G3I58qNKaXeiW5EuN9mpNI8e Hzmy0mAcUOABPel89ziE95qD5CCDMOQ0Ze6z+V8tJItwYwbHcy+lXafskJvFKJHWFC0D f5ZdUlHqqQtzx/5cRSSaODs2NF4RwVIlnxhFoHfsTj/RIXIla75lCLgM/1nvJB7NvJJx osdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5IY2oVgOi4BwHuNcg4KU4s9e+YaMLKjv+djWjs2zE1w=; b=T59G8SZad8juU+ILUFxlG5kIn6JdARIEHUfXMQ5iXOI+UopG/RiH1VPtgZJfPfUA/+ ODbqCBrEO4loz76Mj+5Pfu9ZHTCkGDesNLVRGqPd6GcaKac6YwFT3VGGUIpcfwhj2+d9 dxKGkz00RmZRU/4OsGI3cDO98B6sQkfRiRu1SX1OGrMnWVEUlFDcSDRO4cjUUOvYYyO9 wmvc3E+HHWCaSQP6JqeerkRSLWp/csOtBCv5btMZ9LUrcfnbNTMx7oTv67f9zMVE/9/C Sz7HAIgYVp6V7QYxs0QxssbjrKhFsgS6idWrMVAx5dBWIzWmGEdUC3f6GxdIFQBSx8nQ cT4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YHiMew4D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jd9-20020a170903260900b00199563fff14si242672plb.410.2023.02.08.08.41.10; Wed, 08 Feb 2023 08:41:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YHiMew4D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231650AbjBHQkd (ORCPT + 99 others); Wed, 8 Feb 2023 11:40:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbjBHQk0 (ORCPT ); Wed, 8 Feb 2023 11:40:26 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7EC04E52E; Wed, 8 Feb 2023 08:40:18 -0800 (PST) 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757281762939471797?= X-GMAIL-MSGID: =?utf-8?q?1757281762939471797?= 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