diff --git a/target/linux/realtek/dts/macros.dtsi b/target/linux/realtek/dts/macros.dtsi index eeabf0069e..3cfac36730 100644 --- a/target/linux/realtek/dts/macros.dtsi +++ b/target/linux/realtek/dts/macros.dtsi @@ -19,6 +19,12 @@ compatible = "ethernet-phy-ieee802.3-c22"; \ }; +#define PHY_C45(p, n) \ + phy##p: ethernet-phy@n { \ + reg = <##n>; \ + compatible = "ethernet-phy-ieee802.3-c45"; \ + }; + #define EXTERNAL_SFP_PHY(n) \ phy##n: ethernet-phy@##n { \ compatible = "ethernet-phy-ieee802.3-c22"; \ diff --git a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8t.dts b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8t.dts index bb9616816e..e7bde814dc 100644 --- a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8t.dts +++ b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8t.dts @@ -130,47 +130,17 @@ }; &mdio_bus0 { - phy0: ethernet-phy@0 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <0>; - }; - - phy8: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <1>; - }; - - phy16: ethernet-phy@2 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <2>; - }; - - phy20: ethernet-phy@3 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <3>; - }; + PHY_C45(0, 0) + PHY_C45(8, 1) + PHY_C45(16, 2) + PHY_C45(20, 3) }; &mdio_bus1 { - phy24: ethernet-phy@0 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <0>; - }; - - phy25: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <1>; - }; - - phy26: ethernet-phy@2 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <2>; - }; - - phy27: ethernet-phy@3 { - compatible = "ethernet-phy-ieee802.3-c45"; - reg = <3>; - }; + PHY_C45(24, 0) + PHY_C45(25, 1) + PHY_C45(26, 2) + PHY_C45(27, 3) }; ðernet0 {