summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/serial-sccnxp.h
diff options
context:
space:
mode:
authorJohan Alvarado <contact@c127.dev>2026-07-11 23:31:59 -0500
committerJakub Kicinski <kuba@kernel.org>2026-07-22 09:37:29 -0700
commit987137345f3312fd68cc9c11bd46b754bfb0046f (patch)
tree7f7b01f5361423df90a4d179b6ede12e70d93740 /include/linux/platform_data/serial-sccnxp.h
parent0b577e2fe06c023ab996c3d7684538dbbf6e99bc (diff)
downloadlinux-next-987137345f3312fd68cc9c11bd46b754bfb0046f.tar.gz
linux-next-987137345f3312fd68cc9c11bd46b754bfb0046f.zip
net: dsa: realtek: rtl8365mb: add HSGMII support for RTL8367S
In addition to SGMII, the RTL8367S SerDes also supports HSGMII, which carries 2.5 Gbps with the same signaling as SGMII at 2.5x clock rate. The chip info table already declares HSGMII as a supported interface mode for external interface 1. Extend the SerDes PCS to handle HSGMII, which phylink represents as 2500base-x: - Select the HSGMII SerDes tuning parameters and external interface mode, and mux the SerDes to MAC8 in HSGMII mode, from pcs_config() according to the interface. The parameters are again lifted from the GPL-licensed Realtek rtl8367c vendor driver, and again only cover the tuning variant for a non-zero chip option, so the mode is gated on the option probed at setup. - Advertise 2500base-x and MAC_2500FD on ports whose external interface supports HSGMII. - Accept SPEED_2500 in the forced link configuration. The MAC speed field has no 2.5 Gbps value: the rate is determined by the HSGMII SerDes configuration, and the vendor driver programs the 1 Gbps value here, so do the same. - Raise the port 6 ingress and egress rate limiters to their maximum at setup time, as the vendor switch init does unconditionally for the whole chip family. The chip resets them to 0x1FFFF (~1.048 Gbps in units of 8 Kbps), which caps the aggregate HSGMII throughput at roughly 1 Gbps. The vendor documentation describes the reset default as disabling the limiter, but the cap is real: on an RTL8367S-based Mercusys MR85X running an OpenWrt backport of this series, several clients on 1 Gbps user ports were limited to about 1.02 Gbps combined across the HSGMII CPU port until these limiters were raised, after which throughput reached about 2 Gbps [1]. The related HSGMII scheduler line rate (LINE_RATE_HSG_H) is already set to its maximum by the common init jam table. Tested on a Mercusys MR80X v2.20, where the RTL8367S is connected to the SoC over HSGMII. Link: https://github.com/openwrt/openwrt/pull/19445#issuecomment-4505613294 [1] Suggested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Suggested-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Johan Alvarado <contact@c127.dev> Tested-by: Stanisław Pal <kuncy7@gmail.com> Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Reviewed-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Tested-by: Stanislaw Pal <kuncy7@gmail.com> Link: https://patch.msgid.link/20260711-rtl8367s-sgmii-v6-2-88f7944ddca7@c127.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/platform_data/serial-sccnxp.h')
0 files changed, 0 insertions, 0 deletions