sysreset: qcom-pshold: configure PON reset-type for reset via PS_HOLD
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 0 repliesNew
- v13 patches 3 repliesSuperseded
Changes in v2 from the cover letter
-----------------
- Patch 1: dropped the "qcom,pon", "qcom,pbs-pshold-sw-ctl" and "qcom,pbs-pshold-reset-ctl2" DT properties entirely. The PMIC PON node is now located via its "compatible" property, and an in-driver table maps that compatible node to the PON_PBS base and register offsets. No new DT properties or bindings are introduced. Warm reset support was dropped: per the PMIC specification an unconfigured warm reset defaults to a shutdown, which this driver does not want to trigger unexpectedly. Only hard reset and power-off are implemented. Reverted the unrelated U_BOOT_DRIVER() whitespace reformatting flagged in review.
- Patch 2 (was 3/3 in v1): implement SYSRESET_POWER_OFF (RESET_TYPE=SHUTDOWN) in the driver, and enable CONFIG_SYSRESET_CMD_POWEROFF in qcom-snagboot.config (rather than disabling CONFIG_CMD_POWEROFF as in v1), so "poweroff" works in Snagboot recovery mode where PSCI is unavailable.
- The v1 DT patch (2/3, "arm: dts: qcom: Configure Lemans PS_HOLD reset") is dropped from this series. Adding a qcom,pshold node requires it to also be added to the corresponding Linux devicetree. That patch is being prepared and will be posted separately for Linux DT review. Once accepted,the U-Boot DT enablement patch for Lemans IQ9075 will follow as v3 of this series (or a follow-up), referencing the accepted Linux patch.
[1] https://lore.kernel.org/u-boot/[email protected]/
[2] https://lore.kernel.org/u-boot/[email protected]/
[3] https://lore.kernel.org/u-boot/[email protected]/
[4] https://lore.kernel.org/u-boot/[email protected]/
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | sysreset: qcom-pshold: configure PON reset type before deasserting PS_HOLDdrivers/ | +121 | 0 replies | |
| 2/2 | configs: qcom-snagboot: enable poweroff via sysreset uclassconfigs/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] sysreset: qcom-pshold: configure PON reset-type for reset via PS_HOLD
This is v2 of the PS_HOLD reset-type series, addressing review of v1 [1][2][3].
This series depends on the Snagboot support series for Lemans-EVK [4] (qcom-snagboot.config, qcom_lemans_snagboot_defconfig, CONFIG_QCOM_SNAGBOOT_MODE), since patch 2/2 modifies configs/qcom-snagboot.config.
Background
----------
In Snagboot mode, qcom_lemans_snagboot_defconfig disables CONFIG_PSCI_RESET (PSCI services are unavailable in this mode), so sysreset_walk() falls through to the qcom-pshold driver as the reset path.
On PMICs where the PS_HOLD reset sequence is implemented in the PON PBS (Programmable Boot Sequencer) block rather than directly dropping PS_HOLD a reset type needs to be configured. Otherwise, the board hangs on performing reset such as hard reset.
Reset types defines the behavior of the PMIC during a reset or shutdown event (e.g., warm reset or hard reset event). The type of reset event is determined by configuration register PON_PBS_PS_HOLD_SW_CTL in the PON module. Another register, PON_PBS_PS_HOLD_RESET_CTL2 contains the field S2_RESET_EN that enables reset. To configure PON_PBS_PS_HOLD_SW_CTL, the register PON_PBS_PS_HOLD_RESET_CTL2.S2_RESET_EN needs to be disabled before re-enabling it again.
Per the PMIC specification, a warm reset sequence additionally requires further software configuration and if that configuration is not performed, the PMIC's default behaviour for a warm reset request is to shut down instead. This series does not implement that configuration, so warm reset (SYSRESET_WARM) is not supported here.
Changes since v1
-----------------
- Patch 1: dropped the "qcom,pon", "qcom,pbs-pshold-sw-ctl" and "qcom,pbs-pshold-reset-ctl2" DT properties entirely. The PMIC PON node is now located via its "compatible" property, and an in-driver table maps that compatible node to the PON_PBS base and register offsets. No new DT properties or bindings are introduced. Warm reset support was dropped: per the PMIC specification an unconfigured warm reset defaults to a shutdown, which this driver does not want to trigger unexpectedly. Only hard reset and power-off are implemented. Reverted the unrelated U_BOOT_DRIVER() whitespace reformatting flagged in review.
- Patch 2 (was 3/3 in v1): implement SYSRESET_POWER_OFF (RESET_TYPE=SHUTDOWN) in the driver, and enable CONFIG_SYSRESET_CMD_POWEROFF in qcom-snagboot.config (rather than disabling CONFIG_CMD_POWEROFF as in v1), so "poweroff" works in Snagboot recovery mode where PSCI is unavailable.
- The v1 DT patch (2/3, "arm: dts: qcom: Configure Lemans PS_HOLD reset") is dropped from this series. Adding a qcom,pshold node requires it to also be added to the corresponding Linux devicetree. That patch is being prepared and will be posted separately for Linux DT review. Once accepted,the U-Boot DT enablement patch for Lemans IQ9075 will follow as v3 of this series (or a follow-up), referencing the accepted Linux patch.
[1] https://lore.kernel.org/u-boot/[email protected]/
[2] https://lore.kernel.org/u-boot/[email protected]/
[3] https://lore.kernel.org/u-boot/[email protected]/
[4] https://lore.kernel.org/u-boot/[email protected]/
Sumit Singh Dhami (2):
sysreset: qcom-pshold: configure PON reset type before deasserting
PS_HOLD
configs: qcom-snagboot: enable poweroff via sysreset uclass
configs/qcom-snagboot.config | 3 + drivers/sysreset/sysreset_qcom-pshold.c | 122 +++++++++++++++++++++++- 2 files changed, 124 insertions(+), 1 deletion(-)
Signature · 2 lines
Best regards, Sumit Singh Dhami