Linux sleep/suspend power mode not working #93

Open
opened 2025-06-01 10:32:05 -04:00 by golovdinov · 0 comments
golovdinov commented 2025-06-01 10:32:05 -04:00 (Migrated from github.com)

Hi!

Does anyone managed to make Linux sleep/suspend power mode works on a LicheeRV Nano?

There is Linux doc about it.

But by default, there is no /sys/power/state file (also /sys/power dir is missed).

Research leads me to the Milk-V forum thread. It seems sleep/suspend works on a Milk-V Duo 256m board with the same SG2002 as in LicheeRV Nano.

Here are Linux configs I managed to found:

# build/boards/sg200x/sg2002_licheervnano_sd/linux/sg2002_licheervnano_sd_defconfig
CONFIG_PM=y
CONFIG_PM_RUNTIME=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y

# build/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
# both variants have no effect
CONFIG_KERNEL_SUSPEND=y
CONFIG_SUSPEND=y

After rebuild, /sys/power/state file appears, but it's empty. Also there are no anymore files in /sys/power dir.

Need help.

PS: I tried to force Linux CPU suspending with SG2002 registers, but after setting RTC_EN_SUSPEND_REQ to 1 (devmem 0x050260E4 32 0x1) the board instantly dies. So it's impossible to try to make next steps to implement suspending (write to req_suspend register and so on). But it's another story not connected to a Linux, I think.

Hi! Does anyone managed to make Linux sleep/suspend power mode works on a LicheeRV Nano? There is [Linux doc](https://docs.kernel.org/admin-guide/pm/sleep-states.html) about it. But by default, there is no `/sys/power/state` file (also `/sys/power` dir is missed). Research leads me to the [Milk-V forum thread](https://community.milkv.io/t/suspend-resume-support/2200). It seems sleep/suspend works on a Milk-V Duo 256m board with the same SG2002 as in LicheeRV Nano. Here are Linux configs I managed to found: ``` # build/boards/sg200x/sg2002_licheervnano_sd/linux/sg2002_licheervnano_sd_defconfig CONFIG_PM=y CONFIG_PM_RUNTIME=y CONFIG_PM_SLEEP=y CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y # build/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig # both variants have no effect CONFIG_KERNEL_SUSPEND=y CONFIG_SUSPEND=y ``` After rebuild, `/sys/power/state` file appears, but it's empty. Also there are no anymore files in `/sys/power` dir. Need help. PS: I tried to force Linux CPU suspending with SG2002 registers, but after setting RTC_EN_SUSPEND_REQ to 1 (`devmem 0x050260E4 32 0x1`) the board instantly dies. So it's impossible to try to make next steps to implement suspending (write to req_suspend register and so on). But it's another story not connected to a Linux, I think.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
maxpeterkaya/LicheeRV-Nano-Build#93
No description provided.