openwrt/target/linux/realtek/dts
Markus Stockhausen 593df57731 realtek: dts: adapt RTL839x mdio bus topology
The RTL839x actually has two mdio busses.

- mdio bus 0 serves ports 0..23
- mdio bus 1 serves ports 24..51

This is baked into hardware and cannot be changed during mdio driver
setup with any register write. With the recent changes the driver
handles ports, phys and busses in a more logical way. So a port X
is assigned to a bus Y and a phy Z (on that bus). This gives a
mapping like

- port 16 <=> bus 0, address 16
- port 32 <=> bus 1, address 8

This unique assignment is used in the mdio driver as follows:

- Request to read bus 1, address 8
- Lookup corresponding port = 32
- Read from port 32

Looking at RTL839x it becomes clear that bus/phy => port lookup can
be achieved in multiple different ways. The simple reason is, that
for this device the driver cannot setup the smi topology. It is
baked into the hardware. So adding a "virtual" second bus does not
change the hardware access but allows to keep phy addresses below 32.
Making an example

mdio_bus0 {
  PHY_C22(40, 40)
}

resolves to port 40. But the same can be achieved with

mdio_bus1 {
  PHY_C22(40, 16)
}

In the first case the kernel sees bus/phy = 0/40 and in the second
case it sees bus/phy = 1/16. Both result in the access to the same
phy device on hardware port 40.

Use this analogy for RTL839x devices to match the real hardware
topology. For this change the existing dts and

