From patchwork Thu May 23 07:53: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: 13671359 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 83E6AC25B75 for ; Thu, 23 May 2024 07:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=KH04be/X8tF1KiAaq5rNvdfg7BUvY8VOrJNYiEB/c/Y=; b=phK62W+X5u1wg6 SsYN0k6/HO2mdQQ8K5KSixr2okH7Q5fTmO/0/aw7JGEaTbee/bno/AZp2bLGWv8kL5bgKLWCZbEK6 u5lscEOuHA3HtuZ1LiUX67im+Zs8be0Jmp87i9iWMh1OEWJXQbXAXULNDIAN9BpQJ8WMpJbfaqLj+ Bvl2EfTc+Z7um9KB7Rd8FVmBqdBwnW6Qeb/GRE88XmK3YwLMXq7HCRx3Mb/pFm80oQcxDxYuQDZoT w1/9msq1yJGq6EDYl0Hhc0un4LrdtfiKM+ofR7GAt2mkW187JiDpHNVSnBOweDRzPO3/xix5jUv7/ 6dc5lPWSD2YVyif2ICfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HS-00000005O0q-2Loo; Thu, 23 May 2024 07:54:30 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA3HO-00000005NzF-2B9F for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 07:54:28 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2e564cad1f6so104704461fa.1 for ; Thu, 23 May 2024 00:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1716450863; x=1717055663; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NO+7TP5WD33s7UxZDGhnr50qHmYrw+DG3n3RuvKTKAk=; b=FEXmYCDw58MV9fqG4MTi7Sm2GG9HJnIoRGhJNAitWqslSATOOgHPxBZJv68wXzupJo 3MshDqJnRdAi7riClL02Lq9BDPhF+34eVIw+E79l31DsnBgPy0QwOc4MXMbRIRopSF+x qrCYMOzOc7MuEh9CngtC1pOePd7It/8o0VuhWf64WJD+yg3deFqjel+9eg9CLhFeq4XV /PHR70lOIjSz2T944xednSUmZW0UEQXP447h35e2RXUlt++5iav0q9OqP/iVJsF3hm1R p8nJCP8Tq+CAivG4yTc4Q586hMJSMjBcArhKWH9n+axmW7RcJwvohHU7Bh2CVioMoPcZ 4ILw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716450863; x=1717055663; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NO+7TP5WD33s7UxZDGhnr50qHmYrw+DG3n3RuvKTKAk=; b=Mn0RC8m2Au3mda2nj/ksuICuW6X+kWBLX+pftTfoBa2jeuY1M5IoQCA6cKAsFZ53Us z1V7NLRF2L55PcQl9idQ3PLl5m2LY+UQNsKSgIMPfzjJEAtgXpSlKl/hCXaGwJo3gdIr 6MRuP76r2UxH7ROX6O0foDPmduyJC8rNH2ODbt5F6K+/d0Z+XHEgsPmbpQKX9bEj5KPF MJHW9KjwKB4sIKGgY3f00jO0Hbn5SQvktTpHkOPNA+iKE9FHIKu7992NM8B7Vx21Yfip 52U0248+x11tRnFQSadyfmPWzPPLSXXC0cDBGqFGje5TLYBIAf3jf/yIkyBa3Fq+5Ogr oxOQ== X-Forwarded-Encrypted: i=1; AJvYcCUooQZygjmk5c7DhkRcbpcBO59mUx/qB/fOMvQP/gLFTJ4KIYBNTJuh0CmUW/mpQ+Q5Leag+QjDAn4xJNCVLvRDx0jAQTWcOcHNI7heRPylmLllpE0= X-Gm-Message-State: AOJu0Yxz+pfDxwRlm0y5eA6wkqosJjPlQGSqB0l7pAdA3wxKnaVkh2mT NTpUKzNDpJE+5uan7In6tsG+m/a235XDsgIzofE3NfPXIGAE03LDEJfal2b3S0U= X-Google-Smtp-Source: AGHT+IG1TPrM5IWcLsL0gQR7Oe9oP76a2EOliWzZVJoOaGxGy+vZJRo/X57iPhY+5O8GnBw4G2JH9A== X-Received: by 2002:a2e:874c:0:b0:2e7:2907:a63b with SMTP id 38308e7fff4ca-2e94946e2bfmr26921751fa.21.1716450862499; Thu, 23 May 2024 00:54:22 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a246:821e:6f3b:6b50:4762:8343]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baad074sm36501833f8f.70.2024.05.23.00.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:54:22 -0700 (PDT) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , =?utf-8?q?Martin_Hundeb=C3=B8ll?= , Simon Horman , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Schneider-Pargmann Subject: [PATCH 0/7] can: m_can: Add am62 wakeup support Date: Thu, 23 May 2024 09:53:40 +0200 Message-ID: <20240523075347.1282395-1-msp@baylibre.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_005426_615685_0C149277 X-CRM114-Status: GOOD ( 11.67 ) 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 Hi, am62, am62a and am62p support Partial-IO, a poweroff SoC state with a few pin groups being active for wakeup. To support mcu_mcan0 and mcu_mcan1 wakeup for the mentioned SoCs, the series introduces a notion of wake-on-lan for m_can. If the user decides to enable wake-on-lan for a m_can device, the device is set to wakeup enabled. A 'wakeup' pinctrl state is selected to enable wakeup flags for the relevant pins. If wake-on-lan is disabled the default pinctrl is selected. It is based on v6.9-rc1. This series is part of a bigger topic to support Partial-IO on am62, am62a and am62p. Partial-IO is a poweroff state in which some pins are able to wakeup the SoC. In detail MCU m_can and two serial port pins can trigger the wakeup. These two other series are relevant for the support of Partial-IO: - firmware: ti_sci: Partial-IO support - serial: 8250: omap: Add am62 wakeup support A test branch is available here that includes all patches required to test Partial-IO: https://gitlab.baylibre.com/msp8/linux/-/tree/integration/am62-lp-sk-partialio/v6.9?ref_type=heads After enabling Wake-on-LAN the system can be powered off and will enter the Partial-IO state in which it can be woken up by activity on the specific pins: ethtool -s can0 wol p ethtool -s can1 wol p poweroff I tested these patches on am62-lp-sk. Best, Markus Markus Schneider-Pargmann (6): dt-bindings: can: m_can: Add wakeup-source property dt-bindings: can: m_can: Add wakeup pinctrl state can: m_can: Map WoL to device_set_wakeup_enable can: m_can: Support pinctrl wakeup state arm64: dts: ti: k3-am62: Mark mcu_mcan0/1 as wakeup-source arm64: dts: ti: k3-am62a-mcu: Mark mcu_mcan0/1 as wakeup-source Vibhore Vardhan (1): arm64: dts: ti: k3-am62p-mcu: Mark mcu_mcan0/1 as wakeup-source .../bindings/net/can/bosch,m_can.yaml | 20 +++++++++ arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 2 + arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 2 + arch/arm64/boot/dts/ti/k3-am62p-mcu.dtsi | 2 + drivers/net/can/m_can/m_can.c | 43 +++++++++++++++++++ drivers/net/can/m_can/m_can.h | 4 ++ 6 files changed, 73 insertions(+)