From: Lad Prabhakar <prab…@bp.renesas.com> Add support for an optional reset control to the RZN1 A5PSW driver. Obtain the reset line using devm_reset_control_get_optional_exclusive_deasserted() during probe to ensure that the Ethernet switch (ETHSW) block is properly released from reset before initialization. This change prepares the driver for use on Renesas RZ/T2H and RZ/N2H SoCs, where the ETHSW IP block is connected to a dedicated reset line that must be controlled by software. Signed-off-by: Lad Prabhakar <prab…@bp.renesas.com> Reviewed-by: Philipp Zabel <p.za…@pengutronix.de> Reviewed-by: Vladimir Oltean <olte…@gmail.com> --- v6: - No change v5: https://lore.kernel.org/all/2026…@bp.renesas.com/ - No change v4: https://lore.kernel.org/all/2026…@bp.renesas.com/ - No change v3: https://lore.kernel.org/all/2026…@bp.renesas.com/ - No change v2: https://lore.kernel.org/all/2026…@bp.renesas.com/ - Added RB tags v1: https://lore.kernel.org/all/2025…@bp.renesas.com/ --- drivers/net/dsa/rzn1_a5psw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c index 4925d24ec2a3..038b6b963761 100644 --- a/drivers/net/dsa/rzn1_a5psw.c +++ b/drivers/net/dsa/rzn1_a5psw.c @@ -15,6 +15,7 @@ #include <linux/module.h> #include <linux/of.h> #include <linux/of_mdio.h> +#include <linux/reset.h> #include <net/dsa.h> #include "rzn1_a5psw.h" @@ -1210,6 +1211,7 @@ static int a5psw_pcs_get(struct a5psw *a5psw) static int a5psw_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct reset_control *reset; struct device_node *mdio; struct dsa_switch *ds; struct a5psw *a5psw; @@ -1247,6 +1249,12 @@ static int a5psw_probe(struct platform_device *pdev) goto free_pcs; } + reset = devm_reset_control_get_optional_exclusive_deasserted(dev, NULL); + if (IS_ERR(reset)) { + ret = PTR_ERR(reset); + goto free_pcs; + } + mdio = of_get_available_child_by_name(dev->of_node, "mdio"); if (mdio) { ret = a5psw_probe_mdio(a5psw, mdio);
-- 2.56.1