[net-next,v2,5/8] net: phy: at803x: Indicate SmartEEE support for AR8035 and AR8031 PHYs
Message ID | 20230327142202.3754446-6-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1565686vqo; Mon, 27 Mar 2023 07:47:01 -0700 (PDT) X-Google-Smtp-Source: AKy350a7vjXDjglTZSLzldoPCg6PHYniex0ZXlongVsX6kg4Z21QahjiHTfKGUkOFGezXHwfzycY X-Received: by 2002:a17:906:1e13:b0:92f:e40d:1489 with SMTP id g19-20020a1709061e1300b0092fe40d1489mr13558249ejj.61.1679928421722; Mon, 27 Mar 2023 07:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679928421; cv=none; d=google.com; s=arc-20160816; b=A3mf7FZ6oOwTt3EYX3xP05qrg6oAJn5ZnojQbXlopr3JCNCBg/BC15Yy9QvCmkiOuk gKbG8r84uQ35kcXY79MN416LVzTrGVrAdTBvDPySY7Zk2cUB7eKzKq58HUjGLgiXxaEl G7xkFsvhRMDm6P4XmDeN2NaKyF4Wi+2r5kWiLGmRA0hNN6v+t0xlsECPmyzI5H4WU5dI uMKXxyjr5whRUfTLmggLDTLdWozlqekebmxEqkCLwn1+8Md7ySNhrYaW8/2W4wEHQFIN zOlMeHOjB1GYgI0DDUC2Kng9RYDXyAhK2DZP8lK30edz3x/bez6wGCuFIdapreaIXj4L 9Ntg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YFp4Uz+Q0TStFy7KNyI/XRQaH9zgVzDIisIuoe/C3xk=; b=FDw+Sd4AcoQBbrShceEjyCp2m9rzkeWzffAcBycUtn8IfWyRJnALnpBtIdu4xEDHT3 1Lk2dbVCh4NYmvrHMvYW4DXtvsLY6y2DiEFQ3Md6tadFHmrmHCF63pVp2uOWWj6Fwtp6 MA/h2C5lrCoMZg20keopFP2bztIRXQ6kPqFTWPpxklGi//i/Yu/KnbTaJYcDIFAMEhRj DCiklYBal9w2CSVnwN1kd6hin0C6V449pLj7ir3Xvy/h41w9jix9jDf5ewnAdPwkU3eh mAp4a5J0xNnci/Gtkjc55kWG5vnOyjVt0D72PfIYM/03aM0zyPZDMSoqZwexzGl6Pt3Y 4Abw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020aa7d8c3000000b004bc501f34d4si25685380eds.250.2023.03.27.07.46.39; Mon, 27 Mar 2023 07:47:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233065AbjC0OYS (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Mon, 27 Mar 2023 10:24:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232885AbjC0OXt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Mar 2023 10:23:49 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C41B76BA for <linux-kernel@vger.kernel.org>; Mon, 27 Mar 2023 07:22:15 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1pgnja-0008Hp-Kw; Mon, 27 Mar 2023 16:22:06 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pgnjY-0076IZ-Ss; Mon, 27 Mar 2023 16:22:04 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pgnjW-00FkjK-T0; Mon, 27 Mar 2023 16:22:02 +0200 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Wei Fang <wei.fang@nxp.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Shenwei Wang <shenwei.wang@nxp.com>, Clark Wang <xiaoning.wang@nxp.com>, NXP Linux Team <linux-imx@nxp.com>, Amit Cohen <amcohen@nvidia.com>, Gal Pressman <gal@nvidia.com>, Alexandru Tachici <alexandru.tachici@analog.com>, Piergiorgio Beruto <piergiorgio.beruto@gmail.com>, Willem de Bruijn <willemb@google.com>, Vladimir Oltean <vladimir.oltean@nxp.com> Subject: [PATCH net-next v2 5/8] net: phy: at803x: Indicate SmartEEE support for AR8035 and AR8031 PHYs Date: Mon, 27 Mar 2023 16:21:59 +0200 Message-Id: <20230327142202.3754446-6-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230327142202.3754446-1-o.rempel@pengutronix.de> References: <20230327142202.3754446-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761532624810665455?= X-GMAIL-MSGID: =?utf-8?q?1761532624810665455?= |
Series |
Make SmartEEE support controllable
|
|
Commit Message
Oleksij Rempel
March 27, 2023, 2:21 p.m. UTC
This commit adds SmartEEE support indication for the AR8035 and AR8031
PHYs in the at803x driver. These PHYs support the SmartEEE
functionality, which is a Low Power Idle (LPI) implementation on the PHY
side, typically handled by the MAC.
By indicating SmartEEE support for these PHYs, the at803x driver and the
PHYlib framework can provide proper configuration and management of EEE
and LPI features. This allows for improved power management and energy
efficiency in devices using AR8035 and AR8031 PHYs.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/phy/at803x.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index 656136628ffd..653d27a2e62b 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -856,6 +856,12 @@ static int at803x_probe(struct phy_device *phydev) if (ret) return ret; + if (phydev->drv->phy_id == ATH8035_PHY_ID || + phydev->drv->phy_id == ATH8031_PHY_ID) { + if (!(priv->flags & AT803X_DISABLE_SMARTEEE)) + phydev->is_smart_eee_phy = true; + } + if (priv->vddio) { ret = regulator_enable(priv->vddio); if (ret < 0)