Re: [PATCH 2/3] soc: qcom: spm: Add MSM8960 SAW2 CPU support
From: Rudraksha Gupta
Date: Wed May 27 2026 - 23:07:03 EST
+ .seq = { 0x03, 0x0F, 0x00, 0x24, 0x54, 0x10, 0x09, 0x03, 0x01,I can't see these values anywhere downstream
+ 0x10, 0x54, 0x30, 0x0C, 0x24, 0x30, 0x0F },
Hello Konrad,
The .seq values concatenate spm_wfi_cmd_sequence + spm_power_collapse_without_rpm:
https://github.com/CyanogenMod/android_kernel_samsung_d2/blob/0dbe2b56847b304d30b809dfd08ba3b4a61d9af8/arch/arm/mach-msm/board-express.c#L3265-L3285
These are passed via msm_spm_boot_cpu_seq_list into msm_spm_data[].modes:
https://github.com/CyanogenMod/android_kernel_samsung_d2/blob/0dbe2b56847b304d30b809dfd08ba3b4a61d9af8/arch/arm/mach-msm/board-express.c#L3303-L3369
msm_spm_data is passed to msm_spm_init():
https://github.com/CyanogenMod/android_kernel_samsung_d2/blob/0dbe2b56847b304d30b809dfd08ba3b4a61d9af8/arch/arm/mach-msm/board-express.c#L5510
Which calls msm_spm_dev_init() per CPU:
https://github.com/CyanogenMod/android_kernel_samsung_d2/blob/0dbe2b56847b304d30b809dfd08ba3b4a61d9af8/arch/arm/mach-msm/spm_devices.c#L221-L239
That writes each mode's .cmd sequentially into SAW2 memory, bumping offset:
https://github.com/CyanogenMod/android_kernel_samsung_d2/blob/0dbe2b56847b304d30b809dfd08ba3b4a61d9af8/arch/arm/mach-msm/spm_devices.c#L148-L162
The upstream .seq is the same thing pre-concatenated. spm_retention_cmd_sequence and spm_power_collapse_with_rpm are omitted because no upstream platform uses PM_SLEEP_MODE_RET or PM_SLEEP_MODE_PC:
https://github.com/torvalds/linux/blob/v7.0/drivers/soc/qcom/spm.c#L134-L249
Thanks,
Rudraksha
Konrad