From: Jonas Jelonek Date: Tue, 7 Apr 2026 21:06:19 +0000 (+0000) Subject: realtek: dts: repurpose SFP port macro X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2154c2b326af29b54869b23017c0d7fd76e2d3f;p=thirdparty%2Fopenwrt.git realtek: dts: repurpose SFP port macro Repurpose a currently unused macro to make it usable for common SFP port definitions. Do so by changing defined properties, drop the fixed link, etc. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/22827 Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/realtek/dts/macros.dtsi b/target/linux/realtek/dts/macros.dtsi index c601a5fc1c4..0d3bbcace1a 100644 --- a/target/linux/realtek/dts/macros.dtsi +++ b/target/linux/realtek/dts/macros.dtsi @@ -74,16 +74,15 @@ phy-mode = #m ; \ }; -#define SWITCH_SFP_PORT(n, s, m) \ - port##n: port@##n { \ - reg = <##n>; \ - label = SWITCH_PORT_LABEL(s) ; \ - phy-handle = <&phy##n>; \ - phy-mode = #m ; \ - fixed-link { \ - speed = <1000>; \ - full-duplex; \ - }; \ +#define SWITCH_PORT_SFP(p, l, s, c, g) \ + port##p: port@##p { \ + reg = <##p>; \ + label = SWITCH_PORT_LABEL(l) ; \ + led-set = <##c>; \ + pcs-handle = <&serdes##s>; \ + phy-mode = "1000base-x"; \ + sfp = <&sfp##g>; \ + managed = "in-band-status"; \ }; // LED Set mode definitions