Skip to content

Commit

Permalink
arm64: dts: apple: Add cpufreq nodes for the A10(X) SoCs
Browse files Browse the repository at this point in the history
The cpufreq hardware on the A10(X) is compatible with the M1
and only DT additions are needed.

Signed-off-by: Nick Chan <[email protected]>
  • Loading branch information
asdfugil committed Aug 19, 2024
1 parent 589a52b commit 80c609b
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/apple/t8010-7.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) 2022, Konrad Dybcio <[email protected]>
*/

#include "t8010.dtsi"
#include "t8010-fast.dtsi"
#include <dt-bindings/input/input.h>

/ {
Expand Down
27 changes: 27 additions & 0 deletions arch/arm64/boot/dts/apple/t8010-fast.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
* Apple T8010 "A10" common device tree for non-iPod touch 7 devices
*
* Copyright (c) 2024, Nick Chan <[email protected]>
*/

#include "t8010.dtsi"

/ {
opp: opp-table-0 {
opp08 {
opp-hz = /bits/ 64 <1944000000>;
opp-level = <8>;
};

opp09 {
opp-hz = /bits/ 64 <2244000000>;
opp-level = <9>;
};

opp10 {
opp-hz = /bits/ 64 <2340000000>;
opp-level = <10>;
};
};
};
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/apple/t8010-ipad6.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) 2022, Konrad Dybcio <[email protected]>
*/

#include "t8010.dtsi"
#include "t8010-fast.dtsi"
#include <dt-bindings/input/input.h>

/ {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/apple/t8010-ipad7.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) 2022, Konrad Dybcio <[email protected]>
*/

#include "t8010.dtsi"
#include "t8010-fast.dtsi"

/*
* The iPad 7 seems to be only an iteration over the iPad 6 with some small changes, like the
Expand Down
56 changes: 56 additions & 0 deletions arch/arm64/boot/dts/apple/t8010.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled by loader */
operating-points-v2 = <&opp>;
performance-domains = <&cpufreq>;
enable-method = "spin-table";
device-type = "cpu";
};
Expand All @@ -64,11 +66,59 @@
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled by loader */
operating-points-v2 = <&opp>;
performance-domains = <&cpufreq>;
enable-method = "spin-table";
device-type = "cpu";
};
};

opp: opp-table-0 {
compatible = "operating-points-v2";

/* The E-core frequencies are adjusted so performance scales
* linearly with reported clock speed */

opp01 {
opp-hz = /bits/ 64 <149000000>; /* 396 MHz, E-core */
opp-level = <1>;
};

opp02 {
opp-hz = /bits/ 64 <275000000>; /* 732 MHz, E-core */
opp-level = <2>;
};

opp03 {
opp-hz = /bits/ 64 <410000000>; /* 1092 MHz, E-core */
opp-level = <3>;
};

/* The following operating points are handled by the P-cores */
opp04 {
opp-hz = /bits/ 64 <756000000>;
opp-level = <4>;
};

opp05 {
opp-hz = /bits/ 64 <1056000000>;
opp-level = <5>;
};

opp06 {
opp-hz = /bits/ 64 <1356000000>;
opp-level = <6>;
};

opp07 {
opp-hz = /bits/ 64 <1644000000>;
opp-level = <7>;
};

/* The iPod Touch 7 supports up to 1.6 GHz, faster operating
* points for other devices are in t8010-fast.dtsi */
};

memory@800000000 {
device_type = "memory";
/* To be filled in by the bootloader (based on XNU BootArgs). */
Expand All @@ -93,6 +143,12 @@
nonposted-mmio;
ranges;

cpufreq: performance-controller@202f20000 {
compatible = "apple,t8010-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
reg = <0x2 0x2f20000 0 0x1000>;
#performance-domain-cells = <0>;
};

serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
Expand Down
4 changes: 3 additions & 1 deletion arch/arm64/boot/dts/apple/t8011.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
* Copyright (c) 2022, Konrad Dybcio <[email protected]>
*/

#include "t8010.dtsi"
#include "t8010-fast.dtsi"

/ {
cpus {
cpu2: cpu@2 {
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x2>;
cpu-release-addr = <0 0>; /* To be filled by loader */
operating-points-v2 = <&opp>;
performance-domains = <&cpufreq>;
enable-method = "spin-table";
device-type = "cpu";
};
Expand Down

0 comments on commit 80c609b

Please sign in to comment.