Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp920198rdg; Fri, 13 Oct 2023 05:24:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqbnp557/tIxzGz3/bq2hD+4uBb6xRSeSEjJ4Xzz3DAGQCKGaH1qNekSTncHbcHgcbAAYR X-Received: by 2002:a17:903:110d:b0:1bb:d59d:8c57 with SMTP id n13-20020a170903110d00b001bbd59d8c57mr29864646plh.18.1697199883536; Fri, 13 Oct 2023 05:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697199883; cv=none; d=google.com; s=arc-20160816; b=OH6HPoV6J9TjJcFOawkr0cv4xwzr1K6zQC49PJaLP7IPCLq20Q+UMQ31L8gP6LrKB5 VqgCSvBwZbkMhlpn9KhXAQs1+ZB+RBfseRpR0+FeZ7Yyc8ZH77wVu0P2tTKYyl3wkOei 13+el2eVzmoLYVmlc+NVVsX0fNwyCwQ4SHzFHtbzXJlRgjCmLJ2Qbxy9haW1jrZ3i6wS 9oWckvG2nycZ86f0MYKmf0T5PsOOS7lCDSHLXkDYAxA06ATwvI/MHt1pp+JnzFlw1zuP AL9ewGHnMzzKgoLbJfFgL0HNNbOQwBgRrYZRIJdsHkRlmeB0RpKVJBvG04pzZOVJl0jT ZxTw== 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 :message-id:date:subject:cc:to:from; bh=pD20TMNTCngWfswnJFFcDuXTel1sKjQJpsuwBDWUAJ0=; fh=J4gjwt0mePoRaYCjaHLm28JnUFi5LyPM6ZZbSRFLAL0=; b=BXjiQUv2BjfStA4fiorQsSlz7wdNyl2W6OgCmh0AJrEQGx5EmgbHj3si0oQ4upReFD 7YCSzt/iaaG2lQShxK5uJMCvT+nGeWEh+L2Il4z+ZRdY3AD5hXw5Vz496F5UBc62hXRm +3zi4piCJ2TTZj7WEu0BHCNwbeIi3jiUFsj67kPsIjtx8/4L2qBSo5aMfm5WF0taumbe 9sMUbDDiMIYSaTaSBP1MmImGxorYiVLLMAN+1l/RPhMXSvse+4dM2BhLl0j4FZOaohAF M64UJDzG2RjJy2qZN7Mbqj8gH+7tMVhri7RqsX8wyR3RLMIGBg6uCRf9btP+Ocd1d9j+ tceA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id n6-20020a170903110600b001c7352c5482si4838972plh.373.2023.10.13.05.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 05:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A803D8311BF4; Fri, 13 Oct 2023 05:24:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231620AbjJMMYh (ORCPT + 99 others); Fri, 13 Oct 2023 08:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231718AbjJMMYa (ORCPT ); Fri, 13 Oct 2023 08:24:30 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53B56BF for ; Fri, 13 Oct 2023 05:24:28 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrHD6-00016C-4U; Fri, 13 Oct 2023 14:24:08 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qrHD4-001OKg-UQ; Fri, 13 Oct 2023 14:24:06 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qrHD4-00FiNS-2o; Fri, 13 Oct 2023 14:24:06 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss , Conor Dooley , Krzysztof Kozlowski , Rob Herring Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, "Russell King (Oracle)" , devicetree@vger.kernel.org Subject: [PATCH net-next v3 0/7] net: dsa: microchip: provide Wake on LAN support Date: Fri, 13 Oct 2023 14:23:58 +0200 Message-Id: <20231013122405.3745475-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 13 Oct 2023 05:24:42 -0700 (PDT) changes v3: - use ethernet address of DSA master instead from devicetree - use dev_ops->wol* instead of list of supported switch - don't shotdown the switch if WoL is enabled - rework on top of latest HSR changes changes v2: - rebase against latest next This series of patches provides Wake on LAN support for the KSZ9477 family of switches. It was tested on KSZ8565 Switch with PME pin attached to an external PMIC. The patch making WoL configuration persist on system shutdown will be send separately, since it will potentially need more discussion. Oleksij Rempel (7): net: dsa: microchip: Add missing MAC address register offset for ksz8863 net: dsa: microchip: Set unique MAC at startup for WoL support net: dsa: microchip: ksz9477: add Wake on LAN support net: dsa: microchip: ksz9477: add Wake on PHY event support dt-bindings: net: dsa: microchip: add wakeup-source property net: dsa: microchip: use wakeup-source DT property to enable PME output net: dsa: microchip: do not shut down the switch if WoL is active .../bindings/net/dsa/microchip,ksz.yaml | 2 + drivers/net/dsa/microchip/ksz9477.c | 116 +++++++++++++++++ drivers/net/dsa/microchip/ksz9477.h | 4 + drivers/net/dsa/microchip/ksz9477_i2c.c | 3 + drivers/net/dsa/microchip/ksz_common.c | 117 ++++++++++++++++-- drivers/net/dsa/microchip/ksz_common.h | 7 ++ drivers/net/dsa/microchip/ksz_spi.c | 3 + 7 files changed, 245 insertions(+), 7 deletions(-) -- 2.39.2