From nobody Sat Feb 7 16:05:53 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 427EA136E21 for ; Mon, 29 Jul 2024 08:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240078; cv=none; b=GoAYzEGscgJgCRtw5DjYLTnh0jvCsfF+txmE8kPfA4f6f0JHzKfTMLiVKtFX58Rhz9vpcZXaJO2Ybu5ZVk/2pNwToYbVup7o4QW1gt6+CMgxfT6KRHsLnxqWOhMWaPQgkZBQJYAJBFtZpR0QHHirwfPEZnZ66D3tiFOQdZfWzXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240078; c=relaxed/simple; bh=gFUMqY8c7SLc/xlj0Il9dw1HgpJ+ErhpNp+DDoBd1a0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mt528SgrqB2Hv6WbFHyEcNgy0UfFWEjCxFKaBCly7mDkacLrK/lVB1i6+K5R0rbXcCn0lUBuikEdOOxpg949u6FQc3z3BBkolfyu4lI6ANFNoCBFJ5ybEkmBylrEm9NKpBAyHnTgRS63fP0Jw+yTHdMUhdLVOqBoxKqAdMqgMHQ= 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=RdOqW4Ok; arc=none smtp.client-ip=209.85.221.52 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="RdOqW4Ok" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3684407b2deso1135299f8f.1 for ; Mon, 29 Jul 2024 01:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722240073; x=1722844873; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aOjLun6texcSlkqDtHFasKp/m6UQbRYZsxtm1Omsgik=; b=RdOqW4Ok/s4QANATwGHdXZdEv0LmYrwTxoIivv362D/LE7AljNixCo0rjxyYj+VFgs dvk5WLXGMtAXgp1LFgZ3r0gEaP8fYPxNDHHn5fzywm7vPFNDyXIuG0UD90I9/yO3HQLC pSk075FKJdzvdS9xA30iDJjNQRoJb6NeGFGKIcK93hGknv4wHlLQQJK3AOZqUNJIbZTl Euk5E+P9TTZ8oQZOO+xfy8yU75jPMhMu7SEvt7nO6C7RARF153kTwWeD3FwYhkpv5dcU 90oKcgV4N5wbbWKDBZYoovPzsB/TKXxg518w8lQr0qcOZB/RrX2hnWGiYz3Nrsvb6x7t A7EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722240073; x=1722844873; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aOjLun6texcSlkqDtHFasKp/m6UQbRYZsxtm1Omsgik=; b=OghEnavXP63UarSp5rEItiqsdmZsXWEGdknStAYsBlpeHrGHf5N9hFrk4Pv0MTZsQ+ 0ldePfwpb6nzVCIkRtFNCU09XvWMAaS6OhxFYiupqaWfZx+H1uJBF19AEFP8yqpkDQZ7 brjp/aKfuq7HZcfyKDQ6HalsluTk5fewI86Qn6NVzcPqLY4LbzRJZ+/Te/n6Wy5PZRN8 DnK9A/HORTtr+UvFS18RHqdyO7idShhHWZ8xLQRU96XgpgJH9N9HtOzbJLPJ/v3TPhzx 6MHlpaMqoh/+qtEPH7s81LL6SUacI6bNNwtq4y4860+2Z9+1I0/bkIklmACmQRqlS4bU dIKQ== X-Forwarded-Encrypted: i=1; AJvYcCXwjfbwsm1TR5ZjnsPjhhumtSk2sNE/MaoWSHyl21U6IHTgNrrkTYPv1cRwHqpYEGBYTZ5BACy1iBQiuibG6r2qb/fJ6XRhC0K4gT73 X-Gm-Message-State: AOJu0YwChCh0cxMPWfhiLRaTTXOI1C/f7MQFc39/tU+m1A0mf60xIuI6 Kqhic9SQ8S1dL4uzSCvKyDcXwK3p3sUixU/8mc9hfrw1FplI5HixNJ8+UaADaAk= X-Google-Smtp-Source: AGHT+IFMgwC69DMoi/qdpS3geBrRwusfaLDyoAizRfL/peuUo/6VpfZyOT7ZJpMKpugEbj3UCV3eBQ== X-Received: by 2002:a05:6000:1fac:b0:368:714e:5a59 with SMTP id ffacd0b85a97d-36b5cecf2a0mr6494090f8f.11.1722240073526; Mon, 29 Jul 2024 01:01:13 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42819d9a007sm45452635e9.1.2024.07.29.01.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 01:01:13 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 1/6] dt-bindings: ti, sci: Add property for partial-io-wakeup-sources Date: Mon, 29 Jul 2024 10:00:56 +0200 Message-ID: <20240729080101.3859701-2-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729080101.3859701-1-msp@baylibre.com> References: <20240729080101.3859701-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Partial-IO is a very low power mode in which nearly everything is powered off. Only pins of a few hardware units are kept sensitive and are capable to wakeup the SoC. The device nodes are marked as 'wakeup-source' but so are a lot of other device nodes as well that are not able to do a wakeup from Partial-IO. This creates the need to describe the device nodes that are capable of wakeup from Partial-IO. This patch adds a property with a list of these nodes defining which devices can be used as wakeup sources in Partial-IO. Signed-off-by: Markus Schneider-Pargmann --- .../devicetree/bindings/arm/keystone/ti,sci.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml b/D= ocumentation/devicetree/bindings/arm/keystone/ti,sci.yaml index 25a2b42105e5..7d6152710573 100644 --- a/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml +++ b/Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml @@ -61,6 +61,19 @@ properties: mboxes: minItems: 2 =20 + ti,partial-io-wakeup-sources: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + Partial-IO is a low power mode in which nearly everything is powered + off. Only pins associated with a few hardware units are capable to + wakeup the system from this mode. It is a very small subset of all + device nodes that have the 'wakeup-source' property. + ti,partial-io-wakeup-sources is the list of device nodes that can + wakeup the system from Partial-IO. + + This low power mode depends on the capabilities of the SoC and + the firmware. + ti,host-id: $ref: /schemas/types.yaml#/definitions/uint32 description: | --=20 2.45.2 From nobody Sat Feb 7 16:05:53 2026 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 E65E3137903 for ; Mon, 29 Jul 2024 08:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240079; cv=none; b=S5gqbKG/u5GRg0+2Qp3E9pLX6RBkzhqj1XjsCRigQZg4txSrj/eS773q7DZR6/flTZfsv2Z4ihmDXQyiX8OguZwNaLiRXzzHIUJ2xyJ8FB17CMKfBzOkseBVCt6kHmX9rQm4zDy1WB+Jpm+lmzL7Lxz7qHkJvjxDNpSSRYyQwSI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240079; c=relaxed/simple; bh=hJv3UAfhwjYG8ZjCYDVvzpEw+klMfDJfd0O09UN1Icg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H4R5AzGuZlm2//+g44qctHAHewJHlhv7PTG2W+AwboOKlmxxkfUI1etkeFaXw+1QCG0PNq5wmqOYMOaDWZLYQCaOnSfF+xVIixoS2fBxSHKDfSuyS593Sn76iz7RRjaYGiLzjxHQgf0MRVO6VeTeZWeker4z38O8guCWpm0fHSk= 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=uw89me4f; arc=none smtp.client-ip=209.85.208.172 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="uw89me4f" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2f0dfdc9e16so36028371fa.2 for ; Mon, 29 Jul 2024 01:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722240075; x=1722844875; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XaL7q+hiN8Znt9KwWlJ8p8DadxVN8fjOTmOOEp7Y4Nk=; b=uw89me4fZCkZAAKTO4yEA065FsS9mY4vBUrdQmOBeF8hpgnntWS29JnvHryWsWXSHp UVzSmljZe6cZYdIScNzJe9n55Dx+Tev2wSANC+jBg+aH/gpflJT/s8V+CjEXyKPWg2Pg Um0k5eDHiMVC5nvVVOUp58GVjbmDrO1k+Cea7ymMG2f+yqwCQMr0RgGQAPTDhlGtQS+e KKMWtbbc8KZP78ofYAtBkMM86jJCe//5iL3uV+PKFctjM3zzmqP0PbDYHfYSv3ceHmQz oLS7MtSg0HU3Pzcoipo2wji7O8Cs9XSHUEorh8NQkAMMHeN6SplsaFRmXvAN013kS1ye o8hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722240075; x=1722844875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XaL7q+hiN8Znt9KwWlJ8p8DadxVN8fjOTmOOEp7Y4Nk=; b=v9uJMX+bxSDObaAYKw77qDNoEZapwZaez8BjrYrdK5/+OioRzTbdFwVBLn/U/5AYsr Njp1FBDrRkvIlJfVgyQzh7bwkmxQO2SDK9rtAZRsRvO/k3BxzFdQ8aRnyuNwieDS5/mE P9xC6D/daJ6BPB5AnQ96IXyO8oQuDKUpajeV96O2ksIuCVMy+tPBpi0kNFHxt1lXyFFa Rit+zUboP4QVHwvoW3fstZxAEZg9XEv3heFhVsw8l/5yzy/9H/0tq7nd06Z7IDy/HMzs W66WlE0JtKXMofupMLkGxATeGVBU07Kp5mpr6B4uOXr+IIb8iWYR5ESvldB7vU28XPij PiZQ== X-Forwarded-Encrypted: i=1; AJvYcCXuQIXHd/b9bG4rTPPjzWpM6vSEN360mpfSP5lrObFTsvV5tbK0le9iDMkAmn+ILi3t5KKTQK0L+FMYY4rP2Q+5t2J7BG1txA6WmuLW X-Gm-Message-State: AOJu0Yx/jpZ9ObPFjfQh8A39bRbk7XV7x4DmYBrVghZgyY9iDumCF6jp slHbDApYilh1c/EkXxoqgACAU3JE0B0d5fBg5CZD6oNTNswkwON/SYaY1OBDYNk= X-Google-Smtp-Source: AGHT+IGtANNWAtpJ37DU4Kxw1e1nJWCUhsfVu/g/dZDrwXEI/bbW1ovATxt7o4e1cFRfgvw2yE0d6w== X-Received: by 2002:a2e:7c07:0:b0:2ec:5c94:3d99 with SMTP id 38308e7fff4ca-2f12edf8009mr44140081fa.2.1722240074606; Mon, 29 Jul 2024 01:01:14 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42819d9a007sm45452635e9.1.2024.07.29.01.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 01:01:14 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 2/6] firmware: ti_sci: Partial-IO support Date: Mon, 29 Jul 2024 10:00:57 +0200 Message-ID: <20240729080101.3859701-3-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729080101.3859701-1-msp@baylibre.com> References: <20240729080101.3859701-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for Partial-IO poweroff. In Partial-IO pins of a few modules can generate system wakeups while DDR memory is not powered resulting in a fresh boot of the system. The modules that can be wakeup sources are defined by the devicetree. 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 enter an infinite loop. The wakeup source device nodes are gathered during probe. But they are only resolved to the actual devices in the sys_off handler, if they exist. If they do not exist, they are ignored. 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 | 160 +++++++++++++++++++++++++++++++++----- drivers/firmware/ti_sci.h | 34 ++++++++ 2 files changed, 175 insertions(+), 19 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 160968301b1f..ba2e56da0215 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -99,6 +99,9 @@ struct ti_sci_desc { * @node: list head * @host_id: Host ID * @users: Number of users of this instance + * @nr_wakeup_sources: Number of device nodes in wakeup_source_nodes + * @wakeup_source_nodes: Array of all device_nodes listed as wakeup source= s in + * the devicetree */ struct ti_sci_info { struct device *dev; @@ -116,6 +119,9 @@ struct ti_sci_info { u8 host_id; /* protected by ti_sci_list_mutex */ int users; + + int nr_wakeup_sources; + struct device_node **wakeup_source_nodes; }; =20 #define cl_to_ti_sci_info(c) container_of(c, struct ti_sci_info, cl) @@ -392,10 +398,13 @@ static void ti_sci_put_one_xfer(struct ti_sci_xfers_i= nfo *minfo, static inline int ti_sci_do_xfer(struct ti_sci_info *info, struct ti_sci_xfer *xfer) { + struct ti_sci_msg_hdr *hdr =3D (struct ti_sci_msg_hdr *)xfer->tx_message.= buf; int ret; int timeout; struct device *dev =3D info->dev; bool done_state =3D true; + bool response_expected =3D !!(hdr->flags & (TI_SCI_FLAG_REQ_ACK_ON_PROCES= SED | + TI_SCI_FLAG_REQ_ACK_ON_RECEIVED)); =20 ret =3D mbox_send_message(info->chan_tx, &xfer->tx_message); if (ret < 0) @@ -403,25 +412,27 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *= info, =20 ret =3D 0; =20 - if (system_state <=3D SYSTEM_RUNNING) { - /* And we wait for the response. */ - timeout =3D msecs_to_jiffies(info->desc->max_rx_timeout_ms); - if (!wait_for_completion_timeout(&xfer->done, timeout)) - ret =3D -ETIMEDOUT; - } else { - /* - * If we are !running, we cannot use wait_for_completion_timeout - * during noirq phase, so we must manually poll the completion. - */ - ret =3D read_poll_timeout_atomic(try_wait_for_completion, done_state, - done_state, 1, - info->desc->max_rx_timeout_ms * 1000, - false, &xfer->done); - } + if (response_expected) { + if (system_state <=3D SYSTEM_RUNNING) { + /* And we wait for the response. */ + timeout =3D msecs_to_jiffies(info->desc->max_rx_timeout_ms); + if (!wait_for_completion_timeout(&xfer->done, timeout)) + ret =3D -ETIMEDOUT; + } else { + /* + * If we are !running, we cannot use wait_for_completion_timeout + * during noirq phase, so we must manually poll the completion. + */ + ret =3D read_poll_timeout_atomic(try_wait_for_completion, done_state, + done_state, 1, + info->desc->max_rx_timeout_ms * 1000, + false, &xfer->done); + } =20 - if (ret =3D=3D -ETIMEDOUT) - dev_err(dev, "Mbox timedout in resp(caller: %pS)\n", - (void *)_RET_IP_); + if (ret =3D=3D -ETIMEDOUT) + dev_err(dev, "Mbox timedout in resp(caller: %pS)\n", + (void *)_RET_IP_); + } =20 /* * NOTE: we might prefer not to need the mailbox ticker to manage the @@ -3262,6 +3273,82 @@ static int tisci_reboot_handler(struct sys_off_data = *data) return NOTIFY_BAD; } =20 +/* + * Enter Partial-IO, which disables everything including DDR with only a s= mall + * 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 =3D info->dev; + int ret =3D 0; + + xfer =3D 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 =3D PTR_ERR(xfer); + dev_err(dev, "Message alloc failed(%d)\n", ret); + return ret; + } + + req =3D (struct ti_sci_msg_req_prepare_sleep *)xfer->xfer_buf; + req->mode =3D TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO; + req->ctx_lo =3D 0; + req->ctx_hi =3D 0; + req->debug_flags =3D 0; + + ret =3D 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 int tisci_sys_off_handler(struct sys_off_data *data) +{ + struct ti_sci_info *info =3D data->cb_data; + int i; + int ret; + bool enter_partial_io =3D false; + + for (i =3D 0; i !=3D info->nr_wakeup_sources; ++i) { + struct platform_device *pdev =3D + of_find_device_by_node(info->wakeup_source_nodes[i]); + + if (!pdev) + continue; + + if (device_may_wakeup(&pdev->dev)) { + dev_dbg(info->dev, "%pOFp identified as wakeup source\n", + info->wakeup_source_nodes[i]); + enter_partial_io =3D true; + } + } + + if (!enter_partial_io) + return NOTIFY_DONE; + + ret =3D 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(); + } + + while (1); + + return NOTIFY_DONE; +} + /* Description for K2G */ static const struct ti_sci_desc ti_sci_pmmc_k2g_desc =3D { .default_host_id =3D 2, @@ -3398,6 +3485,35 @@ static int ti_sci_probe(struct platform_device *pdev) goto out; } =20 + if (of_property_read_bool(dev->of_node, "ti,partial-io-wakeup-sources")) { + info->nr_wakeup_sources =3D + of_count_phandle_with_args(dev->of_node, + "ti,partial-io-wakeup-sources", + NULL); + info->wakeup_source_nodes =3D + devm_kzalloc(dev, sizeof(*info->wakeup_source_nodes), + GFP_KERNEL); + + for (i =3D 0; i !=3D info->nr_wakeup_sources; ++i) { + struct device_node *devnode =3D + of_parse_phandle(dev->of_node, + "ti,partial-io-wakeup-sources", + i); + info->wakeup_source_nodes[i] =3D devnode; + } + + ret =3D 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, @@ -3407,7 +3523,13 @@ static int ti_sci_probe(struct platform_device *pdev) list_add_tail(&info->node, &ti_sci_list); mutex_unlock(&ti_sci_list_mutex); =20 - return of_platform_populate(dev->of_node, NULL, NULL, dev); + ret =3D 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 5846c60220f5..ec8e6bb1791a 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -35,6 +35,9 @@ #define TI_SCI_MSG_QUERY_CLOCK_FREQ 0x010d #define TI_SCI_MSG_GET_CLOCK_FREQ 0x010e =20 +/* Low Power Mode Requests */ +#define TI_SCI_MSG_PREPARE_SLEEP 0x0300 + /* Resource Management Requests */ #define TI_SCI_MSG_GET_RESOURCE_RANGE 0x1500 =20 @@ -545,6 +548,37 @@ struct ti_sci_msg_resp_get_clock_freq { u64 freq_hz; } __packed; =20 +#define TISCI_MSG_VALUE_SLEEP_MODE_DEEP_SLEEP 0x0 +#define TISCI_MSG_VALUE_SLEEP_MODE_MCU_ONLY 0x1 +#define TISCI_MSG_VALUE_SLEEP_MODE_STANDBY 0x2 +/* + * When sending perpare_sleep with MODE_PARTIAL_IO no response will be sen= t, + * no further steps are required. */ +#define TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO 0x3 + +/** + * struct tisci_msg_req_prepare_sleep - Request for TISCI_MSG_PREPARE_SLEE= P. + * + * @hdr TISCI header to provide ACK/NAK flags to the host. + * @mode Low power mode to enter. + * @ctx_lo Low 32-bits of physical pointer to address to use for context= save. + * @ctx_hi High 32-bits of physical pointer to address to use for contex= t save. + * @debug_flags Flags that can be set to halt the sequence during suspen= d or + * resume to allow JTAG connection and debug. + * + * This message is used as the first step of entering a low power mode. It + * allows configurable information, including which state to enter to be + * easily shared from the application, as this is a non-secure message and + * therefore can be sent by anyone. + */ +struct ti_sci_msg_req_prepare_sleep { + struct ti_sci_msg_hdr hdr; + u8 mode; + u32 ctx_lo; + u32 ctx_hi; + u32 debug_flags; +} __packed; + #define TI_SCI_IRQ_SECONDARY_HOST_INVALID 0xff =20 /** --=20 2.45.2 From nobody Sat Feb 7 16:05:53 2026 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 8B0FF138490 for ; Mon, 29 Jul 2024 08:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240079; cv=none; b=PJseRu8k0/K0HzmoGBmsUkfgm6CfWgZF93mZZycR6aH8A84INBsGyCf10anAluCq3e0zcIKjssMJa4GhRGZnPAdaeJVdStV3oqDszV9ZNUfZm01uqI5tjEA0ltdDgV0/hIRUajGmpKXonWoj5dnnP+k7SQ0ux2FIRDjeUiLOkX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240079; c=relaxed/simple; bh=53f9JH01fR+1+uKpHwhb0lHI7XimsByJJ1fOG30/dPQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HA+aRfufo2DpS8la3QgLZt4SNBqH8wzWrZsiZeii0KOU64gChuEp6aelj+2OSRamMBrGDEHhsmEjgj9vAYaab3t391dIVY9KgYccxDpTx8lY8GNpYb+asPBWJFDJn/g2fJcf+MNHYF8cq+IaGV3eO8rqu3HuIu/NiSbtkOPwNEQ= 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=Qy9hhOBt; arc=none smtp.client-ip=209.85.208.177 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="Qy9hhOBt" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2f0271b0ae9so40593101fa.1 for ; Mon, 29 Jul 2024 01:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722240076; x=1722844876; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Qwj4fJ5PcTIVxTcnKoK6Sn5Sy7ClPbtzG5l0PUGLdrw=; b=Qy9hhOBtudUvBX79A3IfBjQ/H6JTU3EYToP+t70GXt5u+Ums7uG335Nukq/NvLiGya YRh9TmV005khxxdQBDe/cdIxPcP7DnvVNBNrys5ySnBkzmN15ryjKXFq8YQ3ECd9RwXA EZj9NKZyoLEZIUPAVmWL5g+Z/l4KCgEBgTx+RUEkK+1T3cUyK8052AbNn3S+Eh0FeCYq yQZyQPTxf36cFf3hR+vgN0Eij5n1eP0nluBC47AHaCb8UDTsEhpF6RRjcTax3mLjOBHa jiz1yUs+wy/99whDdvI3El2iqSckzHeQea30KkbNI5mLTZXz6gp0/0MRgtvXumXFxhU+ UdZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722240076; x=1722844876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qwj4fJ5PcTIVxTcnKoK6Sn5Sy7ClPbtzG5l0PUGLdrw=; b=k+5EEQxcXQfv2Mm/wUmU7J59nMGTcSTm+vrZvxCX1lR77kJJCApogRztdCs3Wy2Yv2 U5VS893wiw1R8awcu8cf3VTD3LZjgBb+h73WQIfQFnMLzu4IFa6bEP0dmDp2PGyLMPk8 2lNAKcW6tpUl/NW9XlfKbnKovZuqWtyO0r0C/uneSy+uOod0w+bLTidrxslqHjGxsi7N WmsuWD3QyO+mP/NMjP86oUTkqHHl9zhRB1NqGWitqIKG2Tqo2ajKAz5Cn++G9faXXuvT Gj3/FzdwKBZTwh1iNXI8qMiIB56lmgjkcjxuaVmu33jFqAeGFsM6liTssuRfvUMBWzsy FaJQ== X-Forwarded-Encrypted: i=1; AJvYcCXmn/riTHVt67UsGwtUKKCmjizC5Jl0a7lghlIaEzU8BGeX/yj2484iYIAlCUuLdkGoeNtBFkT4bmEL9n6db4fpxtPdtmmWw2E893YE X-Gm-Message-State: AOJu0Yy61i9UWU59iEjzam2DPsr3wD4bBEZ5sl/MIkN6R2Qbmu1/Yp+X Zxwq/C70oMPyipcSu3k5zBO3XB11wBRPhOj0aodp4IP1Rfcpx9ou53t6UX1UCpw= X-Google-Smtp-Source: AGHT+IGk+Ma28FqZivTy+Lwf3ij5OpU/7rZpCibyXnynu0+yv9j7Y81EKKbkk1ve4///COt/muKc4Q== X-Received: by 2002:a05:651c:102a:b0:2ef:2d58:2de5 with SMTP id 38308e7fff4ca-2f12ecd1b89mr39762381fa.11.1722240075632; Mon, 29 Jul 2024 01:01:15 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42819d9a007sm45452635e9.1.2024.07.29.01.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 01:01:15 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 3/6] arm64: dts: ti: k3-pinctrl: Add WKUP_EN flag Date: Mon, 29 Jul 2024 10:00:58 +0200 Message-ID: <20240729080101.3859701-4-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729080101.3859701-1-msp@baylibre.com> References: <20240729080101.3859701-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/k= 3-pinctrl.h index 22b8d73cfd32..dd4d53e8420a 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) =20 #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) =20 +#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) =20 --=20 2.45.2 From nobody Sat Feb 7 16:05:53 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.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 26F101386C9 for ; Mon, 29 Jul 2024 08:01:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240079; cv=none; b=D+gWt0W3DIbmyx40Vo6aXJ1134773UIWJjEusEBaNV9M/g+MJyI4vKDl0EqOi388Fhne+cRvkTZTro/fnJlcC+lHEu2e09wxNpKLxWmOm1ODIdL881O4wZh+4HatS/++0O4sfkOBe827SihSNlFfyx6enBcdzXTelZf3G/TMDnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240079; c=relaxed/simple; bh=20Wfk3w47c2eDHVGu9FwABnkA+VXPgQxsX/7uDKiMEU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lJp+57/OrJmPQtKmTwmBFmDt7QsAi7epNjyydHgiLvIpPmvxEQJqyKzDwlPzdoWzpURulHJIzg2TZbRgvS4hbbzo3skefEQI942s3h1Y/WZHfjqwik6LasveyaV9COUrOLQh0A5BvhV3HEfwjn6GFet0tFlPkBls1Zy1p2omgp4= 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=UiYTBtZy; arc=none smtp.client-ip=209.85.221.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="UiYTBtZy" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-368440b073bso906629f8f.0 for ; Mon, 29 Jul 2024 01:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722240076; x=1722844876; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lznQr0jMS1hTSLYpt3zZD9a+rnGG0mWFLbB4ZWDI+Vo=; b=UiYTBtZyGB1h56ntZKJauKrG66oNmWsF1cHXyIownUkwZO9w9OYQVJ6FcwPKQXV/az lQw6/2Bq0Gw1CVC70Y7WZtNJcPHdB3tSYo1bjIzw5sJPliZPVRzCRDF5AC36DDN9WpgK rf7Drqt6RZF45fWoXXz7SUyt0o8ZR1jdmMZ6k0mAmHgddZ/M6CB01QyR9ZB1aoHnJ5cg BdeGeD69MxM2ipmMrb6sBMFozgbBWwMgxKy+dqWaqMFC0hl4YTlPSKjkmu1LEZlvREl7 1AMCE1bgQbHqiEOnTnJb3uyJfZJwRP9JNNp4VkxbG4xXS/v+yh461z8XUJQdl1LCzBbg HDcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722240076; x=1722844876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lznQr0jMS1hTSLYpt3zZD9a+rnGG0mWFLbB4ZWDI+Vo=; b=MoACPphoQsRKP67FxRLpu+61DUs5O3t9bsQ460dMg4nxQV4kJRZWHTjSBd2esvvKfD 6/S8ixPZJCsI7Wf4VVgr6lc196+Dv4waeqwH1kwopNakI/QSbNLaiyqsr0KPhD8TmJ8F Mj/2uTCvmZFwrP5tsyHEBkqjW1/KcCvBGGeU/ZEse6HKocIlXNSYR88ZqLFGe7TmUvLh 19rjXmceGSk3F9ROtAHFhetgCd93sgxmpgqEN9O4uGuClStT7EKlRX+jKVGuiyGaBVe6 78F38hB+XCDwYqiHIKldiViptNFjYrtHn2fhvChs85M4VXsehMdmBGvo9YxPUq4oa8wu QMkw== X-Forwarded-Encrypted: i=1; AJvYcCWkUZamtkQiDxQkcRis/VEmCRG9XMWZBo+pcd06hmiCDhEXRkbPDmg43KLWyujozpVchYevMChoa4gy1SEPYNQGXZzM+rDAD/neJdsc X-Gm-Message-State: AOJu0YzIpEjY1neuLhcg6Xigj4rZQxWYz4HdPA5Wwf2MEG2kwfQBX9WB Pl8q1hTTLn4j/uxG2FoKFBTz9ARDOZJsc3c4GAj/xr1vUMy9ICdJKHzZ0wbeowA= X-Google-Smtp-Source: AGHT+IH/sKkBGs22dutys1BjvCqtKuAkAgjEZni/gmQywUyTEpKEfEuJOGjetR+NjIPAma/Q1+SuTA== X-Received: by 2002:a05:6000:1101:b0:361:e909:60c3 with SMTP id ffacd0b85a97d-36b5d7c4bfamr3707368f8f.9.1722240076629; Mon, 29 Jul 2024 01:01:16 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42819d9a007sm45452635e9.1.2024.07.29.01.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 01:01:16 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 4/6] arm64: dts: ti: k3-am62: Add partial-io wakeup sources Date: Mon, 29 Jul 2024 10:00:59 +0200 Message-ID: <20240729080101.3859701-5-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729080101.3859701-1-msp@baylibre.com> References: <20240729080101.3859701-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In Partial-IO mode there are a number of possible wakeup sources. Add the list of phandles to these wakeup sources. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k= 3-am62.dtsi index bfb55ca11323..2bae8550c900 100644 --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi @@ -122,3 +122,7 @@ dss_vp1_clk: clock-divider-oldi { #include "k3-am62-main.dtsi" #include "k3-am62-mcu.dtsi" #include "k3-am62-wakeup.dtsi" + +&dmsc { + ti,partial-io-wakeup-sources =3D <&mcu_mcan0>, <&mcu_mcan1>, <&mcu_uart0>= , <&wkup_uart0>; +}; --=20 2.45.2 From nobody Sat Feb 7 16:05:53 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 27DC913A868 for ; Mon, 29 Jul 2024 08:01:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240080; cv=none; b=ZeIqHNeWHh8SIM6DSFxpaTkrcI2dcSKTfNw2mdLJV5mL0ngDP6QEb8e/05/s5N0OhXuXxKtPrRcnivZrMoF08Byd5j/8/Su65+vZQPXkRJv5Zd7IzO/3Vjd0i2h4uEQtoLUwT9YaGN44v/ErXVeZ1dlbkLo8MamsVvbqHy9uMEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240080; c=relaxed/simple; bh=Ws5NM+P7MDrdFopIXmvse5S24KmyyD/4+cTZxJM/IqY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HsRZ7vYOeiZHL0p3DehtTA6++/vXUTi2qfbNs5Plxbv8GxjqhWuehlR9Gn88K8Ooy7Yb7cZmynYpdpk0NhrHdBYz+T1PxBg+OYsV889QkaSS7wDLV/QtLJURE2kd+i0nAVN/C7PO4TlDZOItzewt7T+K2OO0fC+nWdUd+um39eQ= 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=gvzjSWcT; arc=none smtp.client-ip=209.85.128.48 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="gvzjSWcT" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4266dc7591fso12641205e9.0 for ; Mon, 29 Jul 2024 01:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722240077; x=1722844877; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JU8YPDGhfgyNA8aWOgCS08s+SEmwnZ36/MbZAdv9Jy0=; b=gvzjSWcT6vfSd53Z1VcrNcXFcdBbrUWGjiIOM5bkH8L/yV9oWYRUGg38K2bJj9pkmW 7j4ivAknfnMT31aADaNghNMi0SAIBYsM9AEKIlooqs+jq1UsKFgX4ZwRDSQihcOH3Z1n K1DxIygfhPgB2w8pQ4RgtlxKJQVgX1cKOkVfvxsvVXy562TBHczLt1aBzOSBkmZ1L9Fn S/SdvqKoGgpPME+SpKZRGReQJIlfJTH66nJUNiOLLe3GXSlwNo6Wmc+tm+R6URsIuTfH WpeKy8sAEIDGG18OX5Xrln+j1dQho7iBPRtxHPh7OUZ7ZWNYn0v7/dau8x2/3mF9rZYh 4TjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722240077; x=1722844877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JU8YPDGhfgyNA8aWOgCS08s+SEmwnZ36/MbZAdv9Jy0=; b=F7okpMZ/pzHm9mIbaRdfe7dDWBtXW/7rTM0dcEqjNKtsJ32ydayXENvWtkW0pXGkJU Z6BcD32vb5IAn82brhBLcCuY9a1VMimm1c4Gm9UzSxkLj2Zr8EATDzIpzJ0+5BL3sN3t wEpH7Lg0U/1s8O6AaK1wJSnN0bVwDdgSuMfuU7ur5IoAp2XMGF4gSvVcGBNrEdhVXVDk EA/HhoOmdFLrCRB6bZhNWTZy+p9Ko7Sbw6/B13cEgp3OBl/RP8TXfPlLVzR8bbKBzVvg M5kyVJY5mh5h211RaKrvF9GwBzBgha3y1ZB3dA8rB60/2SkKzcui+r7M3gptUxUoc5Ec jRng== X-Forwarded-Encrypted: i=1; AJvYcCXqw5esjWOidcYmuNKnHJ8AXPJIxvSNbhjVVW0IQqQdj/PVvB9E61pjLdCErQ9tOi5Pi88ySGT23R2PXRwx01suLGSkQ3cuIFYcAh8m X-Gm-Message-State: AOJu0YzA1OXOdGa0BwiegOTxf7NWklFaCQd4BJxYEwqUyfyIkLImBuIT 4svYAjnHfIiQl3B7AOYlU+4+4whIJlzW4SpkDBdVsCqDhVQRuCRbJdwUpHRESYE= X-Google-Smtp-Source: AGHT+IEzvxgrlq2sVwdVFU/d76RGHkKf/FL9gxRWixH14NbnUpqsy79WU0duVX8v51Y9Flhr4p4u/w== X-Received: by 2002:a05:600c:3c95:b0:426:5dde:627a with SMTP id 5b1f17b1804b1-42811dd48f9mr43960815e9.23.1722240077554; Mon, 29 Jul 2024 01:01:17 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42819d9a007sm45452635e9.1.2024.07.29.01.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 01:01:17 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 5/6] arm64: dts: ti: k3-am62a: Add partial-io wakeup sources Date: Mon, 29 Jul 2024 10:01:00 +0200 Message-ID: <20240729080101.3859701-6-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729080101.3859701-1-msp@baylibre.com> References: <20240729080101.3859701-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In Partial-IO mode there are a number of possible wakeup sources. Add the list of phandles to these wakeup sources. Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a.dtsi b/arch/arm64/boot/dts/ti/= k3-am62a.dtsi index b1b884600293..5c13851c29ec 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a.dtsi @@ -123,3 +123,7 @@ cbass_wakeup: bus@b00000 { #include "k3-am62a-main.dtsi" #include "k3-am62a-mcu.dtsi" #include "k3-am62a-wakeup.dtsi" + +&dmsc { + ti,partial-io-wakeup-sources =3D <&mcu_mcan0>, <&mcu_mcan1>, <&mcu_uart0>= , <&wkup_uart0>; +}; --=20 2.45.2 From nobody Sat Feb 7 16:05:53 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 3066613B286 for ; Mon, 29 Jul 2024 08:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240081; cv=none; b=CzYgYCqgJuwxy4WXges2Un/LD0Nh/q98Kb0EPIzfy3YCFzNVADPQ+z3blPWJxlHe3uTqpy1EghDf6kZcWLWADtRhijPRyxBJ23jxKxxXfLnPV0gFesx3KZTyMU1SE0U+syAH01G5knWNlDEmgQ1s7Ddh0PWQy1k5rZOHHNhgV70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722240081; c=relaxed/simple; bh=Q7YB0WcALJsVDb7yxJK+rUTZPqhc/eLdyZInh9H7z+4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RqBPDVGoLWiz+ehN58iNx52pXDUHBm5OgJplzguNWBjRda5N6ixwGo4VzLNmUHsH/kc/aj7/u4SavsZyxMTSlb/bFBH+bV+ZWN/5ZkBTu+jgfzIOXB3p7vKzz7qxGS+dDuuNyOjiDyOEbIeQZZQTlHm7X9XRhZsgWBHHR+kNwSQ= 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=Iafi4PM0; arc=none smtp.client-ip=209.85.128.49 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="Iafi4PM0" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-428085a3ad1so14330255e9.1 for ; Mon, 29 Jul 2024 01:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1722240078; x=1722844878; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=29uxXeDOeLQP1GMl3yPmsnZHtmazUFEQgig3ecXgCqg=; b=Iafi4PM0Sk5dzHc++jYxn3oKOSC2hjB80VvNdUcq8lVySR5vZbQbGNHZme2oeWz3oU GSXNdwXa/7B6/3U99sCoHAo+fzEq3XyFklHSdiLg4sPLTCHTlZn/2dY2zComLSSTkluU 57Elrh0BJx79tQIAGfUmcYHSrYOJCImuJqEhJuHPGDrv6UeowAEjscbSDXEdEVOWDDL8 WXzV2Q/aaT0z50FZ4Z0uN4z2cIP2Qka69SWBOnwRO9DYy7KG1j4ahZ5ZnirRuVHF5br9 6FQVW0fwbx8fIzA2FFI0nr7jWnuHGrxv6bW/zJD31zSmKPi1bX9rDEazah1prBrFOnlq roPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722240078; x=1722844878; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=29uxXeDOeLQP1GMl3yPmsnZHtmazUFEQgig3ecXgCqg=; b=iOqyDJcTdGwxrXgRwnASS39ZE7wIBeLFQeKZxkyF/VLgTiE1aUfEV60DiGAYfUxhNZ htbhcA8ES6jl9MASLanpuZPpuSc7qoIQjqlxwDLwrFSgTA2r6lBZ0BXTK4B2ksy+BHIg HQ/LOUjsabsxa/z7dtwBBqVGGD4LsbWNHhlMNP2dTiHr1TPFqBz0aTm2ZaQQHd6EoS4D gkhbRkj0HqlcMGXOyXqOmZZb6SNpmYBuop7cex8bdKHUUdqPdUDj3oyYDEkKB4TNLmmx XsSwRUNu3iOYmIbt0FM0BhXRoeFAsrnaLPmtIe1ccVl8IX/q+FmTGesYDknV81+XEKpE 4PuQ== X-Forwarded-Encrypted: i=1; AJvYcCXsagyo4M3JkEHFKuQ+86/Z2ftLiJZBEpnpvTN5SUQsFhdfTn/vMitoGLFunNZvbeWmALdrW70RAftAu73PMzudo4Bg63BBSjLkm7yo X-Gm-Message-State: AOJu0YywKwkZXiBCdwY4tlfId4YGhsh1XnHZAHALLOul82ciEeNew/ix prqVzajaQjy5fWLGX3eK7u4N0EPMgqQmqXdFbUvHccnLpI9VEUN3gk3fazkJ5Ko= X-Google-Smtp-Source: AGHT+IE8Yiz/LWA3dIxdU0iaNYEV0D8RMGb+YexRP1/S+Yunh4kjB0gxOiHKJnPBRA9BZEvGWGKF4Q== X-Received: by 2002:a05:600c:4447:b0:426:5c34:b19b with SMTP id 5b1f17b1804b1-42811d9af49mr44304765e9.20.1722240078644; Mon, 29 Jul 2024 01:01:18 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4091:a245:8609:c1c4:a4f8:94c8:31f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42819d9a007sm45452635e9.1.2024.07.29.01.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 01:01:18 -0700 (PDT) From: Markus Schneider-Pargmann To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: Vibhore Vardhan , Kevin Hilman , Dhruva Gole , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH v2 6/6] arm64: dts: ti: k3-am62p: Add partial-io wakeup sources Date: Mon, 29 Jul 2024 10:01:01 +0200 Message-ID: <20240729080101.3859701-7-msp@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729080101.3859701-1-msp@baylibre.com> References: <20240729080101.3859701-1-msp@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Vibhore Vardhan In Partial-IO mode there are a number of possible wakeup sources. Add the list of phandles to these wakeup sources. Based on the patch for AM62a. Signed-off-by: Vibhore Vardhan Signed-off-by: Markus Schneider-Pargmann --- arch/arm64/boot/dts/ti/k3-am62p.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p.dtsi b/arch/arm64/boot/dts/ti/= k3-am62p.dtsi index 75a15c368c11..cd81f6d173f4 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p.dtsi @@ -126,3 +126,7 @@ cbass_wakeup: bus@b00000 { =20 /* Include AM62P specific peripherals */ #include "k3-am62p-main.dtsi" + +&dmsc { + ti,partial-io-wakeup-sources =3D <&mcu_mcan0>, <&mcu_mcan1>, <&mcu_uart0>= , <&wkup_uart0>; +}; --=20 2.45.2