realtek: dts: add PHY_C45() macro

Like the PHY_C22() macro before add a helper that allows to define
a C45 based phy. It works basically the same with two parameters
PHY_C45(port_number, bus_address) where

- port_number is the absolute overall unique phy number
- bus_address is the location of the phy on the bus

As a first consumer adapt the Xikestor SKS8300-8T devicetree.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22715
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Markus Stockhausen 2026-03-31 17:40:31 +02:00 committed by Robert Marko
parent 21704379e0
commit e0287f7aba
2 changed files with 14 additions and 38 deletions

View File

@ -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"; \

View File

@ -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)
};
&ethernet0 {