From 26f2bc96b914d34966c7f527b6cca93e96c79494 Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Tue, 21 Apr 2026 19:25:18 +0200 Subject: [PATCH] realtek: dts: drop EXTERNAL_SFP_PHY macro 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 Link: https://github.com/openwrt/openwrt/pull/23036 Signed-off-by: Robert Marko --- target/linux/realtek/dts/macros.dtsi | 8 -------- target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts | 9 +++++---- target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts | 9 +++++---- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/target/linux/realtek/dts/macros.dtsi b/target/linux/realtek/dts/macros.dtsi index 6f5d991a0e8..a0e7ce33ba9 100644 --- a/target/linux/realtek/dts/macros.dtsi +++ b/target/linux/realtek/dts/macros.dtsi @@ -32,14 +32,6 @@ 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>; \ diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts index e32547ae8eb..cd8b847795b 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-16.dts @@ -28,10 +28,11 @@ 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 { diff --git a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts index f7034ea9127..4b06b9df35c 100644 --- a/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts +++ b/target/linux/realtek/dts/rtl8382_d-link_dgs-1210-20.dts @@ -28,10 +28,11 @@ 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 { -- 2.47.3