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: 13744504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39194C3DA61 for ; Mon, 29 Jul 2024 07:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YxOPhXgBGVgm459I7orAWDkAOXF8W6mRG3330dy+9Vs=; b=WivifdOinOlafbCXkAyWG2gqzg +iMfm+RFmPgxpOWTEqA2WOQX+DWYCzHYGyiSSI349kE5dbcjuOLvGN9m8SfNYXpaoSvJvJmYE/bf1 xswvj10cODc60FcGF8YPIkn+r5y5xF1Yk1Lx/WZcWmP/JMFeiL3y/oAAdxIj140EjsxuX9ewEnxBq NYnyBduFlxxqLiKLGkAbFAblfodXesSD9+px47JY20vIjlwexEZCUvG1qPMsU3dPRnbNdmXMIWFkB 8lSEKFTGkVOVuJ1YKyMsA9dkLdW+EbGlLD3dUo4xmZgWedxtYh3eqaOZ/+1/IDMiEj0uO/ZJBaVcK IIXNv9xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL1Y-0000000AOJn-0lF2; Mon, 29 Jul 2024 07:42:28 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL16-0000000AOBR-21DT for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:02 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42803bbf842so17583765e9.1 for ; Mon, 29 Jul 2024 00:41:59 -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=lists.infradead.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=RgosF5BzFYprwZSIFY3ewbDGWSeNzQ/fJw/aekNT5CV8LHPfHGfthSUkVlYe2QHMwk XeG5JAxx5CSWIkzrwVCBVgbdOQ4mtOo4Z1KhPtCXmJJOYIQOje8vKe6+aCv9HlMOKYEC 5DcPViEU9gJcLUjLG9YFjpZgTQLcts0atF/1JfXL6Tu1oXKN9J6wzeEIb4qoa6LpwN4d OIwIzgyb2gL2NcSsD/3NHzFwXP1L2mom+fliU35u27Vdwr7uGM5SrjjAT0JjwsMITR+r g0zGK5g+GdfHwxrcHZ+Na7LTG1d9VMtXkW/mopEOP3KQjjNFI0fC4toHZGmNAks5bHyK Le/w== 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=a21MdZDb376fddVLySE8rM551TomhZeukrZFXwHeGMGhTJSa+KEa7OqI1UjuUFJnmR 1x6Ja66y1BhK6nZ6EnV4lC8zb3g2HbWbqxQsL5zsnr43BCsm9qanT0noAllD1AF6BEAF GEML7Jdbqym2IFwYMAwoiBWSsi2RERdQ1rrzuG9BNuY5kRqrrnY64jbC0HvRiretPIgq 6asL3uFOjipTvLXDv5+Vyi1AcgT2FJ2+Yn8TRG4xjzU+9kNh658rLIYGwcJObpYbLlnN 7sy3ZmxtOURddq/m7VNXmFw8BDIefG44jkcc2Kbv2Z73z6lbO2jfz8bDssvD7l2aVQQM E0KA== X-Forwarded-Encrypted: i=1; AJvYcCXJrrMEqIHCbs2ufx4mGmeyO5UY1CyOCh+1uvTqxGeFs5Ziz2NIQ9YF2V9pW/KeBhxaWga/AmuIjBRu5Z1tm0PLHDgpbYtIs6aC1b/fex2ihQ+asU8= X-Gm-Message-State: AOJu0YyPUV1o6X7CpCh1kal4ld4JQfr37koLiMzrDi+b8q1Nv/pGyI5H 7F/q2jMN0taARne2WGTCKfP/DMhqPk5ZBQ1sBzucX67pTtGXndChDa9+3IzywAM= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004200_547215_249FCCE9 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13744506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C33DAC3DA4A for ; Mon, 29 Jul 2024 07:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZCJyOdovnkFMEmbndXoqHv/AoixQbNLaTwmx6tiqcEI=; b=1p35px3HmOo0SUkS8u9lv0FbV7 XsPRQLhYm2lY8Fk3Rl8/c1b2FeQ7XVZoktyD/8Eyf9EkjalAUXgk1kqAuTC+w0ls6qmFpAJ5dg+b6 1qCbhyI1UuHqjkso3VHo/k7mIjZQQT9swA9Jp0Vo/XJ4x3LSX5yDLh/hrBkkFWoR2DIW5wHr5qIuX Mr/12xnVQT/XSQI8Y+y6z4qJhIYPe8RkeXQtmLGtvAom3J0XLraq6UkzYnEGPuV8tdB0xMe8j8kho tVaNCcBoTg/c6r+96DVmIt+ojd4/JmWT8bpW9B7kDHI+BsKXM5UsOVl9DF9aNcapoz61O6omImSgA UGF0TJ6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL2K-0000000AOZb-1Yg6; Mon, 29 Jul 2024 07:43:16 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL17-0000000AOCE-2kFG for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:04 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-428035c0bb2so7869195e9.1 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=1722238920; x=1722843720; darn=lists.infradead.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=nIcAwgynWOwUPx4IT8eCXnTF5k3MYXCv+babWxE0s5vaGb79i4zXbnkajz+k3n/Exs eGcIwKBqPae8F4yVZrRIKLk1UoAr+09vTBnC23aL8/1tMFIRMF3EVaqbDSB0P/w/PJcI KzFFfIsQB3E/xaFmB52zhG2kn5DkWe2GXaOY1PJ1HPiyTPUDEhSJKuLydGm7EXuHkcn+ Vb2zKIOu9p7+LcuSUS5xAPQn1i1f0puJBPvmkPcifNnZupDnkjzbUZA6viX/2fRRuI+d Z6CHBS8TXY/mTw0meGKLSanjvMfWAisFhUDKyVrZ974Ix9XMBjT8UTXo8zx0wvZcs8fp zI0g== 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=VQkB6tCMPz9/9gTLO9avjgXIzSJt7Y8jBGawJ6M7TKjmQM+zRxlAyip0l9LzxdLX7x lCFoBwuBG6l6LgewH0rKBUCMXzMqyJm9SQ9vtNLuRDVUd89tEGc3B9Blj5xQ32qwmAuA 9/784XQtumLt20BYHKDu4As/DuPViUf7ZgGAwVJUbh5Br2r3QWGwMQOibz1OhrIvOmZ3 UwbavPuTFMNuNF3doL5pQq+siQLm49BU57BMwKtO13ywiAEHd7szaQDPyfm/woi+GOH0 ebFcpYhs5xZNbJWleVreaZpf3vnfW3aE3XKt3WTp/KaRmptwCXmq+WTSbRq0SmSqymep tg+g== X-Forwarded-Encrypted: i=1; AJvYcCXK8VhWhlT1p9FlPe/Qp/0hCnY46zXVPrEv4ClkSLAikBShVURuVM559T3PTL+UNi0h3yd2qRuRQLm2q/83l6yKpkpSH7bURFoTNoVMCGnEfesRXfU= X-Gm-Message-State: AOJu0YzE5JQ5J8DahK7z1MjYn/99TPJeF4XDfFcH5ZzGccaMfa/mXp51 vBGvbDlq6DDn7L5Q7EfdbtlZ7uF6L7VioI4uj+fCgj+cu4wrrQuACRQ6pUb00Rw= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004201_722300_0E88FEAC X-CRM114-Status: GOOD ( 16.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13744507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CB1DC3DA4A for ; Mon, 29 Jul 2024 07:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qeg14f0KbqEGucxcVmm1WXsFuu/G6EBq2QXT7ORiCag=; b=e8L3NA11QIYixqlyuZ+HD4qfh8 nGnm2Mc/K+0rXlrFB4xHLg4ftZHE9s+dZ7/Wvr6x3pKFFjH6Wz7GoeVsfUCE81wvp//nHnzgE7si5 nDmPwE0E/8JIAVIdzSKahXCo31UsQlRbFLX1sRCI5Sq/WKcZP6FdoqV0Z1QqGLZhC9Ov5bT95XHeH ORbBkRDllexMqjtXFqHEAWv4P4MGvpzMFIhlan+Q1fdQPamu+ED/CHno2M7NCMKd6ylgoHgy1/Cvz LJ/K99tHeRCkBMU1Q0MjO74Vq0M8xzNzCPwZvOruENhl0x9vcl8pW5s36WNDP/o5iNJoXU4zjwFr8 EkoxChYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL2i-0000000AOir-3KIo; Mon, 29 Jul 2024 07:43:40 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL19-0000000AOCo-0Hw2 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:04 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3683329f787so1237366f8f.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=lists.infradead.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=3eJuUQIh6YpKMoxAMn5A/NQmkWfIcXCD7GiQco4BmrlHt4GDHrWjHTfz4We4JUMMCs kjpYW9biphxTEGbKbkIaar1qG4/Fva8Uk5n2UnohTwAreZNuJfjQZq5Gvo+gx/Eh4JGk CG54vzLJGZHQqbBrEMZ6rAlyfomSxbdBQZNC2qxZzm6mA3tVWpFCSRbMzQEC8OoWNG+q lAmYhtgVSLRqdumTEgDnaCGA8HrV43h/3WNbusYxC2gTtUgLwNUjSkgilN2F9R1DuI6o YCOb33DTBVTFm6xrs8JQehlx/73coONe9Hs/wsIdfy1vaWKcPLrkODvU7n8LW9IyR+fu 6/hw== 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=sv9+FGv8NgcIk/3/cNENqHiNmZIsZH60fsXtZAWwFW1HrnW6gxW9rftzCiuHuF91K4 GdoxN9BSQKouJyrDANnxfYR1xx9aNqEtaDXWrF3RKXj9qBvebgU5ny3hxBC/xkHc2WJ0 PVLGNEHE1B8eNPsvxJw7ouakMfPRaBV51yiiElzz5eNpybkIoYcnMxJQ3lH8f9Zu+tZW rnmBxmgqRmOFEwk7oA3feUaYRJDvAfyVnXPeIvv9aFRXz2qB4jDSugkEBKoJ9dqn5d2K MqH7mzR/ZqZP4FuxGSXG7LysG3H37ifUkEJgjmVKHfKdIbeSrs4mtg1iNvpGCOtgCHsT Hxtw== X-Forwarded-Encrypted: i=1; AJvYcCX52ZvWsBdyP31OLRaH/A0uxDXNwj2EEOPu1zHLvXXnPk2PVmbpqLBLPK1BcxJCZivcGInKC+88gO8HCbO47IteLQBZDEnkDlYlrGsQJT202naFFAM= X-Gm-Message-State: AOJu0YwqHMSj3LAh1zzKCag14HtCENKeOSpSlJVRghMEn334sR8qxigB WxV9/dKR/zcBDEX4+Bvh7ZqGsTo0eoPs8E6ayZoqp94EBLOMDUEfp90OXH5V4T0= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004203_221352_E8B1FDDB X-CRM114-Status: GOOD ( 14.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13744508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7A155C3DA61 for ; Mon, 29 Jul 2024 07:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=euYaEmMVMSjTk2pj25N9i4771o+mJWDFmdSDcOKEIIY=; b=z4STXTObx2qIi0gkZ/g3i+bLPe tldf3gSUt2A4U15ugn8It6cWIBrIxqmSzg3s3gT30fLukVOe/f6eppAKw5N4JUjgrw6yOvLKmoPfz dAJ6dB+gts2/WwgpWY7C2D8MqmKycwXAYJORqKp36BZ+rPZP2uIJany6eXQGdlPASOYrK3ym5t7iP CecrBfY0CNMWf0nCg2zguv2H+X2LsbHaFqQu5/uh6IHqxpe/iGGk53yPzfOeVf6ezWTJTLAD0rxJR WUYYX6VONTTe+hxJZ77UzaxwlbqOXdaSTkvqy9JsWqHA3ysXr2I4sj28ixIfsLaaXjBMhCpafk8dr 0pNC4JCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL36-0000000AOpm-0vmj; Mon, 29 Jul 2024 07:44:04 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL1A-0000000AODz-065t for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:05 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4281ca54fd3so5612255e9.2 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=lists.infradead.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=dpns7nbaL9Brp70LMrOHnPt3nOwyortv+9jr1K2nxXVSdjS4sQd49okONntw8urLpb lUXr5Vj7fGLtuhZ1hzwRVx69KGkmUTY4kRzf3sSrI+qczE7a++bUsVU9qJVVbJUsZbY8 3NwKpc88UgSbW6abCgk1teI3SJ1RqKSkG0hoFAclSWhe31JsXk+9O5NiDiOjQvA2mOAf JnbBvwTKKv78/UMoUw1qpr8gvq8baQCGmXGzOff2OPDz+wFHEUncJJBAZOuL1iRk3vp2 3Pa85JCBegR3IqGyqj/G4Yh0S527xAan6bU+ZaMCnEZHfzsF8n1OkWLdd3Rw+D/rmA7Z C6wQ== 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=LiqWL+3304GZp3kLHeG7PfpLxG8O41YxKsz7YkwCio/mkii0eAa+1zZ08yDTzPHgTf 2y/favKozA2j11MCaZh8MN3O5bql3602VSyjzkHsGZr3m7/hiOpZQp2EicbQ533y82RX 6bH069aP9qwD+tRL9pcJZvbuZHjI51HHBxcvb7fF9oOLGR26ELxf+tnot8QxW6wPSJQK 1SdN58DA5D8HuBS1WU2l22feKuL22w018IXC7h2K3AwM0naGB8gwdr1E5nIKhniDdTEE WD5k1V5uGDDW5GTIHgag9zRWkR+OSkdi1614pb+B6G9C1YhZ/92fvpRYocCmdUWAnrFX p08Q== X-Forwarded-Encrypted: i=1; AJvYcCXgwzOnrnvJn9OT0xgvHyctJ4pypwpI8cgZR2RPt5Eo+oX4vSqLoNPnZOrlpvAs2ZAcKE7qcDoIZ/FaZR/W/kudSYiGY3BtXM5HZXwQ5SI3DzW9/gM= X-Gm-Message-State: AOJu0YwRkJF0KetcefoCr51+VkHVh0CNwoWekQsnNVvNngb5O8fnZBkk dvr/xGbBkelDkktoY14ftdukQZQs7UA2K+0bDdmd1JnhqnmyCvav+Hs8wdUT2rU= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004204_203786_18AD778C X-CRM114-Status: GOOD ( 16.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13744509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 750F5C3DA4A for ; Mon, 29 Jul 2024 07:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ikCMpwAbPw7mQsN8sJFhcp+yiR3UIpfqm9/aaxfL+zg=; b=x5vlp1mbYx94XFa9dJ3E2RfyXc iKEkF28p9mHvIQmaBCc+0Nu4um7kLSqjumnNLZP3uA9CuflwbVTmSQfuvSU5rTfzsqg8thSFaUHWG itAStCcnB6+bB0EbXJc5gXUUImw83DEw7+2NvTvY34P3nANjA2NYtQIiSmP92YSCZZ2xpu6XkxQAZ Y79F2oPR5QDwUjXLGc8BcVsk6GwtEkfqnInnyZcsh1JG7TdaWbmvbKss+uFj7CtLXtl2LkO7xEBnG cvX3s8wkglyB/W71sVGIip9DgnryDi3T6/L5HzhMeUdEQdf+v/A9EElMUqfCH9qe9BYoCoAcHzgdL CLgAMp0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL3T-0000000AOye-27JB; Mon, 29 Jul 2024 07:44:27 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL1A-0000000AOEi-2Xt3 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:06 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-428141be2ddso13678275e9.2 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=lists.infradead.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=15+H2nA4b9MmXR1ocZ/xvG9EyLCKGsl9Z8GpUz+NtAVfHRIJo4BJTj6mod4vYbL4FR gpJWXmPA3pUNhbbTtCxqA+1qnwRrI+cJGyxv0GaSAge0e9ucSvh4ysiEE1TlMYQFfK02 OFCxCw5O3HS3hrvc7lj2BXDSZ5OTeyLWThyZEMKroikyp9LhImyj8lpcu5+UL6XhvMJA F0bTvFkSwSiIvCuIsZZaykRDCvpuR73NBoK1I4GnK4bVjk5bdgIfLFlb29AwHj34BMfk shV4BajKS9bjVqMtAl7Vo7gn2fa9+86JkyxXMX4NiZbrSf/jkLPsXVfVPO/4wLiIdMc7 B+pA== 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=tGUdQ1POr1Mm3DpfMrXlhvHRNnYawCIDtvlkkDshhN2tRX0A6nTQ5HoGXOoJ+VTur2 m9BNaN1eYAdqcK/us7pu6vcfYSWOqxxG/8kwQzrSeXxzlvadqSj+22+T6PMOf/LX0k2u d6Lzme6KTYIzlAZfEXHwBHG1XLGnWDQpfWQk/5J24RiUA/5ufgmnxdXglk3SSNDxW/mp Q5arOWqzze5WCfgSAU9iCpwRc9JgNpOk7tVi+kUQYsfoMr3cKq3aozM/1vgab1lqO6j8 nReQs5uFVr2pEGHZQ68+QqCCX+HfyYaon/ZpMf5XAuvVGiuATROvfCT8vSo4ZlMKOnyp cxOA== X-Forwarded-Encrypted: i=1; AJvYcCVj7tDlKFlEJU9YFOgizgYfsWFiTQF0cc8wdAD7RZ8AcedGakdKV97nUJwXYhYiA9/HqoNzpRbq34Fu6KFX+A/wPCSgDEQNumn6LUmFjwajvmj53jA= X-Gm-Message-State: AOJu0YxNxRzKI2ktYTDnh81V+4cnRCoUYINtn0vTeCmMHja+ks3bMLJQ 8pVrFrjHNABx3WNI2J0QBxXNwJ28wjFHXuzhJjU1v07tzIh+gdVnp9owBXAj+YE= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004204_728260_14648503 X-CRM114-Status: GOOD ( 10.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13744510 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0C47C3DA61 for ; Mon, 29 Jul 2024 07:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JAIaWbMrpjXJfyBx3wUp/7AwV6TpyTkOy0qtsR/TmP0=; b=L57c8CDUhHOk8ys7BRr6mhOly4 EbzKmKi+qvKhIjnZdxYnFPNho8Pp7Jv0Z/KZhrmaM7NkaVNy8wfjy3c7ClksR0gb7zPQ1ww+DnSrU ZOJDEUrh4kz0Zwyp7EWfmcWlRPx63HM5YW4FMDDtV/RzdRBrXjTH9eSPxAfNyzxcAtyMz1/nBg1kw vnhXzJIhFsQGPIgAf6CuJZChi8Xw1MjqXwr+2pjTVS8r+wMUjwl3zcnhX3FqzdSWlW/CAgNepJGQv caEbNmlc1SCNM56bsqH5aK5A6s8t7uVjQkKJjxAs7Qz4Welv1t21W0pydJKBkQJbyW6l2aPsN4EE2 N1xShesw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL3s-0000000AP6z-0WoI; Mon, 29 Jul 2024 07:44:52 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL1C-0000000AOFi-19E3 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:07 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3684eb5be64so1257488f8f.3 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=lists.infradead.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=zCtsYYj0oM64zd+LdoUJsmez+1CJrCgr+h6kT8+UjbFjBuZedUaPzoCX0+jRDbi3ck 4KK1HWJV+Q6BNfmGpK8GUZnOu6nEIpnlSCyzaDhv+kiCiDUYVWYqanH/YzMq5s78+QQ6 NupZWa65E/HiUMijT5e1HhipEgf7KS8yaGNvTs4dW4FmJFx71dmKanFIlRWhsQuVC0Lv xxci1FSXxsd7flR4alyyX1L8/5098pA9p8U+vWtJE4HncKzFkF6lSVGB4gGOzUoDGP+D fZdRB9+U+79tVS31DAPS0mpOasz1pxEmGrsUOU/A8DXkF+sry3KE7AvADpK8wUrufGIh A+bA== 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=KoPOSudHCP1oOCtOVuZIu689EFbwdSmc0OFyGabjTba3pZHOH918zWsoTg0xOR6SEF lIzbbNswCfdFx2aJHGDi6aTU1WvGsbGbEaSUl9OMCiCnaM6H2tFnUF7sdSibxS+9sAbt 8nNRs0I4j/vxKuwou9T+FU0vaH3k1p1Gampaj7mTCFhP6roKo9qN73VwdC1if5/2cLR5 h4Ycw+GYxLcDWf/RDkwb8f4+WfDJiqkcrn/seF1ap718o/NWBw5vR7PGBtmMIdbKHOd6 qhhcGl++vXe6cthmZfiJw1kIwa4WLpWOiphO+RQs4w9PZ0+rgsT2m9ooToN5Plb/38V7 lqvw== X-Forwarded-Encrypted: i=1; AJvYcCVrzn85sjBdHRTBovSoM9QyIQU2UneOWAzK4Lkj7FEmyFAGMlBYRs4fQnozN9V3UAuQkykeN7qCY+YoPEOlwq9GLToeSMneW+PziRX1pbOdMFi45qQ= X-Gm-Message-State: AOJu0Yw6RxFr0EeLrvO/87nfBkP08GApMKmYDsbpHYoEU5ESzT+XOeV2 7Mp3F5ZpmFxSeEElfeHD599VK/9KGIMCRJU1a22RwFegLmZUXVg0/8lhHHkKd7k= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004206_375406_39E808C3 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13744511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B83B6C3DA7F for ; Mon, 29 Jul 2024 07:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JbaHllSBP44xGl3C1E+M24vLcFnhJW8T63/SQdZs/pw=; b=2aj9IYsObkL15PxAy+1ON8BxTX CqfLSJTzOX0yDxJDl+z2GGNt481AdJIOmMfLh+bdNTzDXH+DjpddEVqFX7SDL48fiw3bwrDCGzRiK jqCzOvzLm8EPgMVBrY5jpJCkmPiyGoF8tUW1xvbWxfyXsogTqrC9BmyTn3jHxJwW+3rD6keR/mdyY CTuy0QZGXLf90A968lMm6OvUEdlYJetAu5rE83nSAqGpG0IDgkb+Tja9BlRNLNTh+G0HQT9eAtxdV 5vI7phB+UfJBIdSI5wpahyw/jrp3Fmpnc60XLR/ax+R16Aj7e4QW43I2mhZPXtccgNKhZMGw/XR0V ShJMz5cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL4G-0000000APFg-0Uxn; Mon, 29 Jul 2024 07:45:16 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYL1D-0000000AOG4-2A4y for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 07:42:08 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-428101fa30aso13831975e9.3 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=lists.infradead.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=QmbwcwPkX0tBCRLUzlkpXayvZRYMKXnFnK0Up8f4+2bUt1nTmN7BDLDkk2IijOsxht RIGSjFBrI5em+oQnUki7+BkKn3VGWS+X9RpOBHNCTSRs1rkve4LJhQ7pCrbvuK8GFDES W94BXU3afDkWsAWdXKP2g38kew9AaC7CR7cBOkAxyCTWiAY3OxaCWKlXHa31oPA+HebW OThTDwqm15ZMxiX5VSbXhMaF+W3T/rRfVh6PAHchCaoC2xs5thbi6Tpf9jDNJ79VBCaS 5RNTHFXVDTO2JtXLsaDmzrdgsam92L89yzjvhdhb3GzYMqpLizMhLQ16YnI2BTJFvu8b upqQ== 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=vqWkX29uCtbKuIlhknGXgxfaS2Dg1bsHjQQvvqmOOeoDJ3hmTG4QBm2K6pQcK5E2+e U5mVCD3EDQ4WAmsGlKxqjRUv+uc697mWrJTnUoizDHjB1/IIBC2Q3BB5gXzedWZXiiJ3 oF527ooNl3ARrFuZWwpPnqR6E7JgytLoO8KwbL1DQwNucKOMKlG47RvIbWZqR9+0fpNB GsYspeZBxlJi3IrxcehSOxo36Dsuh+yB9A7PWoB0c+6oqZ4EUft227dGA/Z5ouagGPu0 iXW/QNaRi7d3+Vc8smRG8R8Fi7u6etJCwRJFkvjUTw5Hi+prnoklDcMH31oeQXn+XsY2 aCNg== X-Forwarded-Encrypted: i=1; AJvYcCWrTci3piNxazDm4IBK3VyY/I/Ur2hUMVCLfB184INPhh6AP5DFC3JaYzNzC3J48A0rbT/BEEm7LEg550uxX0pN+nsikNpuUq5yzpEOHLEclBonhco= X-Gm-Message-State: AOJu0YyUAlBFVJt1bnDY37jZzcadic3wImgCm3y953RyrWPTdPMbKVAw c12VU0iUFl6oodkm2wXNxUuujl9gWvbh+QkAduH0gyBc3BwCxOSDipfz6VI8wQw= 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_004207_609202_4E161169 X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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"; };