From patchwork Mon Feb 12 17:33:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 20260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp64813dyb; Mon, 12 Feb 2024 09:34:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUA1lqRAYlOby1udoNHvOGITAlWHW+0NS12Qbg5k1uvTR7x2JPG99u29m6zVU6ZXznxOSiyUBaBE5tIA6OjXBVeA93hA== X-Google-Smtp-Source: AGHT+IE115hIX7BTZa4LQdc68llDUIqEnwcfFMREyZ+DAGgMljhSY3X/UYaSN6nl16/SA5wVblip X-Received: by 2002:a05:622a:164a:b0:42c:6fb6:8d2b with SMTP id y10-20020a05622a164a00b0042c6fb68d2bmr7358676qtj.46.1707759254640; Mon, 12 Feb 2024 09:34:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707759254; cv=pass; d=google.com; s=arc-20160816; b=JJL5lOX30AIkcJ1vGCAxZPcj7WrcdCNLSqcX0IGm8inQrLXMXiy5kcDQsQLyzva+SC AEIaSk0ScMZhpOfvrSnR0cfHcibEzppW+expTS1T1gQtoyEcSjOYs1fvze/I/DMJ4EZK fPDvqCOkF7Es/5iC3e9M1VilMy11adGeakZv06jxRQguikCfebb5pZeuPMOG9S47gFlu 4SCK05WZ3pY83QIZeDZdvpUs2a7bBoyAFaK7A2qPfOaUDjn/kYwYKOvmveaaLrTu9hBW fkH3D358Z4nsgLt5pD3fM2chJ151fbkL+H+AK9TN48KW9vNhRaJpkg3GWFOfDAgXTPmM Sk6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=wbzP1U4QOVSgSJ9arF/G/GvzIFiIjVnmU1NWNDzC0Dk=; fh=uOqVwF3OPvcUDjjfZrqi6mtc8JuK/CCV2awH+saZ55c=; b=xpxMAAKMtHP+LkdXMBvsTHanebWFB9UDTROFzDUNuoPvV3tLJs9lXo+ZSAlBGJ1WWs FxZr6/Rg52N6pYtNk0mKhCFH+ZOMW4FkOGnJpQBMAdyFD50GfgSfur9iMLZE93/jQP/2 N8IvKo3dXsL56CViHBHnjFH3pdmw0pxy6O7LiPCpcoCwOfUx6tj/qGa2snSKMKltbA3v XTGgBhxrKfSvKaJZ2bPt66i9kWjLkDTmfo8xs2sYI0wcWOwiYdmOby+9ZZtTo2lDyG1M b9t7+6TKTXtUkJXSweimaLeE51oql5AMnF9C5L0u+WsIhG32vJmf928ZaAgf7BM5dg29 GHrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RZPStI61; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-62105-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62105-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCVxSiC/jOpDI5X2FMrjEhGWLJJ991eaggSNcqwpK1wtQhkQcc5byLrbHWT8zamD16SAncGz9g7v5CSnlggGMrxLsv/DSA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f14-20020ac8464e000000b0042c6b5572ffsi793936qto.105.2024.02.12.09.34.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 09:34:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62105-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RZPStI61; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-62105-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62105-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6A06E1C21AF5 for ; Mon, 12 Feb 2024 17:34:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 326733FE31; Mon, 12 Feb 2024 17:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="RZPStI61" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A07F23E47E; Mon, 12 Feb 2024 17:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707759196; cv=none; b=XlERMsZZ29ijKTzA4TtwmxLEB5exQUweFlO2dT08u5Yee7lPgvsT/w65kJs8aixLDipVjYgW9GpFzIL91Bf90dVVkUZB8CGHHh4wUMHd8aA8u7jgq8lip35yqFHJE+1xF7FaMW4Uk9m3c//39RDsNQod4yf9DrfG/lbbot1au+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707759196; c=relaxed/simple; bh=1WNcSCm6KZePCvvEnDtv7SkkgLZFrShYbxw2IujMJ9U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Y56AQQYtxoXeott3WYTcAEAiq48rwUuh/z6vDFQ5fe87GM69P4EKLcGDEIcE7ln1d21HfSNpQe1eAhTent9TORUn8zi367BgxJU1f0bRXkSGZ/xmiCDfppSM3pvvv/GPAo3P/7PUXAI8p+eJoCClGmve0WDat9RtKSvFh1MdtS0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=RZPStI61; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id CE241240007; Mon, 12 Feb 2024 17:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707759191; 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=wbzP1U4QOVSgSJ9arF/G/GvzIFiIjVnmU1NWNDzC0Dk=; b=RZPStI61/BDuqmhNlBmVsuLPUtf0OPscoYSoNvRzTwrEuczk+LldmgFmsU5N55A4nvNCHG e08D4sbxqG1eZWr/+0RdJhArimCS6es7pa/x16fK+KCSnicY/YzJfzqW1jszXqqtOkvBRa Eqxovh4Ta6X0/Ul9AubVOjYQKVO3sP7l96u9240wN/n0KUavItVTCQUI5ZnMBX1omuOdCC s/fnGgDsvw48NwmVcPvdugwQXj0E6bRxNXDrV8glKAKeE0EyFS+tWyTS8n4DnHxpAU1527 Zzb8zRSJaLBZXS90zGy/Y5nVdPAAS5awVWvMZDHeQLtukm8jfVDoq5FDiLbmUQ== From: Maxime Chevallier To: Andrew Lunn , Heiner Kallweit , Russell King , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Horatiu Vultur , Richard Cochran Cc: Maxime Chevallier , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, =?utf-8?q?K=C3=B6ry_Maincent?= Subject: [PATCH net-next 0/3] Introduce support for USGMII Inband Extensions Date: Mon, 12 Feb 2024 18:33:03 +0100 Message-ID: <20240212173307.1124120-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790715368318335090 X-GMAIL-MSGID: 1790715368318335090 Hello everyone, This series follows (albeit with a lot of delay) the work that was initiated when USGMII support was added a while ago [1], through the QUSGMII variant. One of the differences between the QUSGMII mode and QSGMII is the possibility to pass so-called "Extensions" within the preamble. So far, the only extension documented in the USGMII standard is to pass a 32-bits timestamp through the preamble, but the standard mentions other possible usages in the future, such as a MACSec sectag for example. This series aims at adding support for such extensions and proposes a phylib API to manipulate these. It includes an example using the lan8814 PHY driver and the LAN966x MAC driver, where both have to agree on using this mode to convey the nanoseconds part of a PTP timestamp (the seconds part is still retreived through MDIO accesses). Thanks, Maxime [1] : https://lore.kernel.org/netdev/20220519135647.465653-1-maxime.chevallier@bootlin.com/ Maxime Chevallier (3): net: phy: Add support for inband extensions net: lan966x: Allow using PCH extension for PTP net: phy: micrel: Add QUSGMII support and PCH extension Documentation/networking/phy.rst | 70 ++++++++++++++ .../ethernet/microchip/lan966x/lan966x_main.h | 1 + .../ethernet/microchip/lan966x/lan966x_port.c | 12 +++ .../ethernet/microchip/lan966x/lan966x_ptp.c | 94 +++++++++++++++++-- .../ethernet/microchip/lan966x/lan966x_regs.h | 64 +++++++++++++ drivers/net/phy/micrel.c | 84 ++++++++++++++++- drivers/net/phy/phy.c | 86 +++++++++++++++++ include/linux/phy.h | 28 ++++++ 8 files changed, 425 insertions(+), 14 deletions(-)