How to use UART to wake up system?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use UART to wake up system?

384 Views
masonyen
Contributor I

I tried below command to wake up a custom LS1046a system by UART. But it didn't work. How do I wake up a LS1046a system from UART?

root@localhost:~# echo enabled > /sys/devices/platform/soc/21c0500.serial/tty/ttyS0/power/wakeup
root@localhost:~# echo enabled > /sys/devices/platform/soc/21c0600.serial/tty/ttyS1/power/wakeup
root@localhost:~# echo enabled > /sys/devices/platform/soc/21d0500.serial/tty/ttyS2/power/wakeup
root@localhost:~# echo enabled > /sys/devices/platform/soc/21d0600.serial/tty/ttyS3/power/wakeup
root@localhost:~# echo mem > /sys/power/state

Tags (1)
0 Kudos
8 Replies

254 Views
masonyen
Contributor I

Hi ufedor,
There is no any modification needed for DUART to wake up LS1046a on LSDK1909

0 Kudos

254 Views
ufedor
NXP TechSupport
NXP TechSupport

Which DTS you are using?

0 Kudos

254 Views
masonyen
Contributor I

The DTS for LS1046A Freeway

0 Kudos

254 Views
ufedor
NXP TechSupport
NXP TechSupport

Which NXP LSDK is used?

Have you modified corresponding UART branch of the DTS to support wakeup?

fsl,rcpm-wakeup = <&rcpm 0x20000>;
0 Kudos

254 Views
masonyen
Contributor I

Hi ufedor,

LSDK 20.04

Adding rcpm-wakeup in DTS doesn't work.

This is DUART1, NOT LPUART1. Is it possible to wake up a LS1046A system from DUART1? How?

Cheers,

Mason

0 Kudos

254 Views
ufedor
NXP TechSupport
NXP TechSupport

UART is not mentioned as LPM20 wakeup source - refer to the QorIQ LS1046A Reference Manual, Table 13-4. Device RCPM Mode: Entry and Exit for Power Management.

0 Kudos

254 Views
masonyen
Contributor I

Hi ufedor,

Duart1 is able to wake up LS1046A  from low power mode with LSDK 1909. Please see below text. But Duart1 cannot wake up LS1046A  with LSDK2004. Is this a LSDK2004 bug? 

NXP LSDK 1909 main
root@localhost:~# echo enabled > /sys/devices/platform/soc/21c0500.serial/tty/ttyS0/power/wakeup
root@localhost:~# echo mem > /sys/power/state
[   46.537633] PM: suspend entry (deep)
[   46.541213] PM: Syncing filesystems ... done.
[   46.580423] Freezing user space processes ... (elapsed 0.001 seconds) done.
[   46.588505] OOM killer disabled.
[   46.591771] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
[   46.602314] Suspending console(s) (use no_console_suspend to debug)
duart
[   46.608640] rcpm 1ee208c.rcpm: ttyS0 doesn't refer to this rcpm
[   46.608642] rcpm 1ee208c.rcpm: 1-1 doesn't refer to this rcpm
[   46.646634] Disabling non-boot CPUs ...
[   46.673579] IRQ 56: no longer affine to CPU1
[   46.673583] IRQ 60: no longer affine to CPU1
[   46.673585] IRQ 64: no longer affine to CPU1
[   46.673607] CPU1: shutdown
[   46.693392] psci: Retrying again to check for CPU kill
[   46.693395] psci: CPU1 killed.
[   46.729562] IRQ 57: no longer affine to CPU2
[   46.729566] IRQ 61: no longer affine to CPU2
[   46.729568] IRQ 65: no longer affine to CPU2
[   46.729592] CPU2: shutdown
[   46.749391] psci: Retrying again to check for CPU kill
[   46.749394] psci: CPU2 killed.
[   46.769547] IRQ 58: no longer affine to CPU3
[   46.769550] IRQ 62: no longer affine to CPU3
[   46.769553] IRQ 66: no longer affine to CPU3
[   46.769576] CPU3: shutdown
[   46.789397] psci: Retrying again to check for CPU kill
[   46.789400] psci: CPU3 killed.
[   46.791052] Enabling non-boot CPUs ...
[   46.792013] Detected PIPT I-cache on CPU1
[   46.792050] CPU1: Booted secondary processor 0x0000000001 [0x410fd082]
[   46.792192]  cache: parent cpu1 should not be sleeping
[   46.792308] CPU1 is up
[   46.792910] Detected PIPT I-cache on CPU2
[   46.792927] CPU2: Booted secondary processor 0x0000000002 [0x410fd082]
[   46.793020]  cache: parent cpu2 should not be sleeping
[   46.793123] CPU2 is up
[   46.793754] Detected PIPT I-cache on CPU3
[   46.793771] CPU3: Booted secondary processor 0x0000000003 [0x410fd082]
[   46.793877]  cache: parent cpu3 should not be sleeping
[   46.793973] CPU3 is up

0 Kudos

254 Views
ufedor
NXP TechSupport
NXP TechSupport

You wrote:

> Adding rcpm-wakeup in DTS doesn't work.

How this is implemented with LSDK 1909?

0 Kudos