sc9860.dtsi 14 KB

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