realtek: DTS: add macro for switch port with SerDes
authorMarkus Stockhausen <[email protected]>
Thu, 18 Sep 2025 09:10:50 +0000 (05:10 -0400)
committerRobert Marko <[email protected]>
Sat, 20 Sep 2025 10:51:23 +0000 (12:51 +0200)
commit06c895f5d3a98669aa0f6ac3a06815474e57234d
treee49249b32db81ce502a5e0a32cee0e81905221af
parente31127497c7cc35ddc121eef8918736539dbf80f
realtek: DTS: add macro for switch port with SerDes

In the future the PCS & DSA drivers will lookup the SerDes of a
switch port via pcs-handle (like upstream does). Provide a macro
that allows to expand the existing port definitions. To link a
SerDes to port simply do

Either in short form:

replace SWITCH_PORT(0, 1, qsgmii)
with    SWITCH_PORT_SDS(0, 1, 3, qsgmii) (Link to SerDes 3)

Or in long form:

port@24 {
reg = <24>;
label = "lan25";
pcs-handle = <&serdes4>; (Link to SerDes 4)
phy-handle = <&phy24>;
phy-mode = "1000base-x";
managed = "in-band-status";
sfp = <&sfp0>;
};

Signed-off-by: Markus Stockhausen <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20075
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/dts/macros.dtsi