Skip to contentSkip to conversation

arm64: dts: imx93: enable UART wakeup on Variscite boards

PATCH In review Stefano Radaelli 3 participants 6 messages Nov 2 – Nov 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: imx93: enable UART wakeup on Variscite boards

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

Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/2 arm64: dts: imx93-var-dart-sonata: enable UART wakeup

From: Stefano Radaelli <[email protected]>

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

---
 arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts +1 -0
index 1ca3ec8330d0..d368a09dc916 100644
@@ -385,6 +385,7 @@ can0: can@0 {
 &lpuart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
+	wakeup-source;
 	status = "okay";
 };
 
Signature · 1 line
2.47.3
#2 lore raw

Re: [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup

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 --

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 <[email protected]>

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.

arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts can0: can@0 { · line 388

Quoted 9 lines
arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts +1 -0
index 1ca3ec8330d07..d368a09dc9167 100644
@@ -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?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH v1 1/2] arm64: dts: imx93-var-dart-sonata: enable UART wakeup

Quoted 39 lines · On Mon, Nov 02, 2026 at 07:03:54PM +0000, [email protected] wrote:

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 <[email protected]>

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.

arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts can0: can@0 { · line 388

Quoted 9 lines
arch/arm64/boot/dts/freescale/imx93-var-dart-sonata.dts +1 -0
index 1ca3ec8330d07..d368a09dc9167 100644
@@ -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

Quoted 5 lines

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.

Please check this, look like correct.

Frank

Quoted 30 lines

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/[email protected]?part=1

#4 lore raw

PATCH 2/2 arm64: dts: imx93-var-som-symphony: enable UART wakeup

In reply to Stefano Radaelli

From: Stefano Radaelli <[email protected]>

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

---
 arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts +1 -0
index 1f0954620195..47203811abe9 100644
@@ -302,6 +302,7 @@ typec1_dr_sw: endpoint {
 &lpuart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
+	wakeup-source;
 	status = "okay";
 };
 
Signature · 1 line
2.47.3
#5 lore raw

Re: [PATCH v1 2/2] arm64: dts: imx93-var-som-symphony: enable UART wakeup

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 --

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 <[email protected]>

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.

arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts typec1_dr_sw: endpoint { · line 305

Quoted 9 lines
arch/arm64/boot/dts/freescale/imx93-var-som-symphony.dts +1 -0
index 1f0954620195a..47203811abe99 100644
@@ -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?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2