Guest User

Untitled

a guest
Jul 18th, 2026
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.44 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0+ OR MIT
  2. /*
  3. * Apple T6040 "M4 Pro" SoC
  4. *
  5. * Copyright The Asahi Linux Contributors
  6. */
  7.  
  8. #include <dt-bindings/interrupt-controller/apple-aic.h>
  9.  
  10.  
  11. // TODO: make this 604x, and disable the last 2 cpus?
  12.  
  13. / {
  14. compatible = "apple,t6040", "apple,arm-platform";
  15.  
  16. #address-cells = <2>;
  17. #size-cells = <2>;
  18.  
  19. aliases {
  20.  
  21. };
  22.  
  23. cpus {
  24. #address-cells = <2>;
  25. #size-cells = <0>;
  26.  
  27. cpu-map {
  28. cluster0 {
  29. core0 {
  30. cpu = <&cpu_e0>;
  31. };
  32. core1 {
  33. cpu = <&cpu_e1>;
  34. };
  35. core2 {
  36. cpu = <&cpu_e2>;
  37. };
  38. core3 {
  39. cpu = <&cpu_e3>;
  40. };
  41. };
  42.  
  43. cluster1 {
  44. core0 {
  45. cpu = <&cpu_p00>;
  46. };
  47. core1 {
  48. cpu = <&cpu_p01>;
  49. };
  50. core2 {
  51. cpu = <&cpu_p02>;
  52. };
  53. core3 {
  54. cpu = <&cpu_p03>;
  55. };
  56. core4 {
  57. cpu = <&cpu_p04>;
  58. };
  59. core5 {
  60. cpu = <&cpu_p05>;
  61. };
  62. };
  63.  
  64. cluster2 {
  65. core0 {
  66. cpu = <&cpu_p10>;
  67. };
  68. core1 {
  69. cpu = <&cpu_p11>;
  70. };
  71. core2 {
  72. cpu = <&cpu_p12>;
  73. };
  74. core3 {
  75. cpu = <&cpu_p13>;
  76. };
  77. core4 {
  78. cpu = <&cpu_p14>;
  79. };
  80. core5 {
  81. cpu = <&cpu_p15>;
  82. };
  83. };
  84. };
  85.  
  86. cpu_e0: cpu@0 {
  87. compatible = "apple,sawtooth";
  88. device_type = "cpu";
  89. reg = <0x0 0x0>;
  90. enable-method = "spin-table";
  91. cpu-release-addr = <0 0>; /* To be filled by loader */
  92. next-level-cache = <&l2_cache_0>;
  93. };
  94.  
  95. cpu_e1: cpu@1 {
  96. compatible = "apple,sawtooth";
  97. device_type = "cpu";
  98. reg = <0x0 0x1>;
  99. enable-method = "spin-table";
  100. cpu-release-addr = <0 0>; /* To be filled by loader */
  101. next-level-cache = <&l2_cache_0>;
  102. };
  103.  
  104. cpu_e2: cpu@2 {
  105. compatible = "apple,sawtooth";
  106. device_type = "cpu";
  107. reg = <0x0 0x2>;
  108. enable-method = "spin-table";
  109. cpu-release-addr = <0 0>; /* To be filled by loader */
  110. next-level-cache = <&l2_cache_0>;
  111. };
  112.  
  113. cpu_e3: cpu@3 {
  114. compatible = "apple,sawtooth";
  115. device_type = "cpu";
  116. reg = <0x0 0x3>;
  117. enable-method = "spin-table";
  118. cpu-release-addr = <0 0>; /* To be filled by loader */
  119. next-level-cache = <&l2_cache_0>;
  120. };
  121.  
  122.  
  123. cpu_p00: cpu@10100 {
  124. compatible = "apple,everest";
  125. device_type = "cpu";
  126. reg = <0x0 0x10100>;
  127. enable-method = "spin-table";
  128. cpu-release-addr = <0 0>; /* To be filled by loader */
  129. next-level-cache = <&l2_cache_1>;
  130. };
  131. cpu_p01: cpu@10101 {
  132. compatible = "apple,everest";
  133. device_type = "cpu";
  134. reg = <0x0 0x10101>;
  135. enable-method = "spin-table";
  136. cpu-release-addr = <0 0>; /* To be filled by loader */
  137. next-level-cache = <&l2_cache_1>;
  138. };
  139. cpu_p02: cpu@10102 {
  140. compatible = "apple,everest";
  141. device_type = "cpu";
  142. reg = <0x0 0x10102>;
  143. enable-method = "spin-table";
  144. cpu-release-addr = <0 0>; /* To be filled by loader */
  145. next-level-cache = <&l2_cache_1>;
  146. };
  147. cpu_p03: cpu@10103 {
  148. compatible = "apple,everest";
  149. device_type = "cpu";
  150. reg = <0x0 0x10103>;
  151. enable-method = "spin-table";
  152. cpu-release-addr = <0 0>; /* To be filled by loader */
  153. next-level-cache = <&l2_cache_1>;
  154. };
  155. cpu_p04: cpu@10104 {
  156. compatible = "apple,everest";
  157. device_type = "cpu";
  158. reg = <0x0 0x10104>;
  159. enable-method = "spin-table";
  160. cpu-release-addr = <0 0>; /* To be filled by loader */
  161. next-level-cache = <&l2_cache_1>;
  162. };
  163. cpu_p05: cpu@10105 {
  164. compatible = "apple,everest";
  165. device_type = "cpu";
  166. reg = <0x0 0x10105>;
  167. enable-method = "spin-table";
  168. cpu-release-addr = <0 0>; /* To be filled by loader */
  169. next-level-cache = <&l2_cache_1>;
  170. };
  171.  
  172. cpu_p10: cpu@10200 {
  173. compatible = "apple,everest";
  174. device_type = "cpu";
  175. reg = <0x0 0x10200>;
  176. enable-method = "spin-table";
  177. cpu-release-addr = <0 0>; /* To be filled by loader */
  178. next-level-cache = <&l2_cache_2>;
  179. };
  180. cpu_p11: cpu@10201 {
  181. compatible = "apple,everest";
  182. device_type = "cpu";
  183. reg = <0x0 0x10201>;
  184. enable-method = "spin-table";
  185. cpu-release-addr = <0 0>; /* To be filled by loader */
  186. next-level-cache = <&l2_cache_2>;
  187. };
  188. cpu_p12: cpu@10202 {
  189. compatible = "apple,everest";
  190. device_type = "cpu";
  191. reg = <0x0 0x10202>;
  192. enable-method = "spin-table";
  193. cpu-release-addr = <0 0>; /* To be filled by loader */
  194. next-level-cache = <&l2_cache_2>;
  195. };
  196. cpu_p13: cpu@10203 {
  197. compatible = "apple,everest";
  198. device_type = "cpu";
  199. reg = <0x0 0x10203>;
  200. enable-method = "spin-table";
  201. cpu-release-addr = <0 0>; /* To be filled by loader */
  202. next-level-cache = <&l2_cache_2>;
  203. };
  204. cpu_p14: cpu@10204 {
  205. compatible = "apple,everest";
  206. device_type = "cpu";
  207. reg = <0x0 0x10204>;
  208. enable-method = "spin-table";
  209. cpu-release-addr = <0 0>; /* To be filled by loader */
  210. next-level-cache = <&l2_cache_2>;
  211. };
  212. cpu_p15: cpu@10205 {
  213. compatible = "apple,everest";
  214. device_type = "cpu";
  215. reg = <0x0 0x10205>;
  216. enable-method = "spin-table";
  217. cpu-release-addr = <0 0>; /* To be filled by loader */
  218. next-level-cache = <&l2_cache_2>;
  219. };
  220.  
  221. l2_cache_0: l2-cache-0 {
  222. compatible = "cache";
  223. cache-level = <2>;
  224. cache-unified;
  225. cache-size = <0x400000>;
  226. };
  227.  
  228. l2_cache_1: l2-cache-1 {
  229. compatible = "cache";
  230. cache-level = <2>;
  231. cache-unified;
  232. cache-size = <0x1000000>;
  233. };
  234.  
  235. l2_cache_2: l2-cache-2 {
  236. compatible = "cache";
  237. cache-level = <2>;
  238. cache-unified;
  239. cache-size = <0x1000000>;
  240. };
  241. };
  242.  
  243. timer {
  244. compatible = "arm,armv8-timer";
  245. interrupt-parent = <&aic>;
  246. interrupt-names = "phys", "virt", "hyp-phys", "hyp-virt";
  247. interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
  248. <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>,
  249. <AIC_FIQ AIC_TMR_HV_PHYS IRQ_TYPE_LEVEL_HIGH>,
  250. <AIC_FIQ AIC_TMR_HV_VIRT IRQ_TYPE_LEVEL_HIGH>;
  251. };
  252.  
  253. clkref: clock-ref {
  254. compatible = "fixed-clock";
  255. #clock-cells = <0>;
  256. clock-frequency = <24000000>;
  257. clock-output-names = "clkref";
  258. };
  259.  
  260. soc {
  261. compatible = "simple-bus";
  262. #address-cells = <2>;
  263. #size-cells = <2>;
  264.  
  265. ranges;
  266. nonposted-mmio;
  267. /* Required to get >32-bit DMA via DARTs */
  268. dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>;
  269.  
  270. serial0: serial@429200000 {
  271. compatible = "apple,s5l-uart";
  272. reg = <0x4 0x29200000 0x0 0x1000>;
  273. reg-io-width = <4>;
  274. interrupt-parent = <&aic>;
  275. interrupts = <AIC_IRQ 1559 IRQ_TYPE_LEVEL_HIGH>;
  276. /*
  277. * TODO: figure out the clocking properly, there may
  278. * be a third selectable clock.
  279. */
  280. clocks = <&clkref>, <&clkref>;
  281. clock-names = "uart", "clk_uart_baud0";
  282. // power-domains = <&ps_uart0>;
  283. status = "disabled";
  284. };
  285.  
  286. aic: interrupt-controller@502400000 {
  287. compatible = "apple,t6040-aic3", "apple,t8122-aic3";
  288. #interrupt-cells = <3>;
  289. interrupt-controller;
  290. reg = <0x5 0x2400000 0x0 0x184000>,
  291. <0x5 0x2440000 0x0 0x4>;
  292. reg-names = "core", "event";
  293. // power-domains = <&ps_aic>;
  294.  
  295. affinities {
  296. e-core-pmu-affinity {
  297. apple,fiq-index = <AIC_CPU_PMU_E>;
  298. cpus = <&cpu_e0 &cpu_e1 &cpu_e2 &cpu_e3>;
  299. };
  300.  
  301. p-core-pmu-affinity {
  302. apple,fiq-index = <AIC_CPU_PMU_P>;
  303. cpus = <
  304. &cpu_p00 &cpu_p01 &cpu_p02 &cpu_p03 &cpu_p04 &cpu_p05
  305. &cpu_p10 &cpu_p11 &cpu_p12 &cpu_p13 &cpu_p14 &cpu_p15
  306. >;
  307. };
  308. };
  309. };
  310.  
  311. dockchannel_uart: mailbox@50880c000 {
  312. compatible = "apple,t8122-dockchannel", "apple,t8112-dockchannel";
  313. // maybe 0x50 0x8...
  314. reg = <0x50 0x880c000 0x0 0x4000>,
  315. <0x50 0x8828000 0x0 0x4000>,
  316. <0x50 0x882c000 0x0 0x4000>;
  317. reg-names = "irq", "config", "data";
  318. interrupt-parent = <&aic>;
  319. interrupts = <AIC_IRQ 360 IRQ_TYPE_LEVEL_HIGH>;
  320. #mbox-cells = <0>;
  321. status = "disabled";
  322. };
  323.  
  324. mtp_mbox: mbox@514608000 {
  325. compatible = "apple,t8122-asc-mailbox", "apple,asc-mailbox-v4";
  326. reg = <0x5 0x14608000 0x0 0x4000>;
  327. interrupt-parent = <&aic>;
  328. interrupts = <AIC_IRQ 792 IRQ_TYPE_LEVEL_HIGH>,
  329. <AIC_IRQ 793 IRQ_TYPE_LEVEL_HIGH>,
  330. <AIC_IRQ 794 IRQ_TYPE_LEVEL_HIGH>,
  331. <AIC_IRQ 795 IRQ_TYPE_LEVEL_HIGH>;
  332. interrupt-names = "send-empty", "send-not-empty",
  333. "recv-empty", "recv-not-empty";
  334. #mbox-cells = <0>;
  335. status = "disabled";
  336. };
  337.  
  338. mtp_dart: iommu@514800000 {
  339. compatible = "apple,t8122-dart", "apple,t8110-dart";
  340. reg = <0x5 0x14800000 0x0 0x4000>;
  341. interrupt-parent = <&aic>;
  342. interrupts = <AIC_IRQ 775 IRQ_TYPE_LEVEL_HIGH>;
  343. #iommu-cells = <1>;
  344. status = "disabled";
  345. };
  346.  
  347. mtp_dockchannel: mailbox@514b14000 {
  348. compatible = "apple,t8122-dockchannel", "apple,t8112-dockchannel";
  349. reg = <0x5 0x14b14000 0x0 0x4000>,
  350. <0x5 0x14b30000 0x0 0x4000>,
  351. <0x5 0x14b34000 0x0 0x4000>;
  352. reg-names = "irq", "config", "data";
  353. interrupt-parent = <&aic>;
  354. interrupts = <AIC_IRQ 776 IRQ_TYPE_LEVEL_HIGH>;
  355. #mbox-cells = <0>;
  356. status = "disabled";
  357. };
  358.  
  359. mtp_hid: hid@514600000 {
  360. compatible = "apple,t8122-dockchannel-hid",
  361. "apple,t8112-dockchannel-hid";
  362. reg = <0x5 0x14600000 0x0 0x4000>,
  363. <0x5 0x15000000 0x0 0x100000>;
  364. reg-names = "coproc-asc", "coproc-sram";
  365. mboxes = <&mtp_mbox>, <&mtp_dockchannel>;
  366. mbox-names = "asc", "dockchannel";
  367. iommus = <&mtp_dart 1>;
  368. status = "disabled";
  369. };
  370.  
  371. dockchannel_uart_serial: serial {
  372. compatible = "apple,dockchannel-serial";
  373. mboxes = <&dockchannel_uart>;
  374. mbox-names = "dockchannel";
  375. status = "disabled";
  376. };
  377. };
  378. };
  379.  
Advertisement
Add Comment
Please, Sign In to add comment