🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15999

[PATCH net-next v4 3/6] net: enetc: Enable probing of version 4.4 devices

#15999
From: Claudiu Manoil
Date: Fri, 13 Nov 2026 15:02
102 lines
12654 bytes
This commit adds driver data and platform info entries for ENETC v4.4 PF
and VF devices on S32N79 SoCs with a 500 MHz system clock frequency.

The ENETC v4.4 devices are present on S32N79 SoCs and feature only
Pseudo-MAC ENETC ports, whose PFs use either the 0xe101 or the 0xe110
PCI device ID, and the VFs answer to the usual device ID of 0xef00.

While the ENETC PF instances are usually designated by the 0xe101 ID,
in newer IP versions the 0xe110 ID was introduced to indicate the
power-on reset default NETC switch management interface. These IDs
do not indicate any functional difference between the designated
ENETC instances, and can be interchanged and re-assigned at boot time
(i.e. from firmware).

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
---
v4:
 - Added a leading sentence to the commit message, stating that the
   patch adds driver data and platform info entries for ENETC v4.4
   devices with a 500 MHz system clock frequency.

v3:
 - Added sysclk_freq info for the v4.4 ENETC devices.

v2:
 - Described why there are two ENETC PF IDs in the commit message, as per
   review.

 drivers/net/ethernet/freescale/enetc/enetc.c  | 26 +++++++++++++++++++
 .../net/ethernet/freescale/enetc/enetc_hw.h   |  4 ++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 855b2d3b8718..e3aa117d323d 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -3840,6 +3840,20 @@ static const struct enetc_drvdata enetc4_vf_data = {
 	.eth_ops = &enetc_vf_ethtool_ops,
 };
 
