]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: dts: drop EXTERNAL_SFP_PHY macro 23036/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Tue, 21 Apr 2026 17:25:18 +0000 (19:25 +0200)
committerRobert Marko <robimarko@gmail.com>
Wed, 22 Apr 2026 14:58:04 +0000 (16:58 +0200)
The EXTERNAL_SFP_PHY macro is very strange. It has attributes
sfp and media but is not linked to any SFP definition. There
is nothing that the kernel can evaluate better than the classic
PHY_C22 macro.

Remark! For the current D-Link DGS-1210 consumers this macro
should be converted to a PHY_C22_SFP in the future. As of now
there is no hardware to identify the proper gpios and define
and verify the corresponding SFP ports. Add a TODO comment
where needed.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23036
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/dts/macros.dtsi
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts
target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts

index 6f5d991a0e8307068b93a2ff683ead330a96f9d5..a0e7ce33ba9e080cc6a3eef012948c5aa8644506 100644 (file)
                enet-phy-pair-order = <##po>; \
        };
 
-#define EXTERNAL_SFP_PHY(n) \
-       phy##n: ethernet-phy@##n { \
-               compatible = "ethernet-phy-ieee802.3-c22"; \
-               sfp; \
-               media = "fibre"; \
-               reg = <##n>; \
-       };
-
 #define SWITCH_PORT(p, l, m) \
        port##p: port@##p { \
                reg = <##p>; \
index e32547ae8eba5bb083ddb2dee90ea7900a08eecd..cd8b847795b79e46b5fbb9b492e544b1c89de51f 100644 (file)
        PHY_C22(14, 14)
        PHY_C22(15, 15)
 
-       EXTERNAL_SFP_PHY(24)
-       EXTERNAL_SFP_PHY(25)
-       EXTERNAL_SFP_PHY(26)
-       EXTERNAL_SFP_PHY(27)
+       /* TODO: This is a RTL8214FC and should be PHY_C22_SFP() */
+       PHY_C22(24, 24)
+       PHY_C22(25, 25)
+       PHY_C22(26, 26)
+       PHY_C22(27, 27)
 };
 
 &switch0 {
index f7034ea912794788189614b142fa5552ff6a1ccf..4b06b9df35c3fd2635fa31a23a4c54f574c881d5 100644 (file)
        PHY_C22(14, 14)
        PHY_C22(15, 15)
 
-       EXTERNAL_SFP_PHY(24)
-       EXTERNAL_SFP_PHY(25)
-       EXTERNAL_SFP_PHY(26)
-       EXTERNAL_SFP_PHY(27)
+       /* TODO: This is a RTL8214FC and should be PHY_C22_SFP() */
+       PHY_C22(24, 24)
+       PHY_C22(25, 25)
+       PHY_C22(26, 26)
+       PHY_C22(27, 27)
 };
 
 &switch0 {