From patchwork Fri Jul 29 15:33:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 12932553 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 9CD08C19F2A for ; Fri, 29 Jul 2022 15:35:24 +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=4cjj+DDcybz2iIWoJZEG+2btQNID0Q1JUapBCcZPn8M=; b=SuJDFUE49gYzcN 91r2hmy/9LmlKpnwj4HkIhSqIMgAmf9X2qTH/Pgv10750+F1xt/MJIt7/muFHqqdLz71HhldMcznh 9knhUYHoUmNf/oEqP7Y1+bcc+hjflZfzLGaAzTluGrJGZI6wcTBo2/7EEbGD3Omt4MDnMsBY2LtwG 9bj1zXSOG86iOtLFixAk8oF3qYObVS7QKBmVIq40QvZaeo59DqyljKDGuXbUnfkHiEUkw1q5NTW8I 8rfEO/xe2rJzkj3ltlGiGDQX8/9cXW9G81KA09dBPOShL+aorUMyodolUHVCl8iGNAh9gf5yVOza+ 2vWjNpbSyCaGOcL5uwNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHS0P-005wIY-77; Fri, 29 Jul 2022 15:34:25 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHS0A-005w6X-Rw for linux-arm-kernel@lists.infradead.org; Fri, 29 Jul 2022 15:34:13 +0000 Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id AF00A240003; Fri, 29 Jul 2022 15:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1659108843; 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=W8HzVP3f12jtZr7ZSlHrA7jmUrW5KGei/Y00G5BNdF8=; b=XJNp0Bp7SVJ5kKDdoYriSdiGFucOCO3WcPhxRjgoKwueodrAXjaQdmiYUIyrHWVTA2doRw SMxVb5m1+8euBAqcJZ2ixXoHSunv6cmESz0UdjsMDJ+vMDA8NgB9OmrYodmpEfDO0ZXfFX hh/xaSgKo+iJt9SCwtrO1rLQMZXrxo8k3iZZeXZQY13TSjfwb6bLsu8+dX136wtAs9flFB AkiL/ta7MtTj7uzHJ7kPCPU+hKHzq0ze0NEheEvhczkzafiHXc8hmFI15HSDq21wQ7FUAd PCw6hng81Ffl28F4VFaWLUtesFgkEYqyFqJOALZsJYj1sMT7WcEAQJL3Clrg9Q== From: Maxime Chevallier To: davem@davemloft.net, Rob Herring Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Richard Cochran , Horatiu.Vultur@microchip.com, Allan.Nielsen@microchip.com, UNGLinuxDriver@microchip.com Subject: [PATCH net-next v3 0/4] net: Introduce QUSGMII phy mode Date: Fri, 29 Jul 2022 17:33:52 +0200 Message-Id: <20220729153356.581444-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220729_083411_080931_69C7B70C X-CRM114-Status: GOOD ( 12.48 ) 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 is the V3 of a previous series [1] initially aimed at introducing inband extensions, with modes like QUSGMII. This mode allows passing info in the ethernet preamble between the MAC and the PHY, such s timestamps. This series has now become a preliminary series, that simply introduces the new interface mode, without support for inband extensions, that will come later. The reasonning is that work will need to be done in the networking subsystem, but also in the generic phy driver subsystem to allow serdes configuration for qusgmii. This series add the mode, the relevant binding changes, adds support for it in the lan966x driver, and also introduces a small helper to get the number of links a given phy mode can carry (think 1 for SGMII and 4 for QSGMII). This allows for better readability and will prove useful when (if) we support PSGMII (5 links on 1 interface) and OUSGMII (8 links on one interface). V3 includes small fixups on the ports-per-interface assignment and some missing documentation, thanks Andrew and Florian for the review ! Best regards, Maxime [1] : https://lore.kernel.org/netdev/20220519135647.465653-1-maxime.chevallier@bootlin.com/ Maxime Chevallier (4): net: phy: Introduce QUSGMII PHY mode dt-bindings: net: ethernet-controller: add QUSGMII mode net: phy: Add helper to derive the number of ports from a phy mode net: lan966x: Add QUSGMII support for lan966x .../bindings/net/ethernet-controller.yaml | 1 + Documentation/networking/phy.rst | 9 ++++ .../ethernet/microchip/lan966x/lan966x_main.c | 2 + .../microchip/lan966x/lan966x_phylink.c | 3 +- .../ethernet/microchip/lan966x/lan966x_port.c | 22 +++++--- .../ethernet/microchip/lan966x/lan966x_regs.h | 6 +++ drivers/net/phy/phy-core.c | 52 +++++++++++++++++++ drivers/net/phy/phylink.c | 3 ++ include/linux/phy.h | 6 +++ 9 files changed, 97 insertions(+), 7 deletions(-)