sc9860.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  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";
  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";
  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";
  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";
  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";
  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";
  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";
  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";
  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-dynamic-funnel", "arm,primecell";
  268. reg = <0 0x10001000 0 0x1000>;
  269. clocks = <&ext_26m>;
  270. clock-names = "apb_pclk";
  271. out-ports {
  272. port {
  273. soc_funnel_out_port: endpoint {
  274. remote-endpoint = <&etb_in>;
  275. };
  276. };
  277. };
  278. in-ports {
  279. #address-cells = <1>;
  280. #size-cells = <0>;
  281. port@0 {
  282. reg = <0>;
  283. soc_funnel_in_port0: endpoint {
  284. remote-endpoint =
  285. <&main_funnel_out_port>;
  286. };
  287. };
  288. port@4 {
  289. reg = <4>;
  290. soc_funnel_in_port1: endpoint {
  291. remote-endpoint =
  292. <&stm_out_port>;
  293. };
  294. };
  295. };
  296. };
  297. etb@10003000 {
  298. compatible = "arm,coresight-tmc", "arm,primecell";
  299. reg = <0 0x10003000 0 0x1000>;
  300. clocks = <&ext_26m>;
  301. clock-names = "apb_pclk";
  302. out-ports {
  303. port {
  304. etb_in: endpoint {
  305. remote-endpoint =
  306. <&soc_funnel_out_port>;
  307. };
  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. out-ports {
  319. port {
  320. stm_out_port: endpoint {
  321. remote-endpoint =
  322. <&soc_funnel_in_port1>;
  323. };
  324. };
  325. };
  326. };
  327. funnel@11001000 { /* Cluster0 Funnel */
  328. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  329. reg = <0 0x11001000 0 0x1000>;
  330. clocks = <&ext_26m>;
  331. clock-names = "apb_pclk";
  332. out-ports {
  333. port {
  334. cluster0_funnel_out_port: endpoint {
  335. remote-endpoint =
  336. <&cluster0_etf_in>;
  337. };
  338. };
  339. };
  340. in-ports {
  341. #address-cells = <1>;
  342. #size-cells = <0>;
  343. port@0 {
  344. reg = <0>;
  345. cluster0_funnel_in_port0: endpoint {
  346. remote-endpoint = <&etm0_out>;
  347. };
  348. };
  349. port@1 {
  350. reg = <1>;
  351. cluster0_funnel_in_port1: endpoint {
  352. remote-endpoint = <&etm1_out>;
  353. };
  354. };
  355. port@2 {
  356. reg = <2>;
  357. cluster0_funnel_in_port2: endpoint {
  358. remote-endpoint = <&etm2_out>;
  359. };
  360. };
  361. port@4 {
  362. reg = <4>;
  363. cluster0_funnel_in_port3: endpoint {
  364. remote-endpoint = <&etm3_out>;
  365. };
  366. };
  367. };
  368. };
  369. funnel@11002000 { /* Cluster1 Funnel */
  370. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  371. reg = <0 0x11002000 0 0x1000>;
  372. clocks = <&ext_26m>;
  373. clock-names = "apb_pclk";
  374. out-ports {
  375. port {
  376. cluster1_funnel_out_port: endpoint {
  377. remote-endpoint =
  378. <&cluster1_etf_in>;
  379. };
  380. };
  381. };
  382. in-ports {
  383. #address-cells = <1>;
  384. #size-cells = <0>;
  385. port@0 {
  386. reg = <0>;
  387. cluster1_funnel_in_port0: endpoint {
  388. remote-endpoint = <&etm4_out>;
  389. };
  390. };
  391. port@1 {
  392. reg = <1>;
  393. cluster1_funnel_in_port1: endpoint {
  394. remote-endpoint = <&etm5_out>;
  395. };
  396. };
  397. port@2 {
  398. reg = <2>;
  399. cluster1_funnel_in_port2: endpoint {
  400. remote-endpoint = <&etm6_out>;
  401. };
  402. };
  403. port@3 {
  404. reg = <3>;
  405. cluster1_funnel_in_port3: endpoint {
  406. remote-endpoint = <&etm7_out>;
  407. };
  408. };
  409. };
  410. };
  411. etf@11003000 { /* ETF on Cluster0 */
  412. compatible = "arm,coresight-tmc", "arm,primecell";
  413. reg = <0 0x11003000 0 0x1000>;
  414. clocks = <&ext_26m>;
  415. clock-names = "apb_pclk";
  416. out-ports {
  417. port {
  418. cluster0_etf_out: endpoint {
  419. remote-endpoint =
  420. <&main_funnel_in_port0>;
  421. };
  422. };
  423. };
  424. in-ports {
  425. port {
  426. cluster0_etf_in: endpoint {
  427. remote-endpoint =
  428. <&cluster0_funnel_out_port>;
  429. };
  430. };
  431. };
  432. };
  433. etf@11004000 { /* ETF on Cluster1 */
  434. compatible = "arm,coresight-tmc", "arm,primecell";
  435. reg = <0 0x11004000 0 0x1000>;
  436. clocks = <&ext_26m>;
  437. clock-names = "apb_pclk";
  438. out-ports {
  439. port {
  440. cluster1_etf_out: endpoint {
  441. remote-endpoint =
  442. <&main_funnel_in_port1>;
  443. };
  444. };
  445. };
  446. in-ports {
  447. port {
  448. cluster1_etf_in: endpoint {
  449. remote-endpoint =
  450. <&cluster1_funnel_out_port>;
  451. };
  452. };
  453. };
  454. };
  455. funnel@11005000 { /* Main Funnel */
  456. compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
  457. reg = <0 0x11005000 0 0x1000>;
  458. clocks = <&ext_26m>;
  459. clock-names = "apb_pclk";
  460. out-ports {
  461. port {
  462. main_funnel_out_port: endpoint {
  463. remote-endpoint =
  464. <&soc_funnel_in_port0>;
  465. };
  466. };
  467. };
  468. in-ports {
  469. #address-cells = <1>;
  470. #size-cells = <0>;
  471. port@0 {
  472. reg = <0>;
  473. main_funnel_in_port0: endpoint {
  474. remote-endpoint =
  475. <&cluster0_etf_out>;
  476. };
  477. };
  478. port@1 {
  479. reg = <1>;
  480. main_funnel_in_port1: endpoint {
  481. remote-endpoint =
  482. <&cluster1_etf_out>;
  483. };
  484. };
  485. };
  486. };
  487. etm@11440000 {
  488. compatible = "arm,coresight-etm4x", "arm,primecell";
  489. reg = <0 0x11440000 0 0x1000>;
  490. cpu = <&CPU0>;
  491. clocks = <&ext_26m>;
  492. clock-names = "apb_pclk";
  493. out-ports {
  494. port {
  495. etm0_out: endpoint {
  496. remote-endpoint =
  497. <&cluster0_funnel_in_port0>;
  498. };
  499. };
  500. };
  501. };
  502. etm@11540000 {
  503. compatible = "arm,coresight-etm4x", "arm,primecell";
  504. reg = <0 0x11540000 0 0x1000>;
  505. cpu = <&CPU1>;
  506. clocks = <&ext_26m>;
  507. clock-names = "apb_pclk";
  508. out-ports {
  509. port {
  510. etm1_out: endpoint {
  511. remote-endpoint =
  512. <&cluster0_funnel_in_port1>;
  513. };
  514. };
  515. };
  516. };
  517. etm@11640000 {
  518. compatible = "arm,coresight-etm4x", "arm,primecell";
  519. reg = <0 0x11640000 0 0x1000>;
  520. cpu = <&CPU2>;
  521. clocks = <&ext_26m>;
  522. clock-names = "apb_pclk";
  523. out-ports {
  524. port {
  525. etm2_out: endpoint {
  526. remote-endpoint =
  527. <&cluster0_funnel_in_port2>;
  528. };
  529. };
  530. };
  531. };
  532. etm@11740000 {
  533. compatible = "arm,coresight-etm4x", "arm,primecell";
  534. reg = <0 0x11740000 0 0x1000>;
  535. cpu = <&CPU3>;
  536. clocks = <&ext_26m>;
  537. clock-names = "apb_pclk";
  538. out-ports {
  539. port {
  540. etm3_out: endpoint {
  541. remote-endpoint =
  542. <&cluster0_funnel_in_port3>;
  543. };
  544. };
  545. };
  546. };
  547. etm@11840000 {
  548. compatible = "arm,coresight-etm4x", "arm,primecell";
  549. reg = <0 0x11840000 0 0x1000>;
  550. cpu = <&CPU4>;
  551. clocks = <&ext_26m>;
  552. clock-names = "apb_pclk";
  553. out-ports {
  554. port {
  555. etm4_out: endpoint {
  556. remote-endpoint =
  557. <&cluster1_funnel_in_port0>;
  558. };
  559. };
  560. };
  561. };
  562. etm@11940000 {
  563. compatible = "arm,coresight-etm4x", "arm,primecell";
  564. reg = <0 0x11940000 0 0x1000>;
  565. cpu = <&CPU5>;
  566. clocks = <&ext_26m>;
  567. clock-names = "apb_pclk";
  568. out-ports {
  569. port {
  570. etm5_out: endpoint {
  571. remote-endpoint =
  572. <&cluster1_funnel_in_port1>;
  573. };
  574. };
  575. };
  576. };
  577. etm@11a40000 {
  578. compatible = "arm,coresight-etm4x", "arm,primecell";
  579. reg = <0 0x11a40000 0 0x1000>;
  580. cpu = <&CPU6>;
  581. clocks = <&ext_26m>;
  582. clock-names = "apb_pclk";
  583. out-ports {
  584. port {
  585. etm6_out: endpoint {
  586. remote-endpoint =
  587. <&cluster1_funnel_in_port2>;
  588. };
  589. };
  590. };
  591. };
  592. etm@11b40000 {
  593. compatible = "arm,coresight-etm4x", "arm,primecell";
  594. reg = <0 0x11b40000 0 0x1000>;
  595. cpu = <&CPU7>;
  596. clocks = <&ext_26m>;
  597. clock-names = "apb_pclk";
  598. out-ports {
  599. port {
  600. etm7_out: endpoint {
  601. remote-endpoint =
  602. <&cluster1_funnel_in_port3>;
  603. };
  604. };
  605. };
  606. };
  607. gpio-keys {
  608. compatible = "gpio-keys";
  609. key-volumedown {
  610. label = "Volume Down Key";
  611. linux,code = <KEY_VOLUMEDOWN>;
  612. gpios = <&eic_debounce 2 GPIO_ACTIVE_LOW>;
  613. debounce-interval = <2>;
  614. wakeup-source;
  615. };
  616. key-volumeup {
  617. label = "Volume Up Key";
  618. linux,code = <KEY_VOLUMEUP>;
  619. gpios = <&pmic_eic 10 GPIO_ACTIVE_HIGH>;
  620. debounce-interval = <2>;
  621. wakeup-source;
  622. };
  623. key-power {
  624. label = "Power Key";
  625. linux,code = <KEY_POWER>;
  626. gpios = <&pmic_eic 1 GPIO_ACTIVE_HIGH>;
  627. debounce-interval = <2>;
  628. wakeup-source;
  629. };
  630. };
  631. };
  632. };