From patchwork Wed May 24 13:08:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13253975 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 93A7CC77B7A for ; Wed, 24 May 2023 13:08:53 +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=NWDxAjKi7N9u0/gg1HJHn8IihhmQ5qIOvsectx+qeu8=; b=xLJWv5MJSL/eFq x/9uQmp6XfRySsBM0yZl6Z/GGH9mi48GOkoklxXkvYsOVkO/gEGk3bjbSBCoIYPEs94+vy7aVBDjk AtcnbdwDh5Il2ZhOi1HO/PLW07blu/nI7PkNXLRqyS03ZCDAwUqg8PvmXZuh7n1P6HPxYTMVicS3d TrhGyACb/1qkFj0umfgkf/ryYQkaavrPwQ5hgpkB6sXBzGJKXcgbtpjbahGXAm2ovWbXSeGdFf0jn 7MaOFwkaSYnEWt/sXjFSS+lXAqt/TlwJO7QtjOOWil8inJEkwBOhCHfeUxmTpBYEYp3WYSO83bx79 sxggMl67ZT5fuwBI8cnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1oE2-00DWeG-2i; Wed, 24 May 2023 13:08:22 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1oDy-00DWae-2E for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2023 13:08:21 +0000 Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 01960FF810; Wed, 24 May 2023 13:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684933693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Dlu+LIg1CB+EdnEPMRmgOuwoUG3Sx5A6cdZB48OIf+o=; b=TXeMRzQjPBVJLFm8zj+9XMU3hmTOf+SK7zuShVTqMztutIcqd118u6v0w9R/KPPCE7h8qp GZbNPXSmJBJUYjLN9W01if1NHI2dXvYZbS517YQJ8EetG4J6DpBW5wjXXkPOA08EqBu3TP KxLLjyy2yl/fWTUx0ccinXmfglU9jXnmoVlfviY3awUi6quztjFfpQR1nFhRG7IceaZuri 0RR0QA3LX/w8M2UH/wiT/VpdyWMCD8hGm7InL3BIxtVzA6Fkx0TsCMLbZGNNzPbozgN+yo aJcC+0s+iS9aJYCZU2PM7+PLdc8TUnkwkpvzHajszsWdSoVUUGJdVsz6VJ6C3A== From: Maxime Chevallier To: Mark Brown , davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro Subject: [PATCH net-next 0/4] net: add a regmap-based mdio driver and drop TSE PCS Date: Wed, 24 May 2023 15:08:03 +0200 Message-Id: <20230524130807.310089-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_060818_989469_5F025D06 X-CRM114-Status: GOOD ( 14.56 ) 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 Hello everyone, This series follows-up on the worki [1] aiming at dropping the altera TSE PCS driver, as it turns out to be a version of the Lynx PCS exposed as a memory-mapped block, instead of living on an MDIO bus. One step of this removal involved creating a regmap-based mdio driver that translates MDIO accesses into the actual underlying bus that exposes the register. The register layout must of course match the standard MDIO layout, but we can now account for differences in stride with recent work on the regmap subsystem [2]. Mark, Net maintainers, this series depends on the patch e12ff2876493 that was recently merged into the regmap tree [3]. For this series to be usable in net-next, this patch must be applied beforehand. Should Mark create a tag that would then be merged into net-next ? This series introduces a new MDIO driver, and uses it to convert Altera TSE from the actual TSE PCS driver to Lynx PCS. Since it turns out dwmac_socfpga also uses a TSE PCS block, port that driver to Lynx as well. Thanks, Maxime [1] : https://lore.kernel.org/all/20230324093644.464704-1-maxime.chevallier@bootlin.com/ [2] : https://lore.kernel.org/all/20230407152604.105467-1-maxime.chevallier@bootlin.com/#t [3] : https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git/commit/?id=e12ff28764937dd58c8613f16065da60da149048 Maxime Chevallier (4): net: mdio: Introduce a regmap-based mdio driver net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx net: pcs: Drop the TSE PCS driver net: stmmac: dwmac-sogfpga: use the lynx pcs driver MAINTAINERS | 14 +- drivers/net/ethernet/altera/Kconfig | 2 + drivers/net/ethernet/altera/altera_tse.h | 1 + drivers/net/ethernet/altera/altera_tse_main.c | 57 +++- drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- .../ethernet/stmicro/stmmac/altr_tse_pcs.c | 257 ------------------ .../ethernet/stmicro/stmmac/altr_tse_pcs.h | 29 -- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + .../ethernet/stmicro/stmmac/dwmac-socfpga.c | 90 ++++-- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 12 +- drivers/net/mdio/Kconfig | 10 + drivers/net/mdio/Makefile | 1 + drivers/net/mdio/mdio-regmap.c | 85 ++++++ drivers/net/pcs/Kconfig | 6 - drivers/net/pcs/Makefile | 1 - drivers/net/pcs/pcs-altera-tse.c | 160 ----------- include/linux/mdio/mdio-regmap.h | 25 ++ include/linux/pcs-altera-tse.h | 17 -- 19 files changed, 258 insertions(+), 513 deletions(-) delete mode 100644 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c delete mode 100644 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h create mode 100644 drivers/net/mdio/mdio-regmap.c delete mode 100644 drivers/net/pcs/pcs-altera-tse.c create mode 100644 include/linux/mdio/mdio-regmap.h delete mode 100644 include/linux/pcs-altera-tse.h