sm6125.dtsi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (c) 2021, Martin Botka <[email protected]>
  4. */
  5. #include <dt-bindings/clock/qcom,gcc-sm6125.h>
  6. #include <dt-bindings/clock/qcom,rpmcc.h>
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/interrupt-controller/arm-gic.h>
  9. #include <dt-bindings/power/qcom-rpmpd.h>
  10. / {
  11. interrupt-parent = <&intc>;
  12. #address-cells = <2>;
  13. #size-cells = <2>;
  14. chosen { };
  15. clocks {
  16. xo_board: xo-board {
  17. compatible = "fixed-clock";
  18. #clock-cells = <0>;
  19. clock-frequency = <19200000>;
  20. clock-output-names = "xo_board";
  21. };
  22. sleep_clk: sleep-clk {
  23. compatible = "fixed-clock";
  24. #clock-cells = <0>;
  25. clock-frequency = <32000>;
  26. clock-output-names = "sleep_clk";
  27. };
  28. };
  29. cpus {
  30. #address-cells = <2>;
  31. #size-cells = <0>;
  32. CPU0: cpu@0 {
  33. device_type = "cpu";
  34. compatible = "qcom,kryo260";
  35. reg = <0x0 0x0>;
  36. enable-method = "psci";
  37. capacity-dmips-mhz = <1024>;
  38. next-level-cache = <&L2_0>;
  39. L2_0: l2-cache {
  40. compatible = "cache";
  41. };
  42. };
  43. CPU1: cpu@1 {
  44. device_type = "cpu";
  45. compatible = "qcom,kryo260";
  46. reg = <0x0 0x1>;
  47. enable-method = "psci";
  48. capacity-dmips-mhz = <1024>;
  49. next-level-cache = <&L2_0>;
  50. };
  51. CPU2: cpu@2 {
  52. device_type = "cpu";
  53. compatible = "qcom,kryo260";
  54. reg = <0x0 0x2>;
  55. enable-method = "psci";
  56. capacity-dmips-mhz = <1024>;
  57. next-level-cache = <&L2_0>;
  58. };
  59. CPU3: cpu@3 {
  60. device_type = "cpu";
  61. compatible = "qcom,kryo260";
  62. reg = <0x0 0x3>;
  63. enable-method = "psci";
  64. capacity-dmips-mhz = <1024>;
  65. next-level-cache = <&L2_0>;
  66. };
  67. CPU4: cpu@100 {
  68. device_type = "cpu";
  69. compatible = "qcom,kryo260";
  70. reg = <0x0 0x100>;
  71. enable-method = "psci";
  72. capacity-dmips-mhz = <1638>;
  73. next-level-cache = <&L2_1>;
  74. L2_1: l2-cache {
  75. compatible = "cache";
  76. };
  77. };
  78. CPU5: cpu@101 {
  79. device_type = "cpu";
  80. compatible = "qcom,kryo260";
  81. reg = <0x0 0x101>;
  82. enable-method = "psci";
  83. capacity-dmips-mhz = <1638>;
  84. next-level-cache = <&L2_1>;
  85. };
  86. CPU6: cpu@102 {
  87. device_type = "cpu";
  88. compatible = "qcom,kryo260";
  89. reg = <0x0 0x102>;
  90. enable-method = "psci";
  91. capacity-dmips-mhz = <1638>;
  92. next-level-cache = <&L2_1>;
  93. };
  94. CPU7: cpu@103 {
  95. device_type = "cpu";
  96. compatible = "qcom,kryo260";
  97. reg = <0x0 0x103>;
  98. enable-method = "psci";
  99. capacity-dmips-mhz = <1638>;
  100. next-level-cache = <&L2_1>;
  101. };
  102. cpu-map {
  103. cluster0 {
  104. core0 {
  105. cpu = <&CPU0>;
  106. };
  107. core1 {
  108. cpu = <&CPU1>;
  109. };
  110. core2 {
  111. cpu = <&CPU2>;
  112. };
  113. core3 {
  114. cpu = <&CPU3>;
  115. };
  116. };
  117. cluster1 {
  118. core0 {
  119. cpu = <&CPU4>;
  120. };
  121. core1 {
  122. cpu = <&CPU5>;
  123. };
  124. core2 {
  125. cpu = <&CPU6>;
  126. };
  127. core3 {
  128. cpu = <&CPU7>;
  129. };
  130. };
  131. };
  132. };
  133. firmware {
  134. scm: scm {
  135. compatible = "qcom,scm-sm6125", "qcom,scm";
  136. #reset-cells = <1>;
  137. };
  138. };
  139. memory@40000000 {
  140. /* We expect the bootloader to fill in the size */
  141. reg = <0x0 0x40000000 0x0 0x0>;
  142. device_type = "memory";
  143. };
  144. pmu {
  145. compatible = "arm,armv8-pmuv3";
  146. interrupts = <GIC_PPI 6 IRQ_TYPE_LEVEL_HIGH>;
  147. };
  148. psci {
  149. compatible = "arm,psci-1.0";
  150. method = "smc";
  151. };
  152. reserved_memory: reserved-memory {
  153. #address-cells = <2>;
  154. #size-cells = <2>;
  155. ranges;
  156. hyp_mem: memory@45700000 {
  157. reg = <0x0 0x45700000 0x0 0x600000>;
  158. no-map;
  159. };
  160. xbl_aop_mem: memory@45e00000 {
  161. reg = <0x0 0x45e00000 0x0 0x140000>;
  162. no-map;
  163. };
  164. sec_apps_mem: memory@45fff000 {
  165. reg = <0x0 0x45fff000 0x0 0x1000>;
  166. no-map;
  167. };
  168. smem_mem: memory@46000000 {
  169. reg = <0x0 0x46000000 0x0 0x200000>;
  170. no-map;
  171. };
  172. reserved_mem1: memory@46200000 {
  173. reg = <0x0 0x46200000 0x0 0x2d00000>;
  174. no-map;
  175. };
  176. camera_mem: memory@4ab00000 {
  177. reg = <0x0 0x4ab00000 0x0 0x500000>;
  178. no-map;
  179. };
  180. modem_mem: memory@4b000000 {
  181. reg = <0x0 0x4b000000 0x0 0x7e00000>;
  182. no-map;
  183. };
  184. venus_mem: memory@52e00000 {
  185. reg = <0x0 0x52e00000 0x0 0x500000>;
  186. no-map;
  187. };
  188. wlan_msa_mem: memory@53300000 {
  189. reg = <0x0 0x53300000 0x0 0x200000>;
  190. no-map;
  191. };
  192. cdsp_mem: memory@53500000 {
  193. reg = <0x0 0x53500000 0x0 0x1e00000>;
  194. no-map;
  195. };
  196. adsp_pil_mem: memory@55300000 {
  197. reg = <0x0 0x55300000 0x0 0x1e00000>;
  198. no-map;
  199. };
  200. ipa_fw_mem: memory@57100000 {
  201. reg = <0x0 0x57100000 0x0 0x10000>;
  202. no-map;
  203. };
  204. ipa_gsi_mem: memory@57110000 {
  205. reg = <0x0 0x57110000 0x0 0x5000>;
  206. no-map;
  207. };
  208. gpu_mem: memory@57115000 {
  209. reg = <0x0 0x57115000 0x0 0x2000>;
  210. no-map;
  211. };
  212. cont_splash_mem: memory@5c000000 {
  213. reg = <0x0 0x5c000000 0x0 0x00f00000>;
  214. no-map;
  215. };
  216. dfps_data_mem: memory@5cf00000 {
  217. reg = <0x0 0x5cf00000 0x0 0x0100000>;
  218. no-map;
  219. };
  220. cdsp_sec_mem: memory@5f800000 {
  221. reg = <0x0 0x5f800000 0x0 0x1e00000>;
  222. no-map;
  223. };
  224. qseecom_mem: memory@5e400000 {
  225. reg = <0x0 0x5e400000 0x0 0x1400000>;
  226. no-map;
  227. };
  228. sdsp_mem: memory@f3000000 {
  229. reg = <0x0 0xf3000000 0x0 0x400000>;
  230. no-map;
  231. };
  232. adsp_mem: memory@f3400000 {
  233. reg = <0x0 0xf3400000 0x0 0x800000>;
  234. no-map;
  235. };
  236. qseecom_ta_mem: memory@13fc00000 {
  237. reg = <0x1 0x3fc00000 0x0 0x400000>;
  238. no-map;
  239. };
  240. };
  241. rpm-glink {
  242. compatible = "qcom,glink-rpm";
  243. interrupts = <GIC_SPI 194 IRQ_TYPE_EDGE_RISING>;
  244. qcom,rpm-msg-ram = <&rpm_msg_ram>;
  245. mboxes = <&apcs_glb 0>;
  246. rpm_requests: rpm-requests {
  247. compatible = "qcom,rpm-sm6125";
  248. qcom,glink-channels = "rpm_requests";
  249. rpmcc: clock-controller {
  250. compatible = "qcom,rpmcc-sm6125", "qcom,rpmcc";
  251. #clock-cells = <1>;
  252. };
  253. rpmpd: power-controller {
  254. compatible = "qcom,sm6125-rpmpd";
  255. #power-domain-cells = <1>;
  256. operating-points-v2 = <&rpmpd_opp_table>;
  257. rpmpd_opp_table: opp-table {
  258. compatible = "operating-points-v2";
  259. rpmpd_opp_ret: opp1 {
  260. opp-level = <RPM_SMD_LEVEL_RETENTION>;
  261. };
  262. rpmpd_opp_ret_plus: opp2 {
  263. opp-level = <RPM_SMD_LEVEL_RETENTION_PLUS>;
  264. };
  265. rpmpd_opp_min_svs: opp3 {
  266. opp-level = <RPM_SMD_LEVEL_MIN_SVS>;
  267. };
  268. rpmpd_opp_low_svs: opp4 {
  269. opp-level = <RPM_SMD_LEVEL_LOW_SVS>;
  270. };
  271. rpmpd_opp_svs: opp5 {
  272. opp-level = <RPM_SMD_LEVEL_SVS>;
  273. };
  274. rpmpd_opp_svs_plus: opp6 {
  275. opp-level = <RPM_SMD_LEVEL_SVS_PLUS>;
  276. };
  277. rpmpd_opp_nom: opp7 {
  278. opp-level = <RPM_SMD_LEVEL_NOM>;
  279. };
  280. rpmpd_opp_nom_plus: opp8 {
  281. opp-level = <RPM_SMD_LEVEL_NOM_PLUS>;
  282. };
  283. rpmpd_opp_turbo: opp9 {
  284. opp-level = <RPM_SMD_LEVEL_TURBO>;
  285. };
  286. rpmpd_opp_turbo_no_cpr: opp10 {
  287. opp-level = <RPM_SMD_LEVEL_TURBO_NO_CPR>;
  288. };
  289. };
  290. };
  291. };
  292. };
  293. smem: smem {
  294. compatible = "qcom,smem";
  295. memory-region = <&smem_mem>;
  296. hwlocks = <&tcsr_mutex 3>;
  297. };
  298. soc {
  299. #address-cells = <1>;
  300. #size-cells = <1>;
  301. ranges = <0x00 0x00 0x00 0xffffffff>;
  302. compatible = "simple-bus";
  303. tcsr_mutex: hwlock@340000 {
  304. compatible = "qcom,tcsr-mutex";
  305. reg = <0x00340000 0x20000>;
  306. #hwlock-cells = <1>;
  307. };
  308. tlmm: pinctrl@500000 {
  309. compatible = "qcom,sm6125-tlmm";
  310. reg = <0x00500000 0x400000>,
  311. <0x00900000 0x400000>,
  312. <0x00d00000 0x400000>;
  313. reg-names = "west", "south", "east";
  314. interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
  315. gpio-controller;
  316. gpio-ranges = <&tlmm 0 0 134>;
  317. #gpio-cells = <2>;
  318. interrupt-controller;
  319. #interrupt-cells = <2>;
  320. sdc2_off_state: sdc2-off-state {
  321. clk-pins {
  322. pins = "sdc2_clk";
  323. drive-strength = <2>;
  324. bias-disable;
  325. };
  326. cmd-pins {
  327. pins = "sdc2_cmd";
  328. drive-strength = <2>;
  329. bias-pull-up;
  330. };
  331. data-pins {
  332. pins = "sdc2_data";
  333. drive-strength = <2>;
  334. bias-pull-up;
  335. };
  336. };
  337. sdc2_on_state: sdc2-on-state {
  338. clk {
  339. pins = "sdc2_clk";
  340. drive-strength = <16>;
  341. bias-disable;
  342. };
  343. cmd-pins-pins {
  344. pins = "sdc2_cmd";
  345. drive-strength = <10>;
  346. bias-pull-up;
  347. };
  348. data-pins {
  349. pins = "sdc2_data";
  350. drive-strength = <10>;
  351. bias-pull-up;
  352. };
  353. };
  354. };
  355. gcc: clock-controller@1400000 {
  356. compatible = "qcom,gcc-sm6125";
  357. reg = <0x01400000 0x1f0000>;
  358. #clock-cells = <1>;
  359. #reset-cells = <1>;
  360. #power-domain-cells = <1>;
  361. clock-names = "bi_tcxo", "sleep_clk";
  362. clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&sleep_clk>;
  363. };
  364. hsusb_phy1: phy@1613000 {
  365. compatible = "qcom,msm8996-qusb2-phy";
  366. reg = <0x01613000 0x180>;
  367. #phy-cells = <0>;
  368. clocks = <&gcc GCC_AHB2PHY_USB_CLK>,
  369. <&rpmcc RPM_SMD_XO_CLK_SRC>;
  370. clock-names = "cfg_ahb", "ref";
  371. resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
  372. status = "disabled";
  373. };
  374. rpm_msg_ram: sram@45f0000 {
  375. compatible = "qcom,rpm-msg-ram";
  376. reg = <0x045f0000 0x7000>;
  377. };
  378. sdhc_1: mmc@4744000 {
  379. compatible = "qcom,sm6125-sdhci", "qcom,sdhci-msm-v5";
  380. reg = <0x04744000 0x1000>, <0x04745000 0x1000>;
  381. reg-names = "hc", "cqhci";
  382. interrupts = <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
  383. <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
  384. interrupt-names = "hc_irq", "pwr_irq";
  385. clocks = <&gcc GCC_SDCC1_AHB_CLK>,
  386. <&gcc GCC_SDCC1_APPS_CLK>,
  387. <&xo_board>;
  388. clock-names = "iface", "core", "xo";
  389. power-domains = <&rpmpd SM6125_VDDCX>;
  390. qcom,dll-config = <0x000f642c>;
  391. qcom,ddr-config = <0x80040873>;
  392. bus-width = <8>;
  393. non-removable;
  394. status = "disabled";
  395. };
  396. sdhc_2: mmc@4784000 {
  397. compatible = "qcom,sm6125-sdhci", "qcom,sdhci-msm-v5";
  398. reg = <0x04784000 0x1000>;
  399. reg-names = "hc";
  400. interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
  401. <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
  402. interrupt-names = "hc_irq", "pwr_irq";
  403. clocks = <&gcc GCC_SDCC2_AHB_CLK>,
  404. <&gcc GCC_SDCC2_APPS_CLK>,
  405. <&xo_board>;
  406. clock-names = "iface", "core", "xo";
  407. pinctrl-0 = <&sdc2_on_state>;
  408. pinctrl-1 = <&sdc2_off_state>;
  409. pinctrl-names = "default", "sleep";
  410. power-domains = <&rpmpd SM6125_VDDCX>;
  411. qcom,dll-config = <0x0007642c>;
  412. qcom,ddr-config = <0x80040873>;
  413. bus-width = <4>;
  414. status = "disabled";
  415. };
  416. usb3: usb@4ef8800 {
  417. compatible = "qcom,sm6125-dwc3", "qcom,dwc3";
  418. reg = <0x04ef8800 0x400>;
  419. #address-cells = <1>;
  420. #size-cells = <1>;
  421. ranges;
  422. clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>,
  423. <&gcc GCC_USB30_PRIM_MASTER_CLK>,
  424. <&gcc GCC_SYS_NOC_USB3_PRIM_AXI_CLK>,
  425. <&gcc GCC_USB30_PRIM_SLEEP_CLK>,
  426. <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
  427. <&gcc GCC_USB3_PRIM_CLKREF_CLK>;
  428. clock-names = "cfg_noc",
  429. "core",
  430. "iface",
  431. "sleep",
  432. "mock_utmi",
  433. "xo";
  434. assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
  435. <&gcc GCC_USB30_PRIM_MASTER_CLK>;
  436. assigned-clock-rates = <19200000>, <66666667>;
  437. power-domains = <&gcc USB30_PRIM_GDSC>;
  438. qcom,select-utmi-as-pipe-clk;
  439. status = "disabled";
  440. usb3_dwc3: usb@4e00000 {
  441. compatible = "snps,dwc3";
  442. reg = <0x04e00000 0xcd00>;
  443. interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
  444. phys = <&hsusb_phy1>;
  445. phy-names = "usb2-phy";
  446. snps,dis_u2_susphy_quirk;
  447. snps,dis_enblslpm_quirk;
  448. maximum-speed = "high-speed";
  449. dr_mode = "peripheral";
  450. };
  451. };
  452. sram@4690000 {
  453. compatible = "qcom,rpm-stats";
  454. reg = <0x04690000 0x10000>;
  455. };
  456. spmi_bus: spmi@1c40000 {
  457. compatible = "qcom,spmi-pmic-arb";
  458. reg = <0x01c40000 0x1100>,
  459. <0x01e00000 0x2000000>,
  460. <0x03e00000 0x100000>,
  461. <0x03f00000 0xa0000>,
  462. <0x01c0a000 0x26000>;
  463. reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
  464. interrupt-names = "periph_irq";
  465. interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
  466. qcom,ee = <0>;
  467. qcom,channel = <0>;
  468. #address-cells = <2>;
  469. #size-cells = <0>;
  470. interrupt-controller;
  471. #interrupt-cells = <4>;
  472. cell-index = <0>;
  473. };
  474. apcs_glb: mailbox@f111000 {
  475. compatible = "qcom,sm6125-apcs-hmss-global";
  476. reg = <0x0f111000 0x1000>;
  477. #mbox-cells = <1>;
  478. };
  479. timer@f120000 {
  480. compatible = "arm,armv7-timer-mem";
  481. #address-cells = <1>;
  482. #size-cells = <1>;
  483. ranges;
  484. reg = <0x0f120000 0x1000>;
  485. clock-frequency = <19200000>;
  486. frame@f121000 {
  487. frame-number = <0>;
  488. interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
  489. <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
  490. reg = <0x0f121000 0x1000>,
  491. <0x0f122000 0x1000>;
  492. };
  493. frame@f123000 {
  494. frame-number = <1>;
  495. interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
  496. reg = <0x0f123000 0x1000>;
  497. status = "disabled";
  498. };
  499. frame@f124000 {
  500. frame-number = <2>;
  501. interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
  502. reg = <0x0f124000 0x1000>;
  503. status = "disabled";
  504. };
  505. frame@f125000 {
  506. frame-number = <3>;
  507. interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
  508. reg = <0x0f125000 0x1000>;
  509. status = "disabled";
  510. };
  511. frame@f126000 {
  512. frame-number = <4>;
  513. interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
  514. reg = <0x0f126000 0x1000>;
  515. status = "disabled";
  516. };
  517. frame@f127000 {
  518. frame-number = <5>;
  519. interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
  520. reg = <0x0f127000 0x1000>;
  521. status = "disabled";
  522. };
  523. frame@f128000 {
  524. frame-number = <6>;
  525. interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
  526. reg = <0x0f128000 0x1000>;
  527. status = "disabled";
  528. };
  529. };
  530. intc: interrupt-controller@f200000 {
  531. compatible = "arm,gic-v3";
  532. reg = <0x0f200000 0x20000>,
  533. <0x0f300000 0x100000>;
  534. #interrupt-cells = <3>;
  535. interrupt-controller;
  536. interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
  537. };
  538. };
  539. timer {
  540. compatible = "arm,armv8-timer";
  541. interrupts = <GIC_PPI 1 0xf08
  542. GIC_PPI 2 0xf08
  543. GIC_PPI 3 0xf08
  544. GIC_PPI 0 0xf08>;
  545. clock-frequency = <19200000>;
  546. };
  547. };