]> git.ipfire.org Git - thirdparty/linux.git/commit
net: phy: realtek: add RTL8224 pair order support
authorDamien Dejean <dam.dejean@gmail.com>
Wed, 18 Mar 2026 21:54:59 +0000 (22:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Mar 2026 02:12:46 +0000 (19:12 -0700)
commit330296ea9e158758aa65631f5ec64aa74806b7e2
treed2bdad3fec1f0beddfd11367403494f3bc89b70a
parentc1887257a81bf62f48178d3b9d31e23520d67b2c
net: phy: realtek: add RTL8224 pair order support

The RTL8224 has a register to configure a pair swap (from ABCD order to
DCBA) providing PCB designers more flexbility when wiring the chip. The
swap parameter has to be set correctly for each of the 4 ports before
the chip can detect a link.

After a reset, this register is (unfortunately) left in a random state,
thus it has to be initialized. On most of the devices the bootloader
does it once for all and we can rely on the value set, on some other it
is not and the kernel has to do it.

The MDI pair swap can be set in the device tree using the property
enet-phy-pair-order. The property is set to 0 to keep the default order
(ABCD), or 1 to reverse the pairs (DCBA).

Signed-off-by: Damien Dejean <dam.dejean@gmail.com>
Link: https://patch.msgid.link/20260318215502.106528-3-dam.dejean@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/realtek/Kconfig
drivers/net/phy/realtek/realtek_main.c