Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH v1 0/2] arm64: dts: imx93: enable UART wakeup on Variscite boards
@ 2026-11-02 18:55 Stefano Radaelli
  2026-11-02 18:55 ` [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup Stefano Radaelli
  2026-11-02 18:55 ` [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: " Stefano Radaelli
  0 siblings, 2 replies; 5+ messages in thread
From: Stefano Radaelli @ 2026-11-02 18:55 UTC (permalink / raw)
  To: Frank Li, linux-kernel, devicetree, imx, linux-arm-kernel
  Cc: pierluigi.p, Stefano Radaelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam

This series marks the LPUART1 serial console as a wakeup source on the
Variscite DART-MX93 with the Sonata carrier board and VAR-SOM-MX93 with
the Symphony carrier board, allowing console input to wake the system
from suspend.

Stefano Radaelli (2):
  arm64: dts: imx93-var-dart-sonata: enable UART wakeup
  arm64: dts: imx93-var-som-symphony: enable UART wakeup

 arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts  | 1 +
 arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts | 1 +
 2 files changed, 2 insertions(+)


base-commit: e20daa6eb46fdb339be122a37211aa408488a3e3
-- 
2.47.3


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

* [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup
  2026-11-02 18:55 [PATCH v1 0/2] arm64: dts: imx93: enable UART wakeup on Variscite boards Stefano Radaelli
@ 2026-11-02 18:55 ` Stefano Radaelli
  2026-11-02 19:03   ` sashiko-bot
  2026-11-02 18:55 ` [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: " Stefano Radaelli
  1 sibling, 1 reply; 5+ messages in thread
From: Stefano Radaelli @ 2026-11-02 18:55 UTC (permalink / raw)
  To: Frank Li, linux-kernel, devicetree, imx, linux-arm-kernel
  Cc: pierluigi.p, Stefano Radaelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Alifer Moraes

From: Stefano Radaelli <stefano.r@variscite.com>

Mark the LPUART1 serial console as a wakeup source to allow it to wake
the system from suspend.

Co-developed-by: Alifer Moraes <alifer.m@variscite.com>
Signed-off-by: Alifer Moraes <alifer.m@variscite.com>
Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
---
 arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts b/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts
index 1ca3ec8330d0..d368a09dc916 100644
--- a/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts
@@ -385,6 +385,7 @@ can0: can@0 {
 &lpuart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
+	wakeup-source;
 	status = "okay";
 };
 
-- 
2.47.3


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

* [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: enable UART wakeup
  2026-11-02 18:55 [PATCH v1 0/2] arm64: dts: imx93: enable UART wakeup on Variscite boards Stefano Radaelli
  2026-11-02 18:55 ` [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup Stefano Radaelli
@ 2026-11-02 18:55 ` Stefano Radaelli
  2026-11-02 19:04   ` sashiko-bot
  1 sibling, 1 reply; 5+ messages in thread
From: Stefano Radaelli @ 2026-11-02 18:55 UTC (permalink / raw)
  To: Frank Li, linux-kernel, devicetree, imx, linux-arm-kernel
  Cc: pierluigi.p, Stefano Radaelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Alifer Moraes

From: Stefano Radaelli <stefano.r@variscite.com>

Mark the LPUART1 serial console as a wakeup source to allow it to wake
the system from suspend.

Co-developed-by: Alifer Moraes <alifer.m@variscite.com>
Signed-off-by: Alifer Moraes <alifer.m@variscite.com>
Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
---
 arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts b/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
index 1f0954620195..47203811abe9 100644
--- a/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
@@ -302,6 +302,7 @@ typec1_dr_sw: endpoint {
 &lpuart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
+	wakeup-source;
 	status = "okay";
 };
 
-- 
2.47.3


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

* Re: [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup
  2026-11-02 18:55 ` [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup Stefano Radaelli
@ 2026-11-02 19:03   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-02 19:03 UTC (permalink / raw)
  To: Stefano Radaelli, devicetree, imx; +Cc: robh, conor+dt, Frank.Li

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] arm64: dts: imx93-var-dart-sonata: invalid wakeup-source on lpuart1
--

commit 65667fa7cde1bed5fd9129933907d0e5e0428a2f
Author: Stefano Radaelli <stefano.r@variscite.com>

arm64: dts: imx93-var-dart-sonata: enable UART wakeup

This commit adds the wakeup-source property to the lpuart1 node in
imx93-var-dart-sonata.dts to allow the serial console to wake the system from
suspend.

> diff --git a/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts b/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts
> index 1ca3ec8330d07..d368a09dc9167 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts
> @@ -385,6 +385,7 @@ can0: can@0 {
>  &lpuart1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_uart1>;
> +	wakeup-source;

[Severity: Medium]
Does adding wakeup-source to &lpuart1 pass dtbs_check or take effect at
runtime?

The lpuart1 node in arch/arm64/boot/dts/freescale/imx91_93_common.dtsi uses
the "fsl,imx93-lpuart", "fsl,imx8ulp-lpuart", "fsl,imx7ulp-lpuart"
compatibles, which are matched by
Documentation/devicetree/bindings/serial/fsl-lpuart.yaml:

  required:
    - compatible
    - reg
    - interrupts
    - clocks
    - clock-names

  unevaluatedProperties: false

Neither fsl-lpuart.yaml nor the schemas it references (serial.yaml and
rs485.yaml) define wakeup-source, so this causes an unevaluated property
validation failure on serial@44380000.

In addition, neither lpuart_probe() in drivers/tty/serial/fsl_lpuart.c nor
serial_core_add_one_port() in drivers/tty/serial/serial_core.c reads
wakeup-source from the controller device node. Instead,
serial_core_add_one_port() unconditionally marks the child tty device as
wakeup-capable:

  tty_dev = tty_port_register_device_attr_serdev(port, drv->tty_driver,
                  uport->line, uport->dev, &uport->port_dev->dev, port,
                  uport->tty_groups);
  if (!IS_ERR(tty_dev)) {
          device_set_wakeup_capable(tty_dev, 1);
  }

And lpuart_uport_is_active() in drivers/tty/serial/fsl_lpuart.c checks
wakeup state on that child tty_dev (configured via sysfs) rather than the
platform device:

  tty = tty_port_tty_get(port);
  if (tty) {
          tty_dev = tty->dev;
          may_wake = tty_dev && device_may_wakeup(tty_dev);
          tty_kref_put(tty);
  }

Should fsl-lpuart.yaml and the driver be updated to support wakeup-source
before adding this property to the devicetree?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1793645417.git.stefano.r@variscite.com?part=1

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

* Re: [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: enable UART wakeup
  2026-11-02 18:55 ` [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: " Stefano Radaelli
@ 2026-11-02 19:04   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-02 19:04 UTC (permalink / raw)
  To: Stefano Radaelli, devicetree, imx; +Cc: robh, conor+dt, Frank.Li

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] arm64: dts: imx93: invalid and unused wakeup-source property on lpuart1
--

commit 54c0e2db8b2c42ca5d07339b64a64c48881a16ab
Author: Stefano Radaelli <stefano.r@variscite.com>

arm64: dts: imx93-var-som-symphony: enable UART wakeup

This commit adds the wakeup-source property to the lpuart1 node in
imx93-var-som-symphony.dts to enable UART wakeup from system suspend.

> diff --git a/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts b/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
> index 1f0954620195a..47203811abe99 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts
> @@ -302,6 +302,7 @@ typec1_dr_sw: endpoint {
>  &lpuart1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_uart1>;
> +	wakeup-source;

[Severity: Medium]
Is wakeup-source supported by the fsl-lpuart binding and driver here?

In arch/arm64/boot/dts/freescale/imx91_93_common.dtsi, lpuart1 uses the
compatible strings fsl,imx93-lpuart, fsl,imx8ulp-lpuart, and
fsl,imx7ulp-lpuart, which bind against
Documentation/devicetree/bindings/serial/fsl-lpuart.yaml. That schema
only references serial.yaml and rs485.yaml and specifies:

    unevaluatedProperties: false

Neither fsl-lpuart.yaml, serial.yaml, nor rs485.yaml defines
wakeup-source, so adding it to &lpuart1 causes a dtbs_check validation
failure.

In addition, neither lpuart_probe() in drivers/tty/serial/fsl_lpuart.c
nor serial_core_add_one_port() in drivers/tty/serial/serial_core.c parses
wakeup-source from the UART DT node. Instead, serial_core_add_one_port()
unconditionally marks the tty device wakeup-capable (leaving wakeup
disabled until enabled via sysfs), and lpuart_uport_is_active() checks
that tty device:

drivers/tty/serial/serial_core.c:serial_core_add_one_port() {
    ...
	if (!IS_ERR(tty_dev)) {
		device_set_wakeup_capable(tty_dev, 1);
	}
    ...
}

drivers/tty/serial/fsl_lpuart.c:lpuart_uport_is_active() {
    ...
		may_wake = tty_dev && device_may_wakeup(tty_dev);
    ...
}

Does this property actually have any effect without corresponding binding
and driver support?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1793645417.git.stefano.r@variscite.com?part=2

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

end of thread, other threads:[~2026-11-02 19:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 18:55 [PATCH v1 0/2] arm64: dts: imx93: enable UART wakeup on Variscite boards Stefano Radaelli
2026-11-02 18:55 ` [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup Stefano Radaelli
2026-11-02 19:03   ` sashiko-bot
2026-11-02 18:55 ` [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: " Stefano Radaelli
2026-11-02 19:04   ` sashiko-bot

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