🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24243

Re: [PATCH net-next v16 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode for family D

#24243
From: Linus Walleij
Date: Sun, 29 Nov 2026 22:47
47 lines
11338 bytes
On Sun, Nov 29, 2026 at 4:07 PM Mieczyslaw Nalewaj <namiltd@yahoo.com> wrote:

> On family D, RGMII on extension interface 1 needs additional pin drive
> and slew controls, the EXT1 RGMII TX clock delay field in EXT_TXC_DLY
> (0x13f9, bits [5:3]) must be cleared, the pin mux in the top-level
> configuration register must be set up, and SerDes 1, which shares the
> pins, must be disabled.
>
> Program the EXT1 pin controls explicitly when selecting RGMII instead
> of relying on values inherited from the family C initialization table.
> Set the RG1 DN and DP fields to 7 and 5 respectively, as prescribed by
> the RTL8367D port API, while preserving unrelated register fields.
>
> The vendor RGMII setup for EXT1 clears the RGMII field of EXT_TXC_DLY
> (0x13f9, bits [5:3]) in addition to programming TXDELAY in RGMXF.
> Do the same so that any non-zero reset or bootloader value in that field
> cannot add an extra TX delay on top of tx-internal-delay-ps, making
> tx-internal-delay-ps the only source of TX delay.
>
> If the internal MAC4 block occupies extension 1, do not advertise RGMII
> for port 7 in phylink_get_caps(), so the configuration is refused before
> any EXT1 register is touched. This mirrors the vendor RTL8367D API, which
> returns an error for RGMII on port 7 when UTP port 4 uses the RGMII
> interface. The driver logs an error naming the conflict. RGMII is the
> only interface of port 7 this driver implements, so port 7 then has no
> supported interface: phylink_create() fails for it, and if it is a CPU
> port the switch does not probe.
>
> When MAC4 does not own the pins, bind the RGMII/MII pins to MAC7 and
> disable SerDes 1, which shares them. The TX delay field, the pin mux and
> the SerDes 1 disable are all programmed before RGMII is selected, so the
> shared pins are never driven by RGMII and SerDes 1 at the same time.
>
> The family D branch is not reachable until the chip table entry is
> added in the last patch.
>
> Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>

It's a bit weird that the D branch is unused until later in the
patch series but I guess there are patch mechanics reasons
and other than that this looks good to me, so:
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij
Technical Details
Message-ID: <CAD++jL=HwLGXGZ1ZNTjqA0CNFfCm8KVzwDwNjG96A7xetix_6g@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373686-linux-kernel-netdev=dewy.ru
References: <aebcc7f6-d5f8-4157-b63a-e2e707d9859b@yahoo.com> <030d0d9d-f7b4-44d5-bfe6-57c9eb289cf9@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373686-linux-kernel-netdev=dewy.ru
From: linusw@kernel.org (Linus Walleij)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v16 05/15] net: dsa: realtek: rtl8365mb: set
 RGMII mode for family D
