mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup
@ 2025-12-30 21:37 Kendall Willis
  2026-01-03 10:02 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Kendall Willis @ 2025-12-30 21:37 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Santosh Shilimkar, Ulf Hansson
  Cc: d-gole, vishalm, sebin.francis, msp, khilman, a-kaur,
	s-kochidanadu, linux-arm-kernel, linux-pm, linux-kernel,
	Kendall Willis

For devices capable of out-of-band system wakeups via I/O daisy chaining,
prevent sending wakeup constraints to the PM co-processor. This allows
the system to enter deeper low power modes, as the device is not marked
as requiring power.

Replaces the logic from commit b06bc4727991 ("pmdomain: ti_sci: handle
wake IRQs for IO daisy chain wakeups") since checking out-of-band wakeup
will cover the same functionality.

Detect out-of-band wakeup in the suspend path, and if it exists, skip
sending the constraint.

Signed-off-by: Kendall Willis <k-willis@ti.com>
---
Implementation
--------------
This patch is intended to be implemented along with the following
series. This patch has no dependencies on any of the other series:

1. "pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup"
   (this patch): Skips setting constraints for wakeup sources that have
   out-of-band wakeup capability.
   https://github.com/kwillis01/linux/commits/v6.19/uart-daisy-chain/pmdomain

2. "serial: 8250: omap: set out-of-band wakeup if wakeup pinctrl exists":
   Implements out-of-band wakeup from the UARTs for TI K3 SoCs
   https://github.com/kwillis01/linux/tree/v6.19/uart-daisy-chain/uart-wakeup

3. "arm64: dts: ti: k3-am62: Support Main UART wakeup": Implements the
   functionality to wakeup the system from the Main UART
   https://github.com/kwillis01/linux/tree/b4/uart-daisy-chain-dts

Testing
-------
Tested on a AM62P SK EVM board with all series and dependencies
implemented. Suspend/resume verified with the Main UART wakeup source
by entering a keypress on the console.

This github branch has all the necessary patches to test the series
using v6.19-rc1:
https://github.com/kwillis01/linux/tree/v6.19/uart-daisy-chain/all
---
 drivers/pmdomain/ti/ti_sci_pm_domains.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index e5d1934f78d9ee0a02eb05aa1301cd5a59e134d6..18d33bc35dee1b3bf6107af1e414db377d515199 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -91,8 +91,9 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
 		 * If device can wakeup using IO daisy chain wakeups,
 		 * we do not want to set a constraint.
 		 */
-		if (dev->power.wakeirq) {
-			dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
+		if (device_out_band_wakeup(dev)) {
+			dev_dbg(dev, "%s: has out of band wakeup, not setting constraints\n", \
+					__func__);
 			return;
 		}
 

---
base-commit: f8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da
change-id: 20251230-pmdomain-e71bed9b40f8

Best regards,
-- 
Kendall Willis <k-willis@ti.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup
  2025-12-30 21:37 [PATCH] pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup Kendall Willis
@ 2026-01-03 10:02 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2026-01-03 10:02 UTC (permalink / raw)
  To: Kendall Willis
  Cc: Nishanth Menon, Tero Kristo, Santosh Shilimkar, d-gole, vishalm,
	sebin.francis, msp, khilman, a-kaur, s-kochidanadu,
	linux-arm-kernel, linux-pm, linux-kernel

On Tue, 30 Dec 2025 at 22:37, Kendall Willis <k-willis@ti.com> wrote:
>
> For devices capable of out-of-band system wakeups via I/O daisy chaining,
> prevent sending wakeup constraints to the PM co-processor. This allows
> the system to enter deeper low power modes, as the device is not marked
> as requiring power.
>
> Replaces the logic from commit b06bc4727991 ("pmdomain: ti_sci: handle
> wake IRQs for IO daisy chain wakeups") since checking out-of-band wakeup
> will cover the same functionality.
>
> Detect out-of-band wakeup in the suspend path, and if it exists, skip
> sending the constraint.
>
> Signed-off-by: Kendall Willis <k-willis@ti.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
> Implementation
> --------------
> This patch is intended to be implemented along with the following
> series. This patch has no dependencies on any of the other series:
>
> 1. "pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup"
>    (this patch): Skips setting constraints for wakeup sources that have
>    out-of-band wakeup capability.
>    https://github.com/kwillis01/linux/commits/v6.19/uart-daisy-chain/pmdomain
>
> 2. "serial: 8250: omap: set out-of-band wakeup if wakeup pinctrl exists":
>    Implements out-of-band wakeup from the UARTs for TI K3 SoCs
>    https://github.com/kwillis01/linux/tree/v6.19/uart-daisy-chain/uart-wakeup
>
> 3. "arm64: dts: ti: k3-am62: Support Main UART wakeup": Implements the
>    functionality to wakeup the system from the Main UART
>    https://github.com/kwillis01/linux/tree/b4/uart-daisy-chain-dts

FWIW:
I had a quick look at 2) and 3), both seem fine to me.


>
> Testing
> -------
> Tested on a AM62P SK EVM board with all series and dependencies
> implemented. Suspend/resume verified with the Main UART wakeup source
> by entering a keypress on the console.
>
> This github branch has all the necessary patches to test the series
> using v6.19-rc1:
> https://github.com/kwillis01/linux/tree/v6.19/uart-daisy-chain/all
> ---
>  drivers/pmdomain/ti/ti_sci_pm_domains.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index e5d1934f78d9ee0a02eb05aa1301cd5a59e134d6..18d33bc35dee1b3bf6107af1e414db377d515199 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -91,8 +91,9 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
>                  * If device can wakeup using IO daisy chain wakeups,
>                  * we do not want to set a constraint.
>                  */
> -               if (dev->power.wakeirq) {
> -                       dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
> +               if (device_out_band_wakeup(dev)) {
> +                       dev_dbg(dev, "%s: has out of band wakeup, not setting constraints\n", \
> +                                       __func__);
>                         return;
>                 }
>
>
> ---
> base-commit: f8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da
> change-id: 20251230-pmdomain-e71bed9b40f8
>
> Best regards,
> --
> Kendall Willis <k-willis@ti.com>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-03 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-30 21:37 [PATCH] pmdomain: ti_sci: handle wakeup constraint for out-of-band wakeup Kendall Willis
2026-01-03 10:02 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®