From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
To: linusw@kernel.org, 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
Subject: [PATCH net-next v5 0/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Date: Tue, 13 Oct 2026 10:23:14 +0200 [thread overview]
Message-ID: <aa5fa12c-e43e-4e5e-9f77-c6eaf477abc4@yahoo.com> (raw)
In-Reply-To: <b45a3350-44a3-45ad-89cc-452c25edbd7d.ref@yahoo.com>
This series adds support for the RTL8367S-VB (chip ID 0x6642) to the
rtl8365mb driver. The chip belongs to a new "family D" that differs from
the existing family C in its VLAN table layout, speed/RGMII configuration
and SerDes (SDS13) handling.
Patch 1 documents the chip in the devicetree binding.
Patch 2 adds the chip family infrastructure (no functional change).
Patches 3-4 add port speed and RGMII mode configuration for family D.
Patches 5-6 add VLAN 4k table access and raw-VID PVID handling.
Patches 7-8 add SDS13 PCS support and re-latching of the SerDes.
Patch 9 adds the RTL8367S-VB chip table entry. It comes last, so that
no intermediate commit exposes a family D chip with incomplete
handling and the series stays bisectable.
Family C's functional behaviour is unchanged. The only change in a
shared path is a mutex serializing SerDes register access, added in
patch 8. The port count is capped at 8 for family D only (patch 9).
Tested on a TP-Link Archer AX55 v1 (RTL8367S-VB, CPU port over HSGMII
to an IPQ5018) with bridge VLAN filtering and per-port PVIDs. SGMII has
also been seen working, but I no longer have the exact link partner and
speed it was tested with, so treat it as lightly tested. RGMII mode has
not yet been tested.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
---
v5:
- 1/9: fix the subject
- 4/9: refuse RGMII on EXT1 with -EBUSY when it is owned by MAC4,
before touching any EXT1 register
- 5/9: drop the unverified rationale for forcing SVLAN_CHK_IVL_SVL, say
that the vendor API leaves it at 0, and note that the family D paths
are not reachable until the last patch
- 6/9: init prev_accepted_frame to avoid a maybe-uninitialized warning
- 7/9: comment the write of the whole RX disable field, as in the vendor
sequence; fix two comments that still credit pcs_link_up() on family D
- 8/9: cancel the re-latch work from a reboot notifier instead of
checking the driver data; fix the RESTORE_TRIES comment and do not
sleep after the last failed restore attempt
- 9/9: fix the description of the external interface indices. The v4
changelog said that only HSGMII is exposed; that was wrong, SGMII is
still exposed
v4: https://lore.kernel.org/netdev/38872e6f-1264-4a93-9f81-8212173e909d@yahoo.com/
- 1/9: reword the commit message (support is added by the series)
- 3/9: document the per-port force enable register
- 5/9: document both forced IVL bits, update stale comments
- 6/9: clear the family D PVID registers at setup
- 7/9: do not override the forced SGMII speed in pcs_get_state(),
update stale comments, note that the patch is preparatory
- 8/9: remember a failed restore and retry it first; stop the work
after shutdown (driver data cleared)
- 9/9: expose HSGMII only on the SerDes port, update the SerDes
interface comment
v3: https://lore.kernel.org/netdev/e84d76ee-03df-49b0-8c9a-b289dfae8728@yahoo.com/
- add a dt-bindings patch (1/9): RTL8367S-VB listed under
realtek,rtl8365mb
- add chip family infrastructure as its own patch (2/9), no
functional change
- squash the family D PVID getter and the PVID set/clear patches
into one (6/9), so the read and write paths use the same register
layout at every point of the series
- add the RTL8367S-VB chip table entry last (9/9), after the family
D speed, RGMII, VLAN and PCS support, so no intermediate commit
can reach the chip with incomplete handling (reported by the
automated review)
- 6/9: fix the commit message (port p's write lands in port p >> 1)
and update the stale kernel-doc and file comments
- 8/9: start the re-latch work only for 2500base-x, cancel it from
.pcs_disable, from pcs_config() and via a devres action; retry the
SDS_MISC restore and come back soon if it fails; rewrite the
commit message to match the code (reported by the automated
review)
- 9/9: document family D in the file header comment and in the
learn limit comment (limit confirmed against the Realtek vendor
API)
v2: https://lore.kernel.org/netdev/28382f3f-03c1-4606-9b11-86f118abeafe@yahoo.com/
- 2/8: mask r_speed to the width of the FORCE_SPEED field before passing
it to FIELD_PREP(), so that the family D 2500M value (5) cannot trip
the compile-time range check; bit 2 still goes to FORCE_SPEED2
(reported by the automated review).
- 4/8: the commit message now explains why EXT_TXC_DLY[5:3] is cleared
for RGMII on EXT1: the vendor RGMII setup does it, and the init jam
table leaves the field at 2, which would add an extra TX delay on top
of tx-internal-delay-ps. Add a comment describing the EXT_TXC_DLY
layout (Andrew Lunn's review).
- 8/8: document the new struct rtl8365mb members in the kernel-doc
comment (sds_lock, sds_relatch, sds_relatch_count,
sds_misc_target_val), which fixes the kernel-doc warnings.
- 1/8, 3/8, 5/8, 6/8, 7/8: no changes.
v1: https://lore.kernel.org/netdev/84fc7483-b22d-45ea-a3b8-3285dc357265@yahoo.com/
Mieczyslaw Nalewaj (9):
dt-bindings: net: dsa: realtek: add RTL8367S-VB
net: dsa: realtek: rtl8365mb: add chip family infrastructure
net: dsa: realtek: rtl8365mb: set speed for family D
net: dsa: realtek: rtl8365mb: set RGMII mode for family D
net: dsa: realtek: rtl8365mb: set and get vlan 4k for family D
net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D
net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support
net: dsa: realtek: rtl8365mb: re-latch the family D SerDes
net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
.../devicetree/bindings/net/dsa/realtek.yaml | 2 +-
drivers/net/dsa/realtek/rtl8365mb.h | 14 +
drivers/net/dsa/realtek/rtl8365mb_main.c | 741 ++++++++++++++++--
drivers/net/dsa/realtek/rtl8365mb_vlan.c | 380 +++++++--
drivers/net/dsa/realtek/rtl8365mb_vlan.h | 1 +
5 files changed, 998 insertions(+), 140 deletions(-)
create mode 100644 drivers/net/dsa/realtek/rtl8365mb.h
--
2.53.0
next parent reply other threads:[~2026-10-13 8:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b45a3350-44a3-45ad-89cc-452c25edbd7d.ref@yahoo.com>
2026-10-13 8:23 ` Mieczyslaw Nalewaj [this message]
2026-10-13 8:38 ` [PATCH net-next v5 1/9] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-10-13 8:39 ` [PATCH net-next v5 2/9] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-10-13 8:40 ` [PATCH net-next v5 3/9] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-10-13 8:43 ` [PATCH net-next v5 6/9] net: dsa: realtek: rtl8365mb: use raw VID for PVID on " Mieczyslaw Nalewaj
2026-10-13 8:44 ` [PATCH net-next v5 8/9] net: dsa: realtek: rtl8365mb: re-latch the family D SerDes Mieczyslaw Nalewaj
2026-10-13 8:45 ` [PATCH net-next v5 9/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa5fa12c-e43e-4e5e-9f77-c6eaf477abc4@yahoo.com \
--to=namiltd@yahoo.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luizluca@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox