Skip to contentSkip to conversation

power: reset: qcom-pon: Drop reason shift for PMK8350

RFC PATCH In review Alexander Koskovich 4 participants 4 messages Sep 7 – Sep 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 power: reset: qcom-pon: Drop reason shift for PMK8350

On the PMK8350 the SOFT_RB_SPARE register does not exist, the reset reason is instead kept in SDAM and written through the reboot-reason nvmem cell.

---
Would like some feedback on this as I'm seeing conflicting results, SOFT_RB_SPARE does not exist on HLOS but it looks like the downstream qpnp-power-on driver writes to XVDD_RB_SPARE2 for GEN3, which is on PBS.

Though, targets like waipio don't seem to have access to write to PBS from HLOS? Get SPMI errors when I try. Didn't have an issue doing so on milos though.

Besides, the bindings doesn't allow reboot modes on PMK8350 so maybe setting no reason shift is correct regardless so it gets skipped?

---
 drivers/power/reset/qcom-pon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/qcom-pon.c +1 -1
index 7e108982a582..9cd55f5536b4 100644
@@ -90,7 +90,7 @@ static const struct of_device_id qcom_pon_id_table[] = {
 	{ .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT },
 	{ .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT },
 	{ .compatible = "qcom,pm8998-pon", .data = (void *)GEN2_REASON_SHIFT },
-	{ .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT },
+	{ .compatible = "qcom,pmk8350-pon", .data = (void *)NO_REASON_SHIFT },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_pon_id_table);

---
base-commit: 944a035ecca915ae947905dcfb03f2b9dc6d032c
change-id: 20260907-pon-pbs-76b7ecaafe33

Best regards,

Signature · 1 line
Alexander Koskovich <[email protected]>
#1 lore raw
Quoted 10 lines · Alexander Koskovich

On the PMK8350 the SOFT_RB_SPARE register does not exist, the reset reason is instead kept in SDAM and written through the reboot-reason nvmem cell.

---
Would like some feedback on this as I'm seeing conflicting results, SOFT_RB_SPARE does not exist on HLOS but it looks like the downstream qpnp-power-on driver writes to XVDD_RB_SPARE2 for GEN3, which is on PBS.

Quoted 7 lines

Though, targets like waipio don't seem to have access to write to PBS from HLOS? Get SPMI errors when I try. Didn't have an issue doing so on milos though.

Besides, the bindings doesn't allow reboot modes on PMK8350 so maybe setting no reason shift is correct regardless so it gets skipped?
---

Maybe +Kamal or +Fenglin would know more

Konrad

Quoted 22 lines
 drivers/power/reset/qcom-pon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/qcom-pon.c +1 -2
index 7e108982a582..9cd55f5536b4 100644
@@ -90,7 +90,7 @@ static const struct of_device_id qcom_pon_id_table[] = {
 	{ .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT },
 	{ .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT },
 	{ .compatible = "qcom,pm8998-pon", .data = (void *)GEN2_REASON_SHIFT },
-	{ .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT },
+	{ .compatible = "qcom,pmk8350-pon", .data = (void *)NO_REASON_SHIFT },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_pon_id_table);
 
---

base-commit: 944a035ecca915ae947905dcfb03f2b9dc6d032c
change-id: 20260907-pon-pbs-76b7ecaafe33

Best regards,

#2 lore raw
Quoted 15 lines · Konrad Dybcio
Quoted 14 lines · Alexander Koskovich

On the PMK8350 the SOFT_RB_SPARE register does not exist, the reset reason is instead kept in SDAM and written through the reboot-reason nvmem cell.

---
Would like some feedback on this as I'm seeing conflicting results, SOFT_RB_SPARE does not exist on HLOS but it looks like the downstream qpnp-power-on driver writes to XVDD_RB_SPARE2 for GEN3, which is on PBS.

Though, targets like waipio don't seem to have access to write to PBS from HLOS? Get SPMI errors when I try. Didn't have an issue doing so on milos though.

Quoted 8 lines
Quoted 3 lines

Besides, the bindings doesn't allow reboot modes on PMK8350 so maybe setting no reason shift is correct regardless so it gets skipped?
---

Maybe +Kamal or +Fenglin would know more

Konrad

For pmk8350 HLOS_PON, I can see a register at 0x8f, PON_HLOS_DVDD_RB_SPARE2 in the dVdd_RB block, that may not retain the reset reason during a device reboot. The downstream qpnp-power-on driver stores the reset reason in PBS_PON register 0x8f, PON_PBS_XVDD_RB_SPARE2, which belongs to the xVdd_RB block where all register values are retained during normal reboot.

The downstream driver manages PON/reset behavior primarily through the PBS_PON module, whereas HLOS_PON is mainly used for power/reset keys.

Since I don't have a waipio device available, I couldn't verify the SPMI access permission issue you mentioned. My assumption is that it should work correctly; otherwise, all reset-related functionality would be broken internally, unless the PMIC module ownership settings in BOOT SW were changed on your device.

Quoted 22 lines
Quoted 22 lines
 drivers/power/reset/qcom-pon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/qcom-pon.c +1 -2
index 7e108982a582..9cd55f5536b4 100644
@@ -90,7 +90,7 @@ static const struct of_device_id qcom_pon_id_table[] = {
 	{ .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT },
 	{ .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT },
 	{ .compatible = "qcom,pm8998-pon", .data = (void *)GEN2_REASON_SHIFT },
-	{ .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT },
+	{ .compatible = "qcom,pmk8350-pon", .data = (void *)NO_REASON_SHIFT },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_pon_id_table);
 
---

base-commit: 944a035ecca915ae947905dcfb03f2b9dc6d032c
change-id: 20260907-pon-pbs-76b7ecaafe33

Best regards,

#3 lore raw
In reply to Alexander Koskovich
Quoted 5 lines · Alexander Koskovich

On the PMK8350 the SOFT_RB_SPARE register does not exist, the reset reason is instead kept in SDAM and written through the reboot-reason nvmem cell.

Quoted 8 lines

---
Would like some feedback on this as I'm seeing conflicting results, SOFT_RB_SPARE does not exist on HLOS but it looks like the downstream qpnp-power-on driver writes to XVDD_RB_SPARE2 for GEN3, which is on PBS.

Though, targets like waipio don't seem to have access to write to PBS from HLOS? Get SPMI errors when I try. Didn't have an issue doing so on milos though.

It well might be that the PMIC has the spare register but whether it gets used or not depends on the platform (and the firmware) rather than the PMIC.

Quoted 30 lines

Besides, the bindings doesn't allow reboot modes on PMK8350 so maybe setting no reason shift is correct regardless so it gets skipped?

---
 drivers/power/reset/qcom-pon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/qcom-pon.c +1 -2
index 7e108982a582..9cd55f5536b4 100644
@@ -90,7 +90,7 @@ static const struct of_device_id qcom_pon_id_table[] = {
 	{ .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT },
 	{ .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT },
 	{ .compatible = "qcom,pm8998-pon", .data = (void *)GEN2_REASON_SHIFT },
-	{ .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT },
+	{ .compatible = "qcom,pmk8350-pon", .data = (void *)NO_REASON_SHIFT },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, qcom_pon_id_table);
 
---

base-commit: 944a035ecca915ae947905dcfb03f2b9dc6d032c
change-id: 20260907-pon-pbs-76b7ecaafe33

Best regards,

Signature · 1 line
Alexander Koskovich <[email protected]>
Signature · 2 lines
With best wishes
Dmitry