]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: pcs: rzn1-miic: Add support to handle resets
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 10 Sep 2025 20:41:28 +0000 (21:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Sep 2025 00:44:36 +0000 (17:44 -0700)
commit882a8bb0706c0c3af6b33858bcad630cf61fe894
treeced68bb0f27a0ca008647bd26754eb8371a5541a
parent6245237abae3e78dd0bba20c6067ff45619481a5
net: pcs: rzn1-miic: Add support to handle resets

Add reset-line handling to the RZN1 MIIC driver and move reset
configuration into the SoC/OF data. Introduce MIIC_MAX_NUM_RSTS (= 2),
add storage for reset_control_bulk_data in struct miic and add
reset_ids and reset_count fields to miic_of_data.

When reset_ids are present in the OF data, the driver obtains the reset
lines with devm_reset_control_bulk_get_exclusive(), deasserts them during
probe and registers a devres action to assert them on remove or on error.

This change is preparatory work to support the RZ/T2H SoC, which exposes
two reset lines for the ETHSS IP. The driver remains backward compatible
for platforms that do not provide reset lines.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://patch.msgid.link/20250910204132.319975-8-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/pcs/pcs-rzn1-miic.c