Date: Sun, 29 Nov 2026 23:47:37 +0100
Organization: Usenet Network
Message-ID: <CAD++jL=HwLGXGZ1ZNTjqA0CNFfCm8KVzwDwNjG96A7xetix_6g@mail.gmail.com>
References: <aebcc7f6-d5f8-4157-b63a-e2e707d9859b@yahoo.com> <030d0d9d-f7b4-44d5-bfe6-57c9eb289cf9@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1278190"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:+did9wwgY71Yco/SwHrDq0kdAC0= sha256:gMERbmlvjo4yxHac1y4a5/L4v/zvrCVaqXEweCNJriw=
	sha1:q0JiUIVItIp2S1e2uwEeUiYdcCA= sha256:p3OpG106kaqHYkVrxC8HJoWgC3Ar7iYKLWiksfOeVps=
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 0AC32125FAD; Mon, 30 Nov 2026 01:48:11 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 cZybCACbHdm3;
	Mon, 30 Nov 2026 01:48:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373686-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 223E5125FB0; Mon, 30 Nov 2026 01:47:55 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id BFC7328AA3; Sun, 29 Nov 2026 22:47:53 +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=1795992473;
	b=0+2jjOaJZp8x/ePaql/eGb7Go96EBkRsRNGHioH1uL8W8vpId+EtxsRp8hwx7UV/dpVu
	 ucnEVjXu/K/0cpnluXN5Uk+GFggVZj5Q5nfL8kxOP3gCrinGPo4r/jvi4SM/e9stPJnIm
	 sw0miI299t8hfdksYL5QXwwW05k9FQ7vqncNEuaDm5FKXL9pr/TTpTmnijmBZoLdx5Ja1
	 SKuh3uiAje5s2HSD4jJGg9aiqa157K0s6PB93zG4fCrh1qTbk6FiRzY48LBKbHzaTnK4B
	 kopUFsVe45w3d5in3ADetsRlP2vX4lV0qowvxLsVxizusqSWz+u0q2obtCWnRxPhoQg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795992473;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=uIS+YKpvFE00yRZNJ5CCizGFTAeCR6otRLmU60AH6jo=;
	b=28cgoGYoaZKG0ZRM2g4dWwB25QvZAwuyPPwggu28AkS1jQFyLs5HvKF2441fUa1JYmk4
	 JWAv7EMXeSTwzl6KoMMQi/tcy0B5CsHOk0Y8uXCppYxp6zzsdK8wMNUgf28zK7cRdwFLv
	 oG9xyspVgwsaS6OPKpDzIY0PJB/0dvdIzEnFbIp+K1ArZQ0qB+CCZXcxf5sdcBNHBtEVn
	 7Vey5RuK0a8WqjM4SZlsuUdEKnf9iI/jivOKtscYMziNCFvFBXxYkJ61CGiT9JXgvHNe1
	 Zm4g32bAP6AR2gHc8omkZwsoxV5K3tb9znnHkLWWb6lQ1fO6j0CVgCK+rE9H7TX3cdw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=A2H6ATdh;
	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 108BA606A329;
	Sun, 29 Nov 2026 22:47:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=A2H6ATdh
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795992472;
	b=fmXj2/Em8f7LIsvfJZefTeLKhwHbws5HQG+xaPKWUqU6M3qERn4j1UXTYh/mgGRtGT7+
	 xZPQ/KtrJadHiBCFX6GjlOaV7UOHo6DZZJiClO2CstTngJ9HfztjhD/C+5jdT6tiQfFjB
	 1Id/6k9smsRtt+Q3yH1rRdx1eflutFBKMeG2hfREEO7+SdTzIY8knq/Dbnecyn6AXUNU2
	 /n4x/kClQV1AK1Qq0klmxMunsid8WVvs04nnJTBpkzcoyKj21JrO6hIVamKgM7A9H/4RW
	 KcmTWwGj5KAFqbhjPGW/fC0ARcnu1ElSXj69BZ2Pd7zi2ZPFfaexE99ueHk6EQecPqg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795992472;
	h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
	 X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
	 From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
	 Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
	bh=uIS+YKpvFE00yRZNJ5CCizGFTAeCR6otRLmU60AH6jo=;
	b=SfO7nXbnZGRgTNm80/d0O3P/VjSxus8gRwhhhuJ8yZNXg1AR8gVs0A4J5BC6fPCgfzis
	 bn60bD2UWgNK0AKQrk3ftv3mJ8isGDMF6W6q5nq5f67tlBaMR/3MXpW4ObVcwmFSYXQar
	 05y8XoK+yxD8CZHS1lhzRrBc5jZb4WfUVDaDeSG2okf+Di6/fcRrQ213RiRs4ohz0tVV8
	 P69rS2c7VKC8oOTdY8zzjun7n9qR6XGC7nqHPaObv51vIIE7xsmg6vGAAIigMF/LpwCeW
	 O0uvWwtRX1TYvIy367iziDF1Vv7YdHnFcI4S1ZrOrDrpEaZdnFppjqQ3FM9813AlulA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=A2H6ATdh;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B4AF606A325
	for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 22:47:51 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8D951F0089F
	for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 22:47:51 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795992471;
	bh=uIS+YKpvFE00yRZNJ5CCizGFTAeCR6otRLmU60AH6jo=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=A2H6ATdhPZI9dmy/NKtwbL5g/VnW4wKwwBWLygZcNOT+/35LPuuSHkNVKCr23efmt
	 twyXJPcSaOUNxlMk/EnI6uOxiakbwOqHqcmMcO7gtJTwBhxZVYL6pK/uG+eoZ4k6lb
	 kMtcaz5Hln4F4mPmlV6AzxjrbsZ6shgupY/e7wye9155UF9GHt1eK2VJsVOmNpNxLJ
	 25kWxXYF+l510itVBuP9NwBjw7yCPb5DOKIiNL9OonbseMnc4K7wzxVUkRZ2jT2QaP
	 Tg7taATND1uwSjlTbYHJDColu4sRsLWpVVneHpf6pkXVRL3bHU6ioc0B+UoktUYa77
	 1Dn7feeNmKc2A==
X-Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-3adfed9a887so89801211fa.3
        for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 14:47:51 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErFKdnWEcjAK+os1ZDoXZXdzIOTMSwSoSO3dQek+rOreyaLc5ffBvmZC7O4W/fQV9vvn34lL3xU=@vger.kernel.org
X-Gm-Message-State: APuU4Z9econBUChLNn6boGPIdyXPKowDM18ZlshjNunPHrdN5C7BajKT
	+vJE5RYxHTwTAF6hP/5U5yGEiBBb2AZe4C3kJfS1E8b7R7aNS28pFGZh2ijJECBHeVgqmdbsyh/
	zs51ZtNXnL2DV+CtcKWLSRVfdw+2iJNY=
X-Received: by 2002:ac2:4bca:0:b0:5c1:4ede:6fcf with SMTP id
 2adb3069b0e04-5c3386aeecemr2443016e87.43.1795992470478; Sun, 29 Nov 2026
 14:47:50 -0800 (PST)
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
X-In-Reply-To: <030d0d9d-f7b4-44d5-bfe6-57c9eb289cf9@yahoo.com>
X-Gmail-Original-Message-ID: <CAD++jL=HwLGXGZ1ZNTjqA0CNFfCm8KVzwDwNjG96A7xetix_6g@mail.gmail.com>
X-Gm-Features: Aa3M54ridtS1UJPc2QkKnAvozv_cJh8XitiJ5c5dWZaMNoaasA_m9Vbv1S1dAtQ
X-Cc: andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net, 
	edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk, 
	luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, 
	linux-kernel@vger.kernel.org, alvin.sipraga@analog.com, gusfmora@gmail.com, 
	kuncy7@gmail.com, fabianotassotti@gmail.com, gabonpivovich@gmail.com, 
	contact@c127.dev, o.rempel@pengutronix.de