From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2936A21859D for ; Fri, 11 Oct 2024 13:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652683; cv=none; b=Dya74djqJcdY+odft3HNCvA7b4zWPQ4n6dJD5dgJ+4up1SE/Qykh3vzIsb++/mUkAnC098oHOqo5uXTTTgPaOztrGRqQQ8dfa8cfZxnB6UkedvfyMotLKYXmbGeChbei/aEVO/IxpAz/IEvA69lqTM/vpGpbIzyamVSaZy4wBpI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652683; c=relaxed/simple; bh=tIux4Jo7N8fDpXOCI+Zhs5OWS+myGS4fEvh1G5nNm0s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aWSyqxDy+/ERqxB3yGBOm0UI7oalfFdG21dcdzHqfiUABW/54h2ED5So1R3xglpeOkPZ2ziFnz18/I0c4bh0L39cUDaTPLqzuBgMFLa8PwHdwDwts2K2unr44NJLfzp/j0tZcOBDz5C2Lee70x74bLf7WmozM0DaqwTq+KOPvz4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=scQn7Wxp; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="scQn7Wxp" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5c87c7d6ad4so2797343a12.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=vger.kernel.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=scQn7WxpS8KXqCDKDwZqzrUt3Gilwfdqiz1KFkqfVLA5bQy4qB+h9T4ke6UeO5j/o4 HouUMR+1mJMAarLw+s/Ie4P9Cxxeutsi3J9dSyUlIQkBtl79nsfB24bBfIMaDgmm1hD9 DsVdzVJOyrbsf/SHhG5PakSanlqkzoviVsEK06j79d9GP5ANyzZI9d0hSADbEIQLjYBj 89he5RggejuFfGe8EAOzl0YZalUoRELc0I3KBuUW7WxjOT2CMT3sKsyjrndmoUE6O6Ba fJE0Vb1S2eT+BfX+tnxmStNUF35UYGe7KxtYWrLzU4KQBJMn/FvctM8q/WIQp5Y/eTuA 06zA== 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=wVKXGzZLhtw5DOOU3sblomNbiphUiWCwRRfSyAADj4N3WZAp+DLZPc/3ZGd3XEsJ32 O6jdbTDkYO/XYHD9p02MiZ2f1SKBOFBu8Ym4GCqkuzLwSuPcwPZUUu6Hh2wxdVs2w5NN NYgJtUbDy0YoN9bfa3f/VWv6kRWSZRh/BTQ/xV4GKQ4R7C3FQ1hX54N+HC2tBM2EWLin yRbgAu4dXaYmANAnuzHgZMHhSxQKjvaTUTIAHC8M8/JeV3ZHZvObong3sykRJVO5/uWG E3tsVjVKELbZ7cL9bwu9fzyECBeTJYmhD0eCFWSu3Xs/sMNcB70BF/Px3P1z3ztA7S2+ kcHg== X-Forwarded-Encrypted: i=1; AJvYcCWtNn7Mz3296fLNCo9GvKwAumY1afQ6G6BWeYC9E95q8pQm03Z0BOXGyeRbUNe7wehMdwIdeVZD38sA24U=@vger.kernel.org X-Gm-Message-State: AOJu0YxTv1rD/xoY4RikW12458YvjpxPcLj+VA++1iiO8p5vTaTrFkPR VNYqcx7L2hFz1YHd1REPT6rfHcJAVONCEsFZx7HurJ/fRowODXIECOEJNl7I5fg= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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/D= ocumentation/devicetree/bindings/net/can/bosch,m_can.yaml index c4887522e8fe97c3947357b4dbd4ecf20ee8100a..0c1f9fa7371897d45539ead49c9= d290fb4966f30 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 =20 + pinctrl-0: + description: Default pinctrl state + + pinctrl-1: + description: Wakeup pinctrl state + + pinctrl-names: + description: + When present should contain at least "default" describing the defaul= t 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 =20 + wakeup-source: true + required: - compatible - reg --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD783218D6D for ; Fri, 11 Oct 2024 13:18:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652685; cv=none; b=kn1Ne/UXDGx8NJdHlrx8rRPSUzN/Wtuwj0SaXmsiO9FwySabhM+BAajmL/1V+6IcbNJsg5j3s2XqOjUvKKMjtAAxcWZ4NZgsIY5nZtq2NBwgz82rK1LsnN4b5Lerb28TtDlQcD0Z6Xn9EEmsNvkeP/bVULW8W5gpFVb03Rryp6U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652685; c=relaxed/simple; bh=+BpLo7wO0S5E5+RxGEZ0j27kNVjU0GbulquXMEn7V2A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O2JiMDCeR+Z7RmUxWofh9N6JPdohbLGdDvkDLucX98vGQJFIvcBzA/bypU8xoWvxfbtO1idB37O6e5SWOU+IuIRM9IVBl19KuA5xipwjlotNo7SdACC9g9KFoCnh8J2i093BDRdYxl2f6LAKk7BuNLUw/UMrUwxaVR1TxiggJO0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=itZiZ01h; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="itZiZ01h" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a9932aa108cso309823666b.2 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=vger.kernel.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=itZiZ01h6nh8DDf59DLxPnYIxCrRFIbT0Yecz0ZyGqk+fuXSrEsX+zMt95FQoDsJ8L 2cTcu6sFqvbK4D3Ye6RMinA+KM3AFgRtekZBR17dZwJa/bQOquN18Wu+CN0oJ4927Tmd zfTM9s33PG1NInqbKaEmNXPRb1VjciqASZnIgLsm93B4krj0IrIaIkYxYv+22smY8wD9 mO0V+Ne9v30i82hTGpaDidYKlNdzMQOOxg0RMCtSN58M4DlaHqQznYHwh9/9e4bpseBP Zi0mX7uTk7UrqFY8vmnoQwNqxzZ6PiyIjy5kwRwvor7bbxMYC0EL13NV5iFUitQEJi71 DcQA== 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=xIiHdLhhF2xg7JTRaeVv0KfEVgin56NQrgk2rYxDvf028ZXe36JvKaEv+9ffDYJO5E DVD9kY6LNAYmsLf4Xz2WoeIn5wXcq2GrxXtndmdh8vjSdsciWistadfWJ2xhfNSo7F/l xcViC1kKgyoum7ANXR746aI4Nj+dHm8qlpokJv0XuHOLYLciVwkziNmt0fOd1lRXWvCf f/IZvBmgnSXG9zPiDqcwE/tV64EhxqjIMTDtGwVvsaSoznz8sAciRskD507vyaXA86r0 y190kQpD6mQu/r60aDBrZeZPINLbIMwzxhPQz7UOi74EVz3d2FfLZiqCCrHNhynAg5W2 y/aQ== X-Forwarded-Encrypted: i=1; AJvYcCUj2llO2v/WlB2LRHVKSHP9VZHbSKj5r57i1WRb+gRYKLHvG7yHYs+vmRf1qzIC8WxI1s+86/4Do/E1ldg=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3ccKbCMyP54PpsC75WMwJZYGM9qpVWY7Qu8tvE57Y1EO5H7Ey EWPwEwpEADTE1NLsAY4JwxlR2+ComGcj6QoP6VKOtJwj/JgDUKELnwhe872IBvY= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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/D= ocumentation/devicetree/bindings/net/can/bosch,m_can.yaml index 0c1f9fa7371897d45539ead49c9d290fb4966f30..e35cabce92c658c1b548cbac094= 0e16f7c2504ee 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: =20 wakeup-source: true =20 + vio-supply: + description: | + Reference to the main power supply of the unit. + required: - compatible - reg --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF8B621949A for ; Fri, 11 Oct 2024 13:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652685; cv=none; b=Fzmmd2Lbpgtvps1MYCRupQc3A39xTQ7DoGxo1b0fi1CCqi/BjEBUsN+qYHJigej0BkqOKrYTHCSz0ImHTiuqqmfD5sO0xMQ2yS5Kb/mi0YZYAmlMaP4NCGCRwH6tX+3i9nMV5wR3NxKabjOYAZx1Pn72NtxkGdE2faeu1gp7o34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652685; c=relaxed/simple; bh=cwyU19cQrq3CFX81zcGwso0Vwsxh5WskwRCVqlVQBpY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NRFq2VQ7q9iS0DE+l6IPbHgI7KbYWDWFUX/MiASXycQ2NW/c8WXb1C1W0NceKdMswZHf2XlNEHZ3fqI9evZOew3Cm72d6NyLjY7qMSXRYGgYetyjA1EQIDnJ6md2K2xq0rAlSuJG+1zNADikF4NRc5PXmhJsyGiNoS5saV+r+sQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=mc42f60X; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="mc42f60X" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a9943897c07so281699166b.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=vger.kernel.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=mc42f60X8a/b00gOdY/nGotsyNSbgFvSUKYXnSXEWzqjTk/2ifXLA6kfSI7VoDMjlR XN4nS4N4xKKv+0TKPHDHEi8cI8d3dj+aInyNlssOZWF8Mo2AkFZKXO17Yg7yH2nIvkVK 0bI4BOhc91VxMJcNnxZGNV+8bYmWu1F7rzH/dYH/pQvjPTgcC1MjYnJn7kR2iyW1MUgz Cjs8DoD4Je9kqX6WlCYFm4KyLoWO0dP+7qxsFiz++yh7fvJqO3UBsQ0B+t8N3Sy0lHyf 0FEHXhuVQj4/12/xdC6/fOm51Ka4M5pCCkC+udaHkzjzVKIIh2FAD5krLotCkGxahNoy uYtA== 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=jQVMI4bty/CU3R77vhS7ByZEvy/mrjxF2riSK/iqlku7gwhIR1YEZ/Ud7p+xCAILfL v+ClPWv1Gj0lIchQlT79Kvg7BvBStU0iJ+27e968gysaGKy4X6EVr4ELOtLR3g50fl39 Unuz7VqwmdAFZ1FxZ3PZXW5LViFkt4SameM7d9RorK3qhzveUE4idYhF8i8zr1CraXLt bmcAFHgPsdLU9UvUCy5b71oakNb4e+GewSoE+TprGN26uPgzmt0HOBOer5/9aHTkPIVu NGBoeWI4M8RCzfAGPozb3HcbvbGYiSEtln0EA8LLf+9kFNi/xaRo5HbLK0JT5jG/I8av FtCw== X-Forwarded-Encrypted: i=1; AJvYcCUtilKhNQXfH3zJySWYzcRfeyK5f4wefkRzDqbyJNQWvoUWLwl9SShm3CQDI67vekGP97g4mGLWcDmJkHI=@vger.kernel.org X-Gm-Message-State: AOJu0YwWFpBC6lH5dlOeeFveuKNP9RA9d3MMIHIXdj1Rch18OB8Abckw 181E+OP2+G1MVCoy4b4J/2mGYMiBwBoYw2H8WHF31QtBUHl5wFvdftAENM/+UqM= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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..29accadc20de7e9efa509f14209= cc62e599f03bb 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; } =20 +static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *= wol) +{ + struct m_can_classdev *cdev =3D netdev_priv(dev); + + wol->supported =3D device_can_wakeup(cdev->dev) ? WAKE_PHY : 0; + wol->wolopts =3D device_may_wakeup(cdev->dev) ? WAKE_PHY : 0; +} + +static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *w= ol) +{ + struct m_can_classdev *cdev =3D netdev_priv(dev); + bool wol_enable =3D !!wol->wolopts & WAKE_PHY; + int ret; + + if ((wol->wolopts & WAKE_PHY) !=3D wol->wolopts) + return -EINVAL; + + if (wol_enable =3D=3D device_may_wakeup(cdev->dev)) + return 0; + + ret =3D 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 =3D { .supported_coalesce_params =3D ETHTOOL_COALESCE_RX_USECS_IRQ | ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ | @@ -2194,10 +2224,14 @@ static const struct ethtool_ops m_can_ethtool_ops_c= oalescing =3D { .get_ts_info =3D ethtool_op_get_ts_info, .get_coalesce =3D m_can_get_coalesce, .set_coalesce =3D m_can_set_coalesce, + .get_wol =3D m_can_get_wol, + .set_wol =3D m_can_set_wol, }; =20 static const struct ethtool_ops m_can_ethtool_ops =3D { .get_ts_info =3D ethtool_op_get_ts_info, + .get_wol =3D m_can_get_wol, + .set_wol =3D m_can_set_wol, }; =20 static int register_m_can_dev(struct m_can_classdev *cdev) @@ -2324,6 +2358,9 @@ struct m_can_classdev *m_can_class_allocate_dev(struc= t device *dev, goto out; } =20 + 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 */ --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68B41219C8F for ; Fri, 11 Oct 2024 13:18:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652687; cv=none; b=RhM2Adoaw4gVZcg/uwamwErt61Mj9OQgyQqU/+49952MkLEhhsdRTsSSBuZ8UjreHbz2Q+ZhVvrps81wiy6x/07UeFqvUk47m0HoFtdTQCVCnR2EVWq+gYy3lJ/VP/rgApqfKsThiyJI0C0UpFV0ffJr9xBVav4JQO4CAr8LWC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652687; c=relaxed/simple; bh=Yb7+ZkGNEL4O326OlkJgvKGqwn2t7za2oUgItrtB1AA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZJQzuTpRtWXIp9cZsg+ZBiRKzcqGFiGF4l1cD8k0vExWRirWk/zaYTSY0hpxRCDZGiRaZD+7I6MJb58kjXRBhTqnizDq6ukLkNeVlmVUkaTlkj3KgjvXIOmx4b9rDAZK6F5sxzLYOm9CsWUi49zp7HojmxQpoLTdkQ3AH+0dsYE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=gIT8a4Wa; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="gIT8a4Wa" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5c89f3e8a74so2677092a12.0 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=vger.kernel.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=gIT8a4WaxjpgHu8t4LniuBQw11N/vH8shdIn2pYdSwX2nK7RwYN7158C2st0sy7W/e xEf11Zrxqs0NtIYOdXygiYihJ1yObzEfN6kex/BdK/8fjoRlay21GEacRLhIZe4c1xew tD2xth4Db/NSB7mjifFxEJHLfchg7hg4aVd+/zkVI/Wk5EeY5RnNwqQQBKsMPK5DAHCl i713F6zihic57uk+y6WNsLE6Tgr+OCbRhVTraLo6wsZI6RRucAWYor1NbzxSmmiOi6o4 gP+EDYWeihxnv0zNnRDJFrGdR0d9XWtvOn+VOvRzbuwohflT4aiFENS/w0wX0WdLPSha geug== 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=SxA9foYKifILxrfKCWctZlNhgNlTMvYvrXwRFy/TY/fAo8xF+D3uNBFlsDCpzzp/CE jYPo60GyBVbB0zsgsSWFq4Dkng2zle92wP9+9Q42xUqjpAQ2TqU3mabaPw7ZaCU+eWwm Vc9NYEzbD/hB0Z9iVTRDs5mPo2gLAdCC3LGl9FObgBj/ysYgG3o+Ab4Lz4neB5LRBvUu TU8t6mO6U91HU85IKz+lBTKCIqK4BiSE1KA9C5PQeq33lkqHqdWMnUDkKzeJNXZwE/J3 RkvMHFaLWGAWFl3GLh4R+09Tj93KAMrMULynQrtC3tTK45T6LygtGQa51ObBGgO81dxg fnHw== X-Forwarded-Encrypted: i=1; AJvYcCVBYmlXU7G276ujzWFeQROKHwDB0V1NZs7L28Sb/aWSgw3VW/75cb7QIUjKKheEejK2lL//R++QGHy9zdQ=@vger.kernel.org X-Gm-Message-State: AOJu0YykKHdxSTn1Afkc/bDiN4QBXj8iPkUg2J2DpCwz9ujADwOeABNg v39BDBKmPdj2u6DRBrUSF5dJ37K6mHcWJ6RA833JLXubTEHdAc9XRCsmpAxAxpU= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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..5ab0bb3f1c71e7dc4d6144f7b9e= 8f58d0e0303fe 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(struc= t device *dev, sizeof(mram_config_vals) / 4); if (ret) { dev_err(dev, "Could not get Message RAM configuration."); - goto out; + return ERR_PTR(ret); } =20 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(struc= t device *dev, net_dev =3D alloc_candev(sizeof_priv, tx_fifo_size); if (!net_dev) { dev_err(dev, "Failed to allocate CAN device"); - goto out; + return ERR_PTR(-ENOMEM); } =20 class_dev =3D netdev_priv(net_dev); @@ -2379,7 +2379,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struc= t device *dev, SET_NETDEV_DEV(net_dev, dev); =20 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_ca= n_pci.c index d72fe771dfc7aa768c728f817e67a87b49fd9974..05a01dfdbfbf18b74f796d2efc7= 5e2be5cbb75ed 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 s= truct pci_device_id *id) =20 mcan_class =3D 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); =20 priv =3D cdev_to_priv(mcan_class); =20 diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can= /m_can_platform.c index b832566efda042929486578fad1879c7ad4a0cff..40bd10f71f0e2fab847c40c5bd5= f7d85d3d46712 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) =20 mcan_class =3D 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); =20 priv =3D cdev_to_priv(mcan_class); =20 diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/= tcan4x5x-core.c index 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..4c40b444727585b30df33a897c3= 98e35e7592fb2 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) =20 mcan_class =3D 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); =20 ret =3D m_can_check_mram_cfg(mcan_class, TCAN4X5X_MRAM_SIZE); if (ret) --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C66AD21A6F1 for ; Fri, 11 Oct 2024 13:18:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652688; cv=none; b=Md83ZHg8aBtAS/CifcH53MOpUXCpc/WcOzXY/p5OhSaiJFS87BGrhIf4hN6zkl7+J1DEfRfHYyv6YQCUW9pBpkWsD1dxXTuNJH62eB2kERWG3ThY5jhvHKJHjsgSnZk3IsW2jGhSNlRxJS745pImJzhSnfwQsxktvyj2NcP10v8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652688; c=relaxed/simple; bh=y4cyNWxW+AAMzsvEv+B5MML+u/SjeALajlpD0Ds81SU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pUmbEend3JATHffiu+SArgO1+6duebBf6OAMV8kl/+WgACXIDI5nvVZD73bcZsQTztZhYtVhMWc+tcxn0G1OJKrXUMKePwFL2+Sf0n5uLC/9O4/RTI8o18A48uMvE1fv7tv3L1Z6g0g2xRRtANyHRezvEE2+TY2XU8A5m7WlMfE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=f4WMPRYY; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="f4WMPRYY" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9932aa108cso309831066b.2 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=vger.kernel.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=f4WMPRYYdFhR76J3Rgh3KNrdBY2EWqVeGrCfLRCD1vz4CRGUf/Uz6Oku6JSabN7jrW IauHu/QqfJu/pMGyrNttsXUopfgA0MXAjUPmEBv1XC62byZ5Geb50jNlibn3WIM+kRqC PNFHIcMc3LMGUIGbMLcBUVBfz6dhp1UixQ7862Dj7YYdsKHvQj5W0on/U+MzAwAeTHBT F6Iy3g1+SfA3HFV08Zgry3POWHozepWkGOgco4DSNyIrZ7gyyNktuYdeRzBnmRmvdjUl lYEf84oX/5qlo44qg2/iMUVouw3qKtWkvq6vWQ0iz5gRvGn4j/i1p7PHGoynOyf+QJzJ okTA== 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=tANQooap4PJr9WtLqEXEDoZnNhE/Wld6rEk8USL6X6wbQ2K6RnZyFaXGd8avCf3JQO tkMwZaQH7DenzsTOFQnRv3Vp32lhittvrhqG/cracPpffsCkgQr/ucvdYJ3z9ZDit4qO qb5mJX/77KavGHgIFXmdFasWQoXwkIhdlIWXiqRNaaFp05eodxgCGa7mccfyiFJeb69g fPbXtIbOk0vHULQd5s58+IuiIDapD2xQehgy8HOTeRo8Z4UO/YhKQ2Bpy+AM/dMyY9kQ /jml/FFxV6PS7I0h2gfSsTWNOqTsAABcCtUsQE1GmUva2iAxxYglWSPZppctOWCjV3Su /VFQ== X-Forwarded-Encrypted: i=1; AJvYcCX0Amb0ipewq+0mKHEWtamvBgd/MqI+QYO97QVaUNO+U0ehjwtRMLQTVrT+duKTJDvBrBWADe8C3Undc2g=@vger.kernel.org X-Gm-Message-State: AOJu0YymxynTvvIXAmvGg2q8uuHD4ZJALXPUMolYUrt6/g6WP3kSQqpy sPXMV5go9Gl/ItwOu3DL93pui1mvBqSiq2qpOFRpScgcElYKGwtia3NsgpsFKLU= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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..c56d61b0d20b05be36c95ec4a66= 51b0457883b66 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, str= uct ethtool_wolinfo *wol) static int m_can_set_wol(struct net_device *dev, struct ethtool_wolinfo *w= ol) { struct m_can_classdev *cdev =3D netdev_priv(dev); + struct pinctrl_state *new_pinctrl_state =3D NULL; bool wol_enable =3D !!wol->wolopts & WAKE_PHY; int ret; =20 @@ -2212,7 +2213,28 @@ static int m_can_set_wol(struct net_device *dev, str= uct ethtool_wolinfo *wol) return ret; } =20 + if (wol_enable) + new_pinctrl_state =3D cdev->pinctrl_state_wakeup; + else + new_pinctrl_state =3D cdev->pinctrl_state_default; + + if (IS_ERR_OR_NULL(new_pinctrl_state)) + return 0; + + ret =3D 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; } =20 static const struct ethtool_ops m_can_ethtool_ops_coalescing =3D { @@ -2380,7 +2402,45 @@ struct m_can_classdev *m_can_class_allocate_dev(stru= ct device *dev, =20 m_can_of_parse_mram(class_dev, mram_config_vals); =20 + class_dev->pinctrl =3D devm_pinctrl_get(dev); + if (IS_ERR(class_dev->pinctrl)) { + ret =3D PTR_ERR(class_dev->pinctrl); + + if (ret !=3D -ENODEV) { + dev_err_probe(dev, ret, "Failed to get pinctrl\n"); + goto err_free_candev; + } + + class_dev->pinctrl =3D NULL; + } else { + class_dev->pinctrl_state_wakeup =3D + pinctrl_lookup_state(class_dev->pinctrl, "wakeup"); + if (IS_ERR(class_dev->pinctrl_state_wakeup)) { + ret =3D PTR_ERR(class_dev->pinctrl_state_wakeup); + ret =3D -EIO; + + if (ret !=3D -ENODEV) { + dev_err_probe(dev, ret, "Failed to lookup pinctrl wakeup state\n"); + goto err_free_candev; + } + + class_dev->pinctrl_state_wakeup =3D NULL; + } else { + class_dev->pinctrl_state_default =3D + pinctrl_lookup_state(class_dev->pinctrl, "default"); + if (IS_ERR(class_dev->pinctrl_state_default)) { + ret =3D 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); =20 diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index 92b2bd8628e6b31370f4accbc2e28f3b2257a71d..b75b0dd6ccc93973d0891daac07= c92b61f81dc2a 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]; =20 struct hrtimer hrtimer; + + struct pinctrl *pinctrl; + struct pinctrl_state *pinctrl_state_default; + struct pinctrl_state *pinctrl_state_wakeup; }; =20 struct m_can_classdev *m_can_class_allocate_dev(struct device *dev, int si= zeof_priv); --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06A6721A71B for ; Fri, 11 Oct 2024 13:18:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652690; cv=none; b=saaP9gzTO4OBhC/tNYS0kZQzPeDbaSNhEawYKgUtn9n86mnyMUcB8c10wSSRvKyFV5zCjhowC71hAzfpcQrqlCrL2IcAxzx4nAVpWGdC/8MRaeSSYpIM0Jh7Xk2plHVUD+jDouoOBEiVqYGwZNOOushBYOJXrWsJWxxoVLQiuds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652690; c=relaxed/simple; bh=ulDHdao8BTiFyv+Pi61bMFlLk5gdDHQrGY9errmbLQE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AvlMa/RaPW7VsgHMO2uwngn0Zvy00TVqYABRJkG60DDqoZnMAT3/+aPKwmS1Vw2oxfvsTB5UfEu5EVSd0QY45itj+B8pkYXzChS5tth7If2Nw0s8phS7ukai1oWD9WGPUDwof+k6u/JmaYm6ubydkkoG+jLDlFsAe4WXBlywD9g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=joKSJsQ3; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="joKSJsQ3" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a9944c4d5d4so285859666b.0 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=vger.kernel.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=joKSJsQ3f2PEheIiVeVWH0KTDGiWyGtKXcKrSFTcaAFRog5XZyf4j2dzakS9ox/e9f 37br6Zi9Mgk0bIQLCxuU1n2sNNuztbaZUPrup8AJooqtZDHvZ2U2EYXprlqeXb2YVcFf 5XiKolaOFGReUPCIsNTsKQhZapOyzFtMw6MvQeTNvrSREBJ+cH933E1UmonJ2ZIPG0tD JuMAVnfFe+MsdsSq0fpIx448Y21uKjO0wHwsrvVu9wEtDaeRicsK93spHzRjPpWzJ6N/ FgWCGMUInY463BW8/k2d2rsetGeMgEAB3wn1tqCE/yvw7kZ+NXl/FpNKhEQKtxveYIKj a8jA== 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=TLwR28k3sUCdYGiWKP+o+BgQ4ToXGypXxjnErTjd6kIAXV5LrJDkDrpLAy8Ab0lCfG lysBdKqunHZET4xtgClATv2DdEv14X6PVrTefXWAvHtNe0Clo3nZuOeGuBt0oN7hnJUI cPl5wWlabwqm+HlhAvgUzN08VVE4WzuuHEBEfsIy9QKOPO9ZfwsV/7kq5wCoNUmbPRFR o+NxnaRK0uLxPo3+EaeKTFAlWaHvVcyYMehBHy1Xj8y4QKFIvTu1MfaHVTYbFR40F+WM +V/hOIdcXRDzgK0fjPSkuVelhRfHIv96MJq9byLML6ULblhi1piScCeI37PBQeti9lIY +vlA== X-Forwarded-Encrypted: i=1; AJvYcCV/H59l9Qb1fI5OfE9DOiN8vkVQAHyP26RuLDjuo9fJkoZ1D/fZfOS+92WXxPHwK7pl8mRE887D/c92EFA=@vger.kernel.org X-Gm-Message-State: AOJu0YwBICEpChbS/4XIkN/2vRS5b25UmX101G0RYgE0NNI7Gu2Za/5p yhc6HSopRIyLmex9Lq+kTNCDtREdvjmtbqbaz3lIYHkEMNsJHoxpeoKNaZUEfaU= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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..b009575354cf5f19e93950bb17d= 448f81609aae4 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 =20 #include "m_can.h" =20 @@ -2383,6 +2384,11 @@ struct m_can_classdev *m_can_class_allocate_dev(stru= ct device *dev, if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source")) device_set_wakeup_capable(dev, true); =20 + ret =3D 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 */ --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DB4721B45A for ; Fri, 11 Oct 2024 13:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652691; cv=none; b=ngHB/POD9jEzBFiPET80iiyI42trAOiJf+mLbLUv/oc2RAzjkD+OWz9wyJDGJ65HddpmmF2wK2HsPu2aNySEPLIzwRdbAFgL2SmBw9IMe0nJkdVCjZOCQwPCvhOjU2MmRJ8yFAiGq8hRr1Ri2BktlTqHy9J5eHfrlSjUzLDS2pM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652691; c=relaxed/simple; bh=L5jePk++a0uY91JQrASnpEj/bjSiMyJjUq1CjjPGGl0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GdSZrRlGDuwql8ICfW3WxuxlEE4ifgDtdYnPSeIpcSnlxAENjZPY1s6CxqPK7LpYTDJqtghTHecoupINpA2D6oag+mHMw1vpzEwk+HE7UcqAA4og8TnIlZ1cBs5zKolE4uaTwPBSDR0dzywokSCPmCsB5QFRIPPzQwiPt5v5jdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=H87lTaPY; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="H87lTaPY" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a9977360f9fso273525666b.0 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=vger.kernel.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=H87lTaPY0pqpOIVw6NoS0mlPKQA9Xk7udRF+puaHWRLWaY7xRteySVTfVsy7RsJ3aT Lj4cP2BgrxZ3XSZmd4X7HI1AEHOZj4M2qCvHVUT0SWw7V0VEH3cdfkN9uGKgQkS/72ZE XkP6hAPcY9RsFK4mcqUOkjS7EJg0fBpTXk3CsTFsW8qg28arZsqAx2mSJd8M7v+PqDBO CPLwEDWbft2MvKd/G7TFpR0v4y2aQB5eXisMrEKGcH1q2orrM9quIkB6EqbmlS81Luxa GzvqDg5PczRfXVJD4V6wSJ17nmvnp0lN0r906/dFQQ8xcKCpqknFBb51PxfJL7tUFyTS goKQ== 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=Uy1oibfu2UB2HHmiZhoJ18cpn5uxIL8yKq0bdLbqavZQzeq8ybHR4DUoEw6CxqNpTJ 3c6u7UzC4/CT15Uv7PpVvQOr6b004PvPSGVqKQ5F4d0EdsCT3BMFlcjUoz7pCAfvoDyi k1H/q01heqhp5uX34/grBEyGGL4hr/A6LdWtNJhQRU1PZ7YtjsP5QuluiArkFY2A/0f2 1cIo7EsQP8ZKEbQifA0VF/kcvz9MODVUpLBQLEKzRQjlr4GRyQts5uZweD+ipdJ2+XI6 UUK5JEbLlka++1rrt4SQzn68WHIjHgzxjdZfg/jSBOi4N42MWxIsr39GDhsEQwxAYXa8 o5qQ== X-Forwarded-Encrypted: i=1; AJvYcCXzXvnTdSmOTG0dPM3CXdh6JvfxXG9XRf/7Ll5jjfQwsHLYvuE1pKHr42YZqztn3KcSAx+UULDoBke8fJI=@vger.kernel.org X-Gm-Message-State: AOJu0YxQ8U/6xDdT+bOx8CH9ALDSGLyXYROiCkzWG0/km8bj/sJJy/Ns ctlj28HJoFIqPKWMxP+Rt19nBMU/4pEWn5oLnIIOdljaMw4M45RED1R57BuN+C8= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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..e22177b9dfecb541e99b0807f8b= 79e7b878b6514 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 =3D <&k3_clks 188 6>, <&k3_clks 188 1>; clock-names =3D "hclk", "cclk"; bosch,mram-cfg =3D <0x0 128 64 64 64 64 32 32>; + wakeup-source; status =3D "disabled"; }; =20 @@ -172,6 +173,7 @@ mcu_mcan1: can@4e18000 { clocks =3D <&k3_clks 189 6>, <&k3_clks 189 1>; clock-names =3D "hclk", "cclk"; bosch,mram-cfg =3D <0x0 128 64 64 64 64 32 32>; + wakeup-source; status =3D "disabled"; }; }; --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9756621BB13 for ; Fri, 11 Oct 2024 13:18:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652692; cv=none; b=Lrtyo/k4KA5ocVxU2O4iJYm/T9NfWELaoe/U3dBdu9SPS/OslsbsqbRSYvzXRLkJm4XF6Ch1ieNHvP2oaHOpvha4CgOSqolWJS7yPklNeesoLf1QOpRrwLxMq8I1C7cWsf+wsBhnMTE45DcphsAOlMEgeNIl2t1yiXPURMieEAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652692; c=relaxed/simple; bh=lb40xLu/VXrpPNedn2QOJM+HYtvP+0chbzXXKOqoOlE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Aq2ZyvU4N1g4DzQ/GgF0JuYDH8qWON5TUOulFF/CJXO1pAMHSA1bdERHP3jePsz0CRQ4m4GHvAsmLna99S7bytjnxLeQRcOgTavYYYKH7A/C/iWdwyfIgqzxsdNmVNJd0S5/kaEUhuxeFBXtWr703/JIME4G8APPTeDSL/68qAw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=hcRMEbv8; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="hcRMEbv8" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5c9404c0d50so1762287a12.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=vger.kernel.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=hcRMEbv8K/WUg9wnY87/5iX/H3mc8sFva96P+FP7cawBZSqFp1gerUxDZL+W+/moPa z7OvTow4OasZ/yetIsOKDJRlTfFCEZm2p66w25OWS6NOdZaju3Qw3R9Wwy4oNzYqh/ws iLp54haZxNtbsiNhA6MjKuXLvdN9LLSWhpZzCsVzwCWEsiLjXiTTN2uprWxNKLtbz4gv /vpkBNumoPq2GS/v69jBY5X9Rhg0NOIwZs1kSWt6Dr6W+UhvfJTXpJ06N1sKKTmNPQmr UmDSwzBWgtI403Q5+GJrSNXBdX+K0YomIp2tbIEN/9/1kmhdd4pzVHPLI8T+LUZWUORw NzpQ== 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=U6srkKRISDTS/1/H2sPNv4JAtd4mB2eD85Zcot5jC6FgMQW6EmLmFu1Otpuu5FlNFa KghG3A+Tx60pI5ESecJO65lsftMnjvdvqypAB3OTfqe9bZqnI17PoouRMJ5WSjyJ+NGK 1z5NAIX5aqmZ/2Ncsh7OOwvgJI/VobVTKb5uFos9Drjyd0H9Vhu8VAVE3eEgMQRMJgAx JZz+fbkqJ5OwECQuK0B4Ix+kIQCRGCDy0XZnijPEKmDPAaFZujF0o77thJyur/TOB1c5 Jve6Khpl3nlxNe1srqywT0XOQYyyOgj+ftLElDDrGMTis7aDjhlNisogiXVKeYC1xLUQ EBUg== X-Forwarded-Encrypted: i=1; AJvYcCWxHwssL6e21hhYmSc+sDKWKBJ0pIedTU3hSV2QbGTZpdX4WflmPH35McePJxz9dVt1ccWQRTs4bmHQ9dE=@vger.kernel.org X-Gm-Message-State: AOJu0YylRMj4ax8GyikhDjnSY41vH+vFAWrH4gFS93IPTgCc7ycebG0C xoLQZ4P7o0T8DtYDb/3hjIc6cApCMxSpzE4Js7pbqSgyMKRCYSgi/8L8aNrtVBc= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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..06361cfd7a8ee6f2acf2d15e810= 6087dd0f38008 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 =3D <&k3_clks 188 6>, <&k3_clks 188 1>; clock-names =3D "hclk", "cclk"; bosch,mram-cfg =3D <0x0 128 64 64 64 64 32 32>; + wakeup-source; status =3D "disabled"; }; =20 @@ -173,6 +174,7 @@ mcu_mcan1: can@4e18000 { clocks =3D <&k3_clks 189 6>, <&k3_clks 189 1>; clock-names =3D "hclk", "cclk"; bosch,mram-cfg =3D <0x0 128 64 64 64 64 32 32>; + wakeup-source; status =3D "disabled"; }; }; --=20 2.45.2 From nobody Wed Nov 27 07:50:58 2024 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C271721C183 for ; Fri, 11 Oct 2024 13:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652693; cv=none; b=HPqpd/4hElx6muXh439Oyq2Fy/F0t69VBGo9LxAJCKq1hPfYykSzGhtvW7nOFkX22QAL3w8/X0ejxaLBffekX+u51oStmUcjHcehQcMkegsnqfO+vU3tX6rp1laEty67zvXQI/P2b1pyooSaVreFcKFvbfqMWwVSAeN43ugeNZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728652693; c=relaxed/simple; bh=Mzxbq0cogQNrwowj1zfIE0DVBGY5w4Uyxw7H3xobrQ4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fa1niuNBFfQ4qjHLD1aPdDM3hV+R896h2PTTGQahvpAm+7+Uo1S2Qxd3sucj1zdpnoIXceb7a4OSPQvk8uKc895z3Pq07/UisjpXhoGdpqgtKiPI64RZGZv/8yJ2BZ4DxXjRU/AqgGxWkcHSGEoLW/KVRJwApsiNcDZ3kdlfyg4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=gwBzVQGZ; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="gwBzVQGZ" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9952ea05c5so317180466b.2 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=vger.kernel.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=gwBzVQGZndUEnk7nqpMztkFRdJVhK1lS/IHjAzZZMCsoH3MudspQbAP8a3WGI3KwrC PUB4BFvgN4Q6NCRexlhEhTG9bKGR9044A2JJ342iElzdf9vcBC1M0vdYcpg+F/MOfzMo GpcDQeuDfiyHulOmFomxL8rm7LHuSFNWGiZkLHIrJsqI6LHtGNXIUWqcyjyi1aHZStqS 7Zq4skNrcIpD4FahHfeczTPQ4Mz9wtOHWZjqgxD2OmXAVUN3+NznO77PONnA0G6nvYMF SKy2TmCmfBN5SZnLShyse/CfGatSl4C5JdWcGC6CNRj9jMLXPBLAk5HM/wRW0W855Aw6 8oTQ== 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=RN1bB8Ky3zeZFTtD6VjCAnJD94QQLG++3TnUqge1l+zUuOs+ocvM7JaS7lpegjOCKk Uwgd9vZtbDLCGL2PkDB3Myqn4OhiKcW1/yA5PeF3IAxZYAmWDvxD0Q6yLIocLUhjq88r gzbipW7ghbWFmnGK7kZS/gsI5dUD2Eltu2sYe4lejDdjxn0mevnxbZE8lEeqLyGRvx3Y PGhnv0Qd2uCeYYfHCZKVVynaCJo0F9zHSJBKQ9F1wF/rR0Ceyfc3HaLLwc4CMPcgqxkz xi08vE8YO8GwN4QG3WBZUWeJj0VVxp0Y3/nxFpf1MLN7GhGZjhHeTocJ/UAF2/S56qKL JaAw== X-Forwarded-Encrypted: i=1; AJvYcCVr+4v7JHFSlp0o/01O7NQYPCdVn2Wo26sQxiuZeW3hDKixInzaDYXShON1GQXu3lcvehwgQJDlQYWbZ8A=@vger.kernel.org X-Gm-Message-State: AOJu0YwYrS0Js6tflqpf1eyP/XezHH6IIw5Gd5oywpNHSK7MEqOiMSZo kE4BcnmIosjz+iyb7V0nOnSbHikUadCwMY1Tf/+SFlsfIW6hxpfgHuCu7e0SLPA= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 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/a= rm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi index b33aff0d65c9def755f8dda9eb9feda7bc74e5c8..3afa17e6592f39387a667547835= c90f95a9af351 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 =3D , ; interrupt-names =3D "int0", "int1"; + wakeup-source; status =3D "disabled"; }; =20 @@ -188,6 +189,7 @@ mcu_mcan1: can@4e18000 { interrupts =3D , ; interrupt-names =3D "int0", "int1"; + wakeup-source; status =3D "disabled"; }; =20 --=20 2.45.2