From nobody Tue Oct 7 08:58:28 2025 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75806192D83; Fri, 11 Jul 2025 05:40:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752212446; cv=none; b=LP/OK0R1AKPbQT/HyM9HgXChrG6Q2MGAgy66iOlHsL0zbz9D4ciBLjNq75Z3UUWBJ+F4J73IQu67alXnDlN3WcW66Z0VSFh1JVitkASmCt3HcW6KEsKKBEEkaMrBoJN387+YxMuUSTekyz3IiUaylJq2mrMg3H6Yaef9fu/Phwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752212446; c=relaxed/simple; bh=cLcSoW4RHFm1zNpR3N8xD4FvB98ZNkaDU1D2fYe6qoE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S+MH7ThJtaadhVWHStjTPVaE0zd8c2qUBClA0+3nbvhfgVYvQtdW0BDzRdn2ek90vrZ1XbHqpyAtOu1KAuITHZimlwFoNiHS4BEye/pM5nxa11UNq0HRvk1lD4ZqShEIo/uL5T13oBovvsxByrbGI9r3R87WNh2aLbkD/pWvQuo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: 8ouIrc07RPWR8qAsOQQyXw== X-CSE-MsgGUID: 5T/umF0RT5ygupuhHbcXYQ== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 11 Jul 2025 14:40:36 +0900 Received: from localhost.localdomain (unknown [10.226.92.72]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 58B70413B428; Fri, 11 Jul 2025 14:40:32 +0900 (JST) From: Biju Das To: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Biju Das , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next v2] net: phy: micrel: Add ksz9131_resume() Date: Fri, 11 Jul 2025 06:40:21 +0100 Message-ID: <20250711054029.48536-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Renesas RZ/G3E SMARC EVK uses KSZ9131RNXC phy. On deep power state, PHY loses the power and on wakeup the rgmii delays are not reconfigured causing it to fail. Replace the callback kszphy_resume()->ksz9131_resume() for reconfiguring the rgmii_delay when it exits from PM suspend state. Signed-off-by: Biju Das Reviewed-by: Andrew Lunn --- v1->v2: * Added ksz9131-specific phy_driver->resume to reconfigure the rgmii delays on exit from PM suspend state. * Replaced 'priv->is_suspended'->'phydev->suspended' for checking exit from PM state. * Updated commit description. Ref: https://patchwork.kernel.org/project/linux-renesas-soc/patch/2025070517032= 6.106073-1-biju.das.jz@bp.renesas.com/#26459627 --- drivers/net/phy/micrel.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 74fd6ff32c6c..f678c1bdacdf 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -5633,6 +5633,14 @@ static int lan8841_suspend(struct phy_device *phydev) return kszphy_generic_suspend(phydev); } =20 +static int ksz9131_resume(struct phy_device *phydev) +{ + if (phydev->suspended && phy_interface_is_rgmii(phydev)) + ksz9131_config_rgmii_delay(phydev); + + return kszphy_resume(phydev); +} + static struct phy_driver ksphy_driver[] =3D { { .phy_id =3D PHY_ID_KS8737, @@ -5879,7 +5887,7 @@ static struct phy_driver ksphy_driver[] =3D { .get_strings =3D kszphy_get_strings, .get_stats =3D kszphy_get_stats, .suspend =3D kszphy_suspend, - .resume =3D kszphy_resume, + .resume =3D ksz9131_resume, .cable_test_start =3D ksz9x31_cable_test_start, .cable_test_get_status =3D ksz9x31_cable_test_get_status, .get_features =3D ksz9477_get_features, --=20 2.43.0