arm64: dts: apple: Add CPU cache information for Apple A7-A11, T2 SoCs
Subsystems (2)
cover arm64: dts: apple: Add CPU cache information for Apple A7-A11, T2 SoCs
Add CPU cache information for Apple A7-A11, T2 SoCs. On Apple A10 (T8010), A10X (T8011), T2 (T8012), only the caches in one of the CPU clusters can be used due to the "Apple Fusion Architecture" big.LITTLE switcher. The values for the P-cluster is used in this case.
---
Nick Chan (9):
arm64: dts: apple: s5l8960x: Add CPU caches
arm64: dts: apple: t7000: Add CPU caches
arm64: dts: apple: t7001: Add CPU caches
arm64: dts: apple: s800-0-3: Add CPU caches
arm64: dts: apple: s8001: Add CPU caches
arm64: dts: apple: t8010: Add CPU caches
arm64: dts: apple: t8011: Add CPU caches
arm64: dts: apple: t8012: Add CPU caches
arm64: dts: apple: t8015: Add CPU caches
arch/arm64/boot/dts/apple/s5l8960x.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/apple/s800-0-3.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/apple/s8001.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/apple/t7000.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/apple/t7001.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/apple/t8010.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/apple/t8011.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/apple/t8012.dtsi | 13 +++++++++++++ arch/arm64/boot/dts/apple/t8015.dtsi | 32 ++++++++++++++++++++++++++++++++ 9 files changed, 142 insertions(+)
---
base-commit: 3febe9de5ca5267618675650871a626d0901f8cb
change-id: 20250220-caches-bea5d32f91fb
Best regards,
Signature · 1 line
Nick Chan <[email protected]>
PATCH 1/9 arm64: dts: apple: s5l8960x: Add CPU caches
Add information about CPU caches in Apple A7 SoC.
--- arch/arm64/boot/dts/apple/s5l8960x.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/apple/s5l8960x.dtsi +13 -0
@@ -37,6 +37,9 @@ cpu0: cpu@0 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu1: cpu@1 {
@@ -47,6 +50,16 @@ cpu1: cpu@1 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x100000>; }; };
Signature · 1 line
2.48.1
PATCH 2/9 arm64: dts: apple: t7000: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in Apple A8 SoC.
--- arch/arm64/boot/dts/apple/t7000.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/apple/t7000.dtsi +13 -0
@@ -37,6 +37,9 @@ cpu0: cpu@0 { operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu1: cpu@1 {
@@ -47,6 +50,16 @@ cpu1: cpu@1 { operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x100000>; }; };
Signature · 1 line
2.48.1
PATCH 3/9 arm64: dts: apple: t7001: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in Apple A8X SoC.
--- arch/arm64/boot/dts/apple/t7001.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/apple/t7001.dtsi +16 -0
@@ -39,6 +39,9 @@ cpu0: cpu@0 { operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu1: cpu@1 {
@@ -49,6 +52,9 @@ cpu1: cpu@1 { operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu2: cpu@2 {
@@ -59,6 +65,16 @@ cpu2: cpu@2 { operating-points-v2 = <&typhoon_opp>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x200000>; }; };
Signature · 1 line
2.48.1
PATCH 4/9 arm64: dts: apple: s800-0-3: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in both variants of Apple A9 SoC.
--- arch/arm64/boot/dts/apple/s800-0-3.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/apple/s800-0-3.dtsi +13 -0
@@ -36,6 +36,9 @@ cpu0: cpu@0 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu1: cpu@1 {
@@ -46,6 +49,16 @@ cpu1: cpu@1 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x300000>; }; };
Signature · 1 line
2.48.1
PATCH 5/9 arm64: dts: apple: s8001: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in Apple A9X SoC.
--- arch/arm64/boot/dts/apple/s8001.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/apple/s8001.dtsi +13 -0
@@ -36,6 +36,9 @@ cpu0: cpu@0 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu1: cpu@1 {
@@ -46,6 +49,16 @@ cpu1: cpu@1 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x300000>; }; };
Signature · 1 line
2.48.1
PATCH 6/9 arm64: dts: apple: t8010: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in the P-cluster of Apple A10 SoC. Due to "Apple Fusion Architecture" big.LITTLE switcher, only caches from one of the clusters can be used at any given moment.
--- arch/arm64/boot/dts/apple/t8010.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/apple/t8010.dtsi +13 -0
@@ -36,6 +36,9 @@ cpu0: cpu@0 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ }; cpu1: cpu@1 {
@@ -46,6 +49,16 @@ cpu1: cpu@1 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x300000>; /* P-cluster */ }; };
Signature · 1 line
2.48.1
PATCH 7/9 arm64: dts: apple: t8011: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in the P-cluster of Apple A10X SoC. Due to "Apple Fusion Architecture" big.LITTLE switcher, only caches from one of the clusters can be used at any given moment.
--- arch/arm64/boot/dts/apple/t8011.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/apple/t8011.dtsi +16 -0
@@ -36,6 +36,9 @@ cpu0: cpu@0 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ }; cpu1: cpu@1 {
@@ -46,6 +49,9 @@ cpu1: cpu@1 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ }; cpu2: cpu@2 {
@@ -56,6 +62,16 @@ cpu2: cpu@2 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x800000>; /* P-cluster */ }; };
Signature · 1 line
2.48.1
PATCH 8/9 arm64: dts: apple: t8012: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in the P-cluster of Apple T2 SoC. Due to "Apple Fusion Architecture" big.LITTLE switcher, only caches from one of the clusters can be used at any given moment.
--- arch/arm64/boot/dts/apple/t8012.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/apple/t8012.dtsi +13 -0
@@ -36,6 +36,9 @@ cpu0: cpu@10000 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ }; cpu1: cpu@10001 {
@@ -46,6 +49,16 @@ cpu1: cpu@10001 { performance-domains = <&cpufreq>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache>; + i-cache-size = <0x10000>; /* P-core */ + d-cache-size = <0x10000>; /* P-core */ + }; + + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x300000>; /* P-cluster */ }; };
Signature · 1 line
2.48.1
PATCH 9/9 arm64: dts: apple: t8015: Add CPU caches
In reply to Nick ChanAdd information about CPU caches in Apple A11 SoC.
--- arch/arm64/boot/dts/apple/t8015.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/apple/t8015.dtsi +32 -0
@@ -63,6 +63,9 @@ cpu_e0: cpu@0 { capacity-dmips-mhz = <633>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache_0>; + i-cache-size = <0x8000>; + d-cache-size = <0x8000>; }; cpu_e1: cpu@1 {
@@ -74,6 +77,9 @@ cpu_e1: cpu@1 { capacity-dmips-mhz = <633>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache_0>; + i-cache-size = <0x8000>; + d-cache-size = <0x8000>; }; cpu_e2: cpu@2 {
@@ -85,6 +91,9 @@ cpu_e2: cpu@2 { capacity-dmips-mhz = <633>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache_0>; + i-cache-size = <0x8000>; + d-cache-size = <0x8000>; }; cpu_e3: cpu@3 {
@@ -96,6 +105,9 @@ cpu_e3: cpu@3 { capacity-dmips-mhz = <633>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache_0>; + i-cache-size = <0x8000>; + d-cache-size = <0x8000>; }; cpu_p0: cpu@10004 {
@@ -107,6 +119,9 @@ cpu_p0: cpu@10004 { capacity-dmips-mhz = <1024>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache_1>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; }; cpu_p1: cpu@10005 {
@@ -118,6 +133,23 @@ cpu_p1: cpu@10005 { capacity-dmips-mhz = <1024>; enable-method = "spin-table"; device_type = "cpu"; + next-level-cache = <&l2_cache_1>; + i-cache-size = <0x10000>; + d-cache-size = <0x10000>; + }; + + l2_cache_0: l2-cache-0 { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x100000>; + }; + + l2_cache_1: l2-cache-1 { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0x800000>; }; };
Signature · 1 line
2.48.1
Hi,
Quoted 5 lines · Nick Chan
Add CPU cache information for Apple A7-A11, T2 SoCs. On Apple A10 (T8010), A10X (T8011), T2 (T8012), only the caches in one of the CPU clusters can be used due to the "Apple Fusion Architecture" big.LITTLE switcher. The values for the P-cluster is used in this case.
So this means that the cache information will be "wrong" when the CPU is in the lower power states and only correct for the higher ones? I'm not familiar with how these values are used; are you and do you know if this will have any weird or unexpected effects? Would it be better to use the cache size for the lower rather than the higher states or does this not matter much?
Best,
Sven
Sven Peter 於 2025/3/1 夜晚7:11 寫道:
Quoted 8 lines
Hi,
Quoted 5 lines · Nick Chan
Add CPU cache information for Apple A7-A11, T2 SoCs. On Apple A10 (T8010), A10X (T8011), T2 (T8012), only the caches in one of the CPU clusters can be used due to the "Apple Fusion Architecture" big.LITTLE switcher. The values for the P-cluster is used in this case.
Quoted 6 lines
So this means that the cache information will be "wrong" when the CPU is in the lower power states and only correct for the higher ones? I'm not familiar with how these values are used; are you and do you know if this will have any weird or unexpected effects? Would it be better to use the cache size for the lower rather than the higher states or does this not matter much?
The information in the device tree is only used for reporting cache sizes in /sys/devices/system/cpu. It represents the physical cache size which may not be the same as the architecturally visible cache size. Cache operations in the kernel consult ccsidr_el1 and csselr_el1, so it should be fine.
Quoted 7 lines
Best,
Sven
Nick Chan