]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dts: add link index cell to pcs-handle phandles
authorJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 25 May 2026 13:09:28 +0000 (13:09 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 31 May 2026 10:52:40 +0000 (12:52 +0200)
commit43562f97e7565c1e4aacef8a33106e0986c0d59e
tree7119665ab57c684fbcb886e3aa4b6acc339f341c
parentb3faefcc322149b81e47adf161d3472e95116552
realtek: dts: add link index cell to pcs-handle phandles

A SerDes can host multiple PCS links: QSGMII binds four ports to one
SerDes, USXGMII variants up to eight. Today pcs-handle references the
SerDes as a whole, with no way to express which link inside the SerDes
a port wants. The driver gets away with this because it carries its own
port->link bookkeeping and the link slot is implicit in DSA's port
iteration order -- functional, but the wiring information lives nowhere
in DT.

The upcoming fwnode_pcs migration moves PCS lookup to the generic
fwnode provider API, which disambiguates multiple instances per fwnode
via phandle cells. To make that landable as small, code-only commits,
the DT needs to carry the link index ahead of time.

Bump #pcs-cells from 0 to 1 on every SerDes node in the four SoC DTSIs
and append the link cell to every pcs-handle reference across boards
and the SWITCH_PORT_* macros. Cell values match the existing wiring:
0 for single-link SerDes (10GBase-R, SGMII, fiber, single-link
USXGMII), 0..3 per SerDes for QSGMII and USXGMII-QX, 0..7 for the
RTL9311 octal USXGMII layout.

No code reads the new cell yet -- of_parse_phandle_with_args() in the
PCS driver already cooperates with cells = 0 or 1, and the DSA glue
uses of_parse_phandle() which ignores cells entirely. The change is
runtime-neutral on its own; it exists so the follow-up code patches
can be a few lines each instead of dragging a bridge counter into the
driver to invent slot numbers DT could have provided directly.

Link: https://github.com/openwrt/openwrt/pull/23539
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
66 files changed:
target/linux/realtek/dts/macros.dtsi
target/linux/realtek/dts/rtl8380_d-link_dgs-1210-10mp-f.dts
target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
target/linux/realtek/dts/rtl8380_hpe_1920-8g.dtsi
target/linux/realtek/dts/rtl8380_linksys_lgs310c.dts
target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts
target/linux/realtek/dts/rtl8380_netgear_gs110tup-v1.dts
target/linux/realtek/dts/rtl8380_netgear_gs310tp-v1.dts
target/linux/realtek/dts/rtl8380_panasonic_m8eg-pn28080k.dts
target/linux/realtek/dts/rtl8380_tplink_sg2210p-v3.dts
target/linux/realtek/dts/rtl8380_tplink_sg2xxx.dtsi
target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp-a1.dts
target/linux/realtek/dts/rtl8382_apresia_aplgs120gtss.dts
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-10p.dts
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-26.dts
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-28_common.dtsi
target/linux/realtek/dts/rtl8382_hpe_1920-16g.dts
target/linux/realtek/dts/rtl8382_hpe_1920-24g.dtsi
target/linux/realtek/dts/rtl8382_inaba_aml2-17gp.dts
target/linux/realtek/dts/rtl8382_iodata_bsh-g24mb.dts
target/linux/realtek/dts/rtl8382_panasonic_m16eg-pn28160k.dts
target/linux/realtek/dts/rtl8382_panasonic_m24eg-pn28240k.dts
target/linux/realtek/dts/rtl8382_tplink_t1600g-28ts-v3.dts
target/linux/realtek/dts/rtl8382_zyxel_gs1900-16-a1.dts
target/linux/realtek/dts/rtl8382_zyxel_gs1900-24.dtsi
target/linux/realtek/dts/rtl8382_zyxel_gs1900-24e-a1.dts
target/linux/realtek/dts/rtl8382_zyxel_gs1900-24ep-a1.dts
target/linux/realtek/dts/rtl8382_zyxel_gs1900-24hp-a1.dts
target/linux/realtek/dts/rtl8382_zyxel_gs1900-24hp-b1.dts
target/linux/realtek/dts/rtl838x.dtsi
target/linux/realtek/dts/rtl8391_zyxel_gs1920-24hp-v2.dts
target/linux/realtek/dts/rtl8392_zyxel_gs1920-24hp-v1.dts
target/linux/realtek/dts/rtl8393_d-link_dgs-1210-52.dts
target/linux/realtek/dts/rtl8393_edgecore_ecs4100-12ph.dts
target/linux/realtek/dts/rtl8393_hpe_1920-48g-poe.dts
target/linux/realtek/dts/rtl8393_hpe_1920-48g.dts
target/linux/realtek/dts/rtl8393_hpe_1920.dtsi
target/linux/realtek/dts/rtl8393_netgear_gs750e.dts
target/linux/realtek/dts/rtl8393_panasonic_m48eg-pn28480k.dts
target/linux/realtek/dts/rtl8393_tplink_sg2452p-v4.dts
target/linux/realtek/dts/rtl8393_zyxel_gs1900-48.dtsi
target/linux/realtek/dts/rtl839x.dtsi
target/linux/realtek/dts/rtl839x_zyxel_gs1920-24hp-common.dtsi
target/linux/realtek/dts/rtl9301_d-link_dgs-1250-28x.dts
target/linux/realtek/dts/rtl9301_linksys_lgs328x_nand_common.dtsi
target/linux/realtek/dts/rtl9301_zyxel_xgs1930-28hp.dts
target/linux/realtek/dts/rtl9302_plasmacloud_common.dtsi
target/linux/realtek/dts/rtl9302_plasmacloud_mcx3.dts
target/linux/realtek/dts/rtl9302_xikestor_sks8300-12e2t2x.dts
target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12-common.dtsi
target/linux/realtek/dts/rtl9302_zyxel_xgs1x10-12-common.dtsi
target/linux/realtek/dts/rtl9302_zyxel_xmg1915.dtsi
target/linux/realtek/dts/rtl9303_hasivo_s1100w-8xgt-se.dts
target/linux/realtek/dts/rtl9303_hasivo_s1100wp-8gt-se.dts
target/linux/realtek/dts/rtl9303_hasivo_s600wp-5gt-2sx-se.dts
target/linux/realtek/dts/rtl9303_xikestor_sks7300-4x4t.dts
target/linux/realtek/dts/rtl9303_xikestor_sks8300-8t.dts
target/linux/realtek/dts/rtl930x.dtsi
target/linux/realtek/dts/rtl9311_linksys_lgs352c.dts
target/linux/realtek/dts/rtl9312_plasmacloud_common.dtsi
target/linux/realtek/dts/rtl9313_zyxel_xs1930-12f.dts
target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts
target/linux/realtek/dts/rtl9313_zyxel_xs1930-aqr813.dtsi
target/linux/realtek/dts/rtl931x.dtsi