sc9860.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Spreadtrum SC9860 SoC
  4. *
  5. * Copyright (C) 2016, Spreadtrum Communications Inc.
  6. */
  7. #include <dt-bindings/interrupt-controller/arm-gic.h>
  8. #include <dt-bindings/input/input.h>
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include "whale2.dtsi"
  11. / {
  12. cpus {
  13. #address-cells = <2>;
  14. #size-cells = <0>;
  15. cpu-map {
  16. cluster0 {
  17. core0 {
  18. cpu = <&CPU0>;
  19. };
  20. core1 {
  21. cpu = <&CPU1>;
  22. };
  23. core2 {
  24. cpu = <&CPU2>;
  25. };
  26. core3 {
  27. cpu = <&CPU3>;
  28. };
  29. };
  30. cluster1 {
  31. core0 {
  32. cpu = <&CPU4>;
  33. };
  34. core1 {
  35. cpu = <&CPU5>;
  36. };
  37. core2 {
  38. cpu = <&CPU6>;
  39. };
  40. core3 {
  41. cpu = <&CPU7>;
  42. };
  43. };
  44. };
  45. CPU0: cpu@530000 {
  46. device_type = "cpu";
  47. compatible = "arm,cortex-a53";
  48. reg = <0x0 0x530000>;
  49. enable-method = "psci";
  50. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  51. };
  52. CPU1: cpu@530001 {
  53. device_type = "cpu";
  54. compatible = "arm,cortex-a53";
  55. reg = <0x0 0x530001>;
  56. enable-method = "psci";
  57. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  58. };
  59. CPU2: cpu@530002 {
  60. device_type = "cpu";
  61. compatible = "arm,cortex-a53";
  62. reg = <0x0 0x530002>;
  63. enable-method = "psci";
  64. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  65. };
  66. CPU3: cpu@530003 {
  67. device_type = "cpu";
  68. compatible = "arm,cortex-a53";
  69. reg = <0x0 0x530003>;
  70. enable-method = "psci";
  71. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  72. };
  73. CPU4: cpu@530100 {
  74. device_type = "cpu";
  75. compatible = "arm,cortex-a53";
  76. reg = <0x0 0x530100>;
  77. enable-method = "psci";
  78. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  79. };
  80. CPU5: cpu@530101 {
  81. device_type = "cpu";
  82. compatible = "arm,cortex-a53";
  83. reg = <0x0 0x530101>;
  84. enable-method = "psci";
  85. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  86. };
  87. CPU6: cpu@530102 {
  88. device_type = "cpu";
  89. compatible = "arm,cortex-a53";
  90. reg = <0x0 0x530102>;
  91. enable-method = "psci";
  92. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  93. };
  94. CPU7: cpu@530103 {
  95. device_type = "cpu";
  96. compatible = "arm,cortex-a53";
  97. reg = <0x0 0x530103>;
  98. enable-method = "psci";
  99. cpu-idle-states = <&CORE_PD &CLUSTER_PD>;
  100. };
  101. };
  102. idle-states {
  103. entry-method = "psci";
  104. CORE_PD: core_pd {
  105. compatible = "arm,idle-state";
  106. entry-latency-us = <1000>;
  107. exit-latency-us = <700>;
  108. min-residency-us = <2500>;
  109. local-timer-stop;
  110. arm,psci-suspend-param = <0x00010002>;
  111. };
  112. CLUSTER_PD: cluster_pd {
  113. compatible = "arm,idle-state";
  114. entry-latency-us = <1000>;
  115. exit-latency-us = <1000>;
  116. min-residency-us = <3000>;
  117. local-timer-stop;
  118. arm,psci-suspend-param = <0x01010003>;
  119. };
  120. };
  121. psci {
  122. compatible = "arm,psci-0.2";
  123. method = "smc";
  124. };
  125. timer {
  126. compatible = "arm,armv8-timer";
  127. interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8)
  128. | IRQ_TYPE_LEVEL_LOW)>,
  129. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8)
  130. | IRQ_TYPE_LEVEL_LOW)>,
  131. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8)
  132. | IRQ_TYPE_LEVEL_LOW)>,
  133. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8)
  134. | IRQ_TYPE_LEVEL_LOW)>;
  135. };
  136. pmu {
  137. compatible = "arm,cortex-a53-pmu";
  138. interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
  139. <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
  140. <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
  141. <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
  142. <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
  143. <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
  144. <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>,
  145. <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
  146. interrupt-affinity = <&CPU0>,
  147. <&CPU1>,
  148. <&CPU2>,
  149. <&CPU3>,
  150. <&CPU4>,
  151. <&CPU5>,
  152. <&CPU6>,
  153. <&CPU7>;
  154. };
  155. soc {
  156. gic: interrupt-controller@12001000 {
  157. compatible = "arm,gic-400";
  158. reg = <0 0x12001000 0 0x1000>,
  159. <0 0x12002000 0 0x2000>,
  160. <0 0x12004000 0 0x2000>,
  161. <0 0x12006000 0 0x2000>;
  162. #interrupt-cells = <3>;
  163. interrupt-controller;
  164. interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8)
  165. | IRQ_TYPE_LEVEL_HIGH)>;
  166. };
  167. pmu_gate: pmu-gate {
  168. compatible = "sprd,sc9860-pmu-gate";
  169. sprd,syscon = <&pmu_regs>; /* 0x402b0000 */
  170. clocks = <&ext_26m>;
  171. #clock-cells = <1>;
  172. };
  173. pll: pll {
  174. compatible = "sprd,sc9860-pll";
  175. sprd,syscon = <&ana_regs>; /* 0x40400000 */
  176. clocks = <&pmu_gate 0>;
  177. #clock-cells = <1>;
  178. };
  179. ap_clk: clock-controller@20000000 {
  180. compatible = "sprd,sc9860-ap-clk";
  181. reg = <0 0x20000000 0 0x400>;
  182. clocks = <&ext_26m>, <&pll 0>,
  183. <&pmu_gate 0>;
  184. #clock-cells = <1>;
  185. };
  186. aon_prediv: aon-prediv@402d0000 {
  187. compatible = "sprd,sc9860-aon-prediv";
  188. reg = <0 0x402d0000 0 0x400>;
  189. clocks = <&ext_26m>, <&pll 0>,
  190. <&pmu_gate 0>;
  191. #clock-cells = <1>;
  192. };
  193. apahb_gate: apahb-gate {
  194. compatible = "sprd,sc9860-apahb-gate";
  195. sprd,syscon = <&ap_ahb_regs>; /* 0x20210000 */
  196. clocks = <&aon_prediv 0>;
  197. #clock-cells = <1>;
  198. };
  199. aon_gate: aon-gate {
  200. compatible = "sprd,sc9860-aon-gate";
  201. sprd,syscon = <&aon_regs>; /* 0x402e0000 */
  202. clocks = <&aon_prediv 0>;
  203. #clock-cells = <1>;
  204. };
  205. aonsecure_clk: clock-controller@40880000 {
  206. compatible = "sprd,sc9860-aonsecure-clk";
  207. reg = <0 0x40880000 0 0x400>;
  208. clocks = <&ext_26m>, <&pll 0>;
  209. #clock-cells = <1>;
  210. };
  211. agcp_gate: agcp-gate {
  212. compatible = "sprd,sc9860-agcp-gate";
  213. sprd,syscon = <&agcp_regs>; /* 0x415e0000 */
  214. clocks = <&aon_prediv 0>;
  215. #clock-cells = <1>;
  216. };
  217. gpu_clk: clock-controller@60200000 {
  218. compatible = "sprd,sc9860-gpu-clk";
  219. reg = <0 0x60200000 0 0x400>;
  220. clocks = <&pll 0>;
  221. #clock-cells = <1>;
  222. };
  223. vsp_clk: clock-controller@61000000 {
  224. compatible = "sprd,sc9860-vsp-clk";
  225. reg = <0 0x61000000 0 0x400>;
  226. clocks = <&ext_26m>, <&pll 0>;
  227. #clock-cells = <1>;
  228. };
  229. vsp_gate: vsp-gate {
  230. compatible = "sprd,sc9860-vsp-gate";
  231. sprd,syscon = <&vsp_regs>; /* 0x61100000 */
  232. clocks = <&vsp_clk 0>;
  233. #clock-cells = <1>;
  234. };
  235. cam_clk: clock-controller@62000000 {
  236. compatible = "sprd,sc9860-cam-clk";
  237. reg = <0 0x62000000 0 0x4000>;
  238. clocks = <&ext_26m>, <&pll 0>;
  239. #clock-cells = <1>;
  240. };
  241. cam_gate: cam-gate {
  242. compatible = "sprd,sc9860-cam-gate";
  243. sprd,syscon = <&cam_regs>; /* 0x62100000 */
  244. clocks = <&cam_clk 0>;
  245. #clock-cells = <1>;
  246. };
  247. disp_clk: clock-controller@63000000 {
  248. compatible = "sprd,sc9860-disp-clk";
  249. reg = <0 0x63000000 0 0x400>;
  250. clocks = <&ext_26m>, <&pll 0>;
  251. #clock-cells = <1>;
  252. };
  253. disp_gate: disp-gate {
  254. compatible = "sprd,sc9860-disp-gate";
  255. sprd,syscon = <&disp_regs>; /* 0x63100000 */
  256. clocks = <&disp_clk 0>;
  257. #clock-cells = <1>;
  258. };
  259. apapb_gate: apapb-gate {
  260. compatible = "sprd,sc9860-apapb-gate";
  261. sprd,syscon = <&ap_apb_regs>; /* 0x70b00000 */
  262. clocks = <&ap_clk 0>;
  263. #clock-cells = <1>;
  264. };
  265. funnel@10001000 { /* SoC Funnel */
  266. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  267. reg = <0 0x10001000 0 0x1000>;
  268. clocks = <&ext_26m>;
  269. clock-names = "apb_pclk";
  270. out-ports {
  271. port {
  272. soc_funnel_out_port: endpoint {
  273. remote-endpoint = <&etb_in>;
  274. };
  275. };
  276. };
  277. in-ports {
  278. #address-cells = <1>;
  279. #size-cells = <0>;
  280. port@0 {
  281. reg = <0>;
  282. soc_funnel_in_port0: endpoint {
  283. remote-endpoint =
  284. <&main_funnel_out_port>;
  285. };
  286. };
  287. port@4 {
  288. reg = <4>;
  289. soc_funnel_in_port1: endpoint {
  290. remote-endpoint =
  291. <&stm_out_port>;
  292. };
  293. };
  294. };
  295. };
  296. etb@10003000 {
  297. compatible = "arm,coresight-tmc", "arm,primecell";
  298. reg = <0 0x10003000 0 0x1000>;
  299. clocks = <&ext_26m>;
  300. clock-names = "apb_pclk";
  301. out-ports {
  302. port {
  303. etb_in: endpoint {
  304. remote-endpoint =
  305. <&soc_funnel_out_port>;
  306. };
  307. };
  308. };
  309. };
  310. stm@10006000 {
  311. compatible = "arm,coresight-stm", "arm,primecell";
  312. reg = <0 0x10006000 0 0x1000>,
  313. <0 0x01000000 0 0x180000>;
  314. reg-names = "stm-base", "stm-stimulus-base";
  315. clocks = <&ext_26m>;
  316. clock-names = "apb_pclk";
  317. out-ports {
  318. port {
  319. stm_out_port: endpoint {
  320. remote-endpoint =
  321. <&soc_funnel_in_port1>;
  322. };
  323. };
  324. };
  325. };
  326. funnel@11001000 { /* Cluster0 Funnel */
  327. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  328. reg = <0 0x11001000 0 0x1000>;
  329. clocks = <&ext_26m>;
  330. clock-names = "apb_pclk";
  331. out-ports {
  332. port {
  333. cluster0_funnel_out_port: endpoint {
  334. remote-endpoint =
  335. <&cluster0_etf_in>;
  336. };
  337. };
  338. };
  339. in-ports {
  340. #address-cells = <1>;
  341. #size-cells = <0>;
  342. port@0 {
  343. reg = <0>;
  344. cluster0_funnel_in_port0: endpoint {
  345. remote-endpoint = <&etm0_out>;
  346. };
  347. };
  348. port@1 {
  349. reg = <1>;
  350. cluster0_funnel_in_port1: endpoint {
  351. remote-endpoint = <&etm1_out>;
  352. };
  353. };
  354. port@2 {
  355. reg = <2>;
  356. cluster0_funnel_in_port2: endpoint {
  357. remote-endpoint = <&etm2_out>;
  358. };
  359. };
  360. port@4 {
  361. reg = <4>;
  362. cluster0_funnel_in_port3: endpoint {
  363. remote-endpoint = <&etm3_out>;
  364. };
  365. };
  366. };
  367. };
  368. funnel@11002000 { /* Cluster1 Funnel */
  369. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  370. reg = <0 0x11002000 0 0x1000>;
  371. clocks = <&ext_26m>;
  372. clock-names = "apb_pclk";
  373. out-ports {
  374. port {
  375. cluster1_funnel_out_port: endpoint {
  376. remote-endpoint =
  377. <&cluster1_etf_in>;
  378. };
  379. };
  380. };
  381. in-ports {
  382. #address-cells = <1>;
  383. #size-cells = <0>;
  384. port@0 {
  385. reg = <0>;
  386. cluster1_funnel_in_port0: endpoint {
  387. remote-endpoint = <&etm4_out>;
  388. };
  389. };
  390. port@1 {
  391. reg = <1>;
  392. cluster1_funnel_in_port1: endpoint {
  393. remote-endpoint = <&etm5_out>;
  394. };
  395. };
  396. port@2 {
  397. reg = <2>;
  398. cluster1_funnel_in_port2: endpoint {
  399. remote-endpoint = <&etm6_out>;
  400. };
  401. };
  402. port@3 {
  403. reg = <3>;
  404. cluster1_funnel_in_port3: endpoint {
  405. remote-endpoint = <&etm7_out>;
  406. };
  407. };
  408. };
  409. };
  410. etf@11003000 { /* ETF on Cluster0 */
  411. compatible = "arm,coresight-tmc", "arm,primecell";
  412. reg = <0 0x11003000 0 0x1000>;
  413. clocks = <&ext_26m>;
  414. clock-names = "apb_pclk";
  415. out-ports {
  416. port {
  417. cluster0_etf_out: endpoint {
  418. remote-endpoint =
  419. <&main_funnel_in_port0>;
  420. };
  421. };
  422. };
  423. in-ports {
  424. port {
  425. cluster0_etf_in: endpoint {
  426. remote-endpoint =
  427. <&cluster0_funnel_out_port>;
  428. };
  429. };
  430. };
  431. };
  432. etf@11004000 { /* ETF on Cluster1 */
  433. compatible = "arm,coresight-tmc", "arm,primecell";
  434. reg = <0 0x11004000 0 0x1000>;
  435. clocks = <&ext_26m>;
  436. clock-names = "apb_pclk";
  437. out-ports {
  438. port {
  439. cluster1_etf_out: endpoint {
  440. remote-endpoint =
  441. <&main_funnel_in_port1>;
  442. };
  443. };
  444. };
  445. in-ports {
  446. port {
  447. cluster1_etf_in: endpoint {
  448. remote-endpoint =
  449. <&cluster1_funnel_out_port>;
  450. };
  451. };
  452. };
  453. };
  454. funnel@11005000 { /* Main Funnel */
  455. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  456. reg = <0 0x11005000 0 0x1000>;
  457. clocks = <&ext_26m>;
  458. clock-names = "apb_pclk";
  459. out-ports {
  460. port {
  461. main_funnel_out_port: endpoint {
  462. remote-endpoint =
  463. <&soc_funnel_in_port0>;
  464. };
  465. };
  466. };
  467. in-ports {
  468. #address-cells = <1>;
  469. #size-cells = <0>;
  470. port@0 {
  471. reg = <0>;
  472. main_funnel_in_port0: endpoint {
  473. remote-endpoint =
  474. <&cluster0_etf_out>;
  475. };
  476. };
  477. port@1 {
  478. reg = <1>;
  479. main_funnel_in_port1: endpoint {
  480. remote-endpoint =
  481. <&cluster1_etf_out>;
  482. };
  483. };
  484. };
  485. };
  486. etm@11440000 {
  487. compatible = "arm,coresight-etm4x", "arm,primecell";
  488. reg = <0 0x11440000 0 0x1000>;
  489. cpu = <&CPU0>;
  490. clocks = <&ext_26m>;
  491. clock-names = "apb_pclk";
  492. out-ports {
  493. port {
  494. etm0_out: endpoint {
  495. remote-endpoint =
  496. <&cluster0_funnel_in_port0>;
  497. };
  498. };
  499. };
  500. };
  501. etm@11540000 {
  502. compatible = "arm,coresight-etm4x", "arm,primecell";
  503. reg = <0 0x11540000 0 0x1000>;
  504. cpu = <&CPU1>;
  505. clocks = <&ext_26m>;
  506. clock-names = "apb_pclk";
  507. out-ports {
  508. port {
  509. etm1_out: endpoint {
  510. remote-endpoint =
  511. <&cluster0_funnel_in_port1>;
  512. };
  513. };
  514. };
  515. };
  516. etm@11640000 {
  517. compatible = "arm,coresight-etm4x", "arm,primecell";
  518. reg = <0 0x11640000 0 0x1000>;
  519. cpu = <&CPU2>;
  520. clocks = <&ext_26m>;
  521. clock-names = "apb_pclk";
  522. out-ports {
  523. port {
  524. etm2_out: endpoint {
  525. remote-endpoint =
  526. <&cluster0_funnel_in_port2>;
  527. };
  528. };
  529. };
  530. };
  531. etm@11740000 {
  532. compatible = "arm,coresight-etm4x", "arm,primecell";
  533. reg = <0 0x11740000 0 0x1000>;
  534. cpu = <&CPU3>;
  535. clocks = <&ext_26m>;
  536. clock-names = "apb_pclk";
  537. out-ports {
  538. port {
  539. etm3_out: endpoint {
  540. remote-endpoint =
  541. <&cluster0_funnel_in_port3>;
  542. };
  543. };
  544. };
  545. };
  546. etm@11840000 {
  547. compatible = "arm,coresight-etm4x", "arm,primecell";
  548. reg = <0 0x11840000 0 0x1000>;
  549. cpu = <&CPU4>;
  550. clocks = <&ext_26m>;
  551. clock-names = "apb_pclk";
  552. out-ports {
  553. port {
  554. etm4_out: endpoint {
  555. remote-endpoint =
  556. <&cluster1_funnel_in_port0>;
  557. };
  558. };
  559. };
  560. };
  561. etm@11940000 {
  562. compatible = "arm,coresight-etm4x", "arm,primecell";
  563. reg = <0 0x11940000 0 0x1000>;
  564. cpu = <&CPU5>;
  565. clocks = <&ext_26m>;
  566. clock-names = "apb_pclk";
  567. out-ports {
  568. port {
  569. etm5_out: endpoint {
  570. remote-endpoint =
  571. <&cluster1_funnel_in_port1>;
  572. };
  573. };
  574. };
  575. };
  576. etm@11a40000 {
  577. compatible = "arm,coresight-etm4x", "arm,primecell";
  578. reg = <0 0x11a40000 0 0x1000>;
  579. cpu = <&CPU6>;
  580. clocks = <&ext_26m>;
  581. clock-names = "apb_pclk";
  582. out-ports {
  583. port {
  584. etm6_out: endpoint {
  585. remote-endpoint =
  586. <&cluster1_funnel_in_port2>;
  587. };
  588. };
  589. };
  590. };
  591. etm@11b40000 {
  592. compatible = "arm,coresight-etm4x", "arm,primecell";
  593. reg = <0 0x11b40000 0 0x1000>;
  594. cpu = <&CPU7>;
  595. clocks = <&ext_26m>;
  596. clock-names = "apb_pclk";
  597. out-ports {
  598. port {
  599. etm7_out: endpoint {
  600. remote-endpoint =
  601. <&cluster1_funnel_in_port3>;
  602. };
  603. };
  604. };
  605. };
  606. };
  607. };