From patchwork Mon Jul 29 07:41:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744495 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42D9412C473 for ; Mon, 29 Jul 2024 07:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238922; cv=none; b=b0Iu6jpzyZ4uPJIEzMC1TAqiDO6q4Qx4HYFhe9mjNtdASr0Ayauu3qCtmycZG7wNz9l2UGxD6N1m3vXi+2qOibsRS1dBDNuh8Gcm6dEV4BsqnEjBJBMbIIsrFTfn24f7227OrkcIwbOKHAiIIKJyg0Ly6V9Q2kn1vTWOm8FnVpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238922; c=relaxed/simple; bh=kKmavRoafL7LbrI6wgzkO9etrOXpNKqKGJnQcNGpZL4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uJuYUoIBqFemvvFswaUsEeGSqgJXy/0B9zSJDb/vNNzRLNaK03gZRwKzXZ3Abh01PO/Po9zQIf6RyRhN097GUFZO7D/OLDQ+eFTGt3QthwwSWbXzpRN/OUj0/TgF7jTrK6rdklp73Slb6EKmc2XGUqiv1qOUtEC+Kk5WNZSFHJU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=qw83JVyZ; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="qw83JVyZ" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-36865a516f1so1620833f8f.0 for ; Mon, 29 Jul 2024 00:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238918; x=1722843718; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YxOPhXgBGVgm459I7orAWDkAOXF8W6mRG3330dy+9Vs=; b=qw83JVyZ4r5Wrvz20b/MTpAujpD++eQho27lI7MZhEKvpe2Ol58hSSXsIT8ykfcH1K lpDXK30HD0uf8112z5YL85lcth9MiQ17/ydKhFIRMD7va/Nn5xOTLWymTS8IJut6Xwt2 T5yzRM/QNPgITwxCvg4lpf2LkVaRXmBRG5dUqdvUuJYJxw0Spn38gPgZxpLCSY0QocM9 Z8QF1svr++GmDNuFB7AMROusSd/aDLea1vgaIWc23F6nrh8h3QAjCdKDYtFCoSElyxcx 4zZEtp04DbSCzMhPVPe2S++bsy4aE+JqxCxsIj3R9CzWriTfG68R965jeOGAsTFyMneh mcMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238918; x=1722843718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YxOPhXgBGVgm459I7orAWDkAOXF8W6mRG3330dy+9Vs=; b=Ghn8kBu/XUFRCLDOySFRAA3qxXJd5F5A67vmSoth8uSop6Q3ETSGXsbnoi9HA+wKOj 2pkCyhpKzegCnFP321MW+BKV8TD9oIfedeg6IVBSkHqVU7bp8tBpspiwP7B/099YJLvm 9D+WEyBhMMFXB2ipQ8U+A0n7ER6S8NLeah+XRQQ+IkuuZ5/t0R+3D5zIYSFyHZx/PzaM DZ/Cq+be9U6f4k1b89ENOzaUt39aKaBGVTo6sIOu75Yq152AY2hikWC1U2ENnOQYF1X1 Qzu857rvOTqa51gbLYAMizQiQqD9xzW+HcP7Yp2WneXkdOmFMlwPl8GqCu9dCjJugyJQ 7d5g== X-Forwarded-Encrypted: i=1; AJvYcCUSyosD4ZbkQQsqyWX/g66Ou9E9sB7+aLHYfQmwfApWwxADnfXmWo8OgkFilzhFmbzOtc45gxwW+Pe8+sVOc6YMCweFkijF X-Gm-Message-State: AOJu0YzJRBFuCF7inT/Rw+BzmZCjv+KYvDswsrnGMMonTE8+lK9jFxIq qfOu+xjd0AGoD/d7N8/98ULX79lUCVC49au7meRmHuZZvxKLqzDnrVG+izeETPw= X-Google-Smtp-Source: AGHT+IEH1BmXykzYxHbBlIGQ39KCxXnJRNw6NqAwJ/SmSfzCEFJPCKmY2ZLDYfIMDV8hQvo+5IUQUw== X-Received: by 2002:a5d:4210:0:b0:368:3b5c:7a5d with SMTP id ffacd0b85a97d-36b5d048bf8mr5655964f8f.20.1722238918458; Mon, 29 Jul 2024 00:41:58 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.41.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:41:58 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/7] dt-bindings: can: m_can: Add wakeup properties Date: Mon, 29 Jul 2024 09:41:29 +0200 Message-ID: <20240729074135.3850634-2-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org m_can can be a wakeup source on some devices. Especially on some of the am62* SoCs pins, connected to m_can in the mcu, can be used to wakeup the SoC. The wakeup-source property defines on which devices m_can can be used for wakeup. The pins associated with m_can have to have a special configuration to be able to wakeup the SoC. This configuration is described in the wakeup pinctrl state while the default state describes the default configuration. Signed-off-by: Markus Schneider-Pargmann --- .../bindings/net/can/bosch,m_can.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index c4887522e8fe..ef63f6b8455d 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -106,6 +106,22 @@ properties: maximum: 32 minItems: 1 + pinctrl-0: + description: Default pinctrl state + + pinctrl-1: + description: Wakeup pinctrl state + + pinctrl-names: + description: + When present should contain at least "default" describing the default pin + states. The second state called "wakeup" describes the pins in their + wakeup configuration required to exit sleep states. + minItems: 1 + items: + - const: default + - const: wakeup + power-domains: description: Power domain provider node and an args specifier containing @@ -122,6 +138,10 @@ properties: minItems: 1 maxItems: 2 + wakeup-source: + $ref: /schemas/types.yaml#/definitions/flag + description: This device is capable to wakeup the SoC. + required: - compatible - reg From patchwork Mon Jul 29 07:41:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744496 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5252A12C530 for ; Mon, 29 Jul 2024 07:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238923; cv=none; b=VIST3vDt2PJbZbQYnmHYemPxGLk+Oxxhj9EhzsAfCJ3ZKNWC8PKyKqL0+pc8DcL2QNFOglp8i73uhQ/GD5tmLZ0EW7KP2N/2A8lhs4+THyG4jqMwWbsneG3UKoVfS2+Z/5ZAzoN+lqONmG6QW+EyppGvtm4sgV2IFbGkAdh4d3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238923; c=relaxed/simple; bh=t7F2lKoixWfzCSNEpIYekj5rawyt2QRxC3AGjmCilLM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EgLkSmtquEtJmCKNzp69gr+8gaO+Cvcowr6Zez4SRmpuBCIKfPcBlpHZ9sAXpocySuiIIdGTNDPh6qqk1+bDnjeVdrZV68gIATIdUaanipUaq3b5a8YDt4JKtbqYnYDoR/81nDe5eGFmIeZKIiXdAJGg+fxyzrbW/hiEHCPRGks= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=fgy3eIpv; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="fgy3eIpv" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-368440b073bso893339f8f.0 for ; Mon, 29 Jul 2024 00:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238920; x=1722843720; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZCJyOdovnkFMEmbndXoqHv/AoixQbNLaTwmx6tiqcEI=; b=fgy3eIpv4wNCMkq5iKTCCDuJryptZxSFJTCW7Esks7pESN6kl+8HkbJG09E1qDbp1F qCXDkIeAPumM70YrzMKKBpCDw8BfIj80TUUucZneSCRHRwr5TZH5aBwAuDERp8iqwoHm hj3JY/HRAtJQak7K0HSzjzNS5r8yyK6Hh27cnHVso8TbjyiZVuKqUPUc0I1QLP2niH8u +ZTw/RPtxdkfCa1Osr10GVm4JTCH61QjiRjP0FOT9PKHVHv7RCpRhYb71F3XQZWLNino /Y2bNfpQpyr6rqWveXi/rTPcvwaA0+tzCoLUqEFibSsGwOXWfs9113X0Ad2HWCpAjoN2 ciwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238920; x=1722843720; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZCJyOdovnkFMEmbndXoqHv/AoixQbNLaTwmx6tiqcEI=; b=aBvlsV3BLFNCbDo4rI4zJ7KyQbaH9M5QiX93FFrKRKOH6tBU9Rq0QlFHuK0JzFMVuS b3bI/+9Gj/ws36zS49f8SYHXju9ziO1XfRYTEgcAtbwu09Zi7Mm8Va3T0jTCPrTVlh2l 27uz+DJfewL9BZawNY9Ix/Ta5NuwiKKHYxjHBVusNDVIR2otlaqWpUT6kaItN3sopkmv lzp9iTRdTi38KkZrj9jsEstGVRz6g/YSKNC7Kb5DsQ1HUznHm0cb39OGKyuFUBZGcrAH QfjEsMX80cTP59jxm1UmDskUEUv+RtC3ESKhPjlWMUhb3LO5K0S+tTLsD2xD1xog9KMY O7bA== X-Forwarded-Encrypted: i=1; AJvYcCXLzG5bggOvUsJRqP2n+ERVq6GeqhslndxLZqH1aoen/auiq1Pmsbk77g4SoFmDcPcVr9j+QfNe3If/hUxmCvWndeWU32zH X-Gm-Message-State: AOJu0YzewdTAJu3mFbNHlWqQlno16CaC4EQkXd6c2KSwi+gtUBHOb2X6 upy8gBl9/h7d4Hjwi58p2N5FizUseyzTQIR0CWVoSeq8TptZkvHvQCQcOT3Bd/o= X-Google-Smtp-Source: AGHT+IGA9WK2y4GsRw5Nh5f5SQhHnBIbXwPuYenvw4gciCMeqP8xAeSl3QvUhZ/h2LeIGM5P+g9f4Q== X-Received: by 2002:a5d:5227:0:b0:36b:5d86:d889 with SMTP id ffacd0b85a97d-36b5d86d95cmr3919065f8f.6.1722238919709; Mon, 29 Jul 2024 00:41:59 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:41:59 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/7] can: m_can: Map WoL to device_set_wakeup_enable Date: Mon, 29 Jul 2024 09:41:30 +0200 Message-ID: <20240729074135.3850634-3-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org In some devices the pins of the m_can module can act as a wakeup source. This patch helps do that by connecting the PHY_WAKE WoL option to device_set_wakeup_enable. By marking this device as being wakeup enabled, this setting can be used by platform code to decide which sleep or poweroff mode to use. Also this prepares the driver for the next patch in which the pinctrl settings are changed depending on the desired wakeup source. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Andrew Lunn --- drivers/net/can/m_can/m_can.c | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 81e05746d7d4..2e4ccf05e162 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2182,6 +2182,36 @@ static int m_can_set_coalesce(struct net_device *dev, return 0; } +static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) +{ + struct m_can_classdev *cdev = netdev_priv(dev); + + wol->supported = device_can_wakeup(cdev->dev) ? WAKE_PHY : 0; + wol->wolopts = device_may_wakeup(cdev->dev) ? WAKE_PHY : 0; +} + +static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) +{ + struct m_can_classdev *cdev = netdev_priv(dev); + bool wol_enable = !!wol->wolopts & WAKE_PHY; + int ret; + + if ((wol->wolopts & WAKE_PHY) != wol->wolopts) + return -EINVAL; + + if (wol_enable == device_may_wakeup(cdev->dev)) + return 0; + + ret = device_set_wakeup_enable(cdev->dev, wol_enable); + if (ret) { + netdev_err(cdev->net, "Failed to set wakeup enable %pE\n", + ERR_PTR(ret)); + return ret; + } + + return 0; +} + static const struct ethtool_ops m_can_ethtool_ops_coalescing = { .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS_IRQ | ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ | @@ -2191,10 +2221,14 @@ static const struct ethtool_ops m_can_ethtool_ops_coalescing = { .get_ts_info = ethtool_op_get_ts_info, .get_coalesce = m_can_get_coalesce, .set_coalesce = m_can_set_coalesce, + .get_wol = m_can_get_wol, + .set_wol = m_can_set_wol, }; static const struct ethtool_ops m_can_ethtool_ops = { .get_ts_info = ethtool_op_get_ts_info, + .get_wol = m_can_get_wol, + .set_wol = m_can_set_wol, }; static int register_m_can_dev(struct m_can_classdev *cdev) @@ -2321,6 +2355,9 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, goto out; } + if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) + device_set_wakeup_capable(dev, true); + /* Get TX FIFO size * Defines the total amount of echo buffers for loopback */ From patchwork Mon Jul 29 07:41:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744497 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9779F12BF23 for ; Mon, 29 Jul 2024 07:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238924; cv=none; b=Vmzru9ngH79q/swLrsrGbqoNCwQFUbK/3gb61UwEa9kVIP+9flqN5LvAFU4roWV8gOtRqoI0ydOvmO5h0p+TrgQ3K6UDbBtovBHqJ6opMMViWzPzfIbEgylqRtXHsdN1xhVXHJoHX2Gmq7HpbpFZNhvQ012NGsXp85/kxGofQjk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238924; c=relaxed/simple; bh=Ta2L/1ooF+CTfVFwAjB2t5O92X2+ab6FoFth4ZdKJsY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uDOwIlDaj2fgwOEgrhAPlDKZu/xj0Y0cuMwTCl+6COrMpV/M2r3ldfV9dTSHmYaABs6/XE47q+IBgR7viqflytKe5pZzWLUpVOZCodAnYbmWfwa3Guxa2E79L+vFpLGRQiNDbXrG2VjbzbbVaRlrHS+US2jvRgPZ3ovcfGdmvvQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=BGGyTvWw; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="BGGyTvWw" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3683329f787so1237364f8f.1 for ; Mon, 29 Jul 2024 00:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238921; x=1722843721; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qeg14f0KbqEGucxcVmm1WXsFuu/G6EBq2QXT7ORiCag=; b=BGGyTvWwHZ0X1pkuYWdc12ml6XWvtXZVfBfHY8Q1sLYb72zkf+AO2PA06zZCPQSvv+ VUEgoSmuoKELl/WnSd/NfdOQIoroa9++zjE4HaVRSj9TeqUbtM0f38I4Xy9M7154cTgw 84ZWhYB6O37WLov1kgW803jFFIXRQFdpcbg0G1zFWxU68s+S38iu6W2ijfCpVNro3+m/ jYv0QTA4KkIMZ0tH/WDquwVbvQMCZ9m/CwL568r/agDZGCDL+y+dE1WnPDljDq+gi6VL gzXyXutadjPehRYg7eCYWZ9ZF3fvbPK0SyIlEzDgA8vyEHHOm+1pBfz5Z7FxfmBcU/Nl er9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238921; x=1722843721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qeg14f0KbqEGucxcVmm1WXsFuu/G6EBq2QXT7ORiCag=; b=fcpUL4i7amILqW0L9EpUZ5snFaKR6eLJIzGmK924curfR/k1CbgvU3tZz3pxkxSBXs 6Aq6DlLt7PdO/IDBOZ2FXAN/AqY7i9U3D2gIEwsV2PJrBT+Xtk5h2FlY4mpdYMUUoboX gQZsb9HBtHaiJ2XZCk7z7pyEuaniHjfql66ewosE0sK5y+H5A7NIl2o2KrN6JcqWbPMX CPa+yoWf0/PNbT+dnWNxpL2nJho2XYdHZ9d/bqrmCQT17gUOEI7JgHcEqnNqScgwhzny aifzDtMpMb0ixATbXK0rmlxjGw3TJuho28KKPXEegrZ1/xqa3J5lJe00QkRW6bMJiz2f CKzw== X-Forwarded-Encrypted: i=1; AJvYcCWb0C7KvXtnfSlmiMsr+uA2ca/MVgq96fcKsptJ31b4R0hxSHAYvfP5YZ6AV6KXt4VUlCDAn8mX6iuYXsAh7MRwamRbN21O X-Gm-Message-State: AOJu0YyVm6DUvbnBlzUgYiiRJNLwW/3lG56cObmRqv0FO29NNx+bXyxz d8PbaAvK208GkUSEIfTJDaGk1iSozqa0z/i0Cn8LFqUj/Nu2b7p1Oa3lTU3qAC0= X-Google-Smtp-Source: AGHT+IG/CESAQDtsmDP2HTDQ8KiBa0jkwD+YkksDTOEwTebAs8MrvspRVYp81dFcTJcPrwx9mnhJyg== X-Received: by 2002:adf:e94c:0:b0:369:f662:109b with SMTP id ffacd0b85a97d-36b5cf23abbmr4360020f8f.27.1722238920931; Mon, 29 Jul 2024 00:42:00 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:42:00 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/7] can: m_can: Return ERR_PTR on error in allocation Date: Mon, 29 Jul 2024 09:41:31 +0200 Message-ID: <20240729074135.3850634-4-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org We have more detailed error values available, return them in the core driver and the calling drivers to return proper errors to callers. Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 6 +++--- drivers/net/can/m_can/m_can_pci.c | 4 ++-- drivers/net/can/m_can/m_can_platform.c | 4 ++-- drivers/net/can/m_can/tcan4x5x-core.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 2e4ccf05e162..5b80a7d1f9a1 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2352,7 +2352,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, sizeof(mram_config_vals) / 4); if (ret) { dev_err(dev, "Could not get Message RAM configuration."); - goto out; + return ERR_PTR(ret); } if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) @@ -2367,7 +2367,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, net_dev = alloc_candev(sizeof_priv, tx_fifo_size); if (!net_dev) { dev_err(dev, "Failed to allocate CAN device"); - goto out; + return ERR_PTR(-ENOMEM); } class_dev = netdev_priv(net_dev); @@ -2376,7 +2376,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, SET_NETDEV_DEV(net_dev, dev); m_can_of_parse_mram(class_dev, mram_config_vals); -out: + return class_dev; } EXPORT_SYMBOL_GPL(m_can_class_allocate_dev); diff --git a/drivers/net/can/m_can/m_can_pci.c b/drivers/net/can/m_can/m_can_pci.c index d72fe771dfc7..05a01dfdbfbf 100644 --- a/drivers/net/can/m_can/m_can_pci.c +++ b/drivers/net/can/m_can/m_can_pci.c @@ -111,8 +111,8 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) mcan_class = m_can_class_allocate_dev(&pci->dev, sizeof(struct m_can_pci_priv)); - if (!mcan_class) - return -ENOMEM; + if (IS_ERR(mcan_class)) + return PTR_ERR(mcan_class); priv = cdev_to_priv(mcan_class); diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c index 983ab80260dd..a5024e2cff8d 100644 --- a/drivers/net/can/m_can/m_can_platform.c +++ b/drivers/net/can/m_can/m_can_platform.c @@ -87,8 +87,8 @@ static int m_can_plat_probe(struct platform_device *pdev) mcan_class = m_can_class_allocate_dev(&pdev->dev, sizeof(struct m_can_plat_priv)); - if (!mcan_class) - return -ENOMEM; + if (IS_ERR(mcan_class)) + return PTR_ERR(mcan_class); priv = cdev_to_priv(mcan_class); diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/tcan4x5x-core.c index 2f73bf3abad8..4c40b4447275 100644 --- a/drivers/net/can/m_can/tcan4x5x-core.c +++ b/drivers/net/can/m_can/tcan4x5x-core.c @@ -375,8 +375,8 @@ static int tcan4x5x_can_probe(struct spi_device *spi) mcan_class = m_can_class_allocate_dev(&spi->dev, sizeof(struct tcan4x5x_priv)); - if (!mcan_class) - return -ENOMEM; + if (IS_ERR(mcan_class)) + return PTR_ERR(mcan_class); ret = m_can_check_mram_cfg(mcan_class, TCAN4X5X_MRAM_SIZE); if (ret) From patchwork Mon Jul 29 07:41:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744498 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB8C01304A3 for ; Mon, 29 Jul 2024 07:42:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238926; cv=none; b=sToM05ehqL+rNqkPwbJLr8VXtGwj6ewRJHSfcaR8spqLZU1OwTAgzDd9Jf6oIag8nzagOJObjYdvMF8iVFT4R5CAH3XF73yRCqPNZBDyMIL9SsNhy1BzwNIsA2nGCNVTF+JW1jCTDLIOOsGWlJaYERkqSI9wv3xv1WONHojAVk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238926; c=relaxed/simple; bh=gB4bCvkWVjw2VgpvtJGGwL3mu5ZuVwi3ug/EBaXL9+8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Psot2Pt40LnkTgxTcDMLY0/SdVQYMrWTF6o9Djcq19Xg2wcVi5/jriRm6bTGRt3hniZPFlFJ06gyFBBSMKQ4NhLLJTzkou5br8KKEi8uT2qwgMqPgW9zT86TAlgkLusHPEWRdYe6GoINML3ZNaegHjc+gZAdb0hoKNaPZ4QJ93M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=qHFOW7Xo; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="qHFOW7Xo" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3686b285969so1064498f8f.0 for ; Mon, 29 Jul 2024 00:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238922; x=1722843722; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=euYaEmMVMSjTk2pj25N9i4771o+mJWDFmdSDcOKEIIY=; b=qHFOW7XokXUPeaY0zmx4scRZC2dNWSNgeKJ7y/kiX72XTRtyvixAVJ6BizjwFxz0Zb FA5lBHm6ChwaXiN/gXw8/LV0CejiwQX2fhsQbWFwrap31iBqa+DGnzLTqs+e94+HdQPU iYJZeQphK5u10ESvl1oZ9al0OvWQHXE/hk7c/viE1s6hTZo8JNAOUa4Fuxaw3CcIEEhF frk3ojCEjWgZqvxyZc/OrAvzkU7dLYQ3igLA5hbnIYuPtsh3dMdOoTVaYbG6qZq+1PEU mldbYiA+dOahzgTtVqi/owtr1qGKQOzf/2Q0Yp5nY/qYPFirC9TtAz0Cs4NI/X/0+fBS swNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238922; x=1722843722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=euYaEmMVMSjTk2pj25N9i4771o+mJWDFmdSDcOKEIIY=; b=RxRelciKVvtl+znkVY7/maQONap2KjvscXDMW0QB2MmbfoNme3eiu90gjKtzFXSt+U u/WfVvulUQN2yH0H0kc7hufmX4ZJXEGa4q8r4btnB55k9sl1CL6KAAw1lGU2OR9nIUuJ yC0el3/M/x15zslbm1QGGKNoKRSbniYRPIxA9Jo28t21SIqQuTn89lLtgfkLyJaMgyPB mLf0Y1tVZZ+oQPTsjOddi5mHdmcCkVCYMHs/XVormCALegxnItJavAFwVu2yuQVdt3oP x8aFZyG+o/W9sio4Sfcy3PlO712iDLcu87Mw1l8qxKc4Ye8a9EYiv5mrWcBvNLMGsmvi 94ZQ== X-Forwarded-Encrypted: i=1; AJvYcCUTtyujwjIu5+PGhfFF0RgHLlnVwCkqIG8k4JXkuQHFZlk9DL/B34Y1N3tMtljv/i1O4gVs+dRQU39Zd1KTW1Qsufm7KYsp X-Gm-Message-State: AOJu0YwqWPU4UWEnTnRfEwSnr4fQlvjRfWztRzhsi3ZtnXI/tEs62X5Q iphl3Smake4COWI97KC0XSv07XX/V1ZxoNWkpWTMR3a8teozrq51XJF3sYHYCMk= X-Google-Smtp-Source: AGHT+IHlZDsneAUmpWQlVvOflGKEic5Rye1tKD/dzfIRoSAvJF4QRKJTN1ym1tr9RuFfvC7ACtRobg== X-Received: by 2002:a5d:6c68:0:b0:367:958e:9832 with SMTP id ffacd0b85a97d-36b5cee19c1mr5071133f8f.14.1722238922156; Mon, 29 Jul 2024 00:42:02 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:42:01 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/7] can: m_can: Support pinctrl wakeup state Date: Mon, 29 Jul 2024 09:41:32 +0200 Message-ID: <20240729074135.3850634-5-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org am62 requires a wakeup flag being set in pinctrl when mcan pins acts as a wakeup source. Add support to select the wakeup state if WOL is enabled. Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 57 +++++++++++++++++++++++++++++++++++ drivers/net/can/m_can/m_can.h | 4 +++ 2 files changed, 61 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 5b80a7d1f9a1..b71e7f8e9727 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2193,6 +2193,7 @@ static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct m_can_classdev *cdev = netdev_priv(dev); + struct pinctrl_state *new_pinctrl_state = NULL; bool wol_enable = !!wol->wolopts & WAKE_PHY; int ret; @@ -2209,7 +2210,27 @@ static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) return ret; } + if (wol_enable) + new_pinctrl_state = cdev->pinctrl_state_wakeup; + else + new_pinctrl_state = cdev->pinctrl_state_default; + + if (!IS_ERR_OR_NULL(new_pinctrl_state)) { + ret = pinctrl_select_state(cdev->pinctrl, new_pinctrl_state); + if (ret) { + netdev_err(cdev->net, "Failed to select pinctrl state %pE\n", + ERR_PTR(ret)); + goto err_wakeup_enable; + } + } + return 0; + +err_wakeup_enable: + /* Revert wakeup enable */ + device_set_wakeup_enable(cdev->dev, !wol_enable); + + return ret; } static const struct ethtool_ops m_can_ethtool_ops_coalescing = { @@ -2377,7 +2398,43 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, m_can_of_parse_mram(class_dev, mram_config_vals); + class_dev->pinctrl = devm_pinctrl_get(dev); + if (IS_ERR(class_dev->pinctrl)) { + ret = PTR_ERR(class_dev->pinctrl); + + if (ret != -ENODEV) { + dev_err_probe(dev, ret, "Failed to get pinctrl\n"); + goto err_free_candev; + } + + class_dev->pinctrl = NULL; + } else { + class_dev->pinctrl_state_wakeup = pinctrl_lookup_state(class_dev->pinctrl, "wakeup"); + if (IS_ERR(class_dev->pinctrl_state_wakeup)) { + ret = PTR_ERR(class_dev->pinctrl_state_wakeup); + ret = -EIO; + + if (ret != -ENODEV) { + dev_err_probe(dev, ret, "Failed to lookup pinctrl wakeup state\n"); + goto err_free_candev; + } + + class_dev->pinctrl_state_wakeup = NULL; + } else { + class_dev->pinctrl_state_default = pinctrl_lookup_state(class_dev->pinctrl, "default"); + if (IS_ERR(class_dev->pinctrl_state_default)) { + ret = PTR_ERR(class_dev->pinctrl_state_default); + dev_err_probe(dev, ret, "Failed to lookup pinctrl default state\n"); + goto err_free_candev; + } + } + } + return class_dev; + +err_free_candev: + free_candev(net_dev); + return ERR_PTR(ret); } EXPORT_SYMBOL_GPL(m_can_class_allocate_dev); diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index 92b2bd8628e6..b75b0dd6ccc9 100644 --- a/drivers/net/can/m_can/m_can.h +++ b/drivers/net/can/m_can/m_can.h @@ -126,6 +126,10 @@ struct m_can_classdev { struct mram_cfg mcfg[MRAM_CFG_NUM]; struct hrtimer hrtimer; + + struct pinctrl *pinctrl; + struct pinctrl_state *pinctrl_state_default; + struct pinctrl_state *pinctrl_state_wakeup; }; struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, int sizeof_priv); From patchwork Mon Jul 29 07:41:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744499 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDBEA136E01 for ; Mon, 29 Jul 2024 07:42:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238927; cv=none; b=ax9psnv8v7qqYbZwJICsDKzjOy2XxARYEGewJEV/jomLwlF8pBqGApxypxi3TDr15KziCOrqrDKW97ZQLcEtInr4LCjgYfF8tQVRRY8AN/bCafR8uNz/CzOQacTphViBAGjmGquVCA8w/6HDSBuAlwrdfPwUvEjoitmbufuKXac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238927; c=relaxed/simple; bh=OoIQayK0GGA9cK/vSVlMPO84bmsDhlZIY0+9n9eet2A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jNSVjeIjWEwpsZ941cNq9pZ8vn3qelwpbOeMjnidWV89LwNls7oLPF5zfIZb4atpiemoErIBFcSx4oD9EC4TYkgsnxBfGiXUrdnD9Xv5SH2LRy3wjRGB8P9NSnd/RLco2U/PkKq5o2TJlIvfzUgfIfjqbYzm2B8aR97jOZ1A9Ug= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=zuyB+ay1; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="zuyB+ay1" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4280bbdad3dso14122475e9.0 for ; Mon, 29 Jul 2024 00:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238923; x=1722843723; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ikCMpwAbPw7mQsN8sJFhcp+yiR3UIpfqm9/aaxfL+zg=; b=zuyB+ay1M2xscVKUuxSm0gOpctF3InI9wfBeXmVXDZecZSgjg7rGe+XfJf+T161h3L Rwv7vJVICSLWbSVNE0V1dMuCMolYLJyG7Y8LYWJCOq0Wt6H5lwPMSv3wfLQZVMithe0w QbwrHGnhXCmN/mxwpx7CUS+EvyhGn2WRc2vgus3zpR4bHfdZG/XyGjjw9hm69SI95VeD fCArbtn0vIwi1Ga1i47wfOR3eJ98uRuVryr9aJw6JWoEWKpM4JOPMm2XHcAUfgNtblpQ MGiHjVvCw2QFCBGlGmsbJ5lF6dGp6DHgkuDa5GDHnKcY+IWWMJIH1gDRiL9aIbtQjuPS L4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238923; x=1722843723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ikCMpwAbPw7mQsN8sJFhcp+yiR3UIpfqm9/aaxfL+zg=; b=rSV5/E+l/tctDq+0iZuJ+/DonAd+X4kTkDxqGFjyvg+H6rJjpUvmeeaiPHynxq2EBK sluAn+fw1O/23ZQq0Yk+uwSe9NgnaTtBIUOuNmDNvhaa+f9AihtZC9/47tF8khyJ+Oza z0hR/Ba5Thg4vs1c0R0bJGUXuzO9ez/Vq42kJFtTU/jzciiINGtehemEhMYH/A9elSNx UU+5xJBFI8Nm25g58HIoauRvrdDMmX3z6HIOKXuhurN0oLa7EDGHW84bbZwzL5JyV2b3 QXIHxegVjZ5T0jlmiYZCcmTINxkXe8lBs5LSrl8jWa3W867p9oVRGUbedgpnPjOUGQIB P7Lg== X-Forwarded-Encrypted: i=1; AJvYcCWOxMLCdWGVbnWL4aCa+HwRjY/54WE4gMTzMPeDdqsdb/1P3nhEcaF88JS4QqdBQuZCogfN94BVgMaSNWrIysS5hVeiz/ef X-Gm-Message-State: AOJu0YxmjrKZMvJtawapen1iOvfCCHYPrY3hfGR4rihLTC+Lw7cFrVf1 qYhQoRtOS6MmSM3KdCuE2PQJz0oj3HvzSGeSP9v7zzlE8IYs2Ucn1ODyYBySGYk= X-Google-Smtp-Source: AGHT+IEN5l0VmZxAx8ThMQxyOgQM8hkfK54kUHCfRNpsKszh+kxzwa4ljts9ev+T1yyFnMhTX3O0rA== X-Received: by 2002:a05:600c:444d:b0:426:6e95:78d6 with SMTP id 5b1f17b1804b1-42811d71018mr42435605e9.4.1722238923363; Mon, 29 Jul 2024 00:42:03 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:42:03 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/7] arm64: dts: ti: k3-am62: Mark mcu_mcan0/1 as wakeup-source Date: Mon, 29 Jul 2024 09:41:33 +0200 Message-ID: <20240729074135.3850634-6-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi index e66d486ef1f2..56a40b641667 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi @@ -159,6 +159,7 @@ mcu_mcan0: can@4e08000 { clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; @@ -171,6 +172,7 @@ mcu_mcan1: can@4e18000 { clocks = <&k3_clks 189 6>, <&k3_clks 189 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; }; From patchwork Mon Jul 29 07:41:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744500 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 328E913A87E for ; Mon, 29 Jul 2024 07:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238928; cv=none; b=TrHQ8hQU9Ul7P6PX25FwciY9MeFxN0QFRbD8MSp/WaNQ91BQ56NKOjB4Fy/VaycZcfUh62ab4pWxFqKxxteidsZxLj/tvxPd08D6kLEF6bXbna/EZfo1VxYoT9NfY7MxmTwahupDR9ySu6YG4Es9nS4iDAWCXAhRQmeWb8P6M7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238928; c=relaxed/simple; bh=S1cCoD9bh4B+uAgxd3LHWOod0JD+NDzz4e7CSw0w4ig=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TdfpjKeK2QoDMrT7rV/WeVOdljsy0sMWtxVSmUpB7M7kpHsz2WK0PcKzk22dSQL2vhYGHULM6nxlKP815lg5GNjxp4rqSaLeyjFKSSH1IBgHJZUVa2qm/gQpXESuABhJ+Z0J3NbCL2Dc7WEj7fdpY/yufKPLS5HnflSAwOx1zZk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=YgTRHm69; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="YgTRHm69" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3685b9c8998so1030611f8f.0 for ; Mon, 29 Jul 2024 00:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238924; x=1722843724; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JAIaWbMrpjXJfyBx3wUp/7AwV6TpyTkOy0qtsR/TmP0=; b=YgTRHm69cQ3RzTf7A06JCYYsqe0sXca4iCLkql4OrU8Mi5/7XZCrrRBTvya3QLyZ6y hsEGljbEa53K4AJg5YnrbPKZaYG1iC9RkAlcag+hbLsW1Scm2TUahEgMyK2FM2xh6KbK +f9mJNCPt3qgs043xveGMj57KJ+bKtMIKYIGvN1OeytYuSOiAjzro0aTvDfWZY6cvHpJ J+Y4QJVYkE2fCvO3n9zvzRQhtF/PFYrHtIKQIAL597a7644PMsziFHPZHmWbS/VLCYjM Q/RQHsDR6pkJUtvlK10zPVXkmyTg+HBFuDDYSd9FlCCcOkJ98QFn+Zp/1OrMBxLQPHOp E8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238924; x=1722843724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JAIaWbMrpjXJfyBx3wUp/7AwV6TpyTkOy0qtsR/TmP0=; b=skx5PGx7liB+FRXZgYpKtskMDL0iXXtxakvPa1y+KZtsT5DRQ3/CdWM31Z+ooaXPT8 5LAUMoNNZRVC9LNNMcCgNnDmG3e7DzvQFLe375bUWA62lc5jH1FhKTYLuWweJfYR21br gZS2oC5vPn0qiDWAqk0fGVXfH0v/vSQMiDl2TbGbpoXTmgDQ7pp7j54Uzd1Wzb7Ouw4P rb6WjB1NSEdgCbfwrQ2+wwzH+lj2VMGGV+MbRgdMtwzy8xVt0rDnl4IH8vOmA1F/iywK pP6kx3VoRDpMAQxXfwbw6qrK8mMAOIVYhKDYNO1GRFuRK10AJ4wZ5X48PdSIjtku2CgO OcWw== X-Forwarded-Encrypted: i=1; AJvYcCXmqu02JFXKPh40+98lR8bQ5WJbqn3RvMLQjxWRHjPiFS5Dz95KzZJb4piKHbe0oj0Vpj8OVSpWcKhOFXwB1x8If2r2ANh1 X-Gm-Message-State: AOJu0YzxED8oS8YL1/uDvxKrV1YnG2h2B0vUpqlXUL9pr9vln++RNcj0 GLYLsT6XrKWnrfDyNDbRDhFn38V6aca13UCejRK4gOyuuvw+hg73YPDnQecDoVQ= X-Google-Smtp-Source: AGHT+IH5VOb2By5fvQgwUidv6itqAL+m7XZx78fWcb+U56lzBj0h4lRoNhgztytGNkLGm+Y+RWX3Rg== X-Received: by 2002:a5d:69d1:0:b0:368:71e9:4ee3 with SMTP id ffacd0b85a97d-36b5ceef41bmr4980043f8f.18.1722238924576; Mon, 29 Jul 2024 00:42:04 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:42:04 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 6/7] arm64: dts: ti: k3-am62a-mcu: Mark mcu_mcan0/1 as wakeup-source Date: Mon, 29 Jul 2024 09:41:34 +0200 Message-ID: <20240729074135.3850634-7-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi index 8c36e56f4138..f0f6b7650233 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi @@ -153,6 +153,7 @@ mcu_mcan0: can@4e08000 { clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; @@ -165,6 +166,7 @@ mcu_mcan1: can@4e18000 { clocks = <&k3_clks 189 6>, <&k3_clks 189 1>; clock-names = "hclk", "cclk"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + wakeup-source; status = "disabled"; }; }; From patchwork Mon Jul 29 07:41:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Schneider-Pargmann X-Patchwork-Id: 13744501 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A2CD13B597 for ; Mon, 29 Jul 2024 07:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238929; cv=none; b=LN967pal9ICsf/XOUJCqe9QyfTlYeMOr4fCfBVOW2bFCI129t73pXBUoIt450YFa7Fd5iwHTyuXpyffCjpi5Tw3SCyYqY0TI4vamMAz2f/gxANTN2r7k9u3Lc4RBf0Tdt8EnJDk+jlIML8tYo6tf3PU6gtT0/C6osowV7WOrB6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722238929; c=relaxed/simple; bh=RC9+oAb1G3FrEzAPShpCOonJZhBTxvWXVZW+5cFMqSI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DHL/cnjUGsGRuSsA+FeLUK30yYCPtf8WajJ2QrLyNDGTqMVNyAJBjXlXBNMLWDM413lVFwQeiB0wLV6k0XiEN/FDmvy0j0V43QmmjdKG/S8Ji3RBX8xUCQbmkxmBf5b6KrcxGUkSW3AjGL/ofKtVZN/S7+wsLsU73wKqFBmKTQ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=OQ87rEX5; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="OQ87rEX5" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4280ee5f1e3so13962805e9.0 for ; Mon, 29 Jul 2024 00:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722238926; x=1722843726; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JbaHllSBP44xGl3C1E+M24vLcFnhJW8T63/SQdZs/pw=; b=OQ87rEX5y/RemIV973dqDThyV7ow20reOPrqZ1OaQIzNmO4Dl5j30ulD6/FuHV9rrV iEscUfnQd9vc9JaDDeUbnIDWsGVaOcfZ0oQxBx5/YuAQHHlKs+K5V8h8hJT+JUZd1XVA ggVQUG2gpuvlMK+XGSAYc5EJoAv2naCgLIVEJ7P1n6v3KLo9+dnzWYb5FKp4GVgHl8pt /VEK00nNTyM1O9ZQoiRwhvnIKnIM0RCeaGqSkB+jwiJ2evNJY2JTqP6NgAiktJ6GTGjO eDZwk8964PQFsIOu92OwHVxkni2wwPGQW/qAY5iq4PQDi4mgGIpRAFWx7DIfqPPf/PeG LL6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722238926; x=1722843726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JbaHllSBP44xGl3C1E+M24vLcFnhJW8T63/SQdZs/pw=; b=v714FyHc6kkyDl9QTtkkAOwn8XkrU0VMerv48Z/nlqD01bqMyMvAXfvsqHHuKxH34x QHJWJTGQuNJZ8cS1jUqBQsOWAf5qKIEaXBxvzyjRsQeKTfiX+fPM7ih4qO6QrOuRnw7v kSooz+mEkUP+09szKFa5LM31lrt8inZPo/0ZfqwFFlkBME8DfN5sAmu/d/JEbCpqRJIL NFpLJivkd6GL3sM5usczpG1ZQqmEVbpp4b/srxRnQjtLbmyvKcewoFohbfNkshw3AiJT crEcrbAFfoQY7jfWTLWex+afDrfqbUwnvNk33PBePqWsBvHnMwrPcByy7huVuH/eiGxM kflw== X-Forwarded-Encrypted: i=1; AJvYcCX3u1VU3cYeyMhAy5OYpdZE5WnKKFxTEjymCATiR/7sg9hc3nWhhjM+u5i4wPO/PaEZ1Nn0hy98zRjrqmOidGDwmnztzQnE X-Gm-Message-State: AOJu0YwFlTSZzOpg4YXDaue8Dq5Bhy3QO2pEzqRAttUN95/2/WPH2tY4 1oQXe0bK1dwam60735dI8pB455ORbQ/hVz+0/H4QUFH9IGaXFHWwabKATWxAa+4= X-Google-Smtp-Source: AGHT+IFE1SgIJAautjVauLTqd9nxU/X7KWKBTgVQV4TWBqBwOoYebOAUmEVbfA6ZOnR9sLeiqeX4uQ== X-Received: by 2002:a5d:5751:0:b0:368:4910:8f49 with SMTP id ffacd0b85a97d-36b5cecef87mr4342658f8f.12.1722238925793; Mon, 29 Jul 2024 00:42:05 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36863aa7sm11460879f8f.109.2024.07.29.00.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 00:42:05 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Markus Schneider-Pargmann , =?utf-8?q?Martin_Hundeb=C3=B8?= =?utf-8?q?ll?= , Christophe JAILLET , Michal Kubiak Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , Conor Dooley , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 7/7] arm64: dts: ti: k3-am62p-mcu: Mark mcu_mcan0/1 as wakeup-source Date: Mon, 29 Jul 2024 09:41:35 +0200 Message-ID: <20240729074135.3850634-8-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729074135.3850634-1-msp@baylibre.com> References: <20240729074135.3850634-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Vibhore Vardhan mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Based on the patch for AM62a. Signed-off-by: Vibhore Vardhan Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi index e65db6ce02bf..d6eccaea7a46 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi @@ -171,6 +171,7 @@ mcu_mcan0: can@4e08000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; }; @@ -186,6 +187,7 @@ mcu_mcan1: can@4e18000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; };