]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: realtek: add RTL8224 polarity support
authorDamien Dejean <dam.dejean@gmail.com>
Wed, 18 Mar 2026 21:55:01 +0000 (22:55 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Mar 2026 02:12:46 +0000 (19:12 -0700)
commitbeed9c0e9b53c98bc66d28d46fbe38c347e9aa74
treec0f3a5d9180522dadd58026b0a441d67ac8ec3cc
parent58ffb5910f32e5b387d4af31ee21851c40eb31b5
net: phy: realtek: add RTL8224 polarity support

The RTL8224 has a register to configure the polarity of every pair of
each port. It provides device designers more flexbility when wiring the
chip.

Unfortunately, the register is left in an unknown state after a reset.
Thus on devices where the bootloader don't initialize it, the driver has
to do it to detect and use a link.

The MDI polarity swap can be set in the device tree using the property
enet-phy-pair-polarity. The u32 value is a bitfield where bit[0..3]
control the polarity of pairs A..D.

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