Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp753758rwd; Thu, 25 May 2023 03:32:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5k/iLzE4oWtVx56E3AtbfW51CyTCYsbs3SKw+gona9oXvKA7cic1pJ8ljCs1VBWm2W8Nas X-Received: by 2002:a17:90b:1bd2:b0:252:27d9:7ef0 with SMTP id oa18-20020a17090b1bd200b0025227d97ef0mr1101021pjb.27.1685010737219; Thu, 25 May 2023 03:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685010737; cv=none; d=google.com; s=arc-20160816; b=xLFyVgSbDUi8RgEF4hDBychrL0513Od/Z2F3Hy5qaaq0Pf8zd8wsMkJ2UqyFULATlG N4wYCOzz7NZMahYF9oJt7ndmUsucjjNWnFiO3jgRGQn7NRQ34oEq7zCChicbsIDuB2h/ AO8ZqOq10auaJY9kqWZpvZKKsgojACxQJEO55ywkcXdr6iNPRyWtP8AxGM0ax3XTm0p6 g6TI4OD93qyvTyTtIywHEg/EaygrMN3zpHJRBx8EbJ0/Nrvqq3waiWyR+A93BkdU08An T6x22cH+8RDdFPLemWaPEY0088MSl11J3aHpt+ovvPCEjfOlaPs2Z6TJ2TkrJvNhpPkI vWLQ== 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=2DtftuPlt7nw4969LQf7yqNdHZuf0cGj069GxF4CZik=; b=jGs4jIqpF29F63nc2PMqcjQLhVWBeWJsSM2RC26zr4O8zIWGjIS1+CLEbzuFkx1ohd 7GCmhHAWfoF9rvuUAxqBlPWinWlVrQNgr3WgarTfYdNx7DpbFK38+oWsrjVU7GJz3oQT 5kEmHPz9rY88JuKY9fK2jnTl52H/2DaMw/Vm+r+U081sp3WzqH12ZJP4lPO/a7SkEOEL vYZPPuKbpiulQilgTdeyPBUCKKAA5Mhim+F0RS+Qy8Bwjhc/gNpF4aP79qrltZX6yipR oPPvDPr/gXRJ4F4F2PVy33HvZfCMPL/fuFMI8vks3xst7Cp4X7551oWJdWuUh0rw9cVy MBQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=DO3IpYXV; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id np3-20020a17090b4c4300b00250a6b87c76si566963pjb.142.2023.05.25.03.32.02; Thu, 25 May 2023 03:32:17 -0700 (PDT) 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=DO3IpYXV; 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 S240681AbjEYKLi (ORCPT + 99 others); Thu, 25 May 2023 06:11:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbjEYKLh (ORCPT ); Thu, 25 May 2023 06:11:37 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFA2A12F; Thu, 25 May 2023 03:11:33 -0700 (PDT) X-GND-Sasl: maxime.chevallier@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1685009492; 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=2DtftuPlt7nw4969LQf7yqNdHZuf0cGj069GxF4CZik=; b=DO3IpYXVy1u9yIMYSSpRmIAUueR1oIzZWUZJLgrJVhDCiYhS2cV1JPqvo3UWlGc9NJOT3m bAE4iPAAvMd+e8YtAm1ZjafMkP6EU7bJx+TWCMf7fKXpGnJ7jFIRMlFT3fGkWGSmADaD0w BHL0OFP2Z63czR6kV14vTMRSIVdSVVtgzKstjfOQATeaqomDIiIf9Gr1QnlYZlGQ8CpAoz tMCWmNfQkXY2p0nHxAbijSbMtiUJ5Z+/Wwz86U88v4Q84geM9WW3IVmgtYbOvowATB4YNN x4R55InUBIlLuoP03JjiP1pa2/tZZZ9AvnAW8VApX0HcI3RPvXNE5EX3nPFoJQ== X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 706B7C0005; Thu, 25 May 2023 10:11:28 +0000 (UTC) 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 v2 0/4] net: add a regmap-based mdio driver and drop TSE PCS Date: Thu, 25 May 2023 12:11:22 +0200 Message-Id: <20230525101126.370108-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hello everyone, This is the V2 of a series that follows-up on the work [1] aiming to drop 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. Changes in V2 : - Use phy_mask to avoid unnecessarily scanning the whole mdio bus - Go one step further and completely disable scanning if users set the .autoscan flag to false, in case the mdiodevice isn't an actual PHY (a PCS for example). 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 | 90 ++++++ drivers/net/pcs/Kconfig | 6 - drivers/net/pcs/Makefile | 1 - drivers/net/pcs/pcs-altera-tse.c | 160 ----------- include/linux/mdio/mdio-regmap.h | 26 ++ include/linux/pcs-altera-tse.h | 17 -- 19 files changed, 264 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 -- 2.40.1