- activate mdio bus 1 in rtl839x.dtsi
- rearrange devices with ports 24..51 to make use of bus 1

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23186
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-06 10:52:40 +02:00
..
macros.dtsi realtek: support configurable LED interface mode on RTL930x 2026-05-03 01:32:52 +02:00
rtl83xx_d-link_dgs-1210_common.dtsi realtek: Drop unused property on DGS-1210 gpio0 2025-01-28 07:30:32 +01:00
rtl83xx_d-link_dgs-1210_gpio_sfp.dtsi
rtl83xx_d-link_dgs-1210_gpio.dtsi realtek: switch RTL8231 driver for D-Link DGS-1210 2025-01-28 07:30:33 +01:00
rtl83xx_hpe_1920.dtsi realtek: switch HPE 1920 series to NVMEM 2026-02-13 12:06:20 +01:00
rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi
rtl93xx_linksys_lgs3xxc_nand_common.dtsi realtek: dts: convert LGS3xxC to NVMEM 2026-03-14 10:50:47 +01:00
rtl838x.dtsi realtek: dts: relocate/retype switch node 2026-03-21 22:26:02 +01:00
rtl839x_zyxel_gs1920-24hp-common.dtsi realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl839x.dtsi realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl930x.dtsi realtek: dts: fix ethernet-switch node 2026-03-22 11:31:21 +01:00
rtl931x.dtsi realtek: fix pinmux comment in rtl931x.dtsi 2026-04-12 18:23:08 +02:00
rtl8380_d-link_dgs-1210-10mp-f.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_datto_l8.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_engenius_ews2910p-v1.dts realtek: engenius_ews2910p: support multiple hardware versions 2025-05-31 23:19:01 +02:00
rtl8380_engenius_ews2910p-v3.dts realtek: support EnGenius EWS2910P v3 2025-05-31 23:19:01 +02:00
rtl8380_engenius_ews2910p.dtsi realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_hpe_1920-8g-poe-65w.dts
rtl8380_hpe_1920-8g-poe-180w.dts realtek: HPE 1920 8G PoE+ 180W move fans to hwmon 2025-01-15 08:21:08 +01:00
rtl8380_hpe_1920-8g.dts
rtl8380_hpe_1920-8g.dtsi realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_linksys_lgs310c.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_netgear_gigabit.dtsi realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_netgear_gs108t-v3.dts
rtl8380_netgear_gs110tpp-v1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8380_netgear_gs110tup-v1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8380_netgear_gs308t-v1.dts
rtl8380_netgear_gs310tp-v1.dts realtek: dts: replace ports by ethernet-ports 2026-03-01 14:19:36 +01:00
rtl8380_panasonic_m8eg-pn28080k.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_tplink_sg2xxx.dtsi realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8380_tplink_sg2008p-v1.dts realtek: rtl838x: drop SFP pseudo-PHYs and phy-handle 2025-12-09 00:28:41 +01:00
rtl8380_tplink_sg2210p-v3.dts realtek: dts: replace ports by ethernet-ports 2026-03-01 14:19:36 +01:00
rtl8380_zyxel_gs1900_gpio_emulated.dtsi realtek: rtl838x: drop GS1900 MDIO reset GPIO 2026-02-24 21:29:26 +01:00
rtl8380_zyxel_gs1900_gpio.dtsi realtek: rtl838x: drop GS1900 MDIO reset GPIO 2026-02-24 21:29:26 +01:00
rtl8380_zyxel_gs1900-8-a1.dts realtek: rtl838x: rename GS1900 series v1/v2 to A1/B1 2025-09-24 13:41:04 +02:00
rtl8380_zyxel_gs1900-8-b1.dts realtek: rtl838x: rename GS1900 series v1/v2 to A1/B1 2025-09-24 13:41:04 +02:00
rtl8380_zyxel_gs1900-8hp-a1.dts realtek: rtl838x: rename GS1900 series v1/v2 to A1/B1 2025-09-24 13:41:04 +02:00
rtl8380_zyxel_gs1900-8hp-b1.dts realtek: rtl838x: rename GS1900 series v1/v2 to A1/B1 2025-09-24 13:41:04 +02:00
rtl8380_zyxel_gs1900-10hp-a1.dts realtek: dts: replace ports by ethernet-ports 2026-03-01 14:19:36 +01:00
rtl8380_zyxel_gs1900.dtsi realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_allnet_all-sg8208m.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_apresia_aplgs120gtss.dts realtek: dts: convert EXTERNAL_SFP_PHY_FULL to PHY_C22_SFP 2026-04-22 16:58:04 +02:00
rtl8382_d-link_dgs-1210-10p.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_d-link_dgs-1210-16.dts realtek: dts: drop EXTERNAL_SFP_PHY macro 2026-04-22 16:58:04 +02:00
rtl8382_d-link_dgs-1210-20.dts realtek: dts: drop EXTERNAL_SFP_PHY macro 2026-04-22 16:58:04 +02:00
rtl8382_d-link_dgs-1210-26.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_d-link_dgs-1210-28_common.dtsi realtek: dts: convert EXTERNAL_SFP_PHY_FULL to PHY_C22_SFP 2026-04-22 16:58:04 +02:00
rtl8382_d-link_dgs-1210-28.dts
rtl8382_d-link_dgs-1210-28mp-f.dts
rtl8382_d-link_dgs-1210-28p_common.dtsi
rtl8382_d-link_dgs-1210-28p-f.dts
rtl8382_hpe_1920-16g.dts realtek: dts: replace ports by ethernet-ports 2026-03-01 14:19:36 +01:00
rtl8382_hpe_1920-24g-poe-180w.dts realtek: HPE 1920 24G PoE+ 180W/370W move fans to hwmon 2025-01-16 07:32:16 +01:00
rtl8382_hpe_1920-24g-poe-370w.dts realtek: HPE 1920 24G PoE+ 180W/370W move fans to hwmon 2025-01-16 07:32:16 +01:00
rtl8382_hpe_1920-24g.dts realtek: rtl838x: refactor hpe_1920-24g dts 2024-12-31 08:29:56 +01:00
rtl8382_hpe_1920-24g.dtsi realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8382_hpe_1920.dtsi realtek: dts: convert EXTERNAL_SFP_PHY_FULL to PHY_C22_SFP 2026-04-22 16:58:04 +02:00
rtl8382_inaba_aml2-17gp.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_iodata_bsh-g24mb.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_panasonic_m16eg-pn28160k.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_panasonic_m24eg-pn28240k.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_tplink_t1600g-28ts-v3.dts realtek: drop INTERNAL_PHY() macro 2026-04-13 18:42:33 +02:00
rtl8382_zyxel_gs1900-16-a1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8382_zyxel_gs1900-24-a1.dts realtek: use common dtsi for Zyxel GS1900-24 2026-01-27 01:34:21 +01:00
rtl8382_zyxel_gs1900-24-b1.dts realtek: add Zyxel GS1900-24 B1 device definition 2026-01-27 01:34:21 +01:00
rtl8382_zyxel_gs1900-24.dtsi realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8382_zyxel_gs1900-24e-a1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8382_zyxel_gs1900-24ep-a1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8382_zyxel_gs1900-24hp-a1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8382_zyxel_gs1900-24hp-b1.dts realtek: dts: convert EXTERNAL_PHY() to PHY_C22() 2026-03-31 12:56:24 +02:00
rtl8391_zyxel_gs1920-24hp-v2.dts realtek: dts: convert EXTERNAL_SFP_PHY_FULL to PHY_C22_SFP 2026-04-22 16:58:04 +02:00
rtl8392_zyxel_gs1920-24hp-v1.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_d-link_dgs-1210-52.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_edgecore_ecs4100-12ph.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_hpe_1920-48g-poe.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_hpe_1920-48g.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_hpe_1920.dtsi realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_netgear_gs750e.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_panasonic_m48eg-pn28480k.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_tplink_sg2452p-v4.dts realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_zyxel_gs1900-48-a1.dts realtek: extract shared GS1900-48 dtsi 2026-04-11 19:32:57 +02:00
rtl8393_zyxel_gs1900-48.dtsi realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rtl8393_zyxel_gs1900-48hp-a1.dts realtek: add Zyxel GS1900-48HP A1 support 2026-04-11 19:35:53 +02:00
rtl9301_d-link_dgs-1250-28x.dts realtek: hwmon: backport lm75 alert polarity patches 2026-05-06 10:51:32 +02:00
rtl9301_linksys_lgs328c.dts realtek: dts: rtl93xx: use SWITCH_PORT_SFP for ports 2026-05-01 12:41:49 +02:00
rtl9302_plasmacloud_common.dtsi realtek: Fix pair-order for rtl930x based plasmacloud devices 2026-04-11 12:17:30 +02:00
rtl9302_plasmacloud_mcx3.dts realtek: dts: rtl93xx: use SWITCH_PORT_SFP for ports 2026-05-01 12:41:49 +02:00
rtl9302_plasmacloud_psx8.dts realtek: rtl930x: Add support for Plasma Cloud PSX8 Switch 2025-08-28 21:07:57 +02:00
rtl9302_plasmacloud_psx10.dts realtek: dts: rtl93xx: use SWITCH_PORT_SFP for ports 2026-05-01 12:41:49 +02:00
rtl9302_xikestor_sks8300-12e2t2x.dts realtek: dts: rtl93xx: use macro for PHY port definitions 2026-05-01 12:41:49 +02:00
rtl9302_zyxel_xgs1x10-12-common.dtsi realtek: dts: rtl93xx: use PHY_* macros for Zyxel XGS1X10/1250 2026-05-01 12:41:49 +02:00
rtl9302_zyxel_xgs1010-12-a1.dts realtek: dts: rtl93xx: use PHY_* macros for Zyxel XGS1X10/1250 2026-05-01 12:41:49 +02:00
rtl9302_zyxel_xgs1210-12-a1.dts realtek: dts: rtl93xx: use PHY_* macros for Zyxel XGS1X10/1250 2026-05-01 12:41:49 +02:00
rtl9302_zyxel_xgs1210-12-b1.dts realtek: dts: rtl93xx: use PHY_* macros for Zyxel XGS1X10/1250 2026-05-01 12:41:49 +02:00
rtl9302_zyxel_xgs1210-12-common.dtsi realtek: switch Zyxel XGS1210 to NVMEM 2026-02-15 12:02:38 +01:00
rtl9302_zyxel_xgs1250-12-a1.dts realtek: force in-band autoneg on XGS1250-12 A1 10G PHYs 2026-03-31 12:54:57 +02:00
rtl9302_zyxel_xgs1250-12-b1.dts realtek: mdio: drop realtek,smi-address property 2026-03-21 22:26:02 +01:00
rtl9302_zyxel_xgs1250-12-common.dtsi realtek: dts: rtl93xx: use PHY_* macros for Zyxel XGS1X10/1250 2026-05-01 12:41:49 +02:00
rtl9302_zyxel_xmg1915-10e.dts realtek: add support for Zyxel XMG1915-10E 2026-04-16 14:26:03 +02:00
rtl9303_hasivo_s600wp-5gt-2sx-se.dts realtek: rtl930x: add Hasivo S600WP-5GT-2SX-SE 2026-04-24 12:17:26 +02:00
rtl9303_hasivo_s1100w-8xgt-se.dts realtek: dts: rtl93xx: use macro for PHY port definitions 2026-05-01 12:41:49 +02:00
rtl9303_hasivo_s1100wp-8gt-se.dts realtek: dts: convert devices to PHY_C45() 2026-04-01 14:12:14 +02:00
rtl9303_tplink_tl-st1008f-v2.dts realtek: dts: rtl93xx: replace LED magic values with macros 2026-05-01 12:41:49 +02:00
rtl9303_vimin_vm-s100-0800ms.dts realtek: dts: rtl93xx: replace LED magic values with macros 2026-05-01 12:41:49 +02:00
rtl9303_xikestor_sks8300-8t.dts realtek: dts: add PHY_C45() macro 2026-04-01 14:12:14 +02:00
rtl9303_xikestor_sks8300-8x.dts realtek: dts: rtl93xx: replace LED magic values with macros 2026-05-01 12:41:49 +02:00
rtl9303_xikestor_sks8310-8x.dts realtek: dts: rtl93xx: replace LED magic values with macros 2026-05-01 12:41:49 +02:00
rtl9311_linksys_lgs352c.dts realtek: dts: rtl93xx: use SWITCH_PORT_SFP for ports 2026-05-01 12:41:49 +02:00
rtl9312_plasmacloud_common.dtsi realtek: dts: rtl93xx: use SWITCH_PORT_SFP for ports 2026-05-01 12:41:49 +02:00
rtl9312_plasmacloud_esx28.dts realtek: rtl931x: Add support for Plasma Cloud ESX28 Switch 2025-10-04 16:16:22 +02:00
rtl9312_plasmacloud_psx28.dts realtek: rtl931x: psx28: specify POE MCU reset GPIO 2026-04-14 10:38:28 +02:00
rtl9313_xikestor_sks8300-12x-v1.dts realtek: dts: rtl93xx: use SWITCH_PORT_SFP for ports 2026-05-01 12:41:49 +02:00
rtl9313_zyxel_xs1930-10.dts realtek: pcs: switch SerDes polarity to {rx,tx}-polarity 2026-04-24 10:13:38 +02:00
rtl9313_zyxel_xs1930-12f.dts realtek: pcs: switch SerDes polarity to {rx,tx}-polarity 2026-04-24 10:13:38 +02:00
rtl9313_zyxel_xs1930-12hp.dts realtek: pcs: switch SerDes polarity to {rx,tx}-polarity 2026-04-24 10:13:38 +02:00
rtl9313_zyxel_xs1930.dtsi realtek: add generic support for Zyxel XS1930 lineup 2026-04-20 11:13:06 +02:00