arm64: dts: mediatek: Add CPU Idle support
authorAmjad Ouled-Ameur <aouledameur@baylibre.com>
Thu, 25 May 2023 08:33:19 +0000 (10:33 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Mon, 29 May 2023 13:19:43 +0000 (15:19 +0200)
MT8365 has 3 CPU Idle states:
- MCDI_CPU. (Multi-Core-Deep-Idle)
- MCDI_CLUSTER.
- DPIDLE. (Deep-Idle)

Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230203-evk-board-support-v8-10-7019f3fd0adf@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt8365.dtsi

index cfe0c67..413496c 100644 (file)
                        reg = <0x0>;
                        #cooling-cells = <2>;
                        enable-method = "psci";
+                       cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>;
                        i-cache-size = <0x8000>;
                        i-cache-line-size = <64>;
                        i-cache-sets = <256>;
                        reg = <0x1>;
                        #cooling-cells = <2>;
                        enable-method = "psci";
+                       cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>;
                        i-cache-size = <0x8000>;
                        i-cache-line-size = <64>;
                        i-cache-sets = <256>;
                        reg = <0x2>;
                        #cooling-cells = <2>;
                        enable-method = "psci";
+                       cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>;
                        i-cache-size = <0x8000>;
                        i-cache-line-size = <64>;
                        i-cache-sets = <256>;
                        reg = <0x3>;
                        #cooling-cells = <2>;
                        enable-method = "psci";
+                       cpu-idle-states = <&CPU_MCDI &CLUSTER_MCDI &CLUSTER_DPIDLE>;
                        i-cache-size = <0x8000>;
                        i-cache-line-size = <64>;
                        i-cache-sets = <256>;
                        operating-points-v2 = <&cluster0_opp>;
                };
 
+               idle-states {
+                       entry-method = "psci";
+
+                       CPU_MCDI: cpu-mcdi {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x00010001>;
+                               entry-latency-us = <300>;
+                               exit-latency-us = <200>;
+                               min-residency-us = <1000>;
+                       };
+
+                       CLUSTER_MCDI: cluster-mcdi {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x01010001>;
+                               entry-latency-us = <350>;
+                               exit-latency-us = <250>;
+                               min-residency-us = <1200>;
+                       };
+
+                       CLUSTER_DPIDLE: cluster-dpidle {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x01010004>;
+                               entry-latency-us = <300>;
+                               exit-latency-us = <800>;
+                               min-residency-us = <3300>;
+                       };
+               };
+
                l2: l2-cache {
                        compatible = "cache";
                        cache-level = <2>;