]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: dts: apple: Add cpufreq nodes for S8000/S8003
authorNick Chan <towinchenmi@gmail.com>
Mon, 3 Feb 2025 12:43:43 +0000 (20:43 +0800)
committerSven Peter <sven@svenpeter.dev>
Sun, 9 Feb 2025 11:49:40 +0000 (11:49 +0000)
Add cpufreq nodes for the two variants of Apple A9 SoC. The difference is
that S8000 is slower than S8003 in state transitions.

Change the copyright information in s8000.dtsi and s8003.dtsi as well
since these are now essentially new files with the original content now
being in s800-0-3.dtsi.

Signed-off-by: Nick Chan <towinchenmi@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
arch/arm64/boot/dts/apple/s800-0-3.dtsi
arch/arm64/boot/dts/apple/s8000.dtsi
arch/arm64/boot/dts/apple/s8003.dtsi

index 1e0b8f631ac017bce9e24336786cadc3289171a5..2aec49f0da6467519aeb2561d00b14f46fe216fb 100644 (file)
@@ -32,6 +32,8 @@
                        compatible = "apple,twister";
                        reg = <0x0 0x0>;
                        cpu-release-addr = <0 0>; /* To be filled in by loader */
+                       operating-points-v2 = <&twister_opp>;
+                       performance-domains = <&cpufreq>;
                        enable-method = "spin-table";
                        device_type = "cpu";
                };
@@ -40,6 +42,8 @@
                        compatible = "apple,twister";
                        reg = <0x0 0x1>;
                        cpu-release-addr = <0 0>; /* To be filled in by loader */
+                       operating-points-v2 = <&twister_opp>;
+                       performance-domains = <&cpufreq>;
                        enable-method = "spin-table";
                        device_type = "cpu";
                };
                nonposted-mmio;
                ranges;
 
+               cpufreq: performance-controller@202220000 {
+                       compatible = "apple,s8000-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
+                       reg = <0x2 0x02220000 0 0x1000>;
+                       #performance-domain-cells = <0>;
+               };
+
                serial0: serial@20a0c0000 {
                        compatible = "apple,s5l-uart";
                        reg = <0x2 0x0a0c0000 0x0 0x4000>;
index c7e39abda7e1654889d0804e544b4f2560de4b0f..72322f5677ab15820675a0c4e04eba0a4210bdde 100644 (file)
@@ -4,11 +4,62 @@
  *
  * Other names: H8P, "Maui"
  *
- * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
+ * Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
  */
 
 #include "s800-0-3.dtsi"
 
+/ {
+       twister_opp: opp-table {
+               compatible = "operating-points-v2";
+
+               opp01 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-level = <1>;
+                       clock-latency-ns = <650>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-level = <2>;
+                       clock-latency-ns = <75000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-level = <3>;
+                       clock-latency-ns = <27000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <912000000>;
+                       opp-level = <4>;
+                       clock-latency-ns = <32000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-level = <5>;
+                       clock-latency-ns = <35000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-level = <6>;
+                       clock-latency-ns = <45000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-level = <7>;
+                       clock-latency-ns = <58000>;
+               };
+#if 0
+               /* Not available until CPU deep sleep is implemented */
+               opp08 {
+                       opp-hz = /bits/ 64 <1844000000>;
+                       opp-level = <8>;
+                       clock-latency-ns = <58000>;
+                       turbo-mode;
+               };
+#endif
+       };
+};
+
 /*
  * The A9 was made by two separate fabs on two different process
  * nodes: Samsung made the S8000 (APL0898) on 14nm and TSMC made
index 807e3452f8a7e7ece6c160579965bd0cf12e12df..79df5c7832600beb994952222fdf15bca93c2cb8 100644 (file)
@@ -4,11 +4,62 @@
  *
  * Other names: H8P, "Malta"
  *
- * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
+ * Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
  */
 
 #include "s800-0-3.dtsi"
 
+/ {
+       twister_opp: opp-table {
+               compatible = "operating-points-v2";
+
+               opp01 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-level = <1>;
+                       clock-latency-ns = <500>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <396000000>;
+                       opp-level = <2>;
+                       clock-latency-ns = <45000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-level = <3>;
+                       clock-latency-ns = <22000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <912000000>;
+                       opp-level = <4>;
+                       clock-latency-ns = <25000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-level = <5>;
+                       clock-latency-ns = <28000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-level = <6>;
+                       clock-latency-ns = <35000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-level = <7>;
+                       clock-latency-ns = <38000>;
+               };
+#if 0
+               /* Not available until CPU deep sleep is implemented */
+               opp08 {
+                       opp-hz = /bits/ 64 <1844000000>;
+                       opp-level = <8>;
+                       clock-latency-ns = <38000>;
+                       turbo-mode;
+               };
+#endif
+       };
+};
+
 /*
  * The A9 was made by two separate fabs on two different process
  * nodes: Samsung made the S8000 (APL0898) on 14nm and TSMC made