From patchwork Fri Oct 11 13:16:38 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: 13832563 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 7A336D0D78F for ; Fri, 11 Oct 2024 13:21: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=wUS9O8RaGfXiOh/gcBh0g4YfEW2SakpMupOR/Is8Hqk=; b=S9aoXMSt154WZ3Q0NqdTvUIAk/ QIk1zlHCperqmhxnP7RypGtAv0TbCzGxYy69QHismjEg+vkVsxG1A+7z/cnEP4y6MkuQmyxoP7DKQ /0zI85icRQxXUwnzsAXZ2ul398xil7fHDpk/h3flg3eu4PcnwC8ZdquX2+Y19ffaXsyZYYVYX0Kzw 52Tjm7SD7hOqzznkFGph09iab5/E7CE2uRhwcHcTmqnemhWx/fnErPNmVwvyW+nNLSTInbCx0Q8X+ 7Xvznwnz1BpEj/v5QskErvGYJnFhCNqgBbTAvJyxbb1D9ISU35vKgXF2/L7JO6GxAyPozlyuMrRuJ rxiCwoVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFZZ-0000000GQgx-43Dn; Fri, 11 Oct 2024 13:20:50 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWr-0000000GQ3k-0yuk for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:02 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a9943897c07so281692766b.3 for ; Fri, 11 Oct 2024 06:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652679; x=1729257479; 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=wUS9O8RaGfXiOh/gcBh0g4YfEW2SakpMupOR/Is8Hqk=; b=T+Xh5Rrb2oLvm/jMWgJYOln8FbildEjG4LhS2cpGoSL1b2BsIHpt5iCDnmQY1X7iL/ 0ODhN6h+6ZnpWQa6wAKQXEB/5NDdoFACcaSi1+FBWI1AvYjo7mjCsLPD6cD/9CKn3VRs iczgwMpjN95JlLY2iAhFOOsh2eXBDBK4oh/Ih6VdbFNyNNPXSSzrVIaFHIPfrOCb81ID agF+A2wj6l1wi151sPBt2ZQEJGXy4M8s0byevHfiMsv745MQwIknlqaF8lIhMQEtCja1 yIf7/0KHFf3e4gWFrJcX2peOCKR0Sig+5wJiZ7WveW1c01lYv4HMu/GJ3HRUnh8CRLPr x3mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652679; x=1729257479; 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=wUS9O8RaGfXiOh/gcBh0g4YfEW2SakpMupOR/Is8Hqk=; b=NCFKXZWEWWaus/bGzNGfjHE/B7loa7sV5nEdj3yqwkXKc5y3SqScVc1RIYnGpJ6hXK H7Jn88cbKnsRxUxoITnhhUovZ2Fdf2RHSv2GmW/2bPUmkKmCvwZUXlJQhU9t2DlfpfG+ 23oo/ML4aeY2Bp7R8U6g5pK2Du96Icg2XKj3XOey+xBabwqtXilqq2xpwuz1Z2TlyuZW xSPR++IT/PIjivZ4pZ59GsuG4kZefuAGh80R05pjFNZIkMi+/r0fLyDVk4zYs9gfaOaq y6OP90LaBAsFDAxVAMdgnUXZE6UjyWM1Y19qi6aY5hJwE9brnF5qBFWXMyVtMB3GT1pv 6R3Q== X-Forwarded-Encrypted: i=1; AJvYcCUfYs5x6dDx09h4Jt8MTRe+r3IzebRVXOQ980rhvEwFgBjjSsbBlM9ztu3n71ACPKdMrWJ3IhCVjWlQ/kBX/ZnD@lists.infradead.org X-Gm-Message-State: AOJu0YxdgFqrv86EF94Jr2UfNbjlfrXivY/FR9ujrAQbv2nBFw/yVYRX 4lYDqD27ERz2hLRUBxn9QvhanYl5+6O90GYzUyJNlkxCUncTV/ncjg0HIu81jiY= X-Google-Smtp-Source: AGHT+IFaEMX81GzZ+jATV7DgoLYhKfYvMArkBn856asWysPwWg8p+jz511s/+c59x94ZEJ1yMprBUA== X-Received: by 2002:a17:907:d599:b0:a99:5773:3612 with SMTP id a640c23a62f3a-a99b93d4235mr213477566b.36.1728652679342; Fri, 11 Oct 2024 06:17:59 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80c0238sm211617866b.115.2024.10.11.06.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:17:58 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:38 +0200 Subject: [PATCH v3 1/9] dt-bindings: can: m_can: Add wakeup properties MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-1-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1807; i=msp@baylibre.com; h=from:subject:message-id; bh=tIux4Jo7N8fDpXOCI+Zhs5OWS+myGS4fEvh1G5nNm0s=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VcO2MRvcyOZZsrPXyEn2YvyrzEj2zJUvwvbwc3xYn uCv/f9+RykLgxgHg6yYIsvdDwvf1cldXxCx7pEjzBxWJpAhDFycAjCRt26MDAtfdl4NX5h96fz3 EN9Fii2yh+6X1bTPYCqY+ah5scTEOysYGa5c/5j59nth/JbUqWyTDVm59losurRorprvb/ZX524 tWckGAA== 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-20241011_061801_308826_DBF8702D X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org m_can can be a wakeup source on some devices. Especially on some of the am62* SoCs pins, connected to m_can in the mcu, can be used to wakeup the SoC. The wakeup-source property defines on which devices m_can can be used for wakeup. The pins associated with m_can have to have a special configuration to be able to wakeup the SoC. This configuration is described in the wakeup pinctrl state while the default state describes the default configuration. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Krzysztof Kozlowski --- .../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 Fri Oct 11 13:16:39 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: 13832564 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 7E4D1D0D78D for ; Fri, 11 Oct 2024 13:22:22 +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=rYLiNkzm3f/4BMefMWOVmVXnSoOdYUIxdGSU/9EXCP8=; b=LDXEAj3tzvVQADeyrBd4MvqdiZ XGIK4z9NREiDPgECjV5VYSI3BSnEFUYfDYTbAeOuCS4SxKR17FLgxnLDMw+bFFgzL5+2BA0E3mgsC 7CT48P8uC0gS8hdaGsNdy7FaBNogRtuyk4F0VX/Pc6QCHZwzkx5iF8sWPznnT+3a+ku2xdpBfZhkm x3YVln8TWpb9QIfyLxJjNjFicZ9A568R8kiuSiEAxKpzEb0m7E8cTiwIwiGxpzt3Q7QIOTEtdq4ms gLQLjEIRkUJga+Ocgtb4p6eV+TC3PGHixUF7i+3xJPMZx7XgbRDEtdb7MLaYwIlOtUJkqShbjaSm9 50o9pkOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFav-0000000GQzw-0WDG; Fri, 11 Oct 2024 13:22:13 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWs-0000000GQ4E-1vsa for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:03 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5c920611a86so2641999a12.0 for ; Fri, 11 Oct 2024 06:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652681; x=1729257481; 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=rYLiNkzm3f/4BMefMWOVmVXnSoOdYUIxdGSU/9EXCP8=; b=UccIcG+TVEtqzGgE9h6Gy2y6hr6uxLbFXLxLPrmQv4sAar2G7/q7lc4/7PhSXww2eI g1lKCEAZvvRaIlUDHrxXI5BxG7oHtRMN9OLQ9qWcFfrPJJhtFbCFEGKCyfg+rcUZiLbD kVLm6kT+/7vRWqXSBI2BgZt7zwKHPWrj1SYmd6pnCcHeIjn5LXLLWvPo13XRNPKz8Yc0 EED1pPCt/vkAlLkH6pnxMjKchphA23ZWevvMohtpP/N7pqRuiBgSKRfkVv/ygg5QwT1B gyE7cMDJ7ZJ8Ts0sqVA56Rp86GFbJpGNR75r0MlzTt/ras+2t/Yubl3KuBBLH1OP50EO csKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652681; x=1729257481; 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=rYLiNkzm3f/4BMefMWOVmVXnSoOdYUIxdGSU/9EXCP8=; b=f8H+146X1yJkqujoooxZnoQIIeRtwLSR4ZZddh8FS64sTUFmv6BvOFowol72aOQbd7 rHKZ3hT/9hUoZ8xsjbsZOUqlyc0SstgwGgHxEkGZDyYeGWlARMkB40Yly1U+lCT9bSjj B2njYe9Asry5p94dTMS2+m8z1VLfi3id3xVBO+EcwsQLAXLdzuSEmxHqTqVZEhpC8PK9 Mvym4HtVC/h/GhLBITzmW14a6u6tC3wtPLXV2t2fH5xEbPGAFXSFi/q2Bgn6iaYL2Q+q K3EEGBrEcZ31s00sAF9VuHX75PjKk6eJ5NtL9QFpKXruFMyEY8w0KlSYaB6XMfuLn5do 7gtA== X-Forwarded-Encrypted: i=1; AJvYcCV5+s/l7gYGibnuXH2Ho+dvsALfi7FC8HgQqaqC0cAjwjIalYX6VtxQUnkNLkQSPajTkD6ofnY259uPZfTMaehl@lists.infradead.org X-Gm-Message-State: AOJu0Yynu4zeVOmjl7q8TTfEakYvbhmGyJIDSGPXz+Xp1rVWfDeK7LjF XQA7bvHcJn0z9MP4O2hPPJnWIZrYmQXUpuPZjfI6pKofA5lYtEiWqY7ohu+xRz8= X-Google-Smtp-Source: AGHT+IGzTUXpGaNSMoJpRdsaE2RSr/sAt5ivnKoRilAioDMPmlzspWzWozWfrZen0Wv+N6H4WJW0mA== X-Received: by 2002:a17:907:d845:b0:a7a:9447:3e8c with SMTP id a640c23a62f3a-a99b943b764mr201860366b.3.1728652681030; Fri, 11 Oct 2024 06:18:01 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80c061csm212753966b.99.2024.10.11.06.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:00 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:39 +0200 Subject: [PATCH v3 2/9] dt-bindings: can: m_can: Add vio-supply MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-2-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1148; i=msp@baylibre.com; h=from:subject:message-id; bh=+BpLo7wO0S5E5+RxGEZ0j27kNVjU0GbulquXMEn7V2A=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VaPfv0rMDCj35jqYOOX+pUXRjzfveSu9XsH652TrD QG3mvgqOkpZGMQ4GGTFFFnuflj4rk7u+oKIdY8cYeawMoEMYeDiFICJGCsyMny/Y/zx87tK8/z6 Z5v+r4nZ33GMY0H80QmnFfTbd2+49libkaHNdBLD86wqz55JHt5Z87Yc7BGYI/HgwHTbJDeuJR4 b/3MCAA== 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-20241011_061802_544178_64A861CB X-CRM114-Status: GOOD ( 10.60 ) 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 examle 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. Signed-off-by: Markus Schneider-Pargmann Acked-by: Krzysztof Kozlowski --- 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..e35cabce92c658c1b548cbac0940e16f7c2504ee 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 Fri Oct 11 13:16:40 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: 13832565 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 84DA9D0D78D for ; Fri, 11 Oct 2024 13:23: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=GSdY/jWydsnh5WtGKd8S4In1q/EQUwCvNawFPtKHEzU=; b=CpqlvV+P+nlMmwE+3T3P4hG+Ol Y+h/ZDKRrqspIGyB/4CyGXRSGoR5uLXLcwx2s4h0XLWxgFsbe/YsGME/wL4lOMyU9AulJ3E+0Scu7 wzn7bZand3w1KRdLgaDIiocmi/rs2tajwpGDHTLUc5yBAHpQLPwox+h87tKhkRj5QARU2aAKSYPzj znVH/Ky1rT8J8Vm09pDD726Im9Lhb/bldc5i+yTYsDJooMNeiaNZnwvFP0mpcJQe8HaCfloAgF2nq RGKO/BU3zLKTW6SowVOI0ffKbVpIeXPJ1zTR0xTv4O3+MsNsyrGiwbra0r4DVS46StsolbMEz+DGT 0fdCJmGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFcF-0000000GRIi-3LTC; Fri, 11 Oct 2024 13:23:35 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWu-0000000GQ4d-0heB for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:05 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a9943897c07so281699266b.3 for ; Fri, 11 Oct 2024 06:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652682; x=1729257482; 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=GSdY/jWydsnh5WtGKd8S4In1q/EQUwCvNawFPtKHEzU=; b=Ior4VRgcCa4zpUeyRE0H78FLHBRJbPbDkz+ER1jdhzHxZkLJFxBep8FdIbUdhjlR6J Vu3i4RR5b1UBQfWlPBl2qoEs4CbWz0UT/Zx+06fBXWB0BsOGuI/wJ5iBEbZO+vCa9YO2 TQAkgBKX9DdS2EucAuAdTNvnfnl2nFzuCFTawipZABTjH/X3yuLw0OK2y3B7c3jekHae rgMnivfiPOW4DgLmu/I5YXbmXnoEz8Q4rIaN1mepOQxP+Gl7mkacEt1aR0r1CaqT64Ec GGUnGfLi4BFpGHYHjp9Q48JuzPxBXO+zA8im9BBMwEkApuwYuaaC0rVKdF9TWZNnqsdS E0qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652682; x=1729257482; 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=GSdY/jWydsnh5WtGKd8S4In1q/EQUwCvNawFPtKHEzU=; b=Tnjp5yGl7cMnLI2awwkvMKpJdFjZrTeqz3UEpp01TmH9PNfVQJkxMR+gGJpp6QQv07 f9cdazybfgQYSPCONnUf1k6W3z8Qgn+ZIzWIDh9DFpKOV+qtithiWmz6Ad+BJweg+uvq fyNpQr4isH9VkEnF3pI+VUICEK44fYKwGv5eq5jjJbv8H/lBx+yHTNbWADAG5LlqMlhe t0r9hA7SAzMtk57IX2zRC4ZCcfbFcSrEVrjuleehSE12c3eaaJ75WJt5usX4E2qyfdAw Hx6RuIBhirCU5i3wW3N5GDZvE3GCM2/9uymHbpiwi8IRqjBmk5+Dnq/hfyEiF/w7Ivx9 tv9g== X-Forwarded-Encrypted: i=1; AJvYcCVVtcKfFcRSXdmIkmvM2IxS7RPHY5LyFUsBUW866oaI1ImzEQ0fWq3WzMHfq3jEpZIYXnegGnLQpYRCo4+ZAS/i@lists.infradead.org X-Gm-Message-State: AOJu0Yxg5kvnoxvl0TPXK8RgrsYKzfHPYZPg1tyTItp8UvSAQ09wFryI dyiVdhYKiyy+3ZCGkCa92rPuoO+1AC4ybA99igT2CWryRJPhmyYbv+ajMSkcg3Q= X-Google-Smtp-Source: AGHT+IEldii35e9PVlPZq7x1sIW5eSePwbQUs9Zkn2MXaSKHf3A/zUtyi0U68UtWtK/MFFkB8BzaRQ== X-Received: by 2002:a17:907:6d22:b0:a99:40e6:157c with SMTP id a640c23a62f3a-a99b930192dmr224582866b.4.1728652682272; Fri, 11 Oct 2024 06:18:02 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80df530sm212717066b.145.2024.10.11.06.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:01 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:40 +0200 Subject: [PATCH v3 3/9] can: m_can: Map WoL to device_set_wakeup_enable MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-3-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , Markus Schneider-Pargmann , Andrew Lunn X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2838; i=msp@baylibre.com; h=from:subject:message-id; bh=cwyU19cQrq3CFX81zcGwso0Vwsxh5WskwRCVqlVQBpY=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VRN01scys/0ROFZQ7ylmKfw1ZNPKvnsdr7es7vJJy 92oP/1YRykLgxgHg6yYIsvdDwvf1cldXxCx7pEjzBxWJpAhDFycAjCR3KsM/7RYmS5OuZNmd99Z LKHvwfFNQp3/g39di/+g4B4n5MKcW8Pwv6p/68TPjFx90aK3AxynV854Vr5yjWbI3x1Cb3bUnhM T5gMA 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-20241011_061804_246571_CB208E86 X-CRM114-Status: GOOD ( 17.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In some devices the pins of the m_can module can act as a wakeup source. This patch helps do that by connecting the PHY_WAKE WoL option to device_set_wakeup_enable. By marking this device as being wakeup enabled, this setting can be used by platform code to decide which sleep or poweroff mode to use. Also this prepares the driver for the next patch in which the pinctrl settings are changed depending on the desired wakeup source. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Andrew Lunn --- drivers/net/can/m_can/m_can.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index a978b960f1f1e1e8273216ff330ab789d0fd6d51..29accadc20de7e9efa509f14209cc62e599f03bb 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) != wol->wolopts) + return -EINVAL; + + if (wol_enable == device_may_wakeup(cdev->dev)) + return 0; + + ret = device_set_wakeup_enable(cdev->dev, wol_enable); + if (ret) { + netdev_err(cdev->net, "Failed to set wakeup enable %pE\n", + ERR_PTR(ret)); + return ret; + } + + return 0; +} + static const struct ethtool_ops m_can_ethtool_ops_coalescing = { .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS_IRQ | ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ | @@ -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 Fri Oct 11 13:16: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: 13832566 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 576AED0D78D for ; Fri, 11 Oct 2024 13:25:07 +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=iCNLKfw0M7WpUeLbjzkp9aabjUez3xfd1Cb1mml4nhQ=; b=FygiVWP0u1fKaFJi3hWlEfJsml B3WPl5DiIMmMp7Ku9Pde7cOXvha0d8AOXyE1x+o8ptDAUoDSqa4I1gqP4VyA9iWhiNQHZ2xP27s87 9ydiEYp2qWMAuAbo70oqTK8QumGXfPUbsHG26YNzOvhk8XgK6K8wEVWe2vgcmEL3uvxhLqidZeB41 MD1I6IHDiQoUEx+vBv4XD416sMnmm/k3b2uYhS1vzmsVmlFS1pI6620DaIy3Wnx5Cp/4U8Uidi/EU OsTRj9rsHokoKX4QblTvv+CnMXuMNjs6s1v6j6vvj/GhmNCsTyxYrx5m7BnNBfdmjmOaLnHJC8DoX 2Cy2BBUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFda-0000000GRb5-3MjE; Fri, 11 Oct 2024 13:24:58 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWv-0000000GQ5I-2VlI for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:06 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5c5b954c359so2402977a12.1 for ; Fri, 11 Oct 2024 06:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652684; x=1729257484; 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=iCNLKfw0M7WpUeLbjzkp9aabjUez3xfd1Cb1mml4nhQ=; b=lqwu80IeipUO8FjSdFCSVH0CcZcSoTT8J4OveoHKZfmPNLRMpGjQ5KQxx9uEX4ZsgC iffblGc1tcbUT6ISq21qP8YmjYSm54omMYpVX+WPK0UglVYzGEbt1tcaMeEz68N6yR4Z 9bT51KFTGW8yO/Fu4AFxpplpJPZ6ClYhmTKRPJbNKJt9bfOSWZysndbNx3r7FGxqeKqD c8VJL3VzcZu1OMUK+HvOkMd+mOiqlXzO59zZmpVA5tJm4d4rAdsZnVMQ+hIGgTdl6MVe VcfnQj2otPJPBhtceazXMWMNZYIixkPZIBM8X20XFE0vcfgeNNkrK2Bc19cL7Ius8g4T 1t+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652684; x=1729257484; 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=iCNLKfw0M7WpUeLbjzkp9aabjUez3xfd1Cb1mml4nhQ=; b=vNcL9YDoNlDZZwuZGX0n40AQF6AR2Jv95brFjNjUmxXu/Ze1qzh9MnAlMVa17mzxvX 4uGQZN9pTRyDvDXhjpjgbISJKTKZbdldMofaBr7IjYjL9gzB1odzZ3pmC1BmJW2IxXhy jbGtXVYLWb8484hZ560drvtVIRgk8r8LLyVOF+zK89bh5p5x7HKoTGtnmB9gMA8XJLUx K1rK2edOpkBBQ2OoEYOYl5T47Qtpqgk/Devk5WwZDkX32pNBRGi826xohA6qdluwiApd CgaRxgMAs3w0dq8MBJNF/6Mx5sygLkfM3fJzfNAheCQQtUdt8AebpzryPrxl+EQ82gSI ck3A== X-Forwarded-Encrypted: i=1; AJvYcCUuTeRQJ3X7WOkab7ROvz3SuOpPhHRnaJ95jEXgMj7k6HimeEERyX6b7B0H4P/qXENjxlEotI04ESGDbnLi0WxZ@lists.infradead.org X-Gm-Message-State: AOJu0YyZsCnPJoFOKWQdR2Kg4ruN3v173HFAaVMyQCsY2ydXEKKESfZF zlBpOOq6K15DN4PNFq+kyPClZh+DjrzdpYtew0lVs49Y8JThnJQ9HGvpP8IQwDo= X-Google-Smtp-Source: AGHT+IFQfR6/BL+UbBnXcWXuHv+Bf9nvEzHpLlQPVU/JaI/HqDVV39oK5GhdoCm9/k00vv50syIxeA== X-Received: by 2002:a17:907:368d:b0:a77:c95e:9b1c with SMTP id a640c23a62f3a-a99b93c1e47mr236799766b.27.1728652683727; Fri, 11 Oct 2024 06:18:03 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80f29e5sm209874466b.204.2024.10.11.06.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:03 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:41 +0200 Subject: [PATCH v3 4/9] can: m_can: Return ERR_PTR on error in allocation MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-4-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3461; i=msp@baylibre.com; h=from:subject:message-id; bh=Yb7+ZkGNEL4O326OlkJgvKGqwn2t7za2oUgItrtB1AA=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VVODT7w+FxYs9OfegbtnYh7vX1my6OWWKDnLPY/Nf 0xWVrpm2lHKwiDGwSArpshy98PCd3Vy1xdErHvkCDOHlQlkCAMXpwBM5LAUwz/NpJMRi159XsZV +DXSxWhz1eH0V9azq04//uXl+jX/wLVzDL9ZFaferzTifqX/NYT/VLTz47fTH1ateGhbKPq+/0a Usx8rAA== 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-20241011_061805_680631_3927E541 X-CRM114-Status: GOOD ( 15.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 We have more detailed error values available, return them in the core driver and the calling drivers to return proper errors to callers. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Vincent Mailhol --- 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 29accadc20de7e9efa509f14209cc62e599f03bb..5ab0bb3f1c71e7dc4d6144f7b9e8f58d0e0303fe 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 Fri Oct 11 13:16: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: 13832568 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 CC965D0D78D for ; Fri, 11 Oct 2024 13:26:31 +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=Qi/qlics3jG9EexkXmJNmMTUpWskqoYCj2V24qVovxY=; b=GZArH7Ty6eUl9ZYMZNpE8xelgq hEoWIMw4/N8Db3VujZq+g42JZs/DRAue7LC5IdYjE7rBROYwx7VvTFeGs4GJ+KQs6yw/Bpwk/ebVj 1RFulpuBzu41gevwB4hwRMW+X0hh+W0rfLLncj/SNgCeMSWs8wI/rlRVAJUYpZkyxhtMFb5JETKh/ FcA/5JE3aaCbRRwKZLFsj89kylVz0QnQQmsbPhPOev9CR4LlEdjkNMM8JqtHLx6DipJVHissY6ejR ed0XePWL1OaY0IgI216v+2R/Q0gjh81NmMdUA427wf//Sqj1fdZA0lfJPAsY4/HDEO4/7Nf0zj6qA dEi4SDNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFev-0000000GRjq-1Pt6; Fri, 11 Oct 2024 13:26:21 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWw-0000000GQ5c-3zyV for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:08 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5c920611a86so2642099a12.0 for ; Fri, 11 Oct 2024 06:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652685; x=1729257485; 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=Qi/qlics3jG9EexkXmJNmMTUpWskqoYCj2V24qVovxY=; b=j/QA1LI3JZQKpfGNE58aj9lv2zh04//sSN++s4QHdqnXm+YwdehJaw7QspdkZ28hZL VcpPAn2gaWA8ewKVXFHXbTz7CFZ+65xTOL8nmf6iwMk28GLqUkCuSaIbWTwm06dVfK0A Y5TztyQGJWNHfVBFjs03vWabDuTZQyA4lPwgxa7FhGLw8dazceAK3zBUC/ArknVx4fEd 54ukszksADVDF6OYqyM5Wqum5SYNh1w7ASA2FGv9iV4PjdPxQGTImrqLqVS8g7JhDtCT Js+Wdappbq/NRJJRqMp7lF+ydvXHsyMUT7RtJFPpAhcBV4qD17XqKOuUGMmSZ4cJQJZX m7Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652685; x=1729257485; 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=Qi/qlics3jG9EexkXmJNmMTUpWskqoYCj2V24qVovxY=; b=kcC1eRazKNYzcDIZ4ebVCrWP/BRhldkeNK9gulcGtjHKaKNkV1WJ1KzxpZ/QhZTBnD 6bXAdo30JkB70lW+xIuG45lPDL6a+zZ8MkOmIkSxXSYMcatETwUf79+iCW69v0TBzGAF mspV9yt4ORRZQV8dHFuE8/tYWDLwwJRNlc25l6vURNh6RkrJRDP6ZyIWgeAwLu9S0r5T 0l98C6LfhaelDB7hmBhYNBHuBNjqe6zCZr5aKxX6itklBOBtUs907R0m5LNpU4dd57P4 dsLLNWvZwz1r3/dtMt3HF/0/hAZcZZV/ShOk/GwEwceMCV3Zc1Qqfj15XbFOF2mauM5H 6R5w== X-Forwarded-Encrypted: i=1; AJvYcCUGVRM37i62eF+QQNVOagM7/8UU90px6hSVT4Rm9SlTi9tbS147vvNt0XM/VXXsM2McrGJyLM914tgW7DeBiApK@lists.infradead.org X-Gm-Message-State: AOJu0YxCOI/Jz2oIXbhiR3us7SkbWQ1PFU/ymG4AXIwyVwd0fkB2MKzC 52ZgHTeDESgTaKbbiEkzbkY1QVTjAFcYogEwmjViqE87FPiU2CEJ12U+bxgM0Fk= X-Google-Smtp-Source: AGHT+IHFHVZb0xFh7E/t9gOKFFFtdY640Gp4pHWzck9QzbrflS9WO8wY0rdkL08vnT39n2iJtnT/qg== X-Received: by 2002:a17:906:c14c:b0:a99:53cf:26bc with SMTP id a640c23a62f3a-a99b96b0c3emr256114266b.44.1728652685059; Fri, 11 Oct 2024 06:18:05 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a7ede845sm214686166b.13.2024.10.11.06.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:04 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:42 +0200 Subject: [PATCH v3 5/9] can: m_can: Support pinctrl wakeup state MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-5-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3643; i=msp@baylibre.com; h=from:subject:message-id; bh=y4cyNWxW+AAMzsvEv+B5MML+u/SjeALajlpD0Ds81SU=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VbN4Bc4uOvxl3u3Gs4oZS6ct2r0/8tr94zIv2l/q/ Su3U1pwrqOUhUGMg0FWTJHl7oeF7+rkri+IWPfIEWYOKxPIEAYuTgGYyMR3jAwL+xfm1jNcO3Jw ttKPR41P6j5MTDfYOr18s/6CV3lTO6eWMPwPXnzaTfVR6Tv3E48qjDevXZJ3afrEJO4NE4Iayk9 /vtzJAgA= 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-20241011_061807_035136_C45FF63F X-CRM114-Status: GOOD ( 16.96 ) 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 | 60 +++++++++++++++++++++++++++++++++++++++++++ drivers/net/can/m_can/m_can.h | 4 +++ 2 files changed, 64 insertions(+) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 5ab0bb3f1c71e7dc4d6144f7b9e8f58d0e0303fe..c56d61b0d20b05be36c95ec4a6651b0457883b66 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 = { @@ -2380,7 +2402,45 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, m_can_of_parse_mram(class_dev, mram_config_vals); + class_dev->pinctrl = devm_pinctrl_get(dev); + if (IS_ERR(class_dev->pinctrl)) { + ret = PTR_ERR(class_dev->pinctrl); + + if (ret != -ENODEV) { + dev_err_probe(dev, ret, "Failed to get pinctrl\n"); + goto err_free_candev; + } + + class_dev->pinctrl = NULL; + } else { + class_dev->pinctrl_state_wakeup = + pinctrl_lookup_state(class_dev->pinctrl, "wakeup"); + if (IS_ERR(class_dev->pinctrl_state_wakeup)) { + ret = PTR_ERR(class_dev->pinctrl_state_wakeup); + ret = -EIO; + + if (ret != -ENODEV) { + dev_err_probe(dev, ret, "Failed to lookup pinctrl wakeup state\n"); + goto err_free_candev; + } + + class_dev->pinctrl_state_wakeup = NULL; + } else { + class_dev->pinctrl_state_default = + pinctrl_lookup_state(class_dev->pinctrl, "default"); + if (IS_ERR(class_dev->pinctrl_state_default)) { + ret = PTR_ERR(class_dev->pinctrl_state_default); + dev_err_probe(dev, ret, "Failed to lookup pinctrl default state\n"); + goto err_free_candev; + } + } + } + return class_dev; + +err_free_candev: + free_candev(net_dev); + return ERR_PTR(ret); } EXPORT_SYMBOL_GPL(m_can_class_allocate_dev); diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index 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 Fri Oct 11 13:16: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: 13832569 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 8575DD0D78F for ; Fri, 11 Oct 2024 13:27:51 +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=Vga3MOZfmZ29kxHJN0FdVgZZZBaaChAjrwFcDU1qvO0=; b=wUdVgbil4+oW/t5866SNoiUzfp NOBE0CtUYR9pyBXbb3qsA95pUAgia70TNwxoAuZG0aRnjGZlIzYZHLsx3BgkN+fb6C9q6kXP9EKNP 6Hvmj+aMkfngPsqgjCY6L2uKjy+AF52tHL0Ypgi82ruITpvaA3ykINq0M5r9fo8nMLigklQRS7CBX ROzeFdhw5VpY+Y21yIBhIy4oLJIQhb/WlBPazKjS8Jkh9yARaHytalSZ9TKPgAuB2DwF2O5Yp4QUI 56QBKiPHqcw7NP9r/Fn6URZ/cjiJsRO1nPk45AkRmzapxlt6EPIF/X4ZxdhROdBTQOSKokxdD3ThI Iw+IhDQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFgF-0000000GRsW-03N6; Fri, 11 Oct 2024 13:27:43 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWy-0000000GQ5k-0huk for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:09 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5c918c067a1so2480942a12.3 for ; Fri, 11 Oct 2024 06:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652686; x=1729257486; 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=Vga3MOZfmZ29kxHJN0FdVgZZZBaaChAjrwFcDU1qvO0=; b=jkBQsFNvdkBQMncNbYKUek9VNDLbraebII+T6dXGO04S8+H0kT2Oi2RsHaFNS9629R oMzLlg/LqBpphxBpgjJ3gyiP3ZYgY6/StewUlhNJG6Q2xdBcsg1FbE+RxGKmQvN9HaUx 4jr+xVtYklgHz6CLQK5T5kRWoHR1a9EZJ1nuEkr4ZPnriJtTcufxvh3Tlqmna63D2C97 auqPrIezmvtUXtteqmB3aLBswQPc/GoGKHnElfZPjcnaH3jIwS5JEJQzhgw/Y/gHSIHR vHc7bqCZCrtAgGCG4DHlLwYjhX8wnDL6KBPZ/un/fau7zN3ezMWTZwtdge4uJzAIje5R ik/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652686; x=1729257486; 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=Vga3MOZfmZ29kxHJN0FdVgZZZBaaChAjrwFcDU1qvO0=; b=k+hJWQ9lVvGMynjHRNiNlWp85fHBnbDflP631Cf01EqejxdS8Jq4ijh5319MgkhRwh PDWeSB5KsfUx6L0f2BodfkO5PTkpI+Y4+wEAAaWNbRrN4aYiPfHb4eKIHz/F1Im4r6MA dQqZ7Xd4Q6MeN7FuSjWA6weaRNObW63SOnsYPzaoT4ZW48draSfkwoiQlj5VvdzoAWnw 0BwE1w68ao7QnQvZeqteas3iJHkQe/nB7S97hRPbPOpqFtEQRgKd5WnrsOhUivav9L2I icw04Kxu/YEAQIRDjqaJMmuHudhgd7P6gBrdEKsly3E9jJbemuS/Rpmb/4EANbwCBDPh 9GUA== X-Forwarded-Encrypted: i=1; AJvYcCUUSTKy2llwxWSBc0NM1AZXdtrLfJFgK29BKgY7qpD8KMASDgVp1VKZ9gXtbS1Q63PP+tzARuegNggOnc23UklE@lists.infradead.org X-Gm-Message-State: AOJu0YzMTi6nUntDbL4uTD3xydcPfYS92DNlhEdWyazjZqHWcExDPMn3 748i6S7wlixw3ADJXH3lrrEk5sSEfsvWLLhurJbdZRAEOOJzGCNobpAXDqkbHVVMMYcDt0xqSc9 2 X-Google-Smtp-Source: AGHT+IGgoWPy1ViOIak8PVBnyQlhX6rbT31r7c6raHYXCjGwe6/3JiHlA5M2yM504nFnhQ1ciPMqXQ== X-Received: by 2002:a17:906:d7d4:b0:a99:75bb:a37f with SMTP id a640c23a62f3a-a99b95a5e37mr203682866b.54.1728652686348; Fri, 11 Oct 2024 06:18:06 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80c0133sm210634266b.114.2024.10.11.06.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:05 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:43 +0200 Subject: [PATCH v3 6/9] can: m_can: Add use of optional regulator MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-6-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1195; i=msp@baylibre.com; h=from:subject:message-id; bh=ulDHdao8BTiFyv+Pi61bMFlLk5gdDHQrGY9errmbLQE=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VfP/1iQ80tPZ75Kx42dt2JHw94lrkh/uVZa2XML99 v6+rWd/d5SyMIhxMMiKKbLc/bDwXZ3c9QUR6x45wsxhZQIZwsDFKQATuVXLyLD4/Qamp91bjJd/ +bJx67HC/O3nY4zkqw39JwjdjzgdN+EBI8PuazdthD6er/qTfdYjL+jLCa5HcY+VO9/fKOCSXMS s3cwMAA== 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-20241011_061808_252257_901D80CD X-CRM114-Status: GOOD ( 11.78 ) 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. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Vincent Mailhol --- 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 c56d61b0d20b05be36c95ec4a6651b0457883b66..b009575354cf5f19e93950bb17d448f81609aae4 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" @@ -2383,6 +2384,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 Fri Oct 11 13:16: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: 13832572 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 30F79D0D791 for ; Fri, 11 Oct 2024 13:37:59 +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=Didba9PBFBGaEa+Sw6q7stUgT0 sO2BdDCmjv+Bozh9OsmhCgXfwUhisX7Mnec/2Ykqla7YhBJwvBgMyQeS/YYatsjqp4gwcRrtYhkJA itqi8TJ0A08GeMydWBNum7CPBnj11Vrkri65BGZleHxxkLHnY80VhoNkIt3+G91SZCs0AUX+htolW 2Tr13g4LDis5A2ZU9bEpvCFhaES5CygHbR7kewphoKGgbUBzcJjoXsidQK2NDnaJr9XOCPM6OgIxD fsFvnp/9fNeAscznKVgwwMHaopgm3C+xA/lh4qO8OPeQ0cCepH+/RF5r6dxVrd73wiwn7r7NRzi2l WoaMOovw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFq0-0000000GTZr-3zWS; Fri, 11 Oct 2024 13:37:49 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFWy-0000000GQ60-3g94 for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:10 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5c89e66012aso2850441a12.2 for ; Fri, 11 Oct 2024 06:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652687; x=1729257487; 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=wKAi+0VTg+QVrMcMYXsMBKi4PMwISXawqdfbdxbD6OJiY0xBZ+5vO8PmSoEFlcF4Vb OR6Z20ja2VN1W2X0SrzYOOffc1VrAosGvHaGcH2C/NMWFiY32ymyXyYpsNE4JDsKPUdg ld15AJx2FsekQooc2ApasAgBPIsIcgkJ/hnQgX+Kl4+xim7QbXEgmvgLluNt6Rgb/jHV 24E+Z8/Rb7p0dcivSw6sR5JFdvjjmbqgsUXAvn9/i3hWj9HjX6P7bB2nNRR9+LLxYVmk THhJsik4M6jNlTdEW2I3fmg3XLscKikIr98mT2Ym0Q1PfOT/ylGO4wchNdmmoYXJgUlR YwvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652687; x=1729257487; 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=IcTHtvrB9NAICkkxsjYh0mBAdMD0+p0HI0yssmqMEUrVFy3B23QvjuqtGv2aeC14Vi YRrfdOsEV6wVrX8uG3cI/r2BIkbYdpiKWvDaEdSzieKPrMaqzrCOdqpjNY2DqdukL8XR r6dDvDMbWfYBAyPjuANwlywPSihcJd3tF+3Ff+qAAbMLWyPHrFtcrx3IIZ0Bm3AlKnik /ZiuOktXHKGKRiN2eUxwSmLo84zHdUNKqiY4CscimVm1YqFWfMgaOUr2vyfm8wEnyUJ0 +Tk8Vq1Ql8i+tvuwqgDLXjQRCEY6wu+W/XrdMve9bNLWHHBpJmwHKTGnIuX/WJdud7CU w26Q== X-Forwarded-Encrypted: i=1; AJvYcCVHUOB0zo/lj3KBJV+SNPnSiDdARaIDT/vxs/jgsPTOcr0sH5QPgke/LiHM9APNLP3kVr4VY+Z7/s/BhOJbkTlG@lists.infradead.org X-Gm-Message-State: AOJu0Yxb4dK2yfdpxWkpith7Tim7RFTfdu8C8iq2Riu0YbQYCMl/0xlq kqfmbsRBtLc581PciMiUio5fBIOrahbE+Q7aYa/pe3e86qZr/7iJmsHZ4RwXZDM= X-Google-Smtp-Source: AGHT+IHbDGF9CwONYy7YWYnq2FZ03Xgnf8reWi/jbzYRG3jSk4wq65+x+A4vLhSV9xJFaORvZ3Lz0Q== X-Received: by 2002:a17:907:3e96:b0:a99:6036:90a with SMTP id a640c23a62f3a-a99b93f9128mr214915266b.14.1728652687535; Fri, 11 Oct 2024 06:18:07 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a7f2c1f4sm211948266b.87.2024.10.11.06.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:07 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:44 +0200 Subject: [PATCH v3 7/9] arm64: dts: ti: k3-am62: Mark mcu_mcan0/1 as wakeup-source MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-7-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , 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=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VUtUg8TPHv/TlFH/510N68/nFlVOsSWXXn25E9d2X fTXbJ8rHaUsDGIcDLJiiix3Pyx8Vyd3fUHEukeOMHNYmUCGMHBxCsBE3pkxMuyuv/7pTk3DfCmj q4zRzAZbV13y8NfRFpxy1LrgT83Dr8sY/tkXhF+3trroVswxr3JqSf6DTeHxOl9ZO4xXN5Z9CM2 dwA4A 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-20241011_061808_949996_4AE0F6CA X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-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 Fri Oct 11 13:16: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: 13832573 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 48AF5D0D794 for ; Fri, 11 Oct 2024 13:39:22 +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=ZE2slO6hh2KO6+lZC78QqWOBF7 9+xAVEnPjQOUeIq8t4ryRqE5r7vgvjCqMKZ+dkji1N7spSkQLzJ0piSXD82VlWHDhinEoCMUCECcx k3Qw2ZyZPj0IsjkmAMvlt//8iiir6rebQZiSvEw3zOY72FE6h5ad7n/koHv4b5Wa0Tjdyb60/zmck 1XsGPHLEGsaZBWVtidP7f5obfqd5FiI9TyuC63UGg/AWmiOAdpqNlvwDqSLUNJNQmVWM0NaRqYWDO +1kuWLO46l3Vf/9zFiY4vTCWGhv13AVi2W/VYPnyZvBSRWrkE+IW0b3s5JBS/vimG2XOQbh9NCva0 SImNmdhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFrL-0000000GTiU-0R9v; Fri, 11 Oct 2024 13:39:11 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFX0-0000000GQ6c-1xQb for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:11 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a99cc265e0aso38020566b.3 for ; Fri, 11 Oct 2024 06:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652689; x=1729257489; 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=pRSrJPMsvuKuESHoYbGsHr111Iq/0nsW2ZF+iZE3tvH6Oodnue0M+ma4UzQOo65TDS 0yqa3qnwBIXTVqsc38XwuaIyXi0CxjsLnsDaRPFgNdYN8s8GWQQfl600JlCPvlWjsuIF lNW8Ll+nCf0+U1Rmv86qhOnq/r9WPSuxebU9RkTzB2d3DVVNSwqj/ZPiP0UXF5GOmk4w SvcQj8R+nQDv0N+1m/OFtuQHlvgwfWIRzuOPchTQIs65bVZ2VZ5IZXrh0C0mIDjx0ki7 FdG3umCR7GVlAdo3qTBPJ2T3f11BFGZhYo1LUaHFlzrTt2gAA8E8KZRa4lO9IRxgl/WC zkSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652689; x=1729257489; 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=b076sHAVejnd1pjv14tDBJrclm+akKXgaTN3ziYPfqvKgExG/e8irjl7U9HI/Hpmuk 3/ZLmhEt8aS/L89LrqDIGeRSbhqmFCSEfZ5nF32cgCRSA8K5Ee57+ibobdjs0Dkag9aA AA53frLhJhBt+azPe4sqjJZbFxc2dkNZoRN2KaTOxwloDJPWWmfXAdZDX+LbtBY60Twc q6KhqOCdxeFlK8nUTSoGN19Ea5ukJgXXmCF+Xd7OKvINEa9Zu1sR18xBuA96NwgSRMjP +kFRHQY1hxPl92mvTLCZVLmbWS5pe2OZzohlBIzF7ekX8kKYNPpU91k8ZQ0vW7tugOCn bx0A== X-Forwarded-Encrypted: i=1; AJvYcCXWA83r5b2wsUpbU+tFkjyqeBcHPSZoTSCMd4uiK5lCSnMAWUITWCrGH5WtTMg+0vAri4LlF/5EcGaoKT+m1Gou@lists.infradead.org X-Gm-Message-State: AOJu0Yy0G0C5Sb12kzKT3CdmlpFFWopNOAkT+wXXMu+YOnLyLI5JPv1e Ux1Uas/G66PxpM5owB9ZAN8QPRpBxHkrHZGJ1DHObd2B0hyCGqZ8CcJLyLYFJps= X-Google-Smtp-Source: AGHT+IF6or/njoSxhm0D8BdQrW2GZjoT6sIEIYH2TZDtF/FK3l17TAI5/Lscld9FDFFxOfxNeFGvEQ== X-Received: by 2002:a17:907:6e8b:b0:a99:a48d:4470 with SMTP id a640c23a62f3a-a99b95af2ffmr174995366b.54.1728652688826; Fri, 11 Oct 2024 06:18:08 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80f6691sm212214466b.222.2024.10.11.06.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:08 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:45 +0200 Subject: [PATCH v3 8/9] arm64: dts: ti: k3-am62a-mcu: Mark mcu_mcan0/1 as wakeup-source MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-8-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , 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=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VaumPFevL/GJc1Bqi99b2vSuSSEvl7t2SwdnutRBf 5lLemc6SlkYxDgYZMUUWe5+WPiuTu76goh1jxxh5rAygQxh4OIUgImUP2BkWHbqU4w7p9N2kfzH j/LV+y+k1V1ccdz7UXay9vug7WfqljAyrEmLdXe2rH8iMnfW3hV9Sa8ufD/ecoOd5afCk+38F9c p8QEA 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-20241011_061810_540255_9DFDD705 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi index 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 Fri Oct 11 13:16: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: 13832570 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 D2936D0D791 for ; Fri, 11 Oct 2024 13:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id: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=S8sh8Hke45mqFUn2i+uNoFLbg6 zYQoQkNDFQisyIYs4qFAzL4pAOTLp7UCzNZvPph5W+OeM52sIeAQeY/WkQfp2FF2aDz7mLvRvGQoO pCpMgVxs3fDoGTxcaArgMwkaC4aTv1Rrzp+re8Vsuuqkr4gqE7LfV8+UbQg9aPBQ1F70ET7O7B2mF lFCe/P76BG9pF4Vbln+Q/O7VRdPBuAKRScAMZYcMyC+KFJVw35hZ2/E5D4bufKRUwlGChiOQx2GH9 2tvR8n2YAm+vMVaCKu3pfHBi2rEkx/kue+TpscLLxuuWruwvmA4KLcXrSUA70WyGq5qvzall93I89 HPZEPNFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szFhz-0000000GS4V-1VuQ; Fri, 11 Oct 2024 13:29:31 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szFX1-0000000GQ72-31Ss for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 13:18:12 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a9960371b62so230342366b.3 for ; Fri, 11 Oct 2024 06:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728652690; x=1729257490; 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=lYz2HtpVQzGNru81wEa2NH/HXt360n0SYKImMlM+FwJw2zMTta42vbZ8ES9R8xaLU2 qix7Tis4rQJzgStdNbszqCTHI53UtIv9W7zOhwcoXAI76d+C3qM2a80bZkglD6Nk4Nmd LvorO+3Lf+3u+Rw7CamVTj90pcF4EIvP7L1TDovrbim6u3yx/a8F/TPcVmnsKHqkHqCJ oB7G+CKQNfXa7pWnz2IaXtShV7+CTzX7pz8iUj0vxFwQsB6IKv/hgcOKsWOQB1AjurfH VnuoOGz+GN5XfDBFIXjgSVP9zJVV6mF+LLWX8tixuB7dEWRtwotEtpPLcPLSiZdlhQTu WjCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728652690; x=1729257490; 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=RFkBV4yp4DnuGnOUguKxg2heotehyDGDDJ//tP3AUHNCYzoZbiu1vc6yQSAqcIfUCS Q4pJm7dl/o/KOsYJnVYrlt3g+MSB1qlV/gVKVW51qDHWNaCPH2QqXkB3b594SJuJ4JNu RktiRY8+BtrcgbHJt3RXOrlHGw5uv1u5J5dt6rSvbhYK9TTOy8fNschqUVthsJJsoftG ey0xEnGAoc0c0JG3TfdvWxPUmE7tUkDWxTTV3xDDFxYJFu6KodyiEH7UT0fL6MEMbDLI bAG3euPzhqENMgcOjBI/x3t/DNvjkjN3AVU93tHpzqw02fajRzHRrv9YY3kSY+GXOn7C AYYA== X-Forwarded-Encrypted: i=1; AJvYcCVQ6OYKvyyn2styFXwyzp11IV8lVFor97CnZgm5yUeC9euyjOCH5aN+X3VE5wyAn/aAYYShsidkBejJ21+Lh2TT@lists.infradead.org X-Gm-Message-State: AOJu0YzRcv/9u5ZyeFAYvDchm8KVdLwdyt3fKZjFkfK1cS5JjOVJCwWN Mc2l4D0Thcjtx90Phy4zarFGN/tcj0N84AZTIuT9iEZgaH5wN08QzoTiYYYZy74= X-Google-Smtp-Source: AGHT+IG0Ub6gDX3IQh/3prA7jVWpquOOtRd9X2EDWha7QdWuTYm6Hzp02feEX0uQQCEAWTcDfR1ccw== X-Received: by 2002:a17:907:7290:b0:a8a:78bb:1e2 with SMTP id a640c23a62f3a-a99b9415479mr218657166b.6.1728652690098; Fri, 11 Oct 2024 06:18:10 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a7ec4cd0sm211838966b.1.2024.10.11.06.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 06:18:09 -0700 (PDT) From: Markus Schneider-Pargmann Date: Fri, 11 Oct 2024 15:16:46 +0200 Subject: [PATCH v3 9/9] arm64: dts: ti: k3-am62p-mcu: Mark mcu_mcan0/1 as wakeup-source MIME-Version: 1.0 Message-Id: <20241011-topic-mcan-wakeup-source-v6-12-v3-9-9752c714ad12@baylibre.com> References: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com> In-Reply-To: <20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@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 , 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=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNI5VesfX6o74PpSpyl1L/cP79iFPs5N6R87zlVHrVbf3 ODYWdTcUcrCIMbBICumyHL3w8J3dXLXF0Sse+QIM4eVCWQIAxenAEzkqBTDH267DWZMkSz81mtV Hp0T6/9llxKY+8oi5irHtw9iRw4GxzL803umPvUb95Zdl44X/oiIijizXULx9rOMx4zSbI+9ZYK rmAA= 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-20241011_061811_812424_5D90A175 X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Vibhore Vardhan mcu_mcan0 and mcu_mcan1 can be wakeup sources for the SoC. Mark them accordingly in the devicetree. Based on the patch for AM62a. Signed-off-by: Vibhore Vardhan Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi index 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"; };