]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: pcs: rzn1-miic: Add PHY_LINK active-level configuration support
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Mon, 12 Jan 2026 17:35:55 +0000 (17:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 17 Jan 2026 23:17:25 +0000 (15:17 -0800)
commit61f1139a476569dfe28778358e01ebcf0bef3837
tree1dbc7ce1a97fb6e4655c6f7c3f44745d7317f535
parent98e8039a3b14281b3240f0b40469041365d0e378
net: pcs: rzn1-miic: Add PHY_LINK active-level configuration support

Add support to configure the active level of MIIC PHY_LINK status signals
on a per-converter basis using a DT property.

MIIC provides dedicated PHY_LINK signals that indicate EtherPHY link-up and
link-down status in hardware. These signals are required regardless of
whether GMAC or ETHSW is used. With GMAC, link state is retrieved via
MDC/MDIO and handled in software, while ETHSW relies on PHY_LINK pins for
both CPU-assisted operation and switch-only data paths that do not involve
the host.

Hardware PHY_LINK signals are also critical for fast reaction to link-down
events, for example when running redundancy protocols such as Device Level
Ring (DLR), where rapid detection of cable faults is required to switch to
an alternate path without software latency.

Parse the requested polarity from DT, accumulate the configuration during
probing, and apply it to the MIIC_PHY_LINK register once hardware
initialization is complete, when the registers can be safely modified.
Handle SoC-specific bit layout differences between RZ/N1 and RZ/T2H/N2H
within the driver.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/20260112173555.1166714-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/pcs/pcs-rzn1-miic.c