[PATCH 0/3] qcom: MSM8916 sysreset support

Most MSM8916 devices shipped without PSCI support in their TZ firmware. Instead, they use PSHOLD. These patches enable both PSCI and PSHOLD sysreset drivers in qcom_defconfig.
Caleb had already submitted ([1]) a patch to do the switch to PSCI sysreset driver as part of the UEFI capsule update series, but it seems that the sysreset patch didn't make it upstream.
It's worth noting that sysreset still won't work if booting with a control DT from upstream, as the msm8916.dtsi there includes a /psci node.
As far as I'm aware, only the db410c ever received a firmware update with any PSCI support, so I intend to send a patch to kernel to remove the default /psci node for msm8916 devices, assuming I get the green light ([2]).
I've tested in a local tree that includes a u-boot specific tweak to remove the /psci node, and confirmed that qcom_defconfig can reset both an msm8916 device and an sdm845 one.
[1]: https://lore.kernel.org/all/20240527-b4-qcom-capsule-updates-v2-6-47583d7ad4... [2]: https://github.com/msm8916-mainline/linux/issues/388
Signed-off-by: Sam Day me@samcday.com --- Sam Day (3): mach-snapdragon: use PSCI sysreset driver sysreset: qcom-pshold: remove ARCH_IPQ40XX dependency qcom_defconfig: enable SYSRESET_QCOM_PSHOLD
arch/arm/mach-snapdragon/board.c | 5 ----- configs/qcom_defconfig | 3 +++ drivers/sysreset/Kconfig | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) --- base-commit: 8162f35a108441b8d7a44ac9266c1a64dbf79fd5 change-id: 20250121-msm8916-sysreset-580d9a65a759
Best regards,

Drop the `board_reset` function from mach-snapdragon board code, and instead use the standard PSCI sysreset driver.
Signed-off-by: Sam Day me@samcday.com --- arch/arm/mach-snapdragon/board.c | 5 ----- configs/qcom_defconfig | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c index 2ef936aab757c7045729a2dd91944f4f9bff917e..eba98b73ae629671662ecc2b060544a931718748 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -187,11 +187,6 @@ int board_fdt_blob_setup(void **fdtp) return ret; }
-void reset_cpu(void) -{ - psci_system_reset(); -} - /* * Some Qualcomm boards require GPIO configuration when switching USB modes. * Support setting this configuration via pinctrl state. diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index a4e7a21c31151103e4272147bc27eeddb11b41ed..d19be69190da4e2ddfbb60c4d44ff793e804c523 100644 --- a/configs/qcom_defconfig +++ b/configs/qcom_defconfig @@ -119,6 +119,8 @@ CONFIG_QCOM_RPMH=y CONFIG_SPMI_MSM=y CONFIG_SYSINFO=y CONFIG_SYSINFO_SMBIOS=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_PSCI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y

Depending on ARCH_IPQ40XX is too restrictive, as this architecture is explicitly armv7. This driver is also used on msm8916 devices, which have cortex-a53 armv8 cores.
Signed-off-by: Sam Day me@samcday.com --- drivers/sysreset/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig index 121194e4418f48012c28fa3a4d7da174d3359f54..475540ffac766a302d994372ac965d4d94dd4708 100644 --- a/drivers/sysreset/Kconfig +++ b/drivers/sysreset/Kconfig @@ -242,7 +242,6 @@ config SYSRESET_RAA215300
config SYSRESET_QCOM_PSHOLD bool "Support sysreset for Qualcomm SoCs via PSHOLD" - depends on ARCH_IPQ40XX help Add support for the system reboot on Qualcomm SoCs via PSHOLD.

MSM8916 devices use this instead of PSCI.
Signed-off-by: Sam Day me@samcday.com --- configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index d19be69190da4e2ddfbb60c4d44ff793e804c523..8392a5de90f1a9639d27aac2e3fecdd2d4b62c59 100644 --- a/configs/qcom_defconfig +++ b/configs/qcom_defconfig @@ -121,6 +121,7 @@ CONFIG_SYSINFO=y CONFIG_SYSINFO_SMBIOS=y CONFIG_SYSRESET=y CONFIG_SYSRESET_PSCI=y +CONFIG_SYSRESET_QCOM_PSHOLD=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y
participants (1)
-
Sam Day