Message ID | 20231123-dwmac-rk_phy_wol-v1-2-bf4e718081b9@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp399472vqx; Thu, 23 Nov 2023 04:15:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRcnS6TNGSyO/HFIZcJTT/nAaBSAangw7/Qt8eBUymSpoWqWQ6yLicTssDqjhg/8znAYBs X-Received: by 2002:a17:902:7805:b0:1c9:e68a:1b58 with SMTP id p5-20020a170902780500b001c9e68a1b58mr4190943pll.54.1700741732663; Thu, 23 Nov 2023 04:15:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700741732; cv=pass; d=google.com; s=arc-20160816; b=VJ8eicaAFbM7LlqA+1rpIKO9SD3F6jVpzHid7S5yqvG7TFNneW5bghNQhkW0i5Xl7P /46ek2P2D9R1XT3JgCg1RCrBLnS7IQNUOTKDUafxV/Oil3iHjVBSo2Y8o0WyFUoM2ZeF JhKdE+CmTxqcNOSCjVdKGFfqmc3P/1OP09iNyf4P2ykOYYuqMUZ5rn0+tMttsHNp9jna zchcVFN/Ztpjh/YlFv7uJYzgrTYnKiT5oeWsy9fBGRbLx/1fyjvVdDwbfH042aLyHC2f 7qLFRofG2Vxq/5/UVOVeNl7lzsZOqm8YxocFNiFCDcS2tDfZna000z/osr3u1s9qUebW 2qNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=AIfnaEo4N2Z/UP01LfKx32JgwuHl3fG1jrAMsr9MbfE=; fh=I+mp2iE83YRg0vsrSK94X0MYvN9utJiRswALBfniw1g=; b=YJGMEZzFOvjutaNoni55z3M8yjWPSvXYqQIhMTrBQEVqFLigkTbu1+U3hhBxsMr5Sj aWCHB264G8yPDUhCkvIShtAwWZhRQaddWKIYlDv2Jw7jJGzKCfhBaxm8jSckNQlhiIBw a63T2NKZtNDsRUCmJJn1fplBx2xK7d7Zv+q6lpCUcPLI9DKxE3K4op13ir6GzARlHa0i u0MVlOXWjogLh6AQiDCVOzEqxe0+r2KmJA6Z95OCkyrnDDFlPcM/P/FwyK8lfmF9AGXS s86STDS83qkp09XdgaNq+qpmntw/2VLM8ibgxFSReVkheC5+/nkVcUALr01Ap9HBSMJ0 pxPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=1ggO+kOl; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id l14-20020a170903244e00b001ce661a5ee3si1026472pls.509.2023.11.23.04.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 04:15:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=1ggO+kOl; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2512A808E0FE; Thu, 23 Nov 2023 04:15:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345249AbjKWMPS (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 23 Nov 2023 07:15:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345253AbjKWMPQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 23 Nov 2023 07:15:16 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2058.outbound.protection.outlook.com [40.107.7.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26003D5C; Thu, 23 Nov 2023 04:15:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hKlLEQX04e4A+LKyJFrzVX7xpiN+al4REMJSjyG3w5n35L6wJSFRbp/LgN6XU0robopm77ppT/tGRHN3Qhw9gcd1pC6EIGa9CSEFgIsvhvWLAN4pdGuhKGHBDk7pfBrE0ijoxX/Py8S9t3XVwd9YIj3ZDXfMcK2V/Mrvua+7GsXm0P9dpkzfF/Pmd0gDpg6/Deu4bRJV67FXxzJZKp/EPdzLXWts4u7ue3j9S8tiI3ibJiYCUNdrljUxbWd1uQwtUF/ByCg2yar5lEr+If7J58s2l93RzZ/uj4m0gqSGtAw2MTYDnFNbCxWf0gnvo68d1XxNNyInOiWiBFlZq2cfKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AIfnaEo4N2Z/UP01LfKx32JgwuHl3fG1jrAMsr9MbfE=; b=NRfK34uDBnCE97LlboktJe5Vo4n+3a+OpZkyuo9SF7h3G4rFKOu8Mru8nimghunslYfJUcORCp2w+y9RsY9pY8Q2iLNxBOERaFv9LB8Rr5DESIIpz0smWDIde30bU86M0WM6OGTPYa6guZIR8zBx4+HlhVZYHrZv6zqVDZk2VQP46DjMecJv5cMxxa+hx040GFowydu56pL18hWmU7Sa2KQ1Oq3trL9pVrTGJ2A9yLfNHRRGTC/J9f5hXU8e82Lt+oD1pEPdocc/0XcH9Y0G+B7ykFJhOSyaUFpV70Qd81Ea7EvE6HTvdERZ9a1pHhY2SFuBkoacv7LB6Kw3Jitq8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AIfnaEo4N2Z/UP01LfKx32JgwuHl3fG1jrAMsr9MbfE=; b=1ggO+kOlnsXUHOAovCCunEaUvCrn3b7mZgqtPe1bFkLatzZPqZbWscKJqZ+c8/khv/vILkc3NDQFoCsbAeTJUbjsjCfkMo3OHY0bAGA5T8hKkAuayWVeN2tyGAcheaRIdxwXKzXBCnYVME1+I24zg/nWjuAFnx9HCZo2H6novIo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by DU0PR08MB8423.eurprd08.prod.outlook.com (2603:10a6:10:405::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Thu, 23 Nov 2023 12:15:17 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6b40:1e6f:7c94:71dc]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::6b40:1e6f:7c94:71dc%4]) with mapi id 15.20.7025.020; Thu, 23 Nov 2023 12:15:17 +0000 From: Javier Carrasco <javier.carrasco@wolfvision.net> Date: Thu, 23 Nov 2023 13:14:14 +0100 Subject: [PATCH RFC WIP 2/2] net: stmmac: dwmac-rk: add support for PHY wake on LAN Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231123-dwmac-rk_phy_wol-v1-2-bf4e718081b9@wolfvision.net> References: <20231123-dwmac-rk_phy_wol-v1-0-bf4e718081b9@wolfvision.net> In-Reply-To: <20231123-dwmac-rk_phy_wol-v1-0-bf4e718081b9@wolfvision.net> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Heiko Stuebner <heiko@sntech.de>, David Wu <david.wu@rock-chips.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco <javier.carrasco@wolfvision.net> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1700741701; l=948; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=L+4DG9qvsMLMaPm6QeM3H7V9nATvHLre3SHjaPYMid8=; b=pgp8Dm0BP4blHZcJ6r6YuxjSY6KhK5aZmtXcCHc46Fomuu2r6XJc9kJp3akfP8aSSdfvCmes1 2MhbndH2oPCBVdU65liKUO8KJv5AeKbDvzTMGMEHvtavryS0STVmNvJ X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR06CA0227.eurprd06.prod.outlook.com (2603:10a6:802:2c::48) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|DU0PR08MB8423:EE_ X-MS-Office365-Filtering-Correlation-Id: ea339c67-63f0-46ae-1854-08dbec1dd37b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QUl1IOReLpf3dxNKBZ5HHm+HQLAXmOxuNx598HnUiyXD9dJWACLU86hvaQ0BbY1KZ5yDFv9S+sp1SXSLGmr03LQfRoJXsvuaGgD/h6ymjrV99dhcgvyuvHKEPq/s4GdPKRylyZ3Oeqr1ip3ZmuT233nS88DED/zfzCX1UGXPXQ6u+xMebMLakToFFy7cYI5k+UQebNCzW7aH7kQQK7qnTHovyC/hc/Bu5exnw5jvH3kOREz9aLdy0BPtsp/o9JHaJIKV45IXPYJPwD5ZEvnbEKJrN+ganF9TXHRgIIAibxj9gfZeU7/4o5IgZDxVC+mn/bHwho1keOfu7YWyQP1bh3puQs4eqZcWnrLaRt31CgldGlFhfhe3HgFvVfd/iJ0dSGJ9uBFUqnR33poOW5YDV0GSGJN0eELnJ7NGBwSCIZ1/NHbillvNtJVq/UfPurHrDYX4hnTMbizBtnop/OQyT4FSxo7dAZSG/Mt9K+shypOpO0ETAx5b6xYmwYZepvo9gYe1zR+Qix/II2RjRcDClegtjO9SZfmb2QAMpm2dC7kEWk2Loai4yhUAPh/9zSfB/QHimdXSIV5+KzWCVzcWE3W0skX2mhLbZw2dT6B6FeP3qz1b66poPwBlt1764Ea9K69UbR2CO4FxqLxGcpLWWg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(376002)(346002)(366004)(39850400004)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(921008)(26005)(2906002)(7416002)(4744005)(38100700002)(66556008)(66946007)(2616005)(107886003)(44832011)(5660300002)(41300700001)(8936002)(4326008)(8676002)(6486002)(86362001)(38350700005)(478600001)(66476007)(36756003)(110136005)(316002)(6512007)(6666004)(52116002)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?eX7BHG99v2RDl5oInCCCfe+UX7Iy?= =?utf-8?q?55mJXpSPYD3k22BZYrCpmgitGyQX0piX3gfHClNcfu/12SSBybcSlDR4zrKgNx1Hs?= =?utf-8?q?AjA33En2aIs6hjOs7DRna0RwR3a/3v8QZJgvYAelH2Dnl+9mjsvwZ4eV8drJe4CNl?= =?utf-8?q?VKe5Atr+r7VGN9zJ/rUR2sOXnX930CcaEw8yQp4PAQeo1WEVAUkzFbMDUUHzIxQks?= =?utf-8?q?ffd8LdxVGWvLdmvt65xbmAOFebJKoPuMg9NvBQWvygqs/1C4lviI1wW+zCKlzo0g3?= =?utf-8?q?NCtzZGqeJ1mx1aaRP4E6rc7F7ON+P6flufnGO/cFuTz36JUkrPpU6xQnHesqNuFG2?= =?utf-8?q?UxmjtZgXGEZySvUIjKRo28s4J/RVyeIYokAhdDM3HHFbslZ0pCMrZKXRRtPW7KqR7?= =?utf-8?q?vVILEC/xr4Kfu9yCJrv+NNGmMA2kBQEjBDLvt2uDb6BZ6lEIJCENEoc/1QX0s5ouF?= =?utf-8?q?AnTVoDuXE3rlfVuKErOh0Kf4VGzUTTYtFv67J6fYtTH105btPux6iIktktyowr6Kb?= =?utf-8?q?d3vYCuYjL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9OXhaKc57Tql4COqNUOZ85Bm56KCAENza8hD5jMSYAfPfpUjxjAMI?= =?utf-8?q?yHw4poYT1EL+kuPcfs4nEzPOSheSJ3B1I5h9cffas6zsa9t+0dSeYXkaj4F2FgMfc?= =?utf-8?q?bx0Kfw/nEz6cfAA+dXwE79SEbwozZE9XHPHj2SW+E48yzhJbWxFXIng=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: ea339c67-63f0-46ae-1854-08dbec1dd37b X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 12:15:05.0661 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yUT45QtFPuoIXKLDaGmqkWphvweITQZnFmd5deET9wEJWYAqcagJZi4Lf/zlqisvzRQEjwPye9xGGPrjKAPchKnDlyOa06HkqAuptN3Mfeg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8423 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 04:15:27 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783356963165866408 X-GMAIL-MSGID: 1783356963165866408 |
Series |
net: stmmac: dwmac-rk: add support for PHY wake on LAN
|
|
Commit Message
Javier Carrasco
Nov. 23, 2023, 12:14 p.m. UTC
PHY WOL will be used if the rockhip,phy-wol property is defined. MAC WOL
will be preferred otherwise.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 382e8de1255d..c543566b4f90 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1694,6 +1694,11 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev, dev_info(dev, "integrated PHY? (%s).\n", bsp_priv->integrated_phy ? "yes" : "no"); + if (of_property_read_bool(dev->of_node, "rockchip,phy-wol")) + plat->flags |= STMMAC_FLAG_USE_PHY_WOL; + else + plat->flags &= ~STMMAC_FLAG_USE_PHY_WOL; + bsp_priv->pdev = pdev; return bsp_priv;