diff --git a/bindings/interrupt-controller/qcom,mpm.txt b/bindings/interrupt-controller/qcom,mpm.txt index b998c94d89f1..2b4beeeb7a37 100644 --- a/bindings/interrupt-controller/qcom,mpm.txt +++ b/bindings/interrupt-controller/qcom,mpm.txt @@ -26,6 +26,7 @@ Properties: "qcom,mpm-gic-holi" "qcom,mpm-gic-scuba" "qcom,mpm-gic-sdxnightjar" + "qcom,mpm-gic-monaco" - interrupts: Usage: required diff --git a/qcom/monaco-pinctrl.dtsi b/qcom/monaco-pinctrl.dtsi index 6961c9d6e4e4..fc3bff370d59 100644 --- a/qcom/monaco-pinctrl.dtsi +++ b/qcom/monaco-pinctrl.dtsi @@ -7,6 +7,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + wakeup-parent = <&wakegic>; qupv3_se6_2uart_pins: qupv3_se6_2uart_pins { qupv3_se6_2uart_active: qupv3_se6_2uart_active { diff --git a/qcom/monaco-pm.dtsi b/qcom/monaco-pm.dtsi new file mode 100644 index 000000000000..3b67d4b32af0 --- /dev/null +++ b/qcom/monaco-pm.dtsi @@ -0,0 +1,90 @@ +&soc { + qcom,lpm-levels { + compatible = "qcom,lpm-levels"; + #address-cells = <1>; + #size-cells = <0>; + + qcom,pm-cluster@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + idle-state-name = "L2"; + qcom,psci-mode-shift = <4>; + qcom,psci-mode-mask = <0xf>; + + CLUSTER_WFI: qcom,pm-cluster-level@0 { /* D1 */ + reg = <0>; + compatible = "arm,idle-state"; + idle-state-name = "l2-wfi"; + entry-latency-us = <38>; + exit-latency-us = <51>; + min-residency-us = <89>; + arm,psci-suspend-param = <0x10>; + qcom,psci-mode = <0x1>; + }; + + CLUSTER_OFF: qcom,pm-cluster-level@1 { /* D4 */ + reg = <1>; + compatible = "arm,idle-state"; + idle-state-name = "l2-rail-pc"; + entry-latency-us = <800>; + exit-latency-us = <2118>; + min-residency-us = <7376>; + arm,psci-suspend-param = <0x40>; + qcom,psci-mode = <0x4>; + qcom,notify-rpm; + qcom,min-child-idx = <1>; + qcom,is-reset; + }; + + qcom,pm-cpu@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + qcom,psci-mode-shift = <0>; + qcom,psci-mode-mask = <0xf>; + label = "pwr"; + qcom,disable-ipi-prediction; + qcom,cpu = <&CPU0 &CPU1 &CPU2 &CPU3>; + + CORE_WFI: qcom,pm-cpu-level@0 { /* C1 */ + reg = <0>; + compatible = "arm,idle-state"; + idle-state-name = "wfi"; + entry-latency-us = <49>; + exit-latency-us = <42>; + min-residency-us = <91>; + arm,psci-suspend-param = <0x1>; + qcom,psci-cpu-mode = <0x1>; + }; + + CORE_PC: qcom,pm-cpu-level@1 { /* C3 */ + reg = <1>; + compatible = "arm,idle-state"; + idle-state-name = "pc"; + entry-latency-us = <290>; + exit-latency-us = <376>; + min-residency-us = <1182>; + qcom,psci-cpu-mode = <0x3>; + arm,psci-suspend-param = <0x40000003>; + local-timer-stop; + qcom,is-reset; + qcom,use-broadcast-timer; + }; + }; + }; + }; + + rpm_sleep_stats: soc-sleep-stats@4690000 { + compatible = "qcom,rpm-sleep-stats"; + reg = <0x04690000 0x400>; + }; + + subsystem-sleep-stats { + compatible = "qcom,subsystem-sleep-stats"; + }; + + rpmh-master-stats { + compatible = "qcom,rpmh-master-stats-v1"; + }; +}; diff --git a/qcom/monaco.dtsi b/qcom/monaco.dtsi index 4187cdcc689a..90685c5413d1 100644 --- a/qcom/monaco.dtsi +++ b/qcom/monaco.dtsi @@ -34,6 +34,7 @@ device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x0>; + cpu-idle-states = <&CORE_PC>; enable-method = "psci"; d-cache-size = <0x8000>; i-cache-size = <0x8000>; @@ -58,6 +59,7 @@ device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x1>; + cpu-idle-states = <&CORE_PC>; enable-method = "psci"; d-cache-size = <0x8000>; i-cache-size = <0x8000>; @@ -77,6 +79,7 @@ device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x2>; + cpu-idle-states = <&CORE_PC>; enable-method = "psci"; d-cache-size = <0x8000>; i-cache-size = <0x8000>; @@ -96,6 +99,7 @@ device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x3>; + cpu-idle-states = <&CORE_PC>; enable-method = "psci"; d-cache-size = <0x8000>; i-cache-size = <0x8000>; @@ -1111,6 +1115,22 @@ vote = <43>; }; }; + + system_pm_rpm { + compatible = "qcom,system-pm-rpm"; + }; + + wakegic: wake-gic { + compatible = "qcom,mpm-gic-monaco", "qcom,mpm"; + interrupts = ; + reg = <0x45f01b8 0x1000>, + <0xf111008 0x4>; + reg-names = "vmpm", "ipc"; + qcom,num-mpm-irqs = <96>; + interrupt-controller; + interrupt-parent = <&intc>; + #interrupt-cells = <2>; + }; }; #include "monaco-pinctrl.dtsi" @@ -1119,6 +1139,7 @@ #include "monaco-stub-regulator.dtsi" #include "monaco-gdsc.dtsi" #include "monaco-qupv3.dtsi" +#include "monaco-pm.dtsi" &qupv3_se6_2uart { status = "ok";