|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 | +/* |
| 3 | + * Apple T6022 "M2 Ultra" SoC |
| 4 | + * |
| 5 | + * Other names: H14J, "Rhodes 2C" |
| 6 | + * |
| 7 | + * Copyright The Asahi Linux Contributors |
| 8 | + */ |
| 9 | + |
| 10 | +#include <dt-bindings/gpio/gpio.h> |
| 11 | +#include <dt-bindings/interrupt-controller/apple-aic.h> |
| 12 | +#include <dt-bindings/interrupt-controller/irq.h> |
| 13 | +#include <dt-bindings/pinctrl/apple.h> |
| 14 | +#include <dt-bindings/phy/phy.h> |
| 15 | +#include <dt-bindings/spmi/spmi.h> |
| 16 | + |
| 17 | +#include "multi-die-cpp.h" |
| 18 | + |
| 19 | +#ifndef GPU_REPEAT |
| 20 | +# define GPU_REPEAT(x) <x x x x x x x x> |
| 21 | +#endif |
| 22 | +#ifndef GPU_DIE_REPEAT |
| 23 | +# define GPU_DIE_REPEAT(x) <x x> |
| 24 | +#endif |
| 25 | + |
| 26 | +#include "t602x-common.dtsi" |
| 27 | + |
| 28 | +/ { |
| 29 | + compatible = "apple,t6022", "apple,arm-platform"; |
| 30 | + |
| 31 | + #address-cells = <2>; |
| 32 | + #size-cells = <2>; |
| 33 | + |
| 34 | + cpus { |
| 35 | + cpu-map { |
| 36 | + cluster3 { |
| 37 | + core0 { |
| 38 | + cpu = <&cpu_e10>; |
| 39 | + }; |
| 40 | + core1 { |
| 41 | + cpu = <&cpu_e11>; |
| 42 | + }; |
| 43 | + core2 { |
| 44 | + cpu = <&cpu_e12>; |
| 45 | + }; |
| 46 | + core3 { |
| 47 | + cpu = <&cpu_e13>; |
| 48 | + }; |
| 49 | + }; |
| 50 | + |
| 51 | + cluster4 { |
| 52 | + core0 { |
| 53 | + cpu = <&cpu_p20>; |
| 54 | + }; |
| 55 | + core1 { |
| 56 | + cpu = <&cpu_p21>; |
| 57 | + }; |
| 58 | + core2 { |
| 59 | + cpu = <&cpu_p22>; |
| 60 | + }; |
| 61 | + core3 { |
| 62 | + cpu = <&cpu_p23>; |
| 63 | + }; |
| 64 | + }; |
| 65 | + |
| 66 | + cluster5 { |
| 67 | + core0 { |
| 68 | + cpu = <&cpu_p30>; |
| 69 | + }; |
| 70 | + core1 { |
| 71 | + cpu = <&cpu_p31>; |
| 72 | + }; |
| 73 | + core2 { |
| 74 | + cpu = <&cpu_p32>; |
| 75 | + }; |
| 76 | + core3 { |
| 77 | + cpu = <&cpu_p33>; |
| 78 | + }; |
| 79 | + }; |
| 80 | + }; |
| 81 | + |
| 82 | + cpu_e10: cpu@800 { |
| 83 | + compatible = "apple,blizzard"; |
| 84 | + device_type = "cpu"; |
| 85 | + reg = <0x0 0x800>; |
| 86 | + enable-method = "spin-table"; |
| 87 | + cpu-release-addr = <0 0>; /* to be filled by loader */ |
| 88 | + next-level-cache = <&l2_cache_3>; |
| 89 | + i-cache-size = <0x20000>; |
| 90 | + d-cache-size = <0x10000>; |
| 91 | + operating-points-v2 = <&blizzard_opp>; |
| 92 | + capacity-dmips-mhz = <756>; |
| 93 | + performance-domains = <&cpufreq_e_die1>; |
| 94 | + }; |
| 95 | + |
| 96 | + cpu_e11: cpu@801 { |
| 97 | + compatible = "apple,blizzard"; |
| 98 | + device_type = "cpu"; |
| 99 | + reg = <0x0 0x801>; |
| 100 | + enable-method = "spin-table"; |
| 101 | + cpu-release-addr = <0 0>; /* to be filled by loader */ |
| 102 | + next-level-cache = <&l2_cache_3>; |
| 103 | + i-cache-size = <0x20000>; |
| 104 | + d-cache-size = <0x10000>; |
| 105 | + operating-points-v2 = <&blizzard_opp>; |
| 106 | + capacity-dmips-mhz = <756>; |
| 107 | + performance-domains = <&cpufreq_e_die1>; |
| 108 | + }; |
| 109 | + |
| 110 | + cpu_e12: cpu@802 { |
| 111 | + compatible = "apple,blizzard"; |
| 112 | + device_type = "cpu"; |
| 113 | + reg = <0x0 0x802>; |
| 114 | + enable-method = "spin-table"; |
| 115 | + cpu-release-addr = <0 0>; /* to be filled by loader */ |
| 116 | + next-level-cache = <&l2_cache_3>; |
| 117 | + i-cache-size = <0x20000>; |
| 118 | + d-cache-size = <0x10000>; |
| 119 | + operating-points-v2 = <&blizzard_opp>; |
| 120 | + capacity-dmips-mhz = <756>; |
| 121 | + performance-domains = <&cpufreq_e_die1>; |
| 122 | + }; |
| 123 | + |
| 124 | + cpu_e13: cpu@803 { |
| 125 | + compatible = "apple,blizzard"; |
| 126 | + device_type = "cpu"; |
| 127 | + reg = <0x0 0x803>; |
| 128 | + enable-method = "spin-table"; |
| 129 | + cpu-release-addr = <0 0>; /* to be filled by loader */ |
| 130 | + next-level-cache = <&l2_cache_3>; |
| 131 | + i-cache-size = <0x20000>; |
| 132 | + d-cache-size = <0x10000>; |
| 133 | + operating-points-v2 = <&blizzard_opp>; |
| 134 | + capacity-dmips-mhz = <756>; |
| 135 | + performance-domains = <&cpufreq_e_die1>; |
| 136 | + }; |
| 137 | + |
| 138 | + cpu_p20: cpu@10900 { |
| 139 | + compatible = "apple,avalanche"; |
| 140 | + device_type = "cpu"; |
| 141 | + reg = <0x0 0x10900>; |
| 142 | + enable-method = "spin-table"; |
| 143 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 144 | + next-level-cache = <&l2_cache_4>; |
| 145 | + i-cache-size = <0x30000>; |
| 146 | + d-cache-size = <0x20000>; |
| 147 | + operating-points-v2 = <&avalanche_opp>; |
| 148 | + capacity-dmips-mhz = <1024>; |
| 149 | + performance-domains = <&cpufreq_p0_die1>; |
| 150 | + }; |
| 151 | + |
| 152 | + cpu_p21: cpu@10901 { |
| 153 | + compatible = "apple,avalanche"; |
| 154 | + device_type = "cpu"; |
| 155 | + reg = <0x0 0x10901>; |
| 156 | + enable-method = "spin-table"; |
| 157 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 158 | + next-level-cache = <&l2_cache_4>; |
| 159 | + i-cache-size = <0x30000>; |
| 160 | + d-cache-size = <0x20000>; |
| 161 | + operating-points-v2 = <&avalanche_opp>; |
| 162 | + capacity-dmips-mhz = <1024>; |
| 163 | + performance-domains = <&cpufreq_p0_die1>; |
| 164 | + }; |
| 165 | + |
| 166 | + cpu_p22: cpu@10902 { |
| 167 | + compatible = "apple,avalanche"; |
| 168 | + device_type = "cpu"; |
| 169 | + reg = <0x0 0x10902>; |
| 170 | + enable-method = "spin-table"; |
| 171 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 172 | + next-level-cache = <&l2_cache_4>; |
| 173 | + i-cache-size = <0x30000>; |
| 174 | + d-cache-size = <0x20000>; |
| 175 | + operating-points-v2 = <&avalanche_opp>; |
| 176 | + capacity-dmips-mhz = <1024>; |
| 177 | + performance-domains = <&cpufreq_p0_die1>; |
| 178 | + }; |
| 179 | + |
| 180 | + cpu_p23: cpu@10903 { |
| 181 | + compatible = "apple,avalanche"; |
| 182 | + device_type = "cpu"; |
| 183 | + reg = <0x0 0x10903>; |
| 184 | + enable-method = "spin-table"; |
| 185 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 186 | + next-level-cache = <&l2_cache_4>; |
| 187 | + i-cache-size = <0x30000>; |
| 188 | + d-cache-size = <0x20000>; |
| 189 | + operating-points-v2 = <&avalanche_opp>; |
| 190 | + capacity-dmips-mhz = <1024>; |
| 191 | + performance-domains = <&cpufreq_p0_die1>; |
| 192 | + }; |
| 193 | + |
| 194 | + cpu_p30: cpu@10a00 { |
| 195 | + compatible = "apple,avalanche"; |
| 196 | + device_type = "cpu"; |
| 197 | + reg = <0x0 0x10a00>; |
| 198 | + enable-method = "spin-table"; |
| 199 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 200 | + next-level-cache = <&l2_cache_5>; |
| 201 | + i-cache-size = <0x30000>; |
| 202 | + d-cache-size = <0x20000>; |
| 203 | + operating-points-v2 = <&avalanche_opp>; |
| 204 | + capacity-dmips-mhz = <1024>; |
| 205 | + performance-domains = <&cpufreq_p1_die1>; |
| 206 | + }; |
| 207 | + |
| 208 | + cpu_p31: cpu@10a01 { |
| 209 | + compatible = "apple,avalanche"; |
| 210 | + device_type = "cpu"; |
| 211 | + reg = <0x0 0x10a01>; |
| 212 | + enable-method = "spin-table"; |
| 213 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 214 | + next-level-cache = <&l2_cache_5>; |
| 215 | + i-cache-size = <0x30000>; |
| 216 | + d-cache-size = <0x20000>; |
| 217 | + operating-points-v2 = <&avalanche_opp>; |
| 218 | + capacity-dmips-mhz = <1024>; |
| 219 | + performance-domains = <&cpufreq_p1_die1>; |
| 220 | + }; |
| 221 | + |
| 222 | + cpu_p32: cpu@10a02 { |
| 223 | + compatible = "apple,avalanche"; |
| 224 | + device_type = "cpu"; |
| 225 | + reg = <0x0 0x10a02>; |
| 226 | + enable-method = "spin-table"; |
| 227 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 228 | + next-level-cache = <&l2_cache_5>; |
| 229 | + i-cache-size = <0x30000>; |
| 230 | + d-cache-size = <0x20000>; |
| 231 | + operating-points-v2 = <&avalanche_opp>; |
| 232 | + capacity-dmips-mhz = <1024>; |
| 233 | + performance-domains = <&cpufreq_p1_die1>; |
| 234 | + }; |
| 235 | + |
| 236 | + cpu_p33: cpu@10a03 { |
| 237 | + compatible = "apple,avalanche"; |
| 238 | + device_type = "cpu"; |
| 239 | + reg = <0x0 0x10a03>; |
| 240 | + enable-method = "spin-table"; |
| 241 | + cpu-release-addr = <0 0>; /* To be filled by loader */ |
| 242 | + next-level-cache = <&l2_cache_5>; |
| 243 | + i-cache-size = <0x30000>; |
| 244 | + d-cache-size = <0x20000>; |
| 245 | + operating-points-v2 = <&avalanche_opp>; |
| 246 | + capacity-dmips-mhz = <1024>; |
| 247 | + performance-domains = <&cpufreq_p1_die1>; |
| 248 | + }; |
| 249 | + |
| 250 | + l2_cache_3: l2-cache-3 { |
| 251 | + compatible = "cache"; |
| 252 | + cache-level = <2>; |
| 253 | + cache-unified; |
| 254 | + cache-size = <0x400000>; |
| 255 | + }; |
| 256 | + |
| 257 | + l2_cache_4: l2-cache-4 { |
| 258 | + compatible = "cache"; |
| 259 | + cache-level = <2>; |
| 260 | + cache-unified; |
| 261 | + cache-size = <0x1000000>; |
| 262 | + }; |
| 263 | + |
| 264 | + l2_cache_5: l2-cache-5 { |
| 265 | + compatible = "cache"; |
| 266 | + cache-level = <2>; |
| 267 | + cache-unified; |
| 268 | + cache-size = <0x1000000>; |
| 269 | + }; |
| 270 | + }; |
| 271 | + |
| 272 | + die0: soc@200000000 { |
| 273 | + compatible = "simple-bus"; |
| 274 | + #address-cells = <2>; |
| 275 | + #size-cells = <2>; |
| 276 | + ranges = <0x2 0x0 0x2 0x0 0x4 0x0>, |
| 277 | + <0x5 0x80000000 0x5 0x80000000 0x1 0x80000000>, |
| 278 | + <0x7 0x0 0x7 0x0 0xf 0x80000000>; |
| 279 | + nonposted-mmio; |
| 280 | + /* Required to get >32-bit DMA via DARTs */ |
| 281 | + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; |
| 282 | + |
| 283 | + // filled via templated includes at the end of the file |
| 284 | + }; |
| 285 | + |
| 286 | + die1: soc@2200000000 { |
| 287 | + compatible = "simple-bus"; |
| 288 | + #address-cells = <2>; |
| 289 | + #size-cells = <2>; |
| 290 | + ranges = <0x2 0x0 0x22 0x0 0x4 0x0>, |
| 291 | + <0x7 0x0 0x27 0x0 0xf 0x80000000>; |
| 292 | + nonposted-mmio; |
| 293 | + /* Required to get >32-bit DMA via DARTs */ |
| 294 | + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; |
| 295 | + |
| 296 | + // filled via templated includes at the end of the file |
| 297 | + }; |
| 298 | +}; |
| 299 | + |
| 300 | +#define DIE |
| 301 | +#define DIE_NO 0 |
| 302 | + |
| 303 | +&die0 { |
| 304 | + #include "t602x-die0.dtsi" |
| 305 | + #include "t602x-dieX.dtsi" |
| 306 | +}; |
| 307 | + |
| 308 | +#include "t602x-pmgr.dtsi" |
| 309 | +#include "t602x-gpio-pins.dtsi" |
| 310 | + |
| 311 | +#undef DIE |
| 312 | +#undef DIE_NO |
| 313 | + |
| 314 | +#define DIE _die1 |
| 315 | +#define DIE_NO 1 |
| 316 | + |
| 317 | +&die1 { |
| 318 | + #include "t602x-dieX.dtsi" |
| 319 | + #include "t602x-nvme.dtsi" |
| 320 | +}; |
| 321 | + |
| 322 | +#include "t602x-pmgr.dtsi" |
| 323 | + |
| 324 | +#undef DIE |
| 325 | +#undef DIE_NO |
| 326 | + |
| 327 | +&aic { |
| 328 | + affinities { |
| 329 | + e-core-pmu-affinity { |
| 330 | + apple,fiq-index = <AIC_CPU_PMU_E>; |
| 331 | + cpus = <&cpu_e00 &cpu_e01 &cpu_e02 &cpu_e03 |
| 332 | + &cpu_e10 &cpu_e11 &cpu_e12 &cpu_e13>; |
| 333 | + }; |
| 334 | + |
| 335 | + p-core-pmu-affinity { |
| 336 | + apple,fiq-index = <AIC_CPU_PMU_P>; |
| 337 | + cpus = <&cpu_p00 &cpu_p01 &cpu_p02 &cpu_p03 |
| 338 | + &cpu_p10 &cpu_p11 &cpu_p12 &cpu_p13 |
| 339 | + &cpu_p20 &cpu_p21 &cpu_p22 &cpu_p23 |
| 340 | + &cpu_p30 &cpu_p31 &cpu_p32 &cpu_p33>; |
| 341 | + }; |
| 342 | + }; |
| 343 | +}; |
| 344 | + |
| 345 | +&ps_gfx { |
| 346 | + // On t6022, the die0 GPU power domain needs both AFR power domains |
| 347 | + power-domains = <&ps_afr>, <&ps_afr_die1>; |
| 348 | +}; |
| 349 | + |
| 350 | +&gpu { |
| 351 | + compatible = "apple,agx-t6022", "apple,agx-g14x"; |
| 352 | + |
| 353 | + apple,avg-power-filter-tc-ms = <302>; |
| 354 | + apple,avg-power-ki-only = <1.0125>; |
| 355 | + apple,avg-power-kp = <0.15>; |
| 356 | + apple,fast-die0-integral-gain = <9.6>; |
| 357 | + apple,fast-die0-proportional-gain = <24.0>; |
| 358 | + apple,ppm-ki = <11.0>; |
| 359 | + apple,ppm-kp = <0.15>; |
| 360 | +}; |
0 commit comments