From patchwork Mon Oct 28 17:38:07 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: 13853778 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 CCDBCD339AB for ; Mon, 28 Oct 2024 17:43: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BosgQ+kD0H5BJCs43wOOr0oQ/yjsIN/cdckDvbryFCI=; b=N+UWloW/jtuDJ8WMN7DX5FltLc teIq4hN1ckFUg92CXzWGsfE9MlfDAX7L2srlml4cfUTK1Bv3C4XMJw+5JiRz3p0hHMvUqKKpwefSb zVCpRAT/DhJfwCoTKISqNYmNfl5MYB7lO7/otEubJlg173IE3BpIg9G+4iCwFe+hTn+p5cRqVNk3l V7DsR4TxF7UDg2Qwnkwlhjk7I/Jkx2zLIT8XF+keqdUg+p0DISMp09sKqD1FZa5Qk5pcsdFarLWAa N9PQ3Ti1QBJqCiM8dohfDZOZKv0bpRrfFKvbygX8Ge0b3cxGTeh15O5IG+pMzpny3VeCIkuihNfE5 lxQXsscA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5TmF-0000000Bgne-1RGM; Mon, 28 Oct 2024 17:43:39 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tj3-0000000Bg4p-47sl for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:23 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43158625112so46544675e9.3 for ; Mon, 28 Oct 2024 10:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137220; x=1730742020; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BosgQ+kD0H5BJCs43wOOr0oQ/yjsIN/cdckDvbryFCI=; b=dVo3DdisWlMS7BHfHKVffTUtVpF2X69jhyAD3CCKrwa44xGh9QXZC18toWhEKxaBtX lPe5dUgWky1yaXE1qXQxkSe6iSUXtZNr+o2cSReryRWypwR90rKIfEN3NwbVurQ7C2qH 38x7hj+EqzEwhmNJz98PAtyAhi5wRoDkFE93t+4bDdMLF1lIOat3xkVGBPCmhHE3n00y PlU6JZY+iwj1bHxQarBaSYZjpbLFly3FouacK5raWsT5q3jwEA3NXFYdvR6SK1trU0fJ 2efg29Rt9HnWcEv8UAaZus1azjUM6muKkJFv1ahec3h37yYp+t9/jbarQ5/FUrjY7h76 4ikQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137220; x=1730742020; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BosgQ+kD0H5BJCs43wOOr0oQ/yjsIN/cdckDvbryFCI=; b=RNudljZvV/4rwwtFmTa/hYhEBvOBadf2CwPoOK0rxO5fe9pxoOZbYxflPO8Hlr4F74 jpPVB+g4CTwWpttfPceNWpoR00oRJD7Bqkk2leacDo7IhIbTW7YMlmIjQgOXYp50ORz4 5/Nr6obecrakm8U5XCRsuA4MXql1T3idlh/vI+uLrHVAdBiKPze/vhopcv0kQmCilkG6 iodiw+NYhuO5eWcMt376LNLxQ0DMZWxjVOfKhWdMF1TxvdNmmQkCx3VfMRPyFSfcEevx O4z+kSiPlOQwvYVV2gUS518lewybmq5hSmR6bage5RBVsjkLDuB9oYKhBx33OhzeAMpR 4+0A== X-Forwarded-Encrypted: i=1; AJvYcCUcYZ50/OzULR9gOZjJqtLGKIoeKToQXnW8f15ew//MNaPoQyRjH3yyXI3B49cnCJiUxno0STsdjh2oVScUK35y@lists.infradead.org X-Gm-Message-State: AOJu0YzrEy4l7P1qK8eQlA0mH4+wwLGwOq3J4dYkBebB/G/d6nokSNlc BfFHoiEUxY49y8Tjg1O73VRPksQuigRXNgvS9ONp2K0Z06TyPyQ+Wrt0nLoP54c= X-Google-Smtp-Source: AGHT+IEqqisyDCHRMO2yXr3fzu1rVySxQSqDU1ltOdB1gBn9xls9XzEdxtAs+MNmhWUihFO/tSzfJQ== X-Received: by 2002:a05:600c:4ecb:b0:42d:a024:d6bb with SMTP id 5b1f17b1804b1-4319acb8145mr62323225e9.20.1730137220010; Mon, 28 Oct 2024 10:40:20 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b5431c9sm147417555e9.0.2024.10.28.10.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:19 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:07 +0100 Subject: [PATCH v5 1/9] dt-bindings: can: m_can: Add wakeup properties MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-1-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1874; i=msp@baylibre.com; h=from:subject:message-id; bh=Jw+WdBzdeJ1ejN6JFooZdebJTss0hVEiqW0IkRTOyf4=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlzwSUGSpPS0vrUKo/MalQaG9c6eXD7a217xauk64xV vQ8/XFnRykLgxgHg6yYIsvdDwvf1cldXxCx7pEjzBxWJpAhDFycAjCRkxGMDPtK5r8O7H7EI3f9 tZXC1OXX9n22mT9R+OvnC/Pbwmd+WxXLyHA8SLDz636BllYXl6eGgh6izRv5wh6Un0/dE2Pd9P/ gOkYA X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104022_062943_D60C761A X-CRM114-Status: GOOD ( 12.47 ) 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. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Dhruva Gole --- .../devicetree/bindings/net/can/bosch,m_can.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index c4887522e8fe97c3947357b4dbd4ecf20ee8100a..0c1f9fa7371897d45539ead49c9d290fb4966f30 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,8 @@ properties: minItems: 1 maxItems: 2 + wakeup-source: true + required: - compatible - reg From patchwork Mon Oct 28 17:38:08 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: 13853779 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 D559DD339A9 for ; Mon, 28 Oct 2024 17:45:28 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=saDUfDEJR0b1bnX4tkk4rHbVAroR4qkyv+y1+fjCTpM=; b=XR8U/WvCXDaMUINQSQqta7InM1 6+YqhQpU4+07XKSI9dMNvLZy+mNK3ZoZQ1SnY4fgyP25tRhrYHpw3wY8GtNhfd220dxdMgEQAwHnW TQMPBY3aRZ3KAvf0psRYapDTdGRkiFN12u6x9H3T/9cmqDSg69TrzRLIz0Rd7a+ivZvtJmvsJ1r5q Bw6EiUUmGlbjpX5vn3xlJSoLz+Dum72ztSD9YxTwwtg5UJHO+3YhKcagq2wdIMcSBx601em11FMcv WcQKbcLjgmh2EL3rKWrUwL7wK158O0uXKWbSAWxs6dsdj1waaqM8b/8tnQjpn1e26wWBkqSBFNnht 5QV158/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tnp-0000000BhAC-2OMK; Mon, 28 Oct 2024 17:45:17 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tj4-0000000Bg57-3ggG for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:24 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43168d9c6c9so47170555e9.3 for ; Mon, 28 Oct 2024 10:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137221; x=1730742021; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=saDUfDEJR0b1bnX4tkk4rHbVAroR4qkyv+y1+fjCTpM=; b=B2CjRz+SWrLt4ZKqkGz4Cw4cqwhfWxmsQn1HXU9eBelMLcADMOuO11sJzB6Y82fYtA zznGS6rKSgp1oPoPgwYCoibnc9a/Y8i/mZIfpBvOxjTkB+hOaGnlqIYWCTf9RvLUMp5W DvX4IqruKqejoyiOacSgyfrfBTMQeisAP93bPc5fkIoYM4UkV2GbOzfsu6KZL0n/mNda 7mqrfEdC/WrOO2pAAdfUL3ypEjkC7EN5HIVPXFewbWZpf50esaddEL/rTo4cv08rMq/k NiL3x+zOregelSIBoxubvo3VqV2gKXj6egX8mRzdsS8STGRRNWByqpJcwp6BZbessbjW u3IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137221; x=1730742021; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=saDUfDEJR0b1bnX4tkk4rHbVAroR4qkyv+y1+fjCTpM=; b=dH3AfJl0IN7C9gkKeuXNHMisvKhEsDuffN+mLhIGanXJi2EgQClaCzwRF0ialYxDSt ysszYZbTFSZIqsPmaNKNJwNCTtCix/tb7FYixFgJlg9IkFMUu7c/O3XRXB84JiwtDg7u 846PqMkWaRxGRuyy2vgjnKVt7zw1Aw4yz2CTBV1z9Y5tL+k+bTOu+kYJubPqGPpudKiA rKc44tRozGm0tU2Tamb9Bsk1I39TBNY2p7YPRyhQRDkSvOAsquMnmlGPKchS4B3/ZzAN 8IXl/Yi4u/uBjQzN5D772/nMlapW8rIMZtOJRgaGh3q9FK5lErjp6m7FmKetdqTivDt+ YFow== X-Forwarded-Encrypted: i=1; AJvYcCVlNVMwxSxbyB5Z7rIw4OZprbaiZN3wu9tSb5gM2b0CqDQMkj9rZDjmcex7FXdIgJb8N20Khmv9I5vnJX5FZhDg@lists.infradead.org X-Gm-Message-State: AOJu0YyV80/Itrrry8wQpG/N7IS4cIL6tB5JDJQKtN1tUH97rZsNEI5P DR/n8gK4qLMVnBi4wTSX5AHeLD0nxBuUkT+2ct+V9JgepfPD55wuKzmWPUjt0dU= X-Google-Smtp-Source: AGHT+IEFgqPvKk7zPEVSc8W/hIxxgLdyl05U2omshsXFU5gMdwFKyPVKfHosWtNHQDrxWACBCsN4Kw== X-Received: by 2002:adf:ea43:0:b0:37d:633a:b361 with SMTP id ffacd0b85a97d-38061206c0cmr7014723f8f.51.1730137221379; Mon, 28 Oct 2024 10:40:21 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b479ffsm10101137f8f.49.2024.10.28.10.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:20 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:08 +0100 Subject: [PATCH v5 2/9] dt-bindings: can: m_can: Add vio-supply MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-2-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1211; i=msp@baylibre.com; h=from:subject:message-id; bh=UPDN5Sq6sr7oOOH4G9BvBLb/9GgPBe4IrDFtGwTay8A=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz4Run/jwReX7GwrBXQwK7SZ2pn9mW29ZJKfoziIyX +yHmcGLjlIWBjEOBlkxRZa7Hxa+q5O7viBi3SNHmDmsTCBDGLg4BWAiqVkMf7jENx4SjstJted9 xanLYlMR9vmuZ992XZeNc/9d45LmPsvI0Nh9nXNu+tu+R2vOqZ7Zc/Hysj/vT72qXLlL2fDqW/4 3U9gA X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104022_956211_4BADAA28 X-CRM114-Status: GOOD ( 10.71 ) 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 The m_can unit can be integrated in different ways. For AM62 the unit is integrated in different parts of the system (MCU or Main domain) and can be powered by different external power sources. For example on am62-lp-sk mcu_mcan0 and mcu_mcan1 are powered through VDDSHV_CANUART by an external regulator. To be able to describe these relationships, add a vio-supply property to this binding. Acked-by: Krzysztof Kozlowski Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Dhruva Gole --- 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 0c1f9fa7371897d45539ead49c9d290fb4966f30..aac2add319e240f4f561b755f41bf267b807ebcd 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -140,6 +140,10 @@ properties: wakeup-source: true + vio-supply: + description: + Reference to the main power supply of the unit. + required: - compatible - reg From patchwork Mon Oct 28 17:38:09 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: 13853780 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 2D1EFD339A9 for ; Mon, 28 Oct 2024 17:47:05 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7uoSe/osPZM5KlWFY2p8NKc5PKZqtCcQla6SsIgyOw4=; b=4mz3p69gXqS9AZmcOCx31GfwPz 8NAoOtP61exqd6OUMvDWgqBj7O46uZxXtb8dnMRd6E4Bs1GbRf1Cn8mISnYFnyloKQrHytRW9p2Xn WTth/SQ5QW1nvhSZX7wD8eLYx0ad2kcAHw6pR5ti5G0HmWtv85bFU3gHM/23TX1BYwMC1u7lnY6wJ rsnUTIF93xxIo0vTrvuASLtNHylZAqWNdD26mHCwCZhJTv4OoBpbq9BzLxKh+DyCS+RwoLV85AFrL jHB93Y4cihU3pykr37T9gRnVna6DmctJp3ByY98IJ1z47yKd/FC/sJctCJMxVkkAh83Qk4qA1HImI f6IpDR3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5TpO-0000000BhcK-1tnH; Mon, 28 Oct 2024 17:46:54 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tj6-0000000Bg5j-2MEA for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:25 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4314fa33a35so44529765e9.1 for ; Mon, 28 Oct 2024 10:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137223; x=1730742023; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7uoSe/osPZM5KlWFY2p8NKc5PKZqtCcQla6SsIgyOw4=; b=klpI53P7Byh5V0JWagSxUbAnJBqdjktBL+2RFYi4yoVzISJqiu8B/rYx2p5Za76U+x RZBPNtplVuuSxLKIKVO82OJEzQrtSkcik7qGC4i29WF3GYyVyGWuTk4yT91fnCH969iA S1uXCxzNg0m3jyLtdhrY8iYGf0vfTXsPSkqc3uo4SvfqKpofcQ0uGcDL2SNNIoTFNaK3 nbN/xblMbu7/HUByEj1CdmFQqlxpKsfGq/7Ohw6Pg8H/Y5JqYhDJJ+wbX87qMwbLwHGq zmXOpMuY2lbtEerBls+rj6cwEsoEhhF1lCS9hV4QlJv6aezGdPZf5yUwQ0c4Rl8SfV5i 3J9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137223; x=1730742023; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7uoSe/osPZM5KlWFY2p8NKc5PKZqtCcQla6SsIgyOw4=; b=r1HNb9UKotPtBm0HoQrHTPrwDE+w9hE1wgcrRGcYUIL0DhAOWh3Gu+WrAyaPyKipHl e29tya+u78oUNEhZvC3WIWanB2OdnLexCxRyNh7cDCLDSAVcliP05AtOvJLMlhwS3VWz UVpfm0ewCID59+3Y0QbIYuZ+xIbzoNE7ElrFSeS2NjNR9/EeLE8pBFqxKZDZk/xq+Upa cN871GJsF/mwuZn3AaqQOlqcbzHSn4hqxuT/xtfIXQ4Wdma4qE1T8bGPaL4lcApJUlg5 T4RaKS3SsxaR9LQvuncvz5E1SvM18Rt7BGW5r2Beq16KlKvsAPEy6cZD78esK3cF8Nq/ SjKA== X-Forwarded-Encrypted: i=1; AJvYcCVAQRTGmaQAu3Rgh+t1r/Xj7dTsSKcwlNAdZ7dobfvPFG8EFGf5cVe46RFlYZidzH5AVl/SGGi1MiqLt9zWmBg7@lists.infradead.org X-Gm-Message-State: AOJu0YzLDE9t0OFioWblPFu668uYxvkNZjcVsg/2O8lqSfm9id/wEaVy jZ0cgDBKda46T7qn7GdWTGJA9IATMNgMXXETuOeJ7SZI/nPPbgXLS8stdkySY+s= X-Google-Smtp-Source: AGHT+IEFSR/zG77GxCKMdEA6ZBLL2jNoMnHHBu+9OH7sb56aIGjLWheqa9jEnSLBwlhUQRsnp7JZVQ== X-Received: by 2002:adf:ea4a:0:b0:37c:d54b:a39a with SMTP id ffacd0b85a97d-38061145761mr6895987f8f.33.1730137222779; Mon, 28 Oct 2024 10:40:22 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b0ed7bsm10150974f8f.19.2024.10.28.10.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:22 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:09 +0100 Subject: [PATCH v5 3/9] can: m_can: Map WoL to device_set_wakeup_enable MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-3-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2839; i=msp@baylibre.com; h=from:subject:message-id; bh=XYYmgD9hEGtxNIWY9snEM0dWMiWJG8YdzXkcAQHDIMQ=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz0SxP7w5mbP/+MqNZt6FkftLkoVjHVI7CmTVr63bw F358euhjlIWBjEOBlkxRZa7Hxa+q5O7viBi3SNHmDmsTCBDGLg4BWAimycyMhyudZAq0F0tbzN5 ofD37/u+a2eyLtPZOYVp0WuhHp1jv/Yw/JWLPjLtpkdU+0f5/PDXDRMS+KUe39zqZTBrXlCfSqq yIz8A X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104024_638670_AD4AA7EB X-CRM114-Status: GOOD ( 17.58 ) 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. Reviewed-by: Vincent Mailhol Signed-off-by: Markus Schneider-Pargmann --- 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 a978b960f1f1e1e8273216ff330ab789d0fd6d51..b358b60a1dee0f39aba9e2ec89dcbd0d65cd7823 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2185,6 +2185,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) + 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 | @@ -2194,10 +2224,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) @@ -2324,6 +2358,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 Oct 28 17:38:10 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: 13853883 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 C7027D3E2A2 for ; Mon, 28 Oct 2024 19:00:44 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fPlAnibnmD1fnySJZSs640gnIf/nP26iEQ1zSenIATs=; b=xujmzZgcIenOKKwyl1A5Xm0xV2 /xMw0EZmXaABPer3HtypWEx1vh1lh2z/5Wsz4ma/Zp/MCHcHAUPJT07reoU81sT2sqCCT7DUwvhxe 60WvojUM9ZFVBqNJiDejj9on/HW3uNcXaCkZYqzbscpcEyYmmtxbmFWdgEu5mCIAeurQXCxSIiZGc 13KgEiYJtah0/jc1dciq3cd/XTew6dLAjpkPlrMvdT5RGTZwqDBIn+1cI7ypcEVTBtiT8USabwkrC La7ZWOj1Lnw7ytoE6uaCCgx4eDw7OwvTNjDyjDBwUyPtebmli3C1Xv0PSwBLY6qSQ5J3BLZrWkydN rmE9Wnxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5UyU-0000000BvU2-2Nl7; Mon, 28 Oct 2024 19:00:22 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tj7-0000000Bg6R-3xBU for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:27 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-37d495d217bso4327423f8f.0 for ; Mon, 28 Oct 2024 10:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137224; x=1730742024; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=fPlAnibnmD1fnySJZSs640gnIf/nP26iEQ1zSenIATs=; b=I/1wRlA7/41lWb+RABK2IjOxFEjmv1jXzHt0rf0KS8KSWh3fnLiOSMrhMCDhSifbSE kt+voYyKjsGsyGvqgAcwwSltjHBbZRP9YcjnXbI9CNFrkAr4vNik++srg/U4ZJsNk4Oi uM0r2QrIIlymarxr+PjEfetpL7tcHjWUFMc378i9ZPyZPo3qqY8Z8tBPBmp8aiys1vtZ EU2SX1qRlOkqUGUMompDVk+kC2h5SKVlxmTA/9zZPQ91UQuq8hmkw4owLI7zXPPbTe4w tQ7g1N3s3nQvwuAA2sliMglb2agOzaV4U/m9XcV58xoS6qkH8CqVD/t1SZPcoX5ddkhL z22g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137224; x=1730742024; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fPlAnibnmD1fnySJZSs640gnIf/nP26iEQ1zSenIATs=; b=QcpcBEJKa05/k0+V4fix6PeCeZXrWhlUlJ4ISk7z35M4hzcaci9nir6EKNqu2+T2Md 24f8CCzA3muDTUyxFIuQ++x49m1h1+Ryp3C4CMzyCBLx9F9VVUmCqB6nZJtwjn6eaM3t 2zNvR10zbu6zjE6AqwfaMD9B1pI/7sEeidr/2ICCVONmhEloRu+d6Ai/17IBipC72GOz AIKOR9Z5RxqVv1M2M0BgaEgx2S8m38ZW+TGMQ7oSd2xCLYBrxuyOcxBlDkjPu5ETTP76 6vgORDOyck8tZBjE739i905RrrRDCBU7JEggOtzNHcPvZN3DcN+1YR7wbLkZ0sbqwmXl bo9A== X-Forwarded-Encrypted: i=1; AJvYcCVSXKnZMYVJG3cELoFTJ9cYaCZSess24S4td4xvpr/jU8ARnZpe8rgzjxizoijREM73oiCen702P/+n/GD3Pgfz@lists.infradead.org X-Gm-Message-State: AOJu0YzISP0KohsWyrfqsJHYTdGmOsOn/JdxP1u2MOowiZI7JTrluk/9 uTpNLSHTcWdOdQoBgR9utoaHL7lwybxLnQ84ul0NIEDdxBd2HgrjIsFBPgUcXYXiRzJxk5DbqZT h X-Google-Smtp-Source: AGHT+IHK6xiZTRx/ZH4MVy2X0svjOnw4jE7voI4s3c0JLrRDquRo8a/+4WCEh7ljG+D+BHZxsVc0Hg== X-Received: by 2002:a05:6000:1a44:b0:37d:53d1:84f2 with SMTP id ffacd0b85a97d-3806114091cmr8424440f8f.11.1730137224125; Mon, 28 Oct 2024 10:40:24 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b4e56csm10119427f8f.65.2024.10.28.10.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:23 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:10 +0100 Subject: [PATCH v5 4/9] can: m_can: Return ERR_PTR on error in allocation MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-4-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3520; i=msp@baylibre.com; h=from:subject:message-id; bh=4LejsatiaRcX2zgFBZl/CQNpfL8Zgty2MrObjJLOJXU=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz8RXnd/0e1lXZ4945vpslqasUylSMo9X/TryWObo3 +sJd99c6yhlYRDjYJAVU2S5+2Hhuzq56wsi1j1yhJnDygQyhIGLUwAmwrOdkeFT+WlNu3fmJ6f1 /U8NkrnPql+fc0/7dYX4mnuywvMeSr1n+Gdx6s/7C34bXVd+0z1q3vjk3tUetZh3E29yJnHvX/v z5R5GAA== X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104026_027843_FF6A0337 X-CRM114-Status: GOOD ( 15.31 ) 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. Reviewed-by: Vincent Mailhol 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 b358b60a1dee0f39aba9e2ec89dcbd0d65cd7823..b7e350ff64cb9cc706b7d53321dffaa079f3a8c0 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2355,7 +2355,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")) @@ -2370,7 +2370,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); @@ -2379,7 +2379,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 d72fe771dfc7aa768c728f817e67a87b49fd9974..05a01dfdbfbf18b74f796d2efc75e2be5cbb75ed 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 b832566efda042929486578fad1879c7ad4a0cff..40bd10f71f0e2fab847c40c5bd5f7d85d3d46712 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 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..4c40b444727585b30df33a897c398e35e7592fb2 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 Oct 28 17:38:11 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: 13853884 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 4EB1CD3E2A0 for ; Mon, 28 Oct 2024 19:00:46 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OiJccS24YzbERRopKG6CEKyvgFFySXKUJlR/ejlx6gc=; b=Ryxc2fp5SxFIDhHk2UTfiS8NNW pRTMKGIdnNhjKEpi82fLLfb7iTg1Spf9/e0stmNlkbzjz6/rMRWyfPblBJ2VVaqNuzIM9It+m7kjh G2VWGTEXT8GEi5IehJDoQFQYF9kbsJD0wWYX4AUeZe59sFCNunH2fFMcHp+6zps0ffbMprA03n+xY fR6jyNWWw0N6jkQgTHslzFzEPRSuEp0XzEuTCzP+IhoAnMyvZbT599kLjoUW0K6BrpPh3E6EXhlHm QUgQu79QKwAlZ0/W4Y1SXEBhd6idNoCPMBu/L92i+ez+7oGKg0LeKCPX7DMl5P8nP72iysonp8/gm QCeIX65Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5UyV-0000000BvUR-2EyJ; Mon, 28 Oct 2024 19:00:23 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tj9-0000000Bg6o-1uqT for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:28 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-37d4c1b1455so2978429f8f.3 for ; Mon, 28 Oct 2024 10:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137226; x=1730742026; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OiJccS24YzbERRopKG6CEKyvgFFySXKUJlR/ejlx6gc=; b=utyjN4YqUnVgMW6ypzoUXKL/rrkDrgEP3pjcoSi/bcQNZxIavtFmz9OptWWbNFsgnH TvXhR907PhY022zwcU5RCZ6O5UGTEmK7QPUI2nfAGBM7GZP7/WWvEBAx/0wPjEdDJWNI JjPEXNLWgtTxA65eEBmh2+s/tp2b1NhDhFP7KQOFX2nX/TNfZ0X6J73AT2EicVw136hA cing7vCffYe+cAYBIMPIBduntg0Pr4QV7/xKDUzz3lH/KhBeW/Qbq78061MtoA2IM4QP KwB6zIWG9o/Tk1vgooU+0HtDDeAHjq9QLOGD9sQktkdL3uVFloI7C6w1YkNuzLZmt22Y zHgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137226; x=1730742026; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OiJccS24YzbERRopKG6CEKyvgFFySXKUJlR/ejlx6gc=; b=Bb2Nx+N+bGAioGhJjG2DVdmYI0q2Gq0d10t8pnael310FUct3P9XwZJM8UxlfBylx5 LTOSCuz5iGFA1RVY+iCapjmaZ/ZiwfLdubNiJd3KrHDVvc7bscrBW+m+wHvTm3icupAg UkChtDnZqJemKTYKbc5IfrrjQyT/Zhzwp4WNVvGStcuCBSgdGHDv0s91bXpUI2194wtS mfq2PZEozzViOQCJujFBXvBl3jh92LeuAYAqgUmHBPRroNL+ZSrLQc9KXGUdA5l+ftsQ XNyDbCoGqM4uN4qEdBVHWZH6fbKq/4XstJF4b7VcKQdZq8gSS0o1UYDbqDsJ2kyOqNav /PKA== X-Forwarded-Encrypted: i=1; AJvYcCWkSyhzuv1AelF5va9ib37Re1xR1sDRveqSazunhFkWVczXUj3hjXnszI8yapilh+G6duXF9Keu+nJE7acyP4HI@lists.infradead.org X-Gm-Message-State: AOJu0Yxmsa9jKt4TGddCdMpbNvqlupSVBtxoHAd58TAeMTWlaI3yjW5B 9fuK+vhFaaLBZddED/mKJs+PHdoQqe5kqWpj28YF+xLwYCUMRCaDcdxQ1d31Cug= X-Google-Smtp-Source: AGHT+IF1bTuUiXOYCTuy45+oilc80aMb+3rzydWNyd626/C9NhqmYcI5G2GAG8x29z0tzaS8fa7Ybg== X-Received: by 2002:adf:a444:0:b0:37d:46f4:35 with SMTP id ffacd0b85a97d-380611dc87dmr6493569f8f.45.1730137225466; Mon, 28 Oct 2024 10:40:25 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b3be78sm10179460f8f.31.2024.10.28.10.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:25 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:11 +0100 Subject: [PATCH v5 5/9] can: m_can: Support pinctrl wakeup state MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-5-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4086; i=msp@baylibre.com; h=from:subject:message-id; bh=XR3crKyWb+tG9mI1yPCh57mhnmim4HwK+22w7Gd3XFE=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz6TIeQcn3PZZtDPgXIMps8Gqc9lBOhL+PuomwsW9m 1R1sro6SlkYxDgYZMUUWe5+WPiuTu76goh1jxxh5rAygQxh4OIUgIn0LGf4X1uz+MJTjZO3X1xK e7W46GV+xvZ4rUy/5fr+W/pMVMKVXzH8Fd1e12Whxf501YxTMW0KFVzp1mstul7cvWjJ7RKguzW AHwA= X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104027_536181_D15B77E5 X-CRM114-Status: GOOD ( 17.39 ) 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. Reviewed-by: Vincent Mailhol Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 68 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/can/m_can/m_can.h | 4 +++ 2 files changed, 72 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index b7e350ff64cb9cc706b7d53321dffaa079f3a8c0..8c6452d1490c11d365bab598f2abe047f730d24b 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -2196,6 +2196,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; @@ -2212,7 +2213,28 @@ 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)) + return 0; + + 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 = { @@ -2340,6 +2362,44 @@ int m_can_class_get_clocks(struct m_can_classdev *cdev) } EXPORT_SYMBOL_GPL(m_can_class_get_clocks); +static int m_can_class_setup_optional_pinctrl(struct m_can_classdev *class_dev) +{ + struct device *dev = class_dev->dev; + int ret; + + class_dev->pinctrl = devm_pinctrl_get(dev); + if (IS_ERR(class_dev->pinctrl)) { + ret = PTR_ERR(class_dev->pinctrl); + class_dev->pinctrl = NULL; + + if (ret == -ENODEV) + return 0; + + return dev_err_probe(dev, ret, "Failed to get pinctrl\n"); + } + + 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); + class_dev->pinctrl_state_wakeup = NULL; + + if (ret == -ENODEV) + return 0; + + return dev_err_probe(dev, ret, "Failed to lookup pinctrl wakeup state\n"); + } + + 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); + return dev_err_probe(dev, ret, "Failed to lookup pinctrl default state\n"); + } + + return 0; +} + struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, int sizeof_priv) { @@ -2380,7 +2440,15 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, m_can_of_parse_mram(class_dev, mram_config_vals); + ret = m_can_class_setup_optional_pinctrl(class_dev); + if (ret) + 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 92b2bd8628e6b31370f4accbc2e28f3b2257a71d..b75b0dd6ccc93973d0891daac07c92b61f81dc2a 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 Oct 28 17:38:12 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: 13853781 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 9B29ED339AF for ; Mon, 28 Oct 2024 17:51:58 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Te/9/WdXEHbGw1bV3Tw3mQ9dGEF+E7KMYxRV/chzUCY=; b=i4E0YHvKPEbfpFXFISvzAG5SA2 lKPvGPil0wEa6rSFWII7CmTV/Ck4sxOilQ8ZX39ARSe5L1qv8e+XLLb7cPRqA8uRgq+iSRwGpCN0X mCJSnZAC0lmgbOxLwx4xS5RMUNtBDIMdXFi7OGDO7mdExG1Fijdp/jsWlnYRZmTMZ9bJUQTCGNSer EQLzVTaU7ZpyaZ7gi5dfORP/1MQbGZWY/J8bDE1SB3mWz1gZpwVM97zFb95k8nkFCcmKxBvQRhxWz dkDCtaOgr3M1heAquA2Tpj3PdvL2+hAullmTLC6IrgY5XD4PTccHg7vfsgQw0BF/mUU66sHEy6Vwu PVi+1noA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tu5-0000000BiHn-45iU; Mon, 28 Oct 2024 17:51:45 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5TjA-0000000Bg6t-2Qkq for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:29 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-37d50fad249so3437935f8f.1 for ; Mon, 28 Oct 2024 10:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137227; x=1730742027; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Te/9/WdXEHbGw1bV3Tw3mQ9dGEF+E7KMYxRV/chzUCY=; b=3XafDNCF+p8mDtdux5lfjcTliLPzb8p995R1xdMlvNM42Jh/GV0PwAJXdJF1QO6X+U +4X8i2Kk9odJiqSELIHnoLgL4otTxai938qbp4pwWWXucpgr89SISiryPPpwTXy+srrK fTgQkQSg4CaA6ITtVrtw7YdaBNYCCMYe+KdKWyGXTHMD6qGIvKd6qUvqCOkm9XezkGH0 bGbEGolbPAuI0bfYASvdhs3rzZQ4Qr4VRYFQJT3h/PdBjoQgp59PoZR9jfaV1NyHLtLE ni6GF7rhbx6XlYYZR0WBRXSFuYtHf0Z+u3n1xm/1P7UTjYPUciZZwcFLTtHf6uwiQO4V OEOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137227; x=1730742027; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Te/9/WdXEHbGw1bV3Tw3mQ9dGEF+E7KMYxRV/chzUCY=; b=wTneR+t1YQgdBfKaI+VqnQWyKKAsQcvXNeWQUTOwgQIWkdd3ERAPls5E6V/ycuyAfE nCXL6KW2ZQkfTsrjn8pHgQck1eFCDAAgUOPo/Sx892HYKeC+M0Dp6S3dS83Z7WqvxLOz ei7lrN46U1HvAYvCQbcda0VNB8PUz7Eucx/xepY176h29rdabShZagOWU7d3A4U/IeNv ZFm4M4H3t3phSB/SJiXVWpRoDvcc7wTcSMgOLeGpXouZFYq4/CBaHnXRHTeWkHVxlO+F DLB+nWhtJer4yXrBROuKKm9a/l/lXaEmnubxua95hfbfLtp0QCKsHKlBh37u3QlVWcz8 UifA== X-Forwarded-Encrypted: i=1; AJvYcCUObNaJEapE9PNO+CUYZU6gBvkT38WwfY50eGGR/15sCOh1fqyfgDCJ6GE3mHVm1mh2UXoST/K8oUF1NVT4QONW@lists.infradead.org X-Gm-Message-State: AOJu0YwY9k1Su6EpG1uwrd+CCfab9sIrBnzJp0ZIp4IYEXF7fXNfsBO4 B7DcTqcET5rx5pKsh9M5Kl4tGBF4OqaudXiZeegUC21fKdPBjDNCzfxko1Ez7xQ= X-Google-Smtp-Source: AGHT+IFqMPdBogulD24ryHYACs/0/kPy+ME5m39YFDX+/TOrN8GU2WdBOh9BaqWlHQ/G2u6uOhGjww== X-Received: by 2002:adf:fa07:0:b0:37d:54de:1609 with SMTP id ffacd0b85a97d-380610f3056mr6761435f8f.10.1730137226809; Mon, 28 Oct 2024 10:40:26 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b714fesm10130545f8f.71.2024.10.28.10.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:26 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:12 +0100 Subject: [PATCH v5 6/9] can: m_can: Add use of optional regulator MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-6-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1254; i=msp@baylibre.com; h=from:subject:message-id; bh=f+4c/xAyZM4ng0MgHl2luM8EJirET+RfnpCZLFWpJ+I=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz2QdE8mMSbp8bbLv+ZxJ8W/43HN2iuR/eBo7KWhiW 9W35aeMOkpZGMQ4GGTFFFnuflj4rk7u+oKIdY8cYeawMoEMYeDiFICJTIth+Ct75s0SoUmLJiUr ha7aLa3Z8zkktDC/YM8J38kCalWLlA0Y/vBvX7j1/Mzma7P+zEq3bLi1nruHSVAv7eGNle9/J1+ 7Us8KAA== X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104028_658714_9C3FBD3D X-CRM114-Status: GOOD ( 11.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 Add support to use a regulator for the core. This is optional and used to register the dependency on the regulator. Reviewed-by: Vincent Mailhol Signed-off-by: Markus Schneider-Pargmann --- drivers/net/can/m_can/m_can.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 8c6452d1490c11d365bab598f2abe047f730d24b..56884c49b6f2a36acbcd7ca04be506154f991621 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "m_can.h" @@ -2421,6 +2422,11 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) device_set_wakeup_capable(dev, true); + ret = devm_regulator_get_enable_optional(dev, "vio"); + if (ret) + return ERR_PTR( + dev_err_probe(dev, ret, "Failed to get or enable optional regulator\n")); + /* Get TX FIFO size * Defines the total amount of echo buffers for loopback */ From patchwork Mon Oct 28 17:38:13 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: 13853782 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 BBC6FD339AE for ; Mon, 28 Oct 2024 17:53: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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=81ZVnQPK5cdOXNd0U587x7C4r0h4m8ObdC4H2ODABA8=; b=BaBNN5kzr4kStkcsuXs8vGd3O6 Hr/xyCIVDT21UTKmIg5hCOo3x9zMhFhQDalzti8ZGqoMOPbG7qFHPhySXGMCa9IT0SYcuLetCfVWB 3aaiEeRadklvluO+2CAIH+Jm32L6vL9ICO2Aa3z4sEuOlNbk9AccyXban8tD9MIY8vdmKM1P7W+Sf IaFHPdbM0MEGCTernXAjeeA0ixGml4i/qe1wbwPM+ayHhVNovw/UPd4DSGELUxawdMGSTCkZOoFGy Y5Az2V5ksUzZFjRzLWMYdtSDhmh0h3rshMvNB73jwREWgbb/6Nbya7rmWYU59zvGfffCq35Vttq/D 6LSB1oYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tvi-0000000BiUO-0sfO; Mon, 28 Oct 2024 17:53:26 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5TjB-0000000Bg7J-1fN7 for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:30 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4315df7b43fso47379555e9.0 for ; Mon, 28 Oct 2024 10:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137228; x=1730742028; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=81ZVnQPK5cdOXNd0U587x7C4r0h4m8ObdC4H2ODABA8=; b=ADzHfQQmPAM2Ci0IsFv4LjaNrB5jR6EpQuD2AtnseKVOyW6m2qus0oBjUl0HkRRrd/ wbYqEK0OlXsBk26WHzwAVhegE96Q4OPTEk7avJwSdHZT3jWBJp2Yh9y+gSYft2lsUY2Q qfi+73bLExXf1+m1T6dU2zxqFdttQG46VKaodlXQ0a5uAAb0qRmDx0Z449rlQ1OrACl9 3dfITPefSyzw51jOFz6eqkLSEdJ9VJZKLbZHo+10/zh5GjgvctV2RkJsLb48h6a1CSCW SFhf9C+yhkD6B72Pg6OiPzQUU47Zm0hSW/Q+PKFz7AralIzT4MGu8YT/VZ1iYS2lYE4m YuCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137228; x=1730742028; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=81ZVnQPK5cdOXNd0U587x7C4r0h4m8ObdC4H2ODABA8=; b=vuT7cN257kmOZ7FqG0bWYjpql5PI8bllYMKY/4ZQk9w0EqdleaUDaBvcOjtIgWcwHm DFO2Pg0C1MDqqR2puJnTk4O+6OTx5DYKXMXYIWHiEkyajOCi5cKt1Mn10BBGnWoMBsCY dhmnc+WAAWVyVSwJAJIxTN70RyYdwMpoAL/Zv821ui+5r2+q95fKS0jq8FHjR9uJgrKm dgXT9ch04WtM+nlOhp5MwPKYpwbWV2AC8XiwyM8Nei4ZqlpnCD52AxM0YU9UMujJt8zm WAmesDZ5JrAnS+Hoaj93igRiEmX6xRiH3raryZCBIYsMbr4ibqBurfKdW3BTnFgDLUVB g6aw== X-Forwarded-Encrypted: i=1; AJvYcCU6EY6jeumhN3aba4QvdWgHVmF7d8MLizK2MlwhEgwC3W9DDSWAQoCU+Km4hOk8wMK+uNdR+D2Wq4k2rYxkJOxO@lists.infradead.org X-Gm-Message-State: AOJu0Yzp4aVrFbmbofZbI8IfbIkkuVNM1dBy6IsqLtCvBBZsmUt7Dgo+ P3eGYq+RPAEgf060evLJX15yeFFC/hCjeEpJFm1tahvU3dziLoztiA5nJtr9PJY= X-Google-Smtp-Source: AGHT+IHSnXc+29Qbn383aWq7m+TPYika3FVB6W69uEQ0CryPJ25FNSrebl0db2HQt51eU8vLxtQ8Zw== X-Received: by 2002:adf:ce89:0:b0:37d:476d:2d58 with SMTP id ffacd0b85a97d-380611e56aemr6462733f8f.45.1730137228088; Mon, 28 Oct 2024 10:40:28 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b70c52sm10085494f8f.74.2024.10.28.10.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:27 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:13 +0100 Subject: [PATCH v5 7/9] arm64: dts: ti: k3-am62: Mark mcu_mcan0/1 as wakeup-source MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-7-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1023; i=msp@baylibre.com; h=from:subject:message-id; bh=L5jePk++a0uY91JQrASnpEj/bjSiMyJjUq1CjjPGGl0=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz+SLHqiNv37RLvXbupOvLYK+/3DuON5sdD/DL1Vh1 vb4xC8TO0pZGMQ4GGTFFFnuflj4rk7u+oKIdY8cYeawMoEMYeDiFICJbD3FyHCMe5oZ84qtnQ+r dXPFHq39YJIVG6+Zb/Cty1yo54eH3yGGv3KhbEsVkiI42XYl72T7E9Uruj7v7yud7IUxv1zCe24 FMAIA X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104029_470634_9B904388 X-CRM114-Status: GOOD ( 10.27 ) 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 Reviewed-by: Dhruva Gole --- 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 bb43a411f59b281df476afcb1a71b988ca27f002..e22177b9dfecb541e99b0807f8b79e7b878b6514 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi @@ -160,6 +160,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"; }; @@ -172,6 +173,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 Oct 28 17:38:14 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: 13853783 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 20085D339A9 for ; Mon, 28 Oct 2024 17:55:16 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=p570CyCpET4jQOMvqTRvBlj0hjjJLO72psUJRNLRpe8=; b=aZbDnJq9cT/E790G+frsY0CKJr M3YS4frkB59kLc2CxlAoMFFJLRxtWVnYMo6oZi+DXXAlRB8vyexAoUxR5JgqXmkT9E8LxziSRDEhj +AueziCsa6+s6c23Rl4FWUwGT+GspgSfB6xK/rAnuuw8+gG2iL94EHAGUKmg6BO/s2bJYCPmpv4wz oDj/yLFroAe9umsr+1AP7gm2ckU+fAk/aYlL8Cm/YeivV8PSa+Ea/g3FjZ9ZTiEXvEKWZuMgJLisc BYchRy3uxPmvVxaxQcDMsHfMAvQV8+VO4Kz9x0cdAjaisQUb2KA4rcuLjR82wcToAuE2CEBJ1+ChJ JQ+ZAVxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5TxI-0000000BilK-0xyO; Mon, 28 Oct 2024 17:55:04 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5TjC-0000000Bg7o-35Ds for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:31 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43155afca99so38436335e9.1 for ; Mon, 28 Oct 2024 10:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137229; x=1730742029; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=p570CyCpET4jQOMvqTRvBlj0hjjJLO72psUJRNLRpe8=; b=t7qfzQ3bS20SsePeRhckNSSrahEdkh9EskmeiJgw95I4wXutJRZxq1BbEesR7m/vnB t2AR/0iAabZoIxo08AuIrCLombL01uboU940z6aeV12cKYkBUPzTJnHt6Rd6y/YltWv3 dbNud7sYV9uJwo3dc+WHUnmv8WwWnQIT9eapgVRw2Srwhf5xlwOGrUXGhLcwF1kCGxfr PcT742E88vzOd6m97F4DUkh1rTv7CAQKYUdV7vMBZowHi4jxYs87i2CHA0mTW6pryBnL xLQDqRZOW84S58ORemY6L/b+mSFcvpxrf6Bj5RbRuS93EclNf7ETJ9qbSrqridHOrIov j8gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137229; x=1730742029; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p570CyCpET4jQOMvqTRvBlj0hjjJLO72psUJRNLRpe8=; b=k2Iv/iLljitpM1coY3dbbUCC3T/sWuYfdABzqkmSzvqC9bAUOvFVFiZBq9A8KwZv7c OMMAhgspkpXsOMaHNZGr2llFpFuskIKofoEaw8gVcaTZ86mic0G+7DvKTYt6RwZOAc7H r8HkWyIZT7lMKlUvcEV64fvibRwra3qkmA6EWeJZsodvFjsO8j0Lwx59lGH7Yt6VNx2+ Mm2dXTBQ9GLq0Sbe+vuhm4X5l4d3EoITmBdA4I+/Ww4z94nAsp+SNjQY3BF0SqL6hjPL sRyxMmvTVVSwVpJ4fypbBzIFUNQqv1VEk/DCI1Cd0JVJMlMcRsZF5J5OnpNLu4Gj8HcL Nt0Q== X-Forwarded-Encrypted: i=1; AJvYcCVg+8nJKzJKUiI0NtGYMqNpkSJUe7TVS3wAXmOdamVfctnN2+26M4gZXj6/RFhktHd1v6cEkjJFNjryDS8hh2oE@lists.infradead.org X-Gm-Message-State: AOJu0YxCX0Y1MwPGRNPCUJ+m6VCvCH9EBAohJJCmOWrKlKniy79Bu3LL zRqrF1c1WYg0sibE2aRhlWClnOcEz9B/iXp3YOOLXs5ixEKWCWnzDCfUb7KZJ40= X-Google-Smtp-Source: AGHT+IHJoT1Kru8t2gTjCW87GFlKfRhV5K1JOlejOdWGN1XWolqFZDApbwBdxFRY5yWNwO7g4PRChA== X-Received: by 2002:adf:f84b:0:b0:37d:321e:ef0c with SMTP id ffacd0b85a97d-380813c9f8dmr327949f8f.11.1730137229455; Mon, 28 Oct 2024 10:40:29 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4319360c10asm116567725e9.43.2024.10.28.10.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:29 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:14 +0100 Subject: [PATCH v5 8/9] arm64: dts: ti: k3-am62a-mcu: Mark mcu_mcan0/1 as wakeup-source MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-8-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1028; i=msp@baylibre.com; h=from:subject:message-id; bh=lb40xLu/VXrpPNedn2QOJM+HYtvP+0chbzXXKOqoOlE=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz5RsODMjKeDO7+xNd8/K/zh6sOuF8nNxG6+uE2UJE w6vDmXh7ChlYRDjYJAVU2S5+2Hhuzq56wsi1j1yhJnDygQyhIGLUwAmkjiL4X/djwWuh178yZz3 8avSzEPBl7SzZy/b0Xxo/oX5rNv2eHAlM/zTiZgXyNKl9DBf4bGY4gabxKBnTDWH61TWhOXLt2W 7b+MAAA== X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104030_815599_A40C0D3D X-CRM114-Status: GOOD ( 10.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 mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Dhruva Gole --- 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 0469c766b769e46068f23e0073f951aa094c456f..06361cfd7a8ee6f2acf2d15e8106087dd0f38008 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi @@ -161,6 +161,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"; }; @@ -173,6 +174,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 Oct 28 17:38:15 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: 13853784 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 6BE93D339AE for ; Mon, 28 Oct 2024 17:56:52 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=U0ITVZ/ruKG/TLGpfGAwzLMygWSysjucbld18q4vTYY=; b=06Gw/lzhKQdVjYeCD/Tm8LX35S WUdnNuFaQ0Q9uFit63tZgOBPDDj37KmAvEC5hojlgG4WMtoxvyWJG0A/dtnlUEX5msEkGp7iBZQKE StTckLDAftwG8dW1C0IgSy8Dbbgh0LJbd5K8U8MFvyr4huWZ8ploJVquf/mZyNAWEAt895a+/93I5 nFi7qL+rm2QoipJXj9+3D9k4J97Lqz9m/XVUmLJ5hvLJu5w3iwNNfwSpGrY508S4I7cLSX30keMrm Y95dGVcPY+YSp6xN+1mpxrJaa8Yq/Oc6n/yD8dJ3mzqJTtgQxhvEw3SUrA1oKPJ5BQo4oHdVCwXZK pWBh/q+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Tys-0000000Bj1X-1Uyz; Mon, 28 Oct 2024 17:56:42 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5TjE-0000000Bg8C-2BRT for linux-arm-kernel@lists.infradead.org; Mon, 28 Oct 2024 17:40:34 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-37d4ba20075so3169987f8f.0 for ; Mon, 28 Oct 2024 10:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730137231; x=1730742031; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=U0ITVZ/ruKG/TLGpfGAwzLMygWSysjucbld18q4vTYY=; b=omhia8Tb/W74z+Ql6WmSFkA0Hix73aW3U8tfJAke/aH4Gq61VgvTzUXRqO9bv2ZF6G pAlLd4yHvAmxA7EMgCTCsASBG/wYQbj8DbZGC5gaiKIgv2NmiCv91lkuQ2bAXsrcfUKc 6n18IvGpgDYNoKUCIMi1Bw17EFkC+BpgkGg8zh7gebU0KG+ZwtIF7y4tLufbdnGlZMzJ aUFSefaq8COOzIdqKYqUsPMHwdn/Y3yOmXCPM8EfIaK6EfJ5ADi8qlD7zH2962LB95mg XH8WhPtFuHwwe5W62/Xa6N2J8iozllpBlIq7/jIK3o8m3eWxaaV02U1RrvXtYP56ai8v rccQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730137231; x=1730742031; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0ITVZ/ruKG/TLGpfGAwzLMygWSysjucbld18q4vTYY=; b=XhGVj3nsiSrc6SRHCQvgvG3ISxCoYk6/Uxw4sMJ+KDaHDhjZ36peCUpDTnD411gttM mPjLiG51kueVtUiAv/2M4Rk81RC0l1LqwzDyexucNYdwJUSChWRLvBk/lu9E3s6ufYHO HZInK/SRGXzjHZZkBax0tx6M+ap/paQmk0g1DAwc4J6nQfnzfXrzcecIoHRRdnZgIFKo w/3NJ0fcqAM5sdaXsIC3Yblbjp8Wxqlvr5M44aSF8H3FP7sJnDnL0dx0MtJXrPRvA8s2 GbtXbq2BGELs+6uNkTGswxIlnoY9dv3Rohox2GfKTURf9o76UqLnoQaEmoo+JDS/mMyX t8Jg== X-Forwarded-Encrypted: i=1; AJvYcCUUebeo2gJ6/f+Z5nEf2fOyeBeZgo4iq7UW7jskhK7ZEDGGlOG8/ENWnqxXj6KFZkyT9GVU1J795Ufcr2JZAD33@lists.infradead.org X-Gm-Message-State: AOJu0Yw3uNm6CC0NMDuxvC4+MIg4rfrShxMXiURWra7MIwSsC/4+ePHE nrE5gR0tj/mmK5FxtT8/I3W9sWFPX9DHfRYr+ca3Ut6Bk0PFKgm4KrhLVN0pQO4= X-Google-Smtp-Source: AGHT+IFLz+kMolvcZZxnHsJqfE4G0Nz/GW/Zkf9/d2T203wI1tYzTYM+qzVyQH5oPcQLAmMdMoEp/g== X-Received: by 2002:a05:6000:dcc:b0:37c:cd71:2b96 with SMTP id ffacd0b85a97d-380612008f1mr6773135f8f.36.1730137230728; Mon, 28 Oct 2024 10:40:30 -0700 (PDT) Received: from localhost ([2001:4091:a245:81f4:340d:1a9d:1fa6:531f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b928cesm10176299f8f.102.2024.10.28.10.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 10:40:30 -0700 (PDT) From: Markus Schneider-Pargmann Date: Mon, 28 Oct 2024 18:38:15 +0100 Subject: [PATCH v5 9/9] arm64: dts: ti: k3-am62p-mcu: Mark mcu_mcan0/1 as wakeup-source MIME-Version: 1.0 Message-Id: <20241028-topic-mcan-wakeup-source-v6-12-v5-9-33edc0aba629@baylibre.com> References: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> In-Reply-To: <20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com> 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: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Schiffer , Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Simon Horman , Vincent MAILHOL , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1170; i=msp@baylibre.com; h=from:subject:message-id; bh=Tq/fbr0WhZHR5UVyg7x0DcqyPJVYjETLUN6TQAqpB5E=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNLlz1QyzdQW6Wafxrhl8zL7h8zPPz36vakyx5n/FdNag zg23n+SHaUsDGIcDLJiiix3Pyx8Vyd3fUHEukeOMHNYmUCGMHBxCsBEZvAwMpz8YVn959dP51+C HlPT9itpm33meOze4jNJ5GlLaqamVgPDb7a0zuifaQx+cmx6H6u+cz6a+NKj7M6J5R/Yog3PWBc 85AMA X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_104032_598213_46428E24 X-CRM114-Status: GOOD ( 10.94 ) 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 Reviewed-by: Dhruva Gole --- 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 b33aff0d65c9def755f8dda9eb9feda7bc74e5c8..3afa17e6592f39387a667547835c90f95a9af351 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 @@ -173,6 +173,7 @@ mcu_mcan0: can@4e08000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; }; @@ -188,6 +189,7 @@ mcu_mcan1: can@4e18000 { interrupts = , ; interrupt-names = "int0", "int1"; + wakeup-source; status = "disabled"; };