From patchwork Thu May 23 07:53:41 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: 13671360 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 49F0BC25B75 for ; Thu, 23 May 2024 07:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GnD+erfi2WkqS/CtrAAcENxDQ1TBSScrAuu7WXvzpP0=; b=dg6S/MnCRksfq0 s65qEvjnkeeCzXKPGfOc31bttl+QVlZpww9XzB24cD3gUJPq6kyF6Jd+wgkOp7GCVo70LLSqRqrNZ 8JX0RyAYNDnR/f1F6zK2v4L4AExsLaOFg50Tms6X1tmAoZFNU7Y6a2T+y4e+Wtordi5kJ7x+ds6gC 6a5RHVoqZvBLQYw8zdkynSPeiY5g4WY3UaMHuliQCeXPjvipEhzsO6FhGXf2ZLhIxFfqZHTUN13Ny XH1jJ36T8O7mT6NnIz0wceGgRaOqcOEa6VRuImuEYVU0MKxwsVP/ZG9aDlZg7TwPGlMp39uZdUJzy veoSJZ8YOi5OYrsZE3MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HR-00000005O0Y-33pp; Thu, 23 May 2024 07:54:29 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HP-00000005NzG-0TAg for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:28 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-351da5838fcso5628188f8f.1 for ; Thu, 23 May 2024 00:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450864; x=1717055664; 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=yFKoRI+8ogEC3xai0mED7XOpWxyQTS94NP18L7SjeH4=; b=MMWXS4nDbPUmJOzy5s6pw4AjZiz+O1BjH3Sa6yEGtdaXsKoU/RiP5T/Tx8TLv0wzM1 CQQpYJkSUKsu9oGm1SuWnPvIvgv1i9uX6YW0MfpeWf6fvcbxG93tkObQbmSp5tQd2Os1 KDE6FoC9sAPIf39rofUA1/riwSS6tYhMVHBXRbD90xgEHyOiwQ87k+AJmkw88+wgtUm0 Oy3b5+H0F7IG4u3KsQuGhVr5MhjKHLtmvt6akXYLO/LUL3y4jVKhSp0glgDuYXsadmYc Pr16gAotNrJFrfATM7lwYncdpT0dZi/+eN+7YnlIgaTrCjqGCaZBAuYDJYoYtCU5f/7p 77uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450864; x=1717055664; 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=yFKoRI+8ogEC3xai0mED7XOpWxyQTS94NP18L7SjeH4=; b=EIuCFSQIwvV8vKg1E0aXcl2f7JDAubaFCz6dsoQBftZhVBDCnJ5gfHsd4D1A2JGk+F JHG++CbB56ovlHJkaSAL80czWEXDqhgqwOAR/PkqHpDULbsgwjifIvAjlSlGFG/aWIlF 1rzl3NIfS1Tz5rS4sdrPi4doEChYgHjh8wZTNMaZue2ZrQOZV3EUrxannPe/8hybmHqa xDf98oMDoIL0MHH5qu4FNrHlBYjYGmDNlq+Xlh2FfG+qcuEnqoSwucMBgjXGjwPB/dTd 4Uwo9NCPux6D8zD9uPEr6oUSWhkJmZumE+SpXeQmFOLy+E79Gqbb6v8C7pK4jJZDvCM9 eIzA== X-Forwarded-Encrypted: i=1; AJvYcCXWkAaw9g71fqPs7IssnAU0GNgGnbFQwn+0k617l9fap1QaRn4Aj8qsECvTk2j68g6aCrXQEw3t1SuiCv9GPU3WIZfzmehPVNSwXyWmvvAR5izmteA= X-Gm-Message-State: AOJu0YxOHeeJqKVy5dirxd1dKwvW0LZc0QBKw64gS+AGY5dSe2JmGKrJ KTdOTdxLsKAsouEtN/9uyzoviQet+SOZLwA4/Ri6YXxXaWLsrrQhl8cU7wnWJts= X-Google-Smtp-Source: AGHT+IGDzErplwCICU1ko5jWwuhNNvWBqpXdU1AVQfAdkYAqsILeEMKquVqY/w/WRkxQ5BGXYhUTkQ== X-Received: by 2002:a05:6000:795:b0:354:db63:9de5 with SMTP id ffacd0b85a97d-354db639e56mr4759952f8f.39.1716450864009; Thu, 23 May 2024 00:54:24 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:23 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 1/7] dt-bindings: can: m_can: Add wakeup-source property Date: Thu, 23 May 2024 09:53:41 +0200 Message-ID: <20240523075347.1282395-2-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005427_180046_60B2479D X-CRM114-Status: GOOD ( 10.88 ) 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. This property defines on which devices m_can can be used for wakeup. Signed-off-by: Markus Schneider-Pargmann --- Documentation/devicetree/bindings/net/can/bosch,m_can.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index f9ffb963d6b1..33f1688ca208 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -118,6 +118,10 @@ properties: phys: maxItems: 1 + wakeup-source: + $ref: /schemas/types.yaml#/definitions/flag + description: This device is capable to wakeup the SoC. + required: - compatible - reg From patchwork Thu May 23 07:53:42 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: 13671362 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 CDD29C25B7A for ; Thu, 23 May 2024 07:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qNu9jvy/rg4y/Rn4IkWWVvW2Kpy/ML1X5zB4BU3vcwc=; b=46z65fT//b7JTI dUGMeFIpUdGKEfKKgEjvF2h+PmJ9XH3U27Pqvl/2v9WV7LqOMo7D20zbZQ7ZRMkkZg2tLsukZR+ua EUs7yoK25Ncd7r9kWCuiebzr/3B5dhYwEW9GTvZwIC+g1efakACh/RsfW7U7SPTTFSqxIEPUJQEDi kNHkvqZ09MyxFHDqY8p/UexZf1C3nUhRnmLygNs/4DT1J2jGNQobkMtEI2l8vabJhRl7ApQf7KbVU y1YsDsQViHhQvNyJEvblM67l3k8L7p3yjc0AwTJvqOpZf52VN3suZh1k2X9NOyhn9qgkrL0relYRy rpCRCafT0eYxBDDxacxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Hc-00000005O4N-1ATU; Thu, 23 May 2024 07:54:40 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HQ-00000005NzL-0vM9 for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:29 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-354cd8da8b9so1791988f8f.0 for ; Thu, 23 May 2024 00:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450865; x=1717055665; 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=Dfktdx7avVVxO+VgbPGQcts/32B65YHqwd/3ELI4ILs=; b=1IHkMgli5FbZZamKRFO2hq6IMh48K6PgkOLc7s5XT7DvpLI0JucMWFJj0j0DubBzWL V40+a1BeeRBcW2HujSFOwAXWcj1BsrJr3vs0Zqe3tHKdbrLTNFrBYxh2Lvx9sEIYzQCs 4vzr3ptR7cd3SroHLY7pHbFAkdff3MmJnIyC90sVyo6rp6e7JhlL7D3CneozuqWVjC2M 6P0GmMpJI1zPpeKYRcrO07pjmTfwQZD9OxFuaQ9bHyGLL+mdMZPpqtMqklfFjQjTdnsb yCalWfqxVyKqD01QJ63rxrFEPVeUSENK55xMmfofgX6zSOXze/meJUZ+XmyKSg06XC8F tZBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450865; x=1717055665; 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=Dfktdx7avVVxO+VgbPGQcts/32B65YHqwd/3ELI4ILs=; b=vyH+ccsZviQTZqRDoGSYVdSPxbOtROpXlUgUVLS0+xgc7yEMTcN/59/W+ntXyv/U/B QPDyUKrcXdANHiarGGZtJI1Z0Snps2AIcen0ePC/aFeBt/fD6B6Cv/NHB5teBYVE8B06 qPIfkf2R4+10Bj49HlcrrsJbk78CoRwIipLDdbhCTtDclGMWKQYE//ScLYm41vrk2sVy HsXnEuR3tdfKuGcXcPBlOOgXbxliRZR9GPTuCCiiOPDMJVmYiz9389pcoePFdzqortg1 SdpozeDE0gt1c6NKL5YpNc5hOj/m31xMZLC8hYAVTDAGUx3gdzU1352cqezA9pm+aOPB 0lKQ== X-Forwarded-Encrypted: i=1; AJvYcCXFxf5PYrW6m+iI4HrHbRyzCnrmJvRUVnSKsWCqTaAhAPXpavqmKc0iNIunbm7Sqnx5fcxMFELjdlcJe95jdKuqjQ9RVfQ5JGXyLYtHSO70Y7mm42A= X-Gm-Message-State: AOJu0YxMeVCOfjbyaQ9dmnQHrZutxPQfwNaNVoO27ZrtzrYoOUw0w9Pi UaBo6HFJNsLDE/S7j4q9lQGK4JpZ+ElneHyLfkk1qygdibz/X16XgUS3++Nkm54= X-Google-Smtp-Source: AGHT+IF/pK55XVk6BU5rXK9slQYy/4lO8VwqixmRJMIscsNGljlUqfko0F+oxxn3ecB3ekIdd2xgtA== X-Received: by 2002:a5d:564b:0:b0:354:fd72:8791 with SMTP id ffacd0b85a97d-354fd7288b8mr235826f8f.43.1716450865365; Thu, 23 May 2024 00:54:25 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:24 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 2/7] dt-bindings: can: m_can: Add wakeup pinctrl state Date: Thu, 23 May 2024 09:53:42 +0200 Message-ID: <20240523075347.1282395-3-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005428_281229_0854557C X-CRM114-Status: GOOD ( 11.17 ) 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 Pins associated with m_can can be the source of a wakeup in deep sleep states. To be able to wakeup these pins have to be configured in a special way. To support this configuration add the default and wakeup pinctrl states. Signed-off-by: Markus Schneider-Pargmann --- .../devicetree/bindings/net/can/bosch,m_can.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index 33f1688ca208..7c6fa7367c37 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 From patchwork Thu May 23 07:53:43 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: 13671361 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 2C035C25B75 for ; Thu, 23 May 2024 07:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cCr4qdjXrvDJ/7/WoirLPRctd0SjnVOspMTNawxdFsg=; b=x2T6MmPQR3iAAs fVGq1pnVq5y7koIvUqLDPuKDW/9p82l5lW7VoNOedzLfP4Sq4ttHJzhxRAmrbV5cSdJ9dLK5Vx0Yz uUuDZNQU4IDXCQnBOlju5CVx1KOiamjqNysJCwNPUc3HgpHbyYKVfQQ4jN5Ac/73VVXLwGZN+eCzN phhvfp+V05qUX27sHW/G9H/lU3+mDKpMKvfEb+ZOyXjEDnsIrWQuKnak2NMi1rcEY6z2v7gDzTpEr 1vlMwoAf2G0fvmD5x4IEX3s/HusRsALj3B3c3dN6bsm+ub2Zc68lQddOUBCbGwdMVHFgdQXPAB77n Z67i0IO+EinlQ+qsC4Fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Hd-00000005O4m-0toZ; Thu, 23 May 2024 07:54:41 +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 1sA3HR-00000005Nzr-2VfU for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:31 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-354f51ac110so1088693f8f.0 for ; Thu, 23 May 2024 00:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450867; x=1717055667; 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=hrFQSVhPJTExMHxUs9x2644C6X3jCTcC0vL8A1PKT6s=; b=gmvg2UQhDt6KXAY0K17ok49474lks+zCtizrEvFDMXDq8+3I5nnyK0yLH+vpzxS+g9 a/8V/WhcGKjGDktWzPdgKfaadbLvLEsXWRSOQ9CZ7NSUT35TesmdwoW8oOXntDNRJ6sR 5RoOHu3Y6baz6mXJyx2LPDprK3pGV4doYcZKdyDNqRugO3uAG83Jo2XmJsEN8ObKYdkp Osilirwod0OHa2nS4VsiNTdFXPgJAHX7lL4qUUvL7rjaenmPkh6SR12yJNmlnVTNlBAa waiZhPrnamksSzZhpHLcYQTyxyypsnfofi0AlZgUSIm+yDW5xrRLa4gfbzArRI7aXk07 TB6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450867; x=1717055667; 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=hrFQSVhPJTExMHxUs9x2644C6X3jCTcC0vL8A1PKT6s=; b=GV8MVXHOjtHgY57e1iFnHGG+As2jeqhCcuRo/lv9GqPFAvVK/7A3rfqtzQzLpfntJ+ ca4MbTWNJR6m8ofKz+FEvKoAv9+zR9Q/45X3NMflmL3xiYhnDo5lqDSZhzrcM3lU/uy2 8PBZt+4pH2w6BcTx5ILMZyREe2eGWhIXIhsJ7pox3HlgjuJcZBeEeKgWfI2OKvL/FM+Q UUsLJegE7x9IQpFZ5qZ3kNkDK4kKnl6LJMRogMRsKIcgJctLBtaNn8P1Gw3kVxc6+k+9 eks0Pbhua3d+MweYCiDftHRJdvrvRZN0YZFRlmX8A05qH2kv7x0eIUiAIZYk61O7ktG4 9d9A== X-Forwarded-Encrypted: i=1; AJvYcCXDSLS61JjoXWbABajSerSZpkjyhf/AwWrVpkcEiHG0aj3PSKF51c46eoXSplB714oSKLTPdIRCxshTbPvE2xP3FiHMzC3MYO/oJyE8q1FSw7tPbnA= X-Gm-Message-State: AOJu0YzwKbwuSJlhlwKGjZmRQhFUq64I/xKGBkaIJaSwVufwlhumC1xn kaSGZS2HWCoHcxTOaiqVkWIKLBotGKzM492iO6b4qjLNwP4ExW/39TmTL67olXk= X-Google-Smtp-Source: AGHT+IHpdHwgvkOic2e5snbrW03BmHrtQiZTJlEnXodGIaGdt59+8iaoH1lfBH+5/wLQqizWIx78pA== X-Received: by 2002:a05:6000:1fa5:b0:355:15a:f0b5 with SMTP id ffacd0b85a97d-355015af206mr229576f8f.32.1716450866839; Thu, 23 May 2024 00:54:26 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:26 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 3/7] can: m_can: Map WoL to device_set_wakeup_enable Date: Thu, 23 May 2024 09:53:43 +0200 Message-ID: <20240523075347.1282395-4-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005429_663834_45C446D4 X-CRM114-Status: GOOD ( 15.40 ) 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 --- drivers/net/can/m_can/m_can.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 14b231c4d7ec..80964e403a5e 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2129,6 +2129,26 @@ 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); + + if ((wol->wolopts & WAKE_PHY) != wol->wolopts) + return -EINVAL; + + device_set_wakeup_enable(cdev->dev, !!wol->wolopts & WAKE_PHY); + + return 0; +} + static const struct ethtool_ops m_can_ethtool_ops = { .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS_IRQ | ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ | @@ -2142,6 +2162,8 @@ static const struct ethtool_ops m_can_ethtool_ops = { static const struct ethtool_ops m_can_ethtool_ops_polling = { .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 net_device *dev) @@ -2266,6 +2288,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 Thu May 23 07:53:44 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: 13671364 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 86E5CC25B79 for ; Thu, 23 May 2024 07:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M/68eJT3AplQYfcvkLYzIcBmAhdEQa9CeV9/eW/kjkM=; b=K+X0hqRzgCA8jK gxJGw9fwinMjJdk34a3xG051DWyyBpgPCBAbin2OSuvU98oBuPD6WKxey6qYqa9td32IuXpnilWR3 q+WcNui4TSnYPCvSeQHSev9CHCVV/nX2LHm8KCZjzcczGQ3Yhz/Fp7KYLspqrEOmjbg3PpE8XybMn P5Utfj5xy5bWZAiLkXYI7JF4ia2XG6N9Q8jhjDuOPAKNoHk+qUDyWCtfcS1PVHuJ+ip6zju/fmZnz IuTgTahGRwisXCN5U8AqguQwfAEvdCYvDdNl4yYFrB2qubytO+JiHVRdHSEgp31cZjWG8bFpKyf1M hXHsQhmDfpiTUfp+gcSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3He-00000005O5i-35X5; Thu, 23 May 2024 07:54:43 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HS-00000005O0K-2th5 for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:32 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-354f51ac110so1088711f8f.0 for ; Thu, 23 May 2024 00:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450868; x=1717055668; 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=P4T6sy6AEq30+xE+MXFJmyPKxLYvjiOTPFV8oNWYyfY=; b=G6Hd0FB2Mh+M0NicZfimCEIvrOTZYKNDiAJgI6ookkooE5NUJzKTc66yfSiwh2wtUo VnWntk8ZeMXcVyP42/qEb9dPtjULBlx4IlzQBsG2foDLwtVmyqLPSGRGEikHQPNM8oY3 Ps7D3x5EEElmujKmx0twoYX3UtDeJfzNdqP6WsMUF2iz9HAyTUms/3CSXJU2e17XWPD0 eSX5wCCoAVw987OCH1MdxQRyfDlxo7Psm9A46b4U+vg9L4T9x8WzT+TrDpW14muDEa+T gs+0nbQOxk5KU1nB+W8NoWdY0LsvdzXH5IhWiRqaCQ2u1+BGNlGvArsOGrC3fbvrWgE/ MAcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450868; x=1717055668; 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=P4T6sy6AEq30+xE+MXFJmyPKxLYvjiOTPFV8oNWYyfY=; b=Lmv9kRrjmCr9tnSSFvnOKwztfve/m1++t3ol9Z/XphucmGNxfCjxzCsjFy9NJHLeO9 6i5G0mG52JrfKzQF9EkY2XIgAHfCzBRy2CojOQNOpnrxqW4hOMCt+KSHcJUTuS6TFK5m n2Ij3HYhxBTqUr4E23Wudi0kiY5rBnjPtKQqxRuFDgR5kvuXah/js2ysAD1ErzyplxPv RgZkGip8MYUde37xRgQ/eE9XP61btNhDUG1j/LD9QmIsDX80ruRUic30lbGXqRYnPkLG PRdg392kKhKY1kyvYASG/YVeYtBD1SDcLVAYOWt6ALh0R9rU4SA12GPsNit+qBqqT/1p yPRQ== X-Forwarded-Encrypted: i=1; AJvYcCW21kb8Sp1BI4DT4hYlGEGqqkRb/gfexaHvTfDuHasUOMMK3uoyPVdO3TEWMdt29IC5pG5E33yxy0BMD/ltJjx11DRoazMWq5499AlO66c4wfW57hg= X-Gm-Message-State: AOJu0YzmaLnITXFZKe7yDVdm7d7OH8vMq5JvQB1vB4DKuhGC/LYRoNLq aE60n5kqh856DM4nUPYcsVh6sdfq9d+8rc2r5Ue3dx6YyzJGE0EB13cda/d+C98= X-Google-Smtp-Source: AGHT+IFtIc5i+hivOWt1FZJ1gwG5chb73rVNDKqh9Iu9jNZxfSYT+HyovD+5k8o5exozIdt5jmzJ4A== X-Received: by 2002:adf:e6cb:0:b0:354:f2b0:ebda with SMTP id ffacd0b85a97d-354f2b0ec82mr3067448f8f.10.1716450868279; Thu, 23 May 2024 00:54:28 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:27 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 4/7] can: m_can: Support pinctrl wakeup state Date: Thu, 23 May 2024 09:53:44 +0200 Message-ID: <20240523075347.1282395-5-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005430_915848_6AE8FF56 X-CRM114-Status: GOOD ( 14.81 ) 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 | 20 +++++++++++++++++++- drivers/net/can/m_can/m_can.h | 4 ++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 80964e403a5e..c5585dc68f2f 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2140,11 +2140,21 @@ 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; if ((wol->wolopts & WAKE_PHY) != wol->wolopts) return -EINVAL; - device_set_wakeup_enable(cdev->dev, !!wol->wolopts & WAKE_PHY); + 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)) + pinctrl_select_state(cdev->pinctrl, new_pinctrl_state); + + device_set_wakeup_enable(cdev->dev, wol_enable); return 0; } @@ -2309,6 +2319,14 @@ 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); + + class_dev->pinctrl = devm_pinctrl_get(dev); + if (!IS_ERR_OR_NULL(class_dev->pinctrl)) { + class_dev->pinctrl_state_default = + pinctrl_lookup_state(class_dev->pinctrl, "default"); + class_dev->pinctrl_state_wakeup = + pinctrl_lookup_state(class_dev->pinctrl, "wakeup"); + } out: return class_dev; } diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index 3a9edc292593..bdfbba67b336 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 Thu May 23 07:53:45 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: 13671365 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 A548FC25B75 for ; Thu, 23 May 2024 07:55: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UulKVOmHMwykX0gaR8WZ8i2a21z2F0jm82ZZLP7K78E=; b=1tIvG/GlI0AyQm 4is+WL2nkLIOn/AUJuyARbCQN9lEsKOTtgumJ/VVrzW0NCjUNCAjc07qQkSjjQ5ZYgWjv2FoMtZET +9wvrEpqIMXzR00wCE+jJqhQQMNg1cpvZAn2mVLBEQrSPU1BwNAIrjeb3hOa1RhWuhP51chRB2ZYf JZh6m+z8Z0AAPeVEf4mW/cN4EB3AqOk/YEwVw17TOpswuJuRNnRBqdZL7nUHo3cJf5Q1r6wDDQBBP ngnEHnC0voKw9Z4kfmSzWWEaQM7/+yH/cFdQNButZ2Wsx+2u3qzlfwqHeKElmXrOI+sA+38au8dGp Fa2NchzSujFV7gXgcgKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Hm-00000005OAN-2qic; Thu, 23 May 2024 07:54:50 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HU-00000005O0n-1qif for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:34 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-420180b59b7so16307065e9.0 for ; Thu, 23 May 2024 00:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450870; x=1717055670; 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=8qHm5wPDHErIfonoFh9yf6yEDNagx5CpABpNxxmsHN0=; b=oZQ//gogiKaF8UTxVSDp87Njo00QggzhPyvbpHJsajac0guExjZxhlhZoZbaollEAN 7ZbwkUTSlP+bdsxtEubtWuR88tNAZodPIBoQk3f3Vrz31x0fHrBN1XlqzW5tzNiJKjrc y+o9+ZVw8+SPsFWr3u8U93PP9zAL7gAzbvSBI3RRfyKH3o8HmAt8NM5tOlQFMnVCXvJO BuoKQAiM4MzT55ntO5tvEFFvglGSOAwrSBIjN/kiZawaSko032FxV0WRN38H/+VDfwxp IHE5OsGd2rIOJ8Ybd7vzjnBRLJexUi3NwMYc6lnc0+CY4oCKiAk0Vh+xCaGTVT+Onw9B lm8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450870; x=1717055670; 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=8qHm5wPDHErIfonoFh9yf6yEDNagx5CpABpNxxmsHN0=; b=lJ0Q2eGkRWt+0VdFxUVpgSPci3vlNBb9Fu2Kr+bpRcn1drNOdT1dUNFhthqyZl7SU3 ybT5xrdMqixabliGVg5xh/qMOInBlyONJfF9DtPLXGzwhoeqGAuQJJ6FB0k55z3YihoT Xi06v81LvBz+P/XnGIVY4OWZU7vi2DuMbk4MHKEMYGVMQUYeFiUXRYJzLJ7BgK4Ms37s oGrGr8l9FKDrwZpNtjIsJutgpPWkoWU+2bomO3J8qZ3rgNoCtcimZLxGVW1kCihQaK2b Z1Y7er2XkdRHwRHZV0G10U1dJmicdwpEKluPOVYX6sKz5tAVM/E5QnqOziYgk4/KR1Bv zgIw== X-Forwarded-Encrypted: i=1; AJvYcCX71aZaf11acWiKAJSsHjGZjkChdJia2inml/ZXP8TX68VthKeO4AwK3Y75dJUMVT4WqwCdoF9dHTXgbgwEkWVpQwZVZw/0bTx/ppN9pE5CWuBqBUE= X-Gm-Message-State: AOJu0Ywh7JUVfkWEPKcjI/oEiCuhjpxwIf4iNkJnpgL3WtLaf5lfWS/D NtBYTlVZ/3MjHDpTTRvalKzmgCDgzMOT8qpQIwjFMwF4vM9Yqr07eYjf6TuBifc= X-Google-Smtp-Source: AGHT+IF3OTnggc31210qX3nKdWOjfDLXrGQ5B7znh/oclKD116v3X2b9ljcQKfSkLFzr8iQgUqYRQg== X-Received: by 2002:a05:600c:54e6:b0:41f:fca0:8c09 with SMTP id 5b1f17b1804b1-420fd385d61mr24859455e9.40.1716450869666; Thu, 23 May 2024 00:54:29 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:29 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 5/7] arm64: dts: ti: k3-am62: Mark mcu_mcan0/1 as wakeup-source Date: Thu, 23 May 2024 09:53:45 +0200 Message-ID: <20240523075347.1282395-6-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005432_548530_13AD8A6E X-CRM114-Status: GOOD ( 10.00 ) 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 Thu May 23 07:53:46 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: 13671363 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 753B9C25B75 for ; Thu, 23 May 2024 07:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bgH9QD/0yQzo0EFMCuw/Zw8ZnjUGyI2em5gSe/O6874=; b=rQ9uRZHZfXRUIi IQePKHXzOKsLgp+GW2il3ShQQtL4casvjHG9kU6YHbs8jyuAMvr+9mwyLb+mK2n+SiCscl0LhHAtQ gZUqT1ZxbFLh/9nJ9EHxPkArzx8G/tfJmVSrs/7rYcxI2qFPO8dRuG2qGNqTXJL8boXS8zOHJDzZu MZmAffV7QSAHcjuSsFYKL7sdz5wTZRwVZAsqShHSGvHXv+GcYMo+uAlqWBKIpx+qT8ia/RmOtMTkZ ZIB4Ri5pnT9ojGqFTrWRQSZB1Q+Q5+8oYXHkm1PcfnHzCLl2HW594zYMg7E0N2Q9Yqkpv3Sjt1Spj jjnBavrqoTIsqgTPu0Yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Hi-00000005O7x-0UIs; Thu, 23 May 2024 07:54:46 +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 1sA3HU-00000005O1Q-1mvG for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:33 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-354cd8da8b9so1792066f8f.0 for ; Thu, 23 May 2024 00:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450871; x=1717055671; 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=Cs95lBC/TcgC4HuVf1dVMWZC1dwKXurnxylDtWkEO30=; b=beIFIB6eTg39Qg06jzZkXPIDS+gC4Mg3gEF2rdCdcnXsF62Vx7DC1cyRMOu4xL+k/J tr9EZX49H2mtKtd/M/j60k0YLx0xivtS4T+Ut5anZEUTJz+l/JsyL573l6HZ18g/NlZw 3HYPUh14FZRtbq2MNyqhnG2tTCi2uugYSjpeu5HzlkQHkHl30+/YqSppSYtltQwB+q4l Rtq+LTaiJ55SJXWvF+eCrVWOejh5G8r60ZMaZy/GJgtyTAQ9RJI6GQAuMJ/CcaPE8tNj JPo2fgUjvWEHelnwwkjVVEF/Kih/HBahDhI787cOQ3HCwpLW/UbYWpAlYQIoAe67pti1 6dXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450871; x=1717055671; 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=Cs95lBC/TcgC4HuVf1dVMWZC1dwKXurnxylDtWkEO30=; b=eu0a9pBM2Xj4XhKjjEu+FD8I3B0P/obMc9bTt3GammCMcKg/8/cNSo0g/KpYA5PIc2 3DVoG2lWCmle5rrGJVJDXPSITj/d2g+ApCYcCUsjiYsGT2MlzZEvosbAHMLb4oIIirYV HpU15lTXFDIvA7j66ZZh6sxdMHpKQN/jZUTHD/wYRkB2PyXM6u7VIQ34P77NtVGiNVz+ fNDCc2Ru2jD3ldmUHHf27yl1ltK58son229k5hvgqaVAjJz/vNi/gY7wHMi4e8jEcgBL iGPucIS3GTAIF76SG7f5hwyQajs2vu2BnQyQHZPewlbS2k4JmAT9NPdMbKNd6ImEZLZ3 W+xw== X-Forwarded-Encrypted: i=1; AJvYcCXpxnZyrdqGstpCKtjOaoMWY7hBxQYMBcRBHrhrccRpDZKYIuYR22k10IX0yk0SDwP3hJzgluOpv/4fifzYWZeVTXlu21yGl6l2352m9xWLZmo6AZQ= X-Gm-Message-State: AOJu0YzmiW6y9tCwM+csAi2OZ8O0QHq55KeHq0RZ92NHrnnZTG/8R+5F vDUfBdlRjNbmVP6v2dzUgz6JHn87SNYldvOzsXKrfVZCucGd0fZehHwTGLndwIM= X-Google-Smtp-Source: AGHT+IG7YTkLUSffWTrDruzFzrKP7L50CGiVA7fCsGK/KJwutYO0L6Mt4f2SRF1jo89ocb1d3uWezw== X-Received: by 2002:a5d:6e09:0:b0:349:d810:9974 with SMTP id ffacd0b85a97d-354d8cf9050mr2859963f8f.17.1716450871014; Thu, 23 May 2024 00:54:31 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:30 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 6/7] arm64: dts: ti: k3-am62a-mcu: Mark mcu_mcan0/1 as wakeup-source Date: Thu, 23 May 2024 09:53:46 +0200 Message-ID: <20240523075347.1282395-7-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005432_513255_E5F61AAC X-CRM114-Status: GOOD ( 10.00 ) 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 Thu May 23 07:53:47 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: 13671366 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 A8230C41513 for ; Thu, 23 May 2024 07:55: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uHGSOq1wZlg0aJ34GY3L0kTpRPAfJVFzcNn5EzU9BWA=; b=O+g4G6Uoq2BIJJ uRFBsa3HJJtJS4eomPiKHVGurcEEPUcGhxW2KhtVlHqyHFytbfNjmuWrWfw4DFo1SVJNEvpjjA+bE usUtAmyYMR18lbkPr2erpBTay6ev2sxCJ6l+nek/r7KaEgPGSkNOJC0uOPI6dvu8UHGPXF69a6v19 nMaWQGjdo/6bqpo00ujLU/Q+XqPRHayyY5PhEcC85+9fyOg5sV65Iy18S+zDcDImhPJuqYqW4l9DC jZKU9FX2x+zfyllaMLnA7buosY+TOqGMMszzlgDH6XCFPkKs+NmLczqCJe/95HhPIpIEOcRBLCtKN cXi54kuxIFIsxs8JmRvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3Hp-00000005OCf-0s4J; Thu, 23 May 2024 07:54:53 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HV-00000005O2G-3C9p for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:35 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-351ae94323aso1513041f8f.0 for ; Thu, 23 May 2024 00:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450872; x=1717055672; 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=xT7+JtKss4DjYZVOz3FuZCZuNxMX3BDv4ta8RztPqv0=; b=t7S0coHmph61crr2jeXpNkcCx8KIPL7lxIAj00jDxkF+L6+i2uvTCmdOxiq3TbNKXk W1yFyPy6dVfqSI2vHJcLc4M64bNia+ygCSr3qk3QiSlFAf9MspzvZ0kDBGnjdZrjvDP8 W/4goBmCzB66ovZ1n1IkkDkVC0kLcU6fNyDzq+m5IytL9MkS6eZK7HtVdp0pjJFLvaMf tjodEmxz2xjzgh8PBGxUDTLbWVZNhs6MKW8+hF1SYyrMKDNR6CToqmew9zdVvUlmIlmQ InccLAWUDr+Ob8sDmx3DPV1GUB9rdR2zBU7DRmtvlMPLLFaNnDBceqDaVuomtgug4t1y N6wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450872; x=1717055672; 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=xT7+JtKss4DjYZVOz3FuZCZuNxMX3BDv4ta8RztPqv0=; b=GeyJVh3iSUjJGOHIdBdL1dBmk2KTfsanWSGhEtbqDkn0ekfpDLEyin38tSc9SS5uvm v9zgnUID9OzY+CL8/U/9mWfZiYHSM0wF5qkZX4+MudgMdMnzxvlfakZeQFA/w9MLa/O9 mkUBEMQSJSMBtGKXcjLDnHm3YWyRIurgOowBy+aWK+u01NA0sNr+l1Soaanc2Zox6AWR XX7bDANGngJefNMhmwrUkrVBwTh+KmU8IONN2gVS7VI2BbVFyrRo0AkY6t40GJnIzXJj HvQ0A2DXbyRygmGNljUy/dHb8WjTUtAnKJhqhPkADKSu0/cuX6iijDWZibtZV/zYHSKC r33A== X-Forwarded-Encrypted: i=1; AJvYcCUTPIrumrTVuZDsXaNEtH5+L14tM1Bp2gkx6zAmBsYpZt7A8w2GKNCo78IF1ccafVM1dCxTe3A0J0mgljUaa9sB4urFCbk/7IpBzJgKX1/ytFD8qX8= X-Gm-Message-State: AOJu0YwZNjQbV5tBtQ1fEi/s8OEuip0/AKlnDC6P4lHOUrNBJQskk69A bVHJEyj3Gc7mfLxzz2qymlEZU2iIoB01h0JwcqvOipNMG5hTQrSg62Bif5zvkrQ= X-Google-Smtp-Source: AGHT+IEUHrJ0KdpXh+C+VgytBP/PyrYIZr7cy2feoJNZUjfuK0W25diSS+LmHL7ZAdPTYxlWEqO+sA== X-Received: by 2002:a05:6000:196a:b0:34d:b42d:b666 with SMTP id ffacd0b85a97d-354d8d98cfamr3368702f8f.56.1716450872391; Thu, 23 May 2024 00:54:32 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:31 -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 Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 7/7] arm64: dts: ti: k3-am62p-mcu: Mark mcu_mcan0/1 as wakeup-source Date: Thu, 23 May 2024 09:53:47 +0200 Message-ID: <20240523075347.1282395-8-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240523075347.1282395-1-msp@baylibre.com> References: <20240523075347.1282395-1-msp@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005433_879117_1EAFCBAE X-CRM114-Status: GOOD ( 10.77 ) 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-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi index b973b550eb9d..e434b258e90c 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi @@ -162,6 +162,7 @@ mcu_mcan0: can@4e08000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; }; @@ -177,6 +178,7 @@ mcu_mcan1: can@4e18000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; };