[PATCH] arm64: dts: qcom: monaco: add PMIC PON with power key
Milosz Wasilewski <[email protected]>
| Newsgroups | org.kernel.vger.linux-devicetree,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Monaco has no PMIC PON node, so the power key is not described at all and there is no pwrkey input device. More importantly the board then has no power-key wakeup source: the only way out of s2idle is the RTC alarm or one of the PCIe/USB/remoteproc sources, and pressing the power button does nothing. Add the PON node with the power key, modelled on the pmm8654au PON on lemans, which carries the same PMIC: the block lives at 0x1200 and its interrupts are on block 0x12. qcom,pmk8350-pwrkey has wakeup_source_default set, so the driver arms the IRQ as a wakeup source without any additional DT property. On an IQ-8275-EVK this gives a pmic_pwrkey input device under c440000.spmi:pmic@0:pon@1200, and: # grep pwrkey /sys/kernel/debug/wakeup_sources c440000.spmi:pmic@0:pon@1200:pwrkey "systemctl suspend" followed by a power-key press now resumes the board, where before it stayed in s2idle until an RTC alarm fired. Assisted-by: Claude:claude-opus-5 Signed-off-by: Milosz Wasilewski <[email protected]> --- arch/arm64/boot/dts/qcom/monaco-pmics.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi b/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi index 6e096b9b7546..aeaef002f791 100644 --- a/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/monaco-pmics.dtsi @@ -14,6 +14,19 @@ pmm8620au_0: pmic@0 { #address-cells = <1>; #size-cells = <0>; + pmm8620au_0_pon: pon@1200 { + compatible = "qcom,pmk8350-pon"; + reg = <0x1200>, <0x800>; + reg-names = "hlos", "pbs"; + + pmm8620au_0_pon_pwrkey: pwrkey { + compatible = "qcom,pmk8350-pwrkey"; + interrupts = <0x0 0x12 0x7 IRQ_TYPE_EDGE_BOTH>; + linux,code = <KEY_POWER>; + debounce = <15625>; + }; + }; + pmm8620au_0_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; base-commit: ed2647532a225739e86c7f236a2ce82764ec2772 -- 2.43.0