1
1
openwrt/target/linux
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
..
airoha kernel: bump 6.12 to 6.12.81 2026-04-30 01:31:44 +02:00
apm821xx kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
armsr kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
at91 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
ath79 kernel: bump 6.12 to 6.12.83 2026-04-30 01:31:44 +02:00
bcm27xx kernel: bump 6.12 to 6.12.83 2026-04-30 01:31:44 +02:00
bcm47xx kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
bcm53xx bcm53xx: add ramdisk to FEATURES 2026-04-29 09:56:37 +02:00
bcm4908 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
bmips treewide: use _scoped for loop 2026-04-16 21:17:43 +02:00
d1 d1: drop support for 6.12 2026-04-21 16:13:37 +02:00
econet treewide: use _scoped for loop 2026-04-16 21:17:43 +02:00
gemini gemini/kernel: drop v6.12 and default to v6.18 2026-04-17 18:01:06 +02:00
generic kernel: bump 6.12 to 6.12.85 2026-05-02 01:24:44 +02:00
imx imx: cortexa9: ventana, fix profiles names in profiles.json 2026-04-23 01:13:36 +02:00
ipq40xx kernel: bump 6.12 to 6.12.82 2026-04-30 01:31:44 +02:00
ipq806x chromium: Add #{address,size}-cells to /firmware 2026-04-16 14:18:45 +02:00
ixp4xx ixp4xx/kernel: drop v6.12 and default to v6.18 2026-04-16 08:35:38 +02:00
kirkwood kirkwood: switch to 6.18 kernel 2026-04-27 09:39:21 +02:00
lantiq lantiq: enable 6.18 testing kernel 2026-04-23 15:54:47 +02:00
layerscape layerscape: armv8_64b: traverse ten64-mtd fix ASU support 2026-04-16 20:38:51 +02:00
loongarch64 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
malta malta: restore CONFIG_PAGE_BLOCK_MAX_ORDER=10 for 6.18 2026-04-11 18:11:03 +02:00
mediatek mediatek: add support for ELECOM WRC-X6000GSD 2026-05-03 01:14:11 +02:00
microchipsw microchipsw: use upstreamed QSGMII soft reset patch 2026-05-05 13:11:14 +02:00
mpc85xx mpc85xx: unify wrapper address of simple image devices 2026-05-05 14:09:38 +02:00
mvebu mvebu: use libdeflate for gzip 2026-04-23 20:36:17 +02:00
mxs mxs: drop support for 6.12 2026-04-16 14:55:36 +02:00
octeon octeon: enable 6.18 testing kernel 2026-04-26 10:03:37 +02:00
omap kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
pistachio pistachio: drop support for 6.12 2026-04-18 12:02:48 +02:00
qoriq kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
qualcommax ipq50xx: add label-mac-device to Linksys MX5500 2026-04-29 10:07:09 +02:00
qualcommbe kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
ramips ramips: remove mediatek,firmware-eeprom 2026-05-05 13:14:07 +02:00
realtek realtek: dts: adapt RTL839x mdio bus topology 2026-05-06 10:52:40 +02:00
rockchip rockchip: update irq affinity for RK3528 devices 2026-04-26 14:28:31 +02:00
sifiveu sifiveu: drop support for 6.12 2026-04-19 13:21:21 +02:00
siflower generic: backport MSI affinity support for DW PCIe 2026-04-26 14:28:31 +02:00
starfive starfive: enable 6.18 testing kernel 2026-04-21 14:49:35 +02:00
stm32 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
sunxi sunxi: drop support for 6.12 2026-04-28 11:27:46 +02:00
tegra kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
uml kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
x86 x86: enable HYPERV_VMBUS 2026-04-26 10:27:47 +02:00
zynq kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00