From patchwork Sat Oct 12 14:39:27 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: 13833979 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 E1123CF2566 for ; Sat, 12 Oct 2024 14:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+V4+PzZtNi7MIeIEF0+JVFMXtIpzK+7/ZpBXRsobCbY=; b=oAk5Jkw9qUnHoUURefIngyY2Yo zwxThVdB7UogVioPk9MP5FA5fhV0dlHlyLCyVD4BWLdP8GUIWUpKzc6PYyilnOd+am8+UVS57SiEy 5P6+VxqPZa5dL2wvcYsrVLLMDpu2dwDMilKWhUGIRoAOWMHRXyQzjU5L5K0GecDKuERADFHMdIdjK S41sYVQ8IP/5AppYwV98mKKfcIxII07a6WJ1Iix6Ockrq7GEjKIqHBuWN0Psd4HhD78eAqueXPxG7 KaAREU+qL5GiZeLs9BlwoJHHenopv12XQMrZ0ZViOVvhhuHtBWb1JIg6co5JR7EB/0IX0An6e3KK8 7OcfG9yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szdNG-00000001NTS-2RFJ; Sat, 12 Oct 2024 14:45:42 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szdI4-00000001Lij-3W00 for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2024 14:40:23 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a995f56ea2dso465238666b.1 for ; Sat, 12 Oct 2024 07:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728744019; x=1729348819; 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=+V4+PzZtNi7MIeIEF0+JVFMXtIpzK+7/ZpBXRsobCbY=; b=qOxY+jSZTeO2gAkS+ftXMZdy809VzjWPeRg/jE+bldR17vyX8EDgtMS908FHR7L1Lq XSzhZe0iGL9NdbLf4fyPbPhMNpXnhwwxExayJTOhZOpAyR3rOVb0XV+kb/jAgMi9hZiR UkN4dJ+InHCC5vedvVzPFNQsk3Uld1wHTBhLvthAIoh/g3kCQUZAz/BnahGRNT8SHVOf 8wZrEuvl25WaOVMPIZF/iizddMeuaHpURpLlVIZTDeciKhSKmjsdmBH/p5O72YflH+gM 6GLmj0K6s1twYLXlUqN5Rqq7e6CnAMqZHXh0lLm5K8XXAVumbOt8yVAna8sZoq+tK5G2 bpWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728744019; x=1729348819; 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=+V4+PzZtNi7MIeIEF0+JVFMXtIpzK+7/ZpBXRsobCbY=; b=gEHxRqrdhgxpR4vEi3UpISxP02WPQINaQ7Vpqx4Vnch49zZT0p4E5/PnNRj7qZQFDY k/tGT+1pVv8itZH1GuNK19l3MrQc8QKADUT6RFCjmmyCEXdYId1C8rY6LCHI1qr2gbtX Qgfy0LGfVyiZfhAFCKpR+O3dTJCRMYC0dVuuX2/DnkH/pRVjverrh5iXvEeGKK7CuxcO F489N2g+8ec1UkfXCtSjPcYiF1wZPm+yemnzDNPadi+FiQVN4x2srF1+VIM4siF78X6R /5vgjbPVpKKE4rZOIacmGORSARaS+pUFJgtx712gSRSks1AG/kVtzwii7KfApqEVt5UI nE5A== X-Gm-Message-State: AOJu0YzTLxnyMEMufYZGqochx+7m+ZHrFjQAEBl4pud7ltPYSQKTBDJY XyiWimJtqW3RZMfXana48jv7e0ziGzP5hw77b1INxY3yzlhwqJNz+8LB/kVoj9YQDckmiMGAnvk 1 X-Google-Smtp-Source: AGHT+IED80b4AbvloJuTe1bZzV8uPZDsuxDtElUD5sao7Y4gzMTYG2NdJpeqQ+ZAJDYGrLU8wprhgw== X-Received: by 2002:a17:907:e2d0:b0:a7a:aa35:408c with SMTP id a640c23a62f3a-a99e39e4fbbmr281594166b.8.1728744018451; Sat, 12 Oct 2024 07:40:18 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99f752b7d5sm29972766b.217.2024.10.12.07.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 07:40:18 -0700 (PDT) From: Markus Schneider-Pargmann Date: Sat, 12 Oct 2024 16:39:27 +0200 Subject: [PATCH v3 1/6] firmware: ti_sci: Support transfers without response MIME-Version: 1.0 Message-Id: <20241012-topic-am62-partialio-v6-12-b4-v3-1-f7c6c2739681@baylibre.com> References: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> In-Reply-To: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1782; i=msp@baylibre.com; h=from:subject:message-id; bh=gzvHCEERIFSUE2/l9XVq++gH4WwGcviKuuBBdUnSMcI=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNK5uoxOfru8ZOs2+7jSxF3bFZmrF7YalPlJGrPc/hj3K aruoZdXRykLgxgHg6yYIsvdDwvf1cldXxCx7pEjzBxWJpAhDFycAjCRABeGfwZc5gofIxMDjolP CAkTkF7DXGznu2PHilClUKXtHx5Pes/wz3Bm4WNJbbE4JTuVbxUR5ctXbm0Q/7yAveK55dEnFXf ncgAA 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-20241012_074020_970263_A353F9CD X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Check the header flags if an response is expected or not. If it is not expected skip the receive part of ti_sci_do_xfer(). This prepares the driver for one-way messages as prepare_sleep for Partial-IO. Signed-off-by: Markus Schneider-Pargmann --- drivers/firmware/ti_sci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 555e41cc08080c78b3991a8d6c06f5030a576d72..9ef86ea27a3c9ac6b9aa4a838a4f5e9fc09a81a9 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -398,10 +398,13 @@ static void ti_sci_put_one_xfer(struct ti_sci_xfers_info *minfo, static inline int ti_sci_do_xfer(struct ti_sci_info *info, struct ti_sci_xfer *xfer) { + struct ti_sci_msg_hdr *hdr = (struct ti_sci_msg_hdr *)xfer->tx_message.buf; int ret; int timeout; struct device *dev = info->dev; bool done_state = true; + bool response_expected = !!(hdr->flags & (TI_SCI_FLAG_REQ_ACK_ON_PROCESSED | + TI_SCI_FLAG_REQ_ACK_ON_RECEIVED)); ret = mbox_send_message(info->chan_tx, &xfer->tx_message); if (ret < 0) @@ -409,6 +412,9 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *info, ret = 0; + if (!response_expected) + goto no_response; + if (system_state <= SYSTEM_RUNNING) { /* And we wait for the response. */ timeout = msecs_to_jiffies(info->desc->max_rx_timeout_ms); @@ -429,6 +435,7 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *info, dev_err(dev, "Mbox timedout in resp(caller: %pS)\n", (void *)_RET_IP_); +no_response: /* * NOTE: we might prefer not to need the mailbox ticker to manage the * transfer queueing since the protocol layer queues things by itself. From patchwork Sat Oct 12 14:39:28 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: 13833980 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 0304BCF2568 for ; Sat, 12 Oct 2024 14:47:15 +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=C3sJ/BMf10VX9JK+mjIqHCa6w7KgT4r2r/Tz2Dc9YFM=; b=HKpZhZxTDvVPoGcXWJYlYWMnxX Ge+qhCuRam3uFvOGSuttkLMBW1BciDmtVUH901kNhtCQX2/f1QUfIND2Ywi7HTcpisLJmwZVRk5iJ dlaA5oS/X1muuwsNVR16cmBt9CWwvpx+fEiljfsWetJbCbrrho+qs1OerBzBvFbrhS8GM2BvrSWNq koehhneRG1sDFmsorixumZYrx9dBH7T9mbegq8MHrGVCCxw4TNAj7Ex/yWIjdAM1g2r/DiSlcdstG vg7sNtcEJ3t+o+kS00QnSpieo9tb5O1aYxm7/apxqhrfdkFetwr4VoR7JFux8tsOQmCNpbC/4x/14 PJjwMx6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szdOa-00000001NYY-14MJ; Sat, 12 Oct 2024 14:47:04 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szdI5-00000001Lj6-1NSL for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2024 14:40:23 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a99f646ff1bso38529266b.2 for ; Sat, 12 Oct 2024 07:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728744020; x=1729348820; 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=C3sJ/BMf10VX9JK+mjIqHCa6w7KgT4r2r/Tz2Dc9YFM=; b=qnv9IxvxZwP7zTFGgdzqal8Afuey9o3+jvVsTnSVt+kZusqNsqI3cLeTMxcWwtW+Ob ElbaS81DbHGGpnZ3w3woHcRsR1dji3ZVBEmpCZByus/sI3cYcRsSMPtS+Yoj47yu7ywS INr9DjdxcihZfdmy+LyhUhc0jRHexBIiJyj+WhQ4qQHFy8IjifAoS6Q+r9yaSff0pJcU 1MUwgDPUS7q8sJitMS1j8PStJ71vL1M4uoyA2lr+3wAvCaPLALkKxURoiUNBSRRqhbfH sDv6bfxLrUszUY20trHowMvjqO9SkYtGaE+2FnajgGOAKI9Krt3mD4tpkfQ2G2I8wYEf x8vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728744020; x=1729348820; 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=C3sJ/BMf10VX9JK+mjIqHCa6w7KgT4r2r/Tz2Dc9YFM=; b=tZoWIu2FHrYsyNwPVyALLfMaZTikEAiW16Jh/+gyhQBjF4uQ+WmlKOi+cMtI1Ge4Ma bpKkPp/LBvLxytYQh1t88ks7lVoM3UrpVPd9zwDyhqwiWhjDQ7WiYuSXsDBd/pU4kXLt kydahv3e0l6n3r7Z2tcnGfKPgo3PFbNxGCQ6RsZTddlVgEnJuIAH/FlTmytyWYrCO55b SXaz4QzUIUMZMNP7QIz8inYNQouHY6wDiKFQbgFyXKheUz72oGZfBd8slaGMJJhaxcdZ KcxzRY9C0ISS4OsAfgJCTlp1YgC4GwElq/82SPAeIYr58bzL2F0fZNVFjfJHCCX9SySI 65DA== X-Gm-Message-State: AOJu0YwYDo2/9UwsOuZZqUIWMYzxjcnyBfl1YrbUuy8ebXGzKIfAzPRJ bV+w1k1UXH8YqIuPvSmEmxI0eIJqIPg/Tn8fHVj63/dgsMwEPmsZDiMC780ZbLs= X-Google-Smtp-Source: AGHT+IEfLMWPqMmZhJIeqfEsJCHMFdrk3bveUBzkKtDRVDwhafGQZqqAYTq9jyaDh5E24EX5ws+dvQ== X-Received: by 2002:a17:907:d01:b0:a99:403e:2578 with SMTP id a640c23a62f3a-a99b9313475mr575175866b.5.1728744019721; Sat, 12 Oct 2024 07:40:19 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99f3ed51e8sm49965666b.30.2024.10.12.07.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 07:40:19 -0700 (PDT) From: Markus Schneider-Pargmann Date: Sat, 12 Oct 2024 16:39:28 +0200 Subject: [PATCH v3 2/6] firmware: ti_sci: Partial-IO support MIME-Version: 1.0 Message-Id: <20241012-topic-am62-partialio-v6-12-b4-v3-2-f7c6c2739681@baylibre.com> References: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> In-Reply-To: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6763; i=msp@baylibre.com; h=from:subject:message-id; bh=1dNO0ykSJyMHj7nwRx/ZHojCDWMJLTC6mKghrMYyi6o=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNK5uiwOcTHJZmhaCMhl7y+3aAvmYNtyYa7Aga4d9xn3X VlrbGjZUcrCIMbBICumyHL3w8J3dXLXF0Sse+QIM4eVCWQIAxenAEzkShvDf6fHajMjZ8w5tprz a2xayv2/AR6xh1d94kw7+ueqz4G7U38wMixSutYpHPD32c0XOUUBYlNczLTL/ZfdUfmzSFb115V iXgYA 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-20241012_074021_466929_97EB6BF3 X-CRM114-Status: GOOD ( 25.24 ) 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 for Partial-IO poweroff. In Partial-IO pins of a few hardware units can generate system wakeups while DDR memory is not powered resulting in a fresh boot of the system. These hardware units in the SoC are always powered so that some logic can detect pin activity. If the system supports Partial-IO as described in the fw capabilities, a sys_off handler is added. This sys_off handler decides if the poweroff is executed by entering normal poweroff or Partial-IO instead. The decision is made by checking if wakeup is enabled on all devices that may wake up the SoC from Partial-IO. The possible wakeup devices are found by checking which devices are powered by the regulator supplying the "vddshv_canuart" line. These are considered possible wakeup sources. Only wakeup sources that are actually enabled by the user will be considered as a an active wakeup source. If none of the wakeup sources are enabled the system will do a normal poweroff. If at least one wakeup source is enabled it will instead send a TI_SCI_MSG_PREPARE_SLEEP message from the sys_off handler. Sending this message will result in an immediate shutdown of the system. No execution is expected after this point. The code will wait for 5s and do an emergency_restart afterwards if Partial-IO wasn't entered at that point. A short documentation about Partial-IO can be found in section 6.2.4.5 of the TRM at https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Markus Schneider-Pargmann --- drivers/firmware/ti_sci.c | 130 +++++++++++++++++++++++++++++++++++++++++++++- drivers/firmware/ti_sci.h | 5 ++ 2 files changed, 134 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 9ef86ea27a3c9ac6b9aa4a838a4f5e9fc09a81a9..fe964e5e2b2a06ba2fb9754537d28661951a6b78 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -3746,6 +3746,115 @@ static const struct dev_pm_ops ti_sci_pm_ops = { #endif }; +/* + * Enter Partial-IO, which disables everything including DDR with only a small + * logic being active for wakeup. + */ +static int tisci_enter_partial_io(struct ti_sci_info *info) +{ + struct ti_sci_msg_req_prepare_sleep *req; + struct ti_sci_xfer *xfer; + struct device *dev = info->dev; + int ret = 0; + + xfer = ti_sci_get_one_xfer(info, TI_SCI_MSG_PREPARE_SLEEP, + TI_SCI_FLAG_REQ_GENERIC_NORESPONSE, + sizeof(*req), sizeof(struct ti_sci_msg_hdr)); + if (IS_ERR(xfer)) { + ret = PTR_ERR(xfer); + dev_err(dev, "Message alloc failed(%d)\n", ret); + return ret; + } + + req = (struct ti_sci_msg_req_prepare_sleep *)xfer->xfer_buf; + req->mode = TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO; + req->ctx_lo = 0; + req->ctx_hi = 0; + req->debug_flags = 0; + + dev_info(dev, "Entering Partial-IO because a powered wakeup-enabled device was found.\n"); + + ret = ti_sci_do_xfer(info, xfer); + if (ret) { + dev_err(dev, "Mbox send fail %d\n", ret); + goto fail; + } + +fail: + ti_sci_put_one_xfer(&info->minfo, xfer); + + return ret; +} + +static bool tisci_canuart_wakeup_enabled(struct ti_sci_info *info) +{ + static const char canuart_name[] = "vddshv_canuart"; + struct device_node *wakeup_node = NULL; + + for (wakeup_node = of_find_node_with_property(NULL, "vio-supply"); + wakeup_node; + wakeup_node = of_find_node_with_property(wakeup_node, "vio-supply")) { + struct device_node *supply_node; + const char *supply_name; + struct platform_device *pdev; + int ret; + + supply_node = of_parse_phandle(wakeup_node, "vio-supply", 0); + if (!supply_node) + continue; + + ret = of_property_read_string(supply_node, "regulator-name", &supply_name); + of_node_put(supply_node); + if (ret) { + dev_warn(info->dev, "Failed to parse vio-supply phandle at %pOF %d\n", + wakeup_node, ret); + continue; + } + + if (strncmp(canuart_name, supply_name, strlen(canuart_name))) + continue; + + pdev = of_find_device_by_node(wakeup_node); + if (!pdev) + continue; + + if (device_may_wakeup(&pdev->dev)) { + dev_dbg(info->dev, "%pOF identified as wakeup source for Partial-IO\n", + wakeup_node); + put_device(&pdev->dev); + of_node_put(wakeup_node); + return true; + } + put_device(&pdev->dev); + } + + return false; +} + +static int tisci_sys_off_handler(struct sys_off_data *data) +{ + struct ti_sci_info *info = data->cb_data; + bool enter_partial_io = tisci_canuart_wakeup_enabled(info); + int ret; + + if (!enter_partial_io) + return NOTIFY_DONE; + + ret = tisci_enter_partial_io(info); + + if (ret) { + dev_err(info->dev, + "Failed to enter Partial-IO %pe, trying to do an emergency restart\n", + ERR_PTR(ret)); + emergency_restart(); + } + + mdelay(5000); + emergency_restart(); + + return NOTIFY_DONE; +} + /* Description for K2G */ static const struct ti_sci_desc ti_sci_pmmc_k2g_desc = { .default_host_id = 2, @@ -3889,6 +3998,19 @@ static int ti_sci_probe(struct platform_device *pdev) goto out; } + if (info->fw_caps & MSG_FLAG_CAPS_LPM_PARTIAL_IO) { + ret = devm_register_sys_off_handler(dev, + SYS_OFF_MODE_POWER_OFF, + SYS_OFF_PRIO_FIRMWARE, + tisci_sys_off_handler, + info); + if (ret) { + dev_err(dev, "Failed to register sys_off_handler %pe\n", + ERR_PTR(ret)); + goto out; + } + } + dev_info(dev, "ABI: %d.%d (firmware rev 0x%04x '%s')\n", info->handle.version.abi_major, info->handle.version.abi_minor, info->handle.version.firmware_revision, @@ -3898,7 +4020,13 @@ static int ti_sci_probe(struct platform_device *pdev) list_add_tail(&info->node, &ti_sci_list); mutex_unlock(&ti_sci_list_mutex); - return of_platform_populate(dev->of_node, NULL, NULL, dev); + ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + if (ret) { + dev_err(dev, "platform_populate failed %pe\n", ERR_PTR(ret)); + goto out; + } + return 0; + out: if (!IS_ERR(info->chan_tx)) mbox_free_channel(info->chan_tx); diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index 053387d7baa064498e6a208daa7f70040ef87281..dec9e20cbe5da8f6d9393d56bb9a1e73cb083a42 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -592,6 +592,11 @@ struct ti_sci_msg_resp_get_clock_freq { struct ti_sci_msg_req_prepare_sleep { struct ti_sci_msg_hdr hdr; +/* + * When sending perpare_sleep with MODE_PARTIAL_IO no response will be sent, + * no further steps are required. + */ +#define TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO 0x03 #define TISCI_MSG_VALUE_SLEEP_MODE_DM_MANAGED 0xfd u8 mode; u32 ctx_lo; From patchwork Sat Oct 12 14:39:29 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: 13833981 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 00675CF2568 for ; Sat, 12 Oct 2024 14:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ULCkiQ8VoXo6ciE6Elqk4HCN1p6ytUWA5waL2W1UArY=; b=4uhXiX6XfKdK0B2q5A718Sz4qL 2y6YVC7sUII0TWmpykGvKjVieQFrN9mWqLAvdxw9WnFf72S3GI1+oNvJ6vvUyUY2puZOObeTV2/cp nJK+wW/kh/Jv/Dc1QTim6mQHq4Y1QSdsgimc24WcpmgwAHYTcDfRlcTySv+0cxZtgreEQUYuVQbxe ldoeBD8273E01do0K7mSxKv2OZ5EvpcuCCs8kXwaqG75txoUoNkDcvWa4wMXID8Y7CSVObP9u8pz6 r9Gu2hEDMYqpYtb3uVyrrR6n0k1khyORwofly74PQhQg/ll6uyv9HQyoGJ/p0y1ovzBPLM9AXdtiL HCXpB//Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szdPu-00000001NdD-3nge; Sat, 12 Oct 2024 14:48:26 +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 1szdI6-00000001Lja-3lek for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2024 14:40:24 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a86e9db75b9so445119766b.1 for ; Sat, 12 Oct 2024 07:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728744021; x=1729348821; 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=ULCkiQ8VoXo6ciE6Elqk4HCN1p6ytUWA5waL2W1UArY=; b=3L0Y+bNXN5R7vGe2q8xUUt/MfrEkM1jFaR1DxeHR5+fs4J2cH8u9r8oxave1+Q7pQY naOnI8zqS0V5jseHXtzLTatAdulpfGWUrbob0nQ11yGVVd4fJinV6UD9gs8vjR8PyjYw doGF9xBBhbFwq04aFyg0u1UzHk61yx6hueCsSAebqh6MDBQR8mIyCqEZ6oXPGA6ezxbY c9o+13eIHNuSXfpt0U4cr2LPyEJFBTeReNw7EEk06r6tvVNgkbVYhVBSEhkvECAy7gG1 IC70cjckHeF+XmrSxzYhXh9HDCCKLcg85lPiGQJia8Rldz0kY4NSFxXjBW+quZSd6yqS aWww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728744021; x=1729348821; 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=ULCkiQ8VoXo6ciE6Elqk4HCN1p6ytUWA5waL2W1UArY=; b=sMcGT+Dz1KBEvnmkcKkyklts1a9nUVUd/yvwR3NLUeGnIVQKY9KgSaKTO577Uvi7pI RCKQRePgZO3GUNdeBRR7ZIKDfx5HFMVMbl5kmc32bcJhhzip4hQa1hmoe0Aalxa6chBR Zt7r9qxQWyouVeA1+Z8FnVQGRSQA43a7zNeEEk917BNjLyX6/97xHCXSdRO5DE7e5Dea Grl54s/dmq4jALDaNMgpVLIgqkJX/cIHwDnjhP7JhyXZUGd9UnSG6AMpSe2XR4cZuYpZ 6uIjBwQX3D+avm61Vmh22nvGf7Sfjg81Y3I4hi2g0ocyO1zN58ky1jQerFEjXrijz1N7 osxg== X-Gm-Message-State: AOJu0YxuHputAdVqb89qXePGn5uwy+WitfdTuSSnZaiZy1bIH8VaDXF2 ENaxDFsPGZXLfkRMpZWwrUl4FsXa26sPH72RLFfImw4RPEqH0cPhaeeUnb6+oog= X-Google-Smtp-Source: AGHT+IGWlpkwYPvczR/HmMNrTZLwB3u77RjG+9e11crQIzq8pDrWM2fLtcRa72Csddc7F8rgokMxAA== X-Received: by 2002:a17:907:9489:b0:a99:e98f:e73d with SMTP id a640c23a62f3a-a99e9900010mr139675266b.37.1728744020855; Sat, 12 Oct 2024 07:40:20 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80dcd55sm332162666b.173.2024.10.12.07.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 07:40:20 -0700 (PDT) From: Markus Schneider-Pargmann Date: Sat, 12 Oct 2024 16:39:29 +0200 Subject: [PATCH v3 3/6] arm64: dts: ti: k3-pinctrl: Add WKUP_EN flag MIME-Version: 1.0 Message-Id: <20241012-topic-am62-partialio-v6-12-b4-v3-3-f7c6c2739681@baylibre.com> References: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> In-Reply-To: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1051; i=msp@baylibre.com; h=from:subject:message-id; bh=raNMV7XctJIbSEmg1aR+IsRod9wfbi2q0jEtotc1h3A=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNK5umxevT6yTL1ugqjsyZ/d/gXll499jDv17/NM91mRA g/81Q/v6ShlYRDjYJAVU2S5+2Hhuzq56wsi1j1yhJnDygQyhIGLUwAmciyI4b+Xjcjhd2Hbfn+Y YHWNQa/HelKKjP3cHhmW5P9ZJz6kbHvO8L+yxdmtIUVko07zn7THwmUHvl0PeBMcwM21vePLNi+ zw3wA 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-20241012_074022_999213_9C9FB422 X-CRM114-Status: GOOD ( 10.22 ) 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 WKUP_EN is a flag to enable pin wakeup. Any activity will wakeup the SoC in that case. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-pinctrl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-pinctrl.h b/arch/arm64/boot/dts/ti/k3-pinctrl.h index 22b8d73cfd3264735ddf91874e60a0c5fc7ade5b..dd4d53e8420a1d671e04a70d4af8b0ea1b75b2b2 100644 --- a/arch/arm64/boot/dts/ti/k3-pinctrl.h +++ b/arch/arm64/boot/dts/ti/k3-pinctrl.h @@ -12,6 +12,7 @@ #define PULLTYPESEL_SHIFT (17) #define RXACTIVE_SHIFT (18) #define DEBOUNCE_SHIFT (11) +#define WKUP_EN_SHIFT (29) #define PULL_DISABLE (1 << PULLUDEN_SHIFT) #define PULL_ENABLE (0 << PULLUDEN_SHIFT) @@ -38,6 +39,8 @@ #define PIN_DEBOUNCE_CONF5 (5 << DEBOUNCE_SHIFT) #define PIN_DEBOUNCE_CONF6 (6 << DEBOUNCE_SHIFT) +#define WKUP_EN (1 << WKUP_EN_SHIFT) + /* Default mux configuration for gpio-ranges to use with pinctrl */ #define PIN_GPIO_RANGE_IOPAD (PIN_INPUT | 7) From patchwork Sat Oct 12 14:39:30 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: 13833982 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 179AACF2566 for ; Sat, 12 Oct 2024 14:49: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=9N1QRWG1+vGqch+tHQPBAnNZwJAl+Fys3rUYZOZKJwk=; b=t7YlRha2vxU8x/9SvL8TJQyTVh CDrwAoy0vLsmvnR/UOhaDDBh5d23/+FDM3l3v3MBsnNmhlMdoL5xMoXAJ6VTaj6F2PsueYd9OPm7a n1ZjlZcAFVR3a7L3WHz5wLbazDi1G8PSWRaTBKTfvNXmeTQJvCX4RMc4MVAa6u/f6a0r8fznzj4wL kI4RRgkYMnm4NPsgWxE7Dr00TQyR0qYFzlhsMvhGXq18uqIM68CTR2T6CXQeeRwYpNb3e4StHx9rz 33I4D5IOYUzCVIlQa8NnvNiZ2JGxEtSFRX/Mpmux0H0YUv8I5CkGiy3cSMVfsV15v9VIp46sNb5yn gw908Eng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szdRF-00000001Njp-1JT1; Sat, 12 Oct 2024 14:49: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 1szdI9-00000001LkO-28lZ for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2024 14:40:26 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5c928611371so4139842a12.0 for ; Sat, 12 Oct 2024 07:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728744023; x=1729348823; 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=9N1QRWG1+vGqch+tHQPBAnNZwJAl+Fys3rUYZOZKJwk=; b=Ob7oLmTMwZWqAOUTrxYUmNtIimmfl3wBAbtm519gYeOM3NWUi+ErgpjOWaiYJl9ptm 0hnMIPW5YZJl6nAwJbmAkK6qmMq3W+dDnE2iWKp8Ff2TMoww5I5RF3IoLX7FP1rf+A1Z q/Pgxjae5uB7oO2zvQ+UxS0pM0QHX+LXH9dkOnIRZPbs6sgCV1jyVQrbpa9elp//7pMw fJNXIuTPSCJr12VL6GezKnCZlkO4vipXz+kMsReFumqIvXk+Sh5LIH8Ng+Nqs9eL7Yq9 TEFYF4vk3za1YG1nwdc2rxPV9xKVpIsmVrGXl2PifCpeKDosFgSFWiWvQGYte0OxFhNd dXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728744023; x=1729348823; 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=9N1QRWG1+vGqch+tHQPBAnNZwJAl+Fys3rUYZOZKJwk=; b=lRRlpWxX8jNRQ0NNVSTcNVCmRFH1ASgAK4PyoFbZ1zuDrVq57oEWOP/UZ+bDBskiNj on9Tetjy8EBXnxCYrGxJHM5ZJgv7vCBRdF8VPfdGMJt0jcOw7Z3hiMdqh5lIO/h3rn5M LrBWnNhpqkKAOJWIb/PDmQ18/WRtgoFhY9/YFUViA5zN8eYW7qoMSWY1Ooxi6aBytv+6 NeDEkC0/BAQq6dxysfRSEJ9Ob1cMrNwctUpHTrurhcFTAMj9e+o//Hzo17NxFXbKcJbI Q7eNjRDpah7TFIT2SLnPa+UGOR/tvZHJzVg/if7DRDx2hlID/BwPp+Gke3Pxyg4ROEEK ay0g== X-Gm-Message-State: AOJu0Yx4tcIvunGacGqaBsyeirhp99woVUHSqegzm7d+mRcYAvJVkej4 V9PwcGj1CLXrZPDmhcBLj0FugfW7PYL5hQ+u1tygJOuDfTHlucV50VArtLF9X7U= X-Google-Smtp-Source: AGHT+IFB/80TsoIFcqOP89wUuKPAaBM6QE7qOspyWm7HaILKW2tXt8EZeLi+xkFDPhSFFTfLKDwO9g== X-Received: by 2002:a05:6402:42d4:b0:5c9:4281:451e with SMTP id 4fb4d7f45d1cf-5c948c88378mr4204260a12.1.1728744023446; Sat, 12 Oct 2024 07:40:23 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c9370d22fesm2905032a12.19.2024.10.12.07.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 07:40:22 -0700 (PDT) From: Markus Schneider-Pargmann Date: Sat, 12 Oct 2024 16:39:30 +0200 Subject: [PATCH v3 4/6] arm64: dts: ti: am62-lp-sk: Add vcc_3v3_sys regulator MIME-Version: 1.0 Message-Id: <20241012-topic-am62-partialio-v6-12-b4-v3-4-f7c6c2739681@baylibre.com> References: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> In-Reply-To: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1572; i=msp@baylibre.com; h=from:subject:message-id; bh=XhzApypE5f+qCrdy/4fKvPPdyBST0xn9vF9MGvotmC4=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNK5uhzdZY6nmczOe3lfMv7Imklsn4+8eJuk97Xwg2aR5 KbnfNrvO0pZGMQ4GGTFFFnuflj4rk7u+oKIdY8cYeawMoEMYeDiFICJvI5i+F+ce/demWLfp8UV m3Ywsyh0Cp9Yrr/qt1Yd4+JJghss799mZHiXGDxlHrf5ddeO2zYrr/M57Ohdx1pw77p58Z9PRz8 tOMgJAA== 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-20241012_074025_583602_8D3D42E5 X-CRM114-Status: GOOD ( 11.61 ) 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 vcc_3v3_main is currently modeled slightly wrong. vcc_3v3_main has a parent called vcc_3v3_sys which is currently not present. Add the regulator for vcc_3v3_sys to be able to describe other regulators in the next patch. Fixes: e6a51ffabfc1 ("arm64: ti: dts: Add support for AM62x LP SK") Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts index 8e9fc00a6b3c7459a360f9e1d6bbb60e68c460ab..529360b5e6fe052dd99f04b74c129193922f76ac 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts @@ -34,10 +34,10 @@ vcc_5v0: regulator-1 { regulator-boot-on; }; - vcc_3v3_sys: regulator-2 { + vcc_3v3_main: regulator-2 { /* output of LM61460-Q1 */ compatible = "regulator-fixed"; - regulator-name = "vcc_3v3_sys"; + regulator-name = "vcc_3v3_main"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; vin-supply = <&vmain_pd>; @@ -70,6 +70,16 @@ vddshv_sdio: regulator-4 { states = <1800000 0x0>, <3300000 0x1>; }; + + vcc_3v3_sys: regulator-5 { + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3_sys"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_main>; + regulator-always-on; + regulator-boot-on; + }; }; &main_pmx0 { From patchwork Sat Oct 12 14:39:31 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: 13833983 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 38A42CF2566 for ; Sat, 12 Oct 2024 14:51:24 +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=gttVsMS4Fqvh3Tt7h6KmD5HQ1g1j9lzENne/NicL/Zs=; b=FNP6K4yqtPDKLvPjrHkMWS5Dvk exKIqih8guTLqTELS1l2fHCyNg5tGKLhim718By9WRmYDbB7d2AkKzoAoQDPK7OIkIN3oz2CXWASS LFMvrYG8Ra534Y6eUjr8RXWFjhcF5ti5Le6MKSTnIBoY2y0lOXVrfZLYGZV13ixXpSG3zIv5jdy/a HsMuAlMFE7Bbf/dedQKSSmP9kL73yM52tzuTEwckIxHNDIC2SXwwqE+FpBtYr55ck7eNFTITC1llU rvsj4Sqqa2TEjGhD5nbZ74zGwCTEbriDUrZkVTWaIJAZrjNBKW/Tya72Lh3IP6cSz4joDB9pC6ynu MrcHwUEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szdSa-00000001NtO-0yV3; Sat, 12 Oct 2024 14:51:12 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szdIA-00000001Lks-41DE for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2024 14:40:28 +0000 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a993a6348e0so207070666b.1 for ; Sat, 12 Oct 2024 07:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728744025; x=1729348825; 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=gttVsMS4Fqvh3Tt7h6KmD5HQ1g1j9lzENne/NicL/Zs=; b=10aa0RQn4r6CV+orUFtWBy67ebY/wXKD6bsIrWGCF/DkSbEa+gW2autLz39T9wqfnL J9WylLncuG/Y2r1CyD5GFd//5ZLK3SFJ5IkubiDwGis0nhUF89NkLzP1FwtIkV437Lqx uiRAWQLVvDOMDtch3KsRYqdsem/WlVLBWv5a1WCQbpWvo7vErWiHZoi7LuIVPyuLKR7e Q68gL+OwP08UNU0yvuQtS14nwjHPS27MlkEBDkpikdX1QoD//EF8jW8oOiEcdEStcxYi 7H52pioBglAEnVHRVHP6WynUlk2xas/ikSK9t8WR7N2VIwQwkzajIFu0uthS3BOrR1mK lHkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728744025; x=1729348825; 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=gttVsMS4Fqvh3Tt7h6KmD5HQ1g1j9lzENne/NicL/Zs=; b=wH19TA66VHeyDZ0gvF/nZ2FKsv4o2myZQOXUjAtNGGscnFaCX9DdYwxRn+HNhYJToj Y5I4v0jI9Ls79Bl4dk5JNsOd4EWXzxpHXxVvmSFa9yzuLdN5cFHiHsPsA2143Y0A+tQn UZ0e9zfQA8x4F/lTARppu5ziSD8OVWPYY7+7K1MTuJA1gi3vRMnbHbQDDijp9XodLOyL h3zTCfaI2NraeBt7q9FhYMPXZ+e1Z+gh631UWkRo2BkI3Coy8HGBi47GBVwhEmbjBJzT sX8TjgMXhpnMZf3/IMRm72I/FwQwpTU2Bo1zi4tf8TvAGZeHM1I5C/m17uJxbhV8jRtc GyxQ== X-Gm-Message-State: AOJu0YxRxhwEkwaWMaFnaFQESFIy5DmcOyec3EVMDzTIAlzwwvz0HZdt XYClAlRQKsftyaA57T4QKW0auAumdkQg+sqh6qXXaEGrbMSW50VjMhu2DSctFPg= X-Google-Smtp-Source: AGHT+IHt5b4bByB1WvcuC38k97IWVU58hfVMsjj5FiJWbVwYm1/FeLRBTfW/P+tmVBSwJRaQRUR0MQ== X-Received: by 2002:a05:6402:40c8:b0:5c9:34b4:69a8 with SMTP id 4fb4d7f45d1cf-5c95ac09860mr3965894a12.6.1728744025513; Sat, 12 Oct 2024 07:40:25 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80cb013sm328446266b.131.2024.10.12.07.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 07:40:24 -0700 (PDT) From: Markus Schneider-Pargmann Date: Sat, 12 Oct 2024 16:39:31 +0200 Subject: [PATCH v3 5/6] arm64: dts: ti: am62-lp-sk: Add vddshv_canuart regulator MIME-Version: 1.0 Message-Id: <20241012-topic-am62-partialio-v6-12-b4-v3-5-f7c6c2739681@baylibre.com> References: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> In-Reply-To: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1333; i=msp@baylibre.com; h=from:subject:message-id; bh=B9BqpeoJguVWS7gI+XD6rHIo0W/hrym3/3+lBaC2IGI=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNK5utxEp3dO6Us5KRkTecpIP3rpPckzfV6XN1V8ltM4O avp0X6xjlIWBjEOBlkxRZa7Hxa+q5O7viBi3SNHmDmsTCBDGLg4BWAiU08xMky9qLng0OL70vHO t45nefrmlZ6pfP1YZt2SqfxTfy8QO5LHyDB97YNZf1KYS0M+7/u57mBcRdhGgzOSMpyT3TR/8WR N72QBAA== 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-20241012_074027_031827_40795455 X-CRM114-Status: GOOD ( 11.26 ) 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 vddshv_canuart on am62-lp-sk is used to power a few units specific units of the SoC that remain active in a special low power mode. Model this relationship explicitly. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts index 529360b5e6fe052dd99f04b74c129193922f76ac..783ad65e6165ea74010c3240069fc6d99a0cd035 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts @@ -80,6 +80,17 @@ vcc_3v3_sys: regulator-5 { regulator-always-on; regulator-boot-on; }; + + vddshv_canuart: regulator-7 { + /* TPS22965DSGT */ + compatible = "regulator-fixed"; + regulator-name = "vddshv_canuart"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_main>; + regulator-always-on; + regulator-boot-on; + }; }; &main_pmx0 { @@ -242,3 +253,11 @@ &tlv320aic3106 { &gpmc0 { ranges = <0 0 0x00 0x51000000 0x01000000>; /* CS0 space. Min partition = 16MB */ }; + +&mcu_mcan0 { + vio-supply = <&vddshv_canuart>; +}; + +&mcu_mcan1 { + vio-supply = <&vddshv_canuart>; +}; From patchwork Sat Oct 12 14:39:32 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: 13833984 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 87818CF256B for ; Sat, 12 Oct 2024 14:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y3xZ4a5awHPcdMjSyXUFYiKUuBlpPlAJT3mA8niN3dM=; b=KiIM482vZO8sEUu66NptUslQvv A4En+P8Bh4qDUxA5hszL5XgMb4v5qIBwEZb5XGJ4he6yV1glYkM3p7ZsLyJIGS/EiRBjjuOVMdy0O AVonpfw2Op2cXI+C2jhungvFJoGwHlXmYysRCg899hc+Bf2q+qL+Q+//+TVxUSG7bbP2Xg0eJdQD3 VD2SRG1zLhvAkFEDH0V9PJZbjP7KsMIkSuxIJyayeGhKxg8Lcbt8gauQEl7fFgIvHECbxzcze+ipE cOADiVLvAeIpKj96mr5gvZ5qvRfYZFjI7iFBJKKYSakOF92w8Pqy23+ivA0AYE0LNw709+4g2HTMD MxYqW9cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szdTv-00000001O1x-0BFf; Sat, 12 Oct 2024 14:52:35 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szdIC-00000001LlJ-2v7W for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2024 14:40:30 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a99fa009adcso12240666b.0 for ; Sat, 12 Oct 2024 07:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1728744027; x=1729348827; 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=Y3xZ4a5awHPcdMjSyXUFYiKUuBlpPlAJT3mA8niN3dM=; b=plaOhH61ORCUpv4Ci/HTxavQ84JptYj9fBEtAE/CA5aoxp8FOUH6AnQCgVFuUYqTk4 8nUq5owC9U3YQRe1HB9tqvfIbANoWgzYl6g6IbkPyNSDApgBmlIemvwm0gCjOb9n0MLx D5mvtuCQTRX5xtxPRCF+9geUItucwqVwoIOsw7GhD9zkt/6iat3Wfhjq/rG0+kUDT7G5 RxzkdxzANvFTDGomYQvYkvcxqHYjuxwiai3drV3I0/IFP1Zg7GSDi/tfGeO2fXahM1nz NRAlaq6C4xJgXCcbuBd75pORnlbfWYD9eMjd6kZsdZRSlgn5MAzvmjgQAAEuOdj+A8w7 VJiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728744027; x=1729348827; 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=Y3xZ4a5awHPcdMjSyXUFYiKUuBlpPlAJT3mA8niN3dM=; b=CqQCO+jIOjlbKO3E2xxpcCoSwTz2FlB7R6iIooa3g563LhPUOs8pEeNg2iMm0n8beP hUeqKk9Vm1gTMT9O8CCc5JGpeiG32OgdfffhWWJy9Zy/b2k1+KQiCuDNzgKRSc1X4C8h pphDGi6lvMzm4SL6ablW+My/HEC/fn9H9hIbi2jFiJYAY9blG5/XWsxAavTnYSa7dFdv 8hZTN0pRkH8Ho/5hSU3xHBLSRmHmvL9TklKuGgIPyZTwh2WF5fiqFwnB5WMfE0BCmO9m 1qeMtKQcbj+t8vpADAYTlWbZ22azF0xtj/DzHQkH18LDfd5rY2GIDV/vnIAu4uHt+6qi aD7g== X-Gm-Message-State: AOJu0YyBd99Mv/RkHNieB4TWtm1fmHVY+bHe/DcUCAu2P+Ezki+lyO+i CNu6mOjCkB3akbF2Di7f/MrZobuM7S0EJqtg7pRHI1nZ7gOPtjCrXFYeR7B6v4Grg8mSSSnX90K w X-Google-Smtp-Source: AGHT+IG9ioLyyHl/HtWV0pbHTj1ySQ8SJ6REFjcmSOPMoXc68Zmr1Vs+Sj6fLUwZqHEWKbuYJDCdLw== X-Received: by 2002:a05:6402:8c3:b0:5c9:55aa:4285 with SMTP id 4fb4d7f45d1cf-5c95ac63c95mr3728863a12.34.1728744026673; Sat, 12 Oct 2024 07:40:26 -0700 (PDT) Received: from localhost ([2001:4090:a244:83ae:2517:2666:43c9:d0d3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a7f5cea5sm328289766b.96.2024.10.12.07.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 07:40:26 -0700 (PDT) From: Markus Schneider-Pargmann Date: Sat, 12 Oct 2024 16:39:32 +0200 Subject: [PATCH v3 6/6] arm64: dts: ti: am62-lp-sk: Add wakeup mcu_mcan0/1 pinctrl MIME-Version: 1.0 Message-Id: <20241012-topic-am62-partialio-v6-12-b4-v3-6-f7c6c2739681@baylibre.com> References: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> In-Reply-To: <20241012-topic-am62-partialio-v6-12-b4-v3-0-f7c6c2739681@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2222; i=msp@baylibre.com; h=from:subject:message-id; bh=3rhP+Zbms4CJO3Z/gy2uQZJnt81xMUEEDV0P1R+LUzc=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNK5uryjmTWWb2ScNI+J177mJLPVcVufx39rP8U8/ffy2 lFRF6WgjlIWBjEOBlkxRZa7Hxa+q5O7viBi3SNHmDmsTCBDGLg4BWAif5sZ/pmfLkpexfrk3hnz LCnZGC/jTpNLzfWrH/118Fl72pzTlZmR4bDFj0v5R2OuN/vczf5im75M4A3LhAWuHK7v1t1KVND V5AAA 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-20241012_074028_770456_E2F6D614 X-CRM114-Status: GOOD ( 10.14 ) 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 pincontrol definitions for mcu_mcan0 and mcu_mcan1 for wakeup from Partial-IO. Add these as wakeup pinctrl entries for both devices. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts index 783ad65e6165ea74010c3240069fc6d99a0cd035..de3c9abe39ad35cbab9e480d76e7161bd46af46a 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts @@ -255,9 +255,55 @@ &gpmc0 { }; &mcu_mcan0 { + pinctrl-names = "default", "wakeup"; + pinctrl-0 = <&mcu_mcan0_tx_pins_default>, <&mcu_mcan0_rx_pins_default>; + pinctrl-1 = <&mcu_mcan0_tx_pins_default>, <&mcu_mcan0_rx_pins_wakeup>; vio-supply = <&vddshv_canuart>; + status = "okay"; }; &mcu_mcan1 { + pinctrl-names = "default", "wakeup"; + pinctrl-0 = <&mcu_mcan1_tx_pins_default>, <&mcu_mcan1_rx_pins_default>; + pinctrl-1 = <&mcu_mcan1_tx_pins_default>, <&mcu_mcan1_rx_pins_wakeup>; vio-supply = <&vddshv_canuart>; + status = "okay"; +}; + +&mcu_pmx0 { + mcu_mcan0_tx_pins_default: mcu-mcan0-tx-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x034, PIN_OUTPUT, 0) /* (D6) MCU_MCAN0_TX */ + >; + }; + + mcu_mcan0_rx_pins_default: mcu-mcan0-rx-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x038, PIN_INPUT, 0) /* (B3) MCU_MCAN0_RX */ + >; + }; + + mcu_mcan0_rx_pins_wakeup: mcu-mcan0-rx-pins-wakeup { + pinctrl-single,pins = < + AM62X_IOPAD(0x038, PIN_INPUT | WKUP_EN, 0) /* (B3) MCU_MCAN0_RX */ + >; + }; + + mcu_mcan1_tx_pins_default: mcu-mcan1-tx-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x03c, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */ + >; + }; + + mcu_mcan1_rx_pins_default: mcu-mcan1-rx-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */ + >; + }; + + mcu_mcan1_rx_pins_wakeup: mcu-mcan1-rx-pins-wakeup { + pinctrl-single,pins = < + AM62X_IOPAD(0x040, PIN_INPUT | WKUP_EN, 0) /* (D4) MCU_MCAN1_RX */ + >; + }; };