+static const struct enetc_drvdata enetc4_s32n79_ppm_data = {
+	.sysclk_freq = ENETC_CLK_500M,
+	.tx_csum = true,
+	.max_frags = ENETC4_MAX_SKB_FRAGS,
+	.eth_ops = &enetc4_ppm_ethtool_ops,
+};
+
+static const struct enetc_drvdata enetc4_s32n79_vf_data = {
+	.sysclk_freq = ENETC_CLK_500M,
+	.tx_csum = true,
+	.max_frags = ENETC4_MAX_SKB_FRAGS,
+	.eth_ops = &enetc_vf_ethtool_ops,
+};
+
 static const struct enetc_platform_info enetc_info[] = {
 	{ .revision = ENETC_REV_1_0,
 	  .dev_id = ENETC_DEV_ID_PF,
@@ -3870,6 +3884,18 @@ static const struct enetc_platform_info enetc_info[] = {
 	  .dev_id = NXP_ENETC_VF_DEV_ID,
 	  .data = &enetc4_vf_data,
 	},
+	{ .revision = ENETC_REV_4_4,
+	  .dev_id = NXP_ENETC_PPM_DEV_ID,
+	  .data = &enetc4_s32n79_ppm_data,
+	},
+	{ .revision = ENETC_REV_4_4,
+	  .dev_id = NXP_ENETC_PF_DEV_ID,
+	  .data = &enetc4_s32n79_ppm_data,
+	},
+	{ .revision = ENETC_REV_4_4,
+	  .dev_id = NXP_ENETC_VF_DEV_ID,
+	  .data = &enetc4_s32n79_vf_data,
+	},
 };
 
 int enetc_get_driver_data(struct enetc_si *si)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_hw.h b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
index 2c9d9042eb0b..8e6a9d366d40 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
@@ -414,6 +414,7 @@ enum enetc_bdr_type {TX, RX};
 #define ENETC_REV_1_0		0x0100
 #define ENETC_REV_4_1		0X0401
 #define ENETC_REV_4_3		0x0403
+#define ENETC_REV_4_4		0x0404
 
 #define ENETC_G_EIPBRR1		0x0bfc
 #define ENETC_G_EPFBLPR(n)	(0xd00 + 4 * (n))
@@ -1048,8 +1049,9 @@ struct enetc_cbd {
 	u8 status_flags;
 };
 
-#define ENETC_CLK_400M		400000000ULL
 #define ENETC_CLK_333M		333000000ULL
+#define ENETC_CLK_400M		400000000ULL
+#define ENETC_CLK_500M		500000000ULL
 
 static inline u32 enetc_cycles_to_usecs(u32 cycles, u64 clk_freq)
 {
-- 
2.34.1
Technical Details
Message-ID: <d783ccebf4b38bfd1e2ede44c36682269a5bc68e.1794581338.git.claudiu.manoil@nxp.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362719-linux-kernel-netdev=dewy.ru
References: <cover.1794581338.git.claudiu.manoil@nxp.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362719-linux-kernel-netdev=dewy.ru
From: claudiu.manoil@nxp.com (Claudiu Manoil)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v4 3/6] net: enetc: Enable probing of version 4.4 devices
Date: Fri, 13 Nov 2026 17:02:34 +0200
Organization: Usenet Network
Message-ID: <d783ccebf4b38bfd1e2ede44c36682269a5bc68e.1794581338.git.claudiu.manoil@nxp.com>
References: <cover.1794581338.git.claudiu.manoil@nxp.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1444744"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Ukngc/65b2hsP+H6l80NajOg21g= sha256:b2yfj0qClenB0t7Jb9le9a6NtZC3pl8lSfrBtbr51Lc=
	sha1:+t7I7crERlfVdnivYYXwjznw3Ac= sha256:0IMVFj5pLNmo2KK+1yi8wI2/Z4fHQ6GHVfcsgZsrYmg=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id D024D114688; Sat, 14 Nov 2026 00:37:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=nxp.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id EJ6WeURCwRlO;
	Sat, 14 Nov 2026 00:37:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-362719-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=nxp.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id E759C114697; Sat, 14 Nov 2026 00:37:44 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id BAB42203DD2; Fri, 13 Nov 2026 15:16:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794582962;
	b=KBigEqzaPbwrb5y4mJU+ZDMUWo8rlxVixeIlMuzB9FVFXYpB6GnCy7dj5UC0BB54O3Ti
	 8EupXZ5n4FChnCrUawP+1Qb1gkofXfCYUAEYBJuJU9khBP2CWId5AScNjm+OCWvhL66rZ
	 StToVSb32r5oyLpugkTSFWeGuPmCnmZt1PjEgKamuityLVHrl+h5UC95YbdxuRItOxcBk
	 Nu+1nr9Ei3bSvtlzpAhOg7/Wte6TNVCqRfU6YBqwvaUzyrQoqxRgpKmG4ERFT6W6A33Xw
	 +XBjHgni2o7+/4mGa6/sGSpk4D9diFgpNwRtnHm6tX9+cKeG9E15eSMbB90ggnrnF5g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794582962;
	h=X-Original-To:Received:DMARC-Filter:Received:X-Virus-Scanned:
	 Received:Received:DKIM-Filter:DKIM-Signature:Received:From:To:Cc:
	 Subject:Date:Message-Id:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=3Nya1KSrvobXnumd+w894vKJxdCnwbZg0vMhgegdGtk=;
	b=1NKx/Rf7d5TceyrugPcgB3MLZCVIl+p8lAFVRmtVVQ3Bc9dktlCaULqTX0RYKR65ksSd
	 1z3wRMFiu6MVFOGRjQvhG/vDDVZYSiwjsftgcNkrOEP48rlLHgt0WNr+gJ5AmjZXBfczC
	 k8r8iMi+3/6PB+3hIc01lpCcQK+YuwGNvNNxM108y6fb0Jsx0Wvx4/ZWPkffvEJa8qsdQ
	 +kLfY6wLNvZDQCFSVtGSVmQnmqGEpFiBAATfpapj8AuzQjT2BCwD1+EmR53hK2owiahK8
	 zaQx0Ll4waDT3uSFWVIqjFFJdB4s1yVQJlrJoBw1xDWQmEZVOkujGjq3P8pLPnLPCXg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=nselector2 header.b=qBO07gG2;
	dmarc=pass header.from=nxp.com;
	spf=pass smtp.mailfrom=nxp.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 04655606A8A2;
	Fri, 13 Nov 2026 15:16:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=nselector2 header.b=qBO07gG2
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=92.121.32.54
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794582961;
	b=inKgBV1YF4rUktqPeCFnqAa4qlh6+HW8xn0QDo/GPLnlJ+vZrrF7YoKaLI5laxeT8HUe
	 FB3I1HrCgBYiLzEpCM7na5rXOby2WSqpHCXutgydiFsSJNI7U4QKqYn5PY97lDtbG8wTC
	 v7a3Nk0IoXqCNKP7qf3dXiCbAobJr01eKmx7rjpx+DvwErCP6zdKYSIhp6EpzdLh36E4q
	 rcSD6xuFt1Mi2ETe8M8jG/YeJqk2vavi9OtPGHJhC/EOX3NgK0h6+MnfO02ySGT+b5bU6
	 OdLZRv0lzRAhg4lH3c0im/LV9Recey9JE6rW+PTG4TW3IyrzYLVKWXfp+8/v/+nKMIg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794582961;
	h=DMARC-Filter:Received:X-Virus-Scanned:Received:Received:DKIM-Filter:
	 DKIM-Signature:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:
	 In-Reply-To:References:MIME-Version:Content-Transfer-Encoding;
	bh=3Nya1KSrvobXnumd+w894vKJxdCnwbZg0vMhgegdGtk=;
	b=iVSOd3vLD5IcpMLUfURLA7OkNemrqVbTiAbPcazqIazXMEx/bRnIEjwZjGJRgoX7fvNN
	 nRePzS8bXLSZWrNh6q8fKqWtTpRpp91GeAhbQFkCW63IzGdV0l1Elu40EGX+w9N2FV0/q
	 OlzN4bRL0SNlf2xB/5eCsnBz/xpa+EoRjIVDgsIuhUpvAv7kuw7TtaqQOc+RKnWCuHag1
	 h6Ljkzskdu6WXBoHqmYS2NuZnyqKwasy/SNJ7l9WPjrizO8buE1mzQZHRg815exQkNGqL
	 5xhWI0NgbwCYa719V6DHG7KPKZCS6fq52rz1mJIZoR7hPKPGTk/qrBKceAs3TuTLlDw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=nxp.com;
	spf=pass smtp.mailfrom=nxp.com;
	dkim=pass header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=nselector2 header.b=qBO07gG2;
	arc=none smtp.remote-ip=92.121.32.54
X-Received: from inva129.nxp.com (inva129.nxp.com [92.121.32.54])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18B6B606A32D;
	Fri, 13 Nov 2026 15:15:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 18B6B606A32D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com
X-Received: from localhost (localhost [127.0.0.1])
	by inva129.nxp.com (Postfix) with ESMTP id CB1496080E53;
	Fri, 13 Nov 2026 16:10:14 +0100 (CET)
X-Virus-Scanned: amavis at nxp.com
X-Received: from inva129.nxp.com ([127.0.0.1])
 by localhost (inva129.nxp.com [127.0.0.1]) (amavis, port 10024) with ESMTP
 id x2K1XU5eukMn; Fri, 13 Nov 2026 16:10:14 +0100 (CET)
X-Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22])
	by inva129.nxp.com (Postfix) with ESMTP id BFF816031FBC;
	Fri, 13 Nov 2026 16:02:42 +0100 (CET)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 inva129.nxp.com BFF816031FBC
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com;
	s=nselector2; t=1794582162;
	bh=3Nya1KSrvobXnumd+w894vKJxdCnwbZg0vMhgegdGtk=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=qBO07gG2Yzx5nbmL3yDdnG4emipABTIm0j7hOS+G8X0tcZlCa2yrCTbWxrQPiVaez
	 L4162OBuP78Ors2DMch1QPrWNIJ9ULfEsquTPiIqc6nXc39Fk6FDW3ExOgS6yVmP+0
	 pEiSgsPfHU3Rbeep2ZfR6r98HkqrtFnixvAA35kmmB7At0apMNLzEJW4pbZjZ54LzY
	 XtBMPdJzw0YPbX092l82cLlDfRlmC9hv2jpMQHoOuH4Qnrq8iwj+8UURtdMCQmBLud
	 pY8wQADqJ0RMXGLZ8/3rdodr7ZjCZRRZWuN0DXMaalxJSuzv4OPnP8DP+MB/1RMBVV
	 SqHjQYuPWF9Qg==
X-Received: from lsv15141.swis.ro-buh01.nxp.com (lsv15141.swis.ro-buh01.nxp.com [10.162.246.138])
	by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 96C0B202B6;
	Fri, 13 Nov 2026 16:02:41 +0100 (CET)
X-Cc: s32@nxp.com,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Wei Fang <wei.fang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	imx@lists.linux.dev,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.34.1
X-In-Reply-To: <cover.1794581338.git.claudiu.manoil@nxp.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list