qcs615.c 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. */
  6. #include <linux/device.h>
  7. #include <linux/interconnect.h>
  8. #include <linux/interconnect-provider.h>
  9. #include <linux/module.h>
  10. #include <linux/of_platform.h>
  11. #include <dt-bindings/interconnect/qcom,qcs615-rpmh.h>
  12. #include "bcm-voter.h"
  13. #include "icc-rpmh.h"
  14. static struct qcom_icc_node qhm_a1noc_cfg;
  15. static struct qcom_icc_node qhm_qdss_bam;
  16. static struct qcom_icc_node qhm_qspi;
  17. static struct qcom_icc_node qhm_qup0;
  18. static struct qcom_icc_node qhm_qup1;
  19. static struct qcom_icc_node qnm_cnoc;
  20. static struct qcom_icc_node qxm_crypto;
  21. static struct qcom_icc_node qxm_ipa;
  22. static struct qcom_icc_node xm_emac_avb;
  23. static struct qcom_icc_node xm_pcie;
  24. static struct qcom_icc_node xm_qdss_etr;
  25. static struct qcom_icc_node xm_sdc1;
  26. static struct qcom_icc_node xm_sdc2;
  27. static struct qcom_icc_node xm_ufs_mem;
  28. static struct qcom_icc_node xm_usb2;
  29. static struct qcom_icc_node xm_usb3_0;
  30. static struct qcom_icc_node qxm_camnoc_hf0_uncomp;
  31. static struct qcom_icc_node qxm_camnoc_hf1_uncomp;
  32. static struct qcom_icc_node qxm_camnoc_sf_uncomp;
  33. static struct qcom_icc_node qhm_spdm;
  34. static struct qcom_icc_node qnm_snoc;
  35. static struct qcom_icc_node xm_qdss_dap;
  36. static struct qcom_icc_node qhm_cnoc;
  37. static struct qcom_icc_node acm_apps;
  38. static struct qcom_icc_node acm_gpu_tcu;
  39. static struct qcom_icc_node acm_sys_tcu;
  40. static struct qcom_icc_node qhm_gemnoc_cfg;
  41. static struct qcom_icc_node qnm_gpu;
  42. static struct qcom_icc_node qnm_mnoc_hf;
  43. static struct qcom_icc_node qnm_mnoc_sf;
  44. static struct qcom_icc_node qnm_snoc_gc;
  45. static struct qcom_icc_node qnm_snoc_sf;
  46. static struct qcom_icc_node llcc_mc;
  47. static struct qcom_icc_node qhm_mnoc_cfg;
  48. static struct qcom_icc_node qxm_camnoc_hf0;
  49. static struct qcom_icc_node qxm_camnoc_hf1;
  50. static struct qcom_icc_node qxm_camnoc_sf;
  51. static struct qcom_icc_node qxm_mdp0;
  52. static struct qcom_icc_node qxm_rot;
  53. static struct qcom_icc_node qxm_venus0;
  54. static struct qcom_icc_node qxm_venus_arm9;
  55. static struct qcom_icc_node qhm_snoc_cfg;
  56. static struct qcom_icc_node qnm_aggre1_noc;
  57. static struct qcom_icc_node qnm_gemnoc;
  58. static struct qcom_icc_node qnm_gemnoc_pcie;
  59. static struct qcom_icc_node qnm_lpass_anoc;
  60. static struct qcom_icc_node qnm_pcie_anoc;
  61. static struct qcom_icc_node qxm_pimem;
  62. static struct qcom_icc_node xm_gic;
  63. static struct qcom_icc_node qns_a1noc_snoc;
  64. static struct qcom_icc_node qns_lpass_snoc;
  65. static struct qcom_icc_node qns_pcie_snoc;
  66. static struct qcom_icc_node srvc_aggre2_noc;
  67. static struct qcom_icc_node qns_camnoc_uncomp;
  68. static struct qcom_icc_node qhs_a1_noc_cfg;
  69. static struct qcom_icc_node qhs_ahb2phy_east;
  70. static struct qcom_icc_node qhs_ahb2phy_west;
  71. static struct qcom_icc_node qhs_aop;
  72. static struct qcom_icc_node qhs_aoss;
  73. static struct qcom_icc_node qhs_camera_cfg;
  74. static struct qcom_icc_node qhs_clk_ctl;
  75. static struct qcom_icc_node qhs_cpr_cx;
  76. static struct qcom_icc_node qhs_cpr_mx;
  77. static struct qcom_icc_node qhs_crypto0_cfg;
  78. static struct qcom_icc_node qhs_ddrss_cfg;
  79. static struct qcom_icc_node qhs_display_cfg;
  80. static struct qcom_icc_node qhs_emac_avb_cfg;
  81. static struct qcom_icc_node qhs_glm;
  82. static struct qcom_icc_node qhs_gpuss_cfg;
  83. static struct qcom_icc_node qhs_imem_cfg;
  84. static struct qcom_icc_node qhs_ipa;
  85. static struct qcom_icc_node qhs_mnoc_cfg;
  86. static struct qcom_icc_node qhs_pcie_config;
  87. static struct qcom_icc_node qhs_pimem_cfg;
  88. static struct qcom_icc_node qhs_prng;
  89. static struct qcom_icc_node qhs_qdss_cfg;
  90. static struct qcom_icc_node qhs_qspi;
  91. static struct qcom_icc_node qhs_qup0;
  92. static struct qcom_icc_node qhs_qup1;
  93. static struct qcom_icc_node qhs_sdc1;
  94. static struct qcom_icc_node qhs_sdc2;
  95. static struct qcom_icc_node qhs_snoc_cfg;
  96. static struct qcom_icc_node qhs_spdm;
  97. static struct qcom_icc_node qhs_tcsr;
  98. static struct qcom_icc_node qhs_tlmm_east;
  99. static struct qcom_icc_node qhs_tlmm_south;
  100. static struct qcom_icc_node qhs_tlmm_west;
  101. static struct qcom_icc_node qhs_ufs_mem_cfg;
  102. static struct qcom_icc_node qhs_usb2;
  103. static struct qcom_icc_node qhs_usb3;
  104. static struct qcom_icc_node qhs_venus_cfg;
  105. static struct qcom_icc_node qhs_vsense_ctrl_cfg;
  106. static struct qcom_icc_node qns_cnoc_a2noc;
  107. static struct qcom_icc_node srvc_cnoc;
  108. static struct qcom_icc_node qhs_dc_noc_gemnoc;
  109. static struct qcom_icc_node qhs_llcc;
  110. static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg;
  111. static struct qcom_icc_node qns_gem_noc_snoc;
  112. static struct qcom_icc_node qns_llcc;
  113. static struct qcom_icc_node qns_sys_pcie;
  114. static struct qcom_icc_node srvc_gemnoc;
  115. static struct qcom_icc_node ebi;
  116. static struct qcom_icc_node qns2_mem_noc;
  117. static struct qcom_icc_node qns_mem_noc_hf;
  118. static struct qcom_icc_node srvc_mnoc;
  119. static struct qcom_icc_node qhs_apss;
  120. static struct qcom_icc_node qns_cnoc;
  121. static struct qcom_icc_node qns_gemnoc_sf;
  122. static struct qcom_icc_node qns_memnoc_gc;
  123. static struct qcom_icc_node qxs_imem;
  124. static struct qcom_icc_node qxs_pimem;
  125. static struct qcom_icc_node srvc_snoc;
  126. static struct qcom_icc_node xs_pcie;
  127. static struct qcom_icc_node xs_qdss_stm;
  128. static struct qcom_icc_node xs_sys_tcu_cfg;
  129. static struct qcom_icc_node qhm_a1noc_cfg = {
  130. .name = "qhm_a1noc_cfg",
  131. .channels = 1,
  132. .buswidth = 4,
  133. .num_links = 1,
  134. .link_nodes = { &srvc_aggre2_noc },
  135. };
  136. static struct qcom_icc_node qhm_qdss_bam = {
  137. .name = "qhm_qdss_bam",
  138. .channels = 1,
  139. .buswidth = 4,
  140. .num_links = 1,
  141. .link_nodes = { &qns_a1noc_snoc },
  142. };
  143. static struct qcom_icc_node qhm_qspi = {
  144. .name = "qhm_qspi",
  145. .channels = 1,
  146. .buswidth = 4,
  147. .num_links = 1,
  148. .link_nodes = { &qns_a1noc_snoc },
  149. };
  150. static struct qcom_icc_node qhm_qup0 = {
  151. .name = "qhm_qup0",
  152. .channels = 1,
  153. .buswidth = 4,
  154. .num_links = 1,
  155. .link_nodes = { &qns_a1noc_snoc },
  156. };
  157. static struct qcom_icc_node qhm_qup1 = {
  158. .name = "qhm_qup1",
  159. .channels = 1,
  160. .buswidth = 4,
  161. .num_links = 1,
  162. .link_nodes = { &qns_a1noc_snoc },
  163. };
  164. static struct qcom_icc_node qnm_cnoc = {
  165. .name = "qnm_cnoc",
  166. .channels = 1,
  167. .buswidth = 8,
  168. .num_links = 1,
  169. .link_nodes = { &qns_a1noc_snoc },
  170. };
  171. static struct qcom_icc_node qxm_crypto = {
  172. .name = "qxm_crypto",
  173. .channels = 1,
  174. .buswidth = 8,
  175. .num_links = 1,
  176. .link_nodes = { &qns_a1noc_snoc },
  177. };
  178. static struct qcom_icc_node qxm_ipa = {
  179. .name = "qxm_ipa",
  180. .channels = 1,
  181. .buswidth = 8,
  182. .num_links = 1,
  183. .link_nodes = { &qns_lpass_snoc },
  184. };
  185. static struct qcom_icc_node xm_emac_avb = {
  186. .name = "xm_emac_avb",
  187. .channels = 1,
  188. .buswidth = 8,
  189. .num_links = 1,
  190. .link_nodes = { &qns_a1noc_snoc },
  191. };
  192. static struct qcom_icc_node xm_pcie = {
  193. .name = "xm_pcie",
  194. .channels = 1,
  195. .buswidth = 8,
  196. .num_links = 1,
  197. .link_nodes = { &qns_pcie_snoc },
  198. };
  199. static struct qcom_icc_node xm_qdss_etr = {
  200. .name = "xm_qdss_etr",
  201. .channels = 1,
  202. .buswidth = 8,
  203. .num_links = 1,
  204. .link_nodes = { &qns_a1noc_snoc },
  205. };
  206. static struct qcom_icc_node xm_sdc1 = {
  207. .name = "xm_sdc1",
  208. .channels = 1,
  209. .buswidth = 8,
  210. .num_links = 1,
  211. .link_nodes = { &qns_a1noc_snoc },
  212. };
  213. static struct qcom_icc_node xm_sdc2 = {
  214. .name = "xm_sdc2",
  215. .channels = 1,
  216. .buswidth = 8,
  217. .num_links = 1,
  218. .link_nodes = { &qns_a1noc_snoc },
  219. };
  220. static struct qcom_icc_node xm_ufs_mem = {
  221. .name = "xm_ufs_mem",
  222. .channels = 1,
  223. .buswidth = 8,
  224. .num_links = 1,
  225. .link_nodes = { &qns_a1noc_snoc },
  226. };
  227. static struct qcom_icc_node xm_usb2 = {
  228. .name = "xm_usb2",
  229. .channels = 1,
  230. .buswidth = 8,
  231. .num_links = 1,
  232. .link_nodes = { &qns_a1noc_snoc },
  233. };
  234. static struct qcom_icc_node xm_usb3_0 = {
  235. .name = "xm_usb3_0",
  236. .channels = 1,
  237. .buswidth = 8,
  238. .num_links = 1,
  239. .link_nodes = { &qns_a1noc_snoc },
  240. };
  241. static struct qcom_icc_node qxm_camnoc_hf0_uncomp = {
  242. .name = "qxm_camnoc_hf0_uncomp",
  243. .channels = 1,
  244. .buswidth = 32,
  245. .num_links = 1,
  246. .link_nodes = { &qns_camnoc_uncomp },
  247. };
  248. static struct qcom_icc_node qxm_camnoc_hf1_uncomp = {
  249. .name = "qxm_camnoc_hf1_uncomp",
  250. .channels = 1,
  251. .buswidth = 32,
  252. .num_links = 1,
  253. .link_nodes = { &qns_camnoc_uncomp },
  254. };
  255. static struct qcom_icc_node qxm_camnoc_sf_uncomp = {
  256. .name = "qxm_camnoc_sf_uncomp",
  257. .channels = 1,
  258. .buswidth = 32,
  259. .num_links = 1,
  260. .link_nodes = { &qns_camnoc_uncomp },
  261. };
  262. static struct qcom_icc_node qhm_spdm = {
  263. .name = "qhm_spdm",
  264. .channels = 1,
  265. .buswidth = 4,
  266. .num_links = 1,
  267. .link_nodes = { &qns_cnoc_a2noc },
  268. };
  269. static struct qcom_icc_node qnm_snoc = {
  270. .name = "qnm_snoc",
  271. .channels = 1,
  272. .buswidth = 8,
  273. .num_links = 39,
  274. .link_nodes = { &qhs_a1_noc_cfg, &qhs_ahb2phy_east,
  275. &qhs_ahb2phy_west, &qhs_aop,
  276. &qhs_aoss, &qhs_camera_cfg,
  277. &qhs_clk_ctl, &qhs_cpr_cx,
  278. &qhs_cpr_mx, &qhs_crypto0_cfg,
  279. &qhs_ddrss_cfg, &qhs_display_cfg,
  280. &qhs_emac_avb_cfg, &qhs_glm,
  281. &qhs_gpuss_cfg, &qhs_imem_cfg,
  282. &qhs_ipa, &qhs_mnoc_cfg,
  283. &qhs_pcie_config, &qhs_pimem_cfg,
  284. &qhs_prng, &qhs_qdss_cfg,
  285. &qhs_qspi, &qhs_qup0,
  286. &qhs_qup1, &qhs_sdc1,
  287. &qhs_sdc2, &qhs_snoc_cfg,
  288. &qhs_spdm, &qhs_tcsr,
  289. &qhs_tlmm_east, &qhs_tlmm_south,
  290. &qhs_tlmm_west, &qhs_ufs_mem_cfg,
  291. &qhs_usb2, &qhs_usb3,
  292. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  293. &srvc_cnoc },
  294. };
  295. static struct qcom_icc_node xm_qdss_dap = {
  296. .name = "xm_qdss_dap",
  297. .channels = 1,
  298. .buswidth = 8,
  299. .num_links = 40,
  300. .link_nodes = { &qhs_a1_noc_cfg, &qhs_ahb2phy_east,
  301. &qhs_ahb2phy_west, &qhs_aop,
  302. &qhs_aoss, &qhs_camera_cfg,
  303. &qhs_clk_ctl, &qhs_cpr_cx,
  304. &qhs_cpr_mx, &qhs_crypto0_cfg,
  305. &qhs_ddrss_cfg, &qhs_display_cfg,
  306. &qhs_emac_avb_cfg, &qhs_glm,
  307. &qhs_gpuss_cfg, &qhs_imem_cfg,
  308. &qhs_ipa, &qhs_mnoc_cfg,
  309. &qhs_pcie_config, &qhs_pimem_cfg,
  310. &qhs_prng, &qhs_qdss_cfg,
  311. &qhs_qspi, &qhs_qup0,
  312. &qhs_qup1, &qhs_sdc1,
  313. &qhs_sdc2, &qhs_snoc_cfg,
  314. &qhs_spdm, &qhs_tcsr,
  315. &qhs_tlmm_east, &qhs_tlmm_south,
  316. &qhs_tlmm_west, &qhs_ufs_mem_cfg,
  317. &qhs_usb2, &qhs_usb3,
  318. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  319. &qns_cnoc_a2noc, &srvc_cnoc },
  320. };
  321. static struct qcom_icc_node qhm_cnoc = {
  322. .name = "qhm_cnoc",
  323. .channels = 1,
  324. .buswidth = 4,
  325. .num_links = 2,
  326. .link_nodes = { &qhs_dc_noc_gemnoc, &qhs_llcc },
  327. };
  328. static struct qcom_icc_node acm_apps = {
  329. .name = "acm_apps",
  330. .channels = 1,
  331. .buswidth = 16,
  332. .num_links = 3,
  333. .link_nodes = { &qns_gem_noc_snoc, &qns_llcc,
  334. &qns_sys_pcie },
  335. };
  336. static struct qcom_icc_node acm_gpu_tcu = {
  337. .name = "acm_gpu_tcu",
  338. .channels = 1,
  339. .buswidth = 8,
  340. .num_links = 2,
  341. .link_nodes = { &qns_gem_noc_snoc, &qns_llcc },
  342. };
  343. static struct qcom_icc_node acm_sys_tcu = {
  344. .name = "acm_sys_tcu",
  345. .channels = 1,
  346. .buswidth = 8,
  347. .num_links = 2,
  348. .link_nodes = { &qns_gem_noc_snoc, &qns_llcc },
  349. };
  350. static struct qcom_icc_node qhm_gemnoc_cfg = {
  351. .name = "qhm_gemnoc_cfg",
  352. .channels = 1,
  353. .buswidth = 4,
  354. .num_links = 2,
  355. .link_nodes = { &qhs_mdsp_ms_mpu_cfg, &srvc_gemnoc },
  356. };
  357. static struct qcom_icc_node qnm_gpu = {
  358. .name = "qnm_gpu",
  359. .channels = 2,
  360. .buswidth = 32,
  361. .num_links = 2,
  362. .link_nodes = { &qns_gem_noc_snoc, &qns_llcc },
  363. };
  364. static struct qcom_icc_node qnm_mnoc_hf = {
  365. .name = "qnm_mnoc_hf",
  366. .channels = 1,
  367. .buswidth = 32,
  368. .num_links = 1,
  369. .link_nodes = { &qns_llcc },
  370. };
  371. static struct qcom_icc_node qnm_mnoc_sf = {
  372. .name = "qnm_mnoc_sf",
  373. .channels = 1,
  374. .buswidth = 32,
  375. .num_links = 2,
  376. .link_nodes = { &qns_gem_noc_snoc, &qns_llcc },
  377. };
  378. static struct qcom_icc_node qnm_snoc_gc = {
  379. .name = "qnm_snoc_gc",
  380. .channels = 1,
  381. .buswidth = 8,
  382. .num_links = 1,
  383. .link_nodes = { &qns_llcc },
  384. };
  385. static struct qcom_icc_node qnm_snoc_sf = {
  386. .name = "qnm_snoc_sf",
  387. .channels = 1,
  388. .buswidth = 16,
  389. .num_links = 1,
  390. .link_nodes = { &qns_llcc },
  391. };
  392. static struct qcom_icc_node llcc_mc = {
  393. .name = "llcc_mc",
  394. .channels = 2,
  395. .buswidth = 4,
  396. .num_links = 1,
  397. .link_nodes = { &ebi },
  398. };
  399. static struct qcom_icc_node qhm_mnoc_cfg = {
  400. .name = "qhm_mnoc_cfg",
  401. .channels = 1,
  402. .buswidth = 4,
  403. .num_links = 1,
  404. .link_nodes = { &srvc_mnoc },
  405. };
  406. static struct qcom_icc_node qxm_camnoc_hf0 = {
  407. .name = "qxm_camnoc_hf0",
  408. .channels = 1,
  409. .buswidth = 32,
  410. .num_links = 1,
  411. .link_nodes = { &qns_mem_noc_hf },
  412. };
  413. static struct qcom_icc_node qxm_camnoc_hf1 = {
  414. .name = "qxm_camnoc_hf1",
  415. .channels = 1,
  416. .buswidth = 32,
  417. .num_links = 1,
  418. .link_nodes = { &qns_mem_noc_hf },
  419. };
  420. static struct qcom_icc_node qxm_camnoc_sf = {
  421. .name = "qxm_camnoc_sf",
  422. .channels = 1,
  423. .buswidth = 32,
  424. .num_links = 1,
  425. .link_nodes = { &qns2_mem_noc },
  426. };
  427. static struct qcom_icc_node qxm_mdp0 = {
  428. .name = "qxm_mdp0",
  429. .channels = 1,
  430. .buswidth = 32,
  431. .num_links = 1,
  432. .link_nodes = { &qns_mem_noc_hf },
  433. };
  434. static struct qcom_icc_node qxm_rot = {
  435. .name = "qxm_rot",
  436. .channels = 1,
  437. .buswidth = 32,
  438. .num_links = 1,
  439. .link_nodes = { &qns2_mem_noc },
  440. };
  441. static struct qcom_icc_node qxm_venus0 = {
  442. .name = "qxm_venus0",
  443. .channels = 1,
  444. .buswidth = 32,
  445. .num_links = 1,
  446. .link_nodes = { &qns2_mem_noc },
  447. };
  448. static struct qcom_icc_node qxm_venus_arm9 = {
  449. .name = "qxm_venus_arm9",
  450. .channels = 1,
  451. .buswidth = 8,
  452. .num_links = 1,
  453. .link_nodes = { &qns2_mem_noc },
  454. };
  455. static struct qcom_icc_node qhm_snoc_cfg = {
  456. .name = "qhm_snoc_cfg",
  457. .channels = 1,
  458. .buswidth = 4,
  459. .num_links = 1,
  460. .link_nodes = { &srvc_snoc },
  461. };
  462. static struct qcom_icc_node qnm_aggre1_noc = {
  463. .name = "qnm_aggre1_noc",
  464. .channels = 1,
  465. .buswidth = 16,
  466. .num_links = 8,
  467. .link_nodes = { &qhs_apss, &qns_cnoc,
  468. &qns_gemnoc_sf, &qxs_imem,
  469. &qxs_pimem, &xs_pcie,
  470. &xs_qdss_stm, &xs_sys_tcu_cfg },
  471. };
  472. static struct qcom_icc_node qnm_gemnoc = {
  473. .name = "qnm_gemnoc",
  474. .channels = 1,
  475. .buswidth = 8,
  476. .num_links = 6,
  477. .link_nodes = { &qhs_apss, &qns_cnoc,
  478. &qxs_imem, &qxs_pimem,
  479. &xs_qdss_stm, &xs_sys_tcu_cfg },
  480. };
  481. static struct qcom_icc_node qnm_gemnoc_pcie = {
  482. .name = "qnm_gemnoc_pcie",
  483. .channels = 1,
  484. .buswidth = 8,
  485. .num_links = 1,
  486. .link_nodes = { &xs_pcie },
  487. };
  488. static struct qcom_icc_node qnm_lpass_anoc = {
  489. .name = "qnm_lpass_anoc",
  490. .channels = 1,
  491. .buswidth = 8,
  492. .num_links = 7,
  493. .link_nodes = { &qhs_apss, &qns_cnoc,
  494. &qns_gemnoc_sf, &qxs_imem,
  495. &qxs_pimem, &xs_pcie,
  496. &xs_qdss_stm },
  497. };
  498. static struct qcom_icc_node qnm_pcie_anoc = {
  499. .name = "qnm_pcie_anoc",
  500. .channels = 1,
  501. .buswidth = 8,
  502. .num_links = 5,
  503. .link_nodes = { &qhs_apss, &qns_cnoc,
  504. &qns_gemnoc_sf, &qxs_imem,
  505. &xs_qdss_stm },
  506. };
  507. static struct qcom_icc_node qxm_pimem = {
  508. .name = "qxm_pimem",
  509. .channels = 1,
  510. .buswidth = 8,
  511. .num_links = 2,
  512. .link_nodes = { &qns_memnoc_gc, &qxs_imem },
  513. };
  514. static struct qcom_icc_node xm_gic = {
  515. .name = "xm_gic",
  516. .channels = 1,
  517. .buswidth = 8,
  518. .num_links = 2,
  519. .link_nodes = { &qns_memnoc_gc, &qxs_imem },
  520. };
  521. static struct qcom_icc_node qns_a1noc_snoc = {
  522. .name = "qns_a1noc_snoc",
  523. .channels = 1,
  524. .buswidth = 16,
  525. .num_links = 1,
  526. .link_nodes = { &qnm_aggre1_noc },
  527. };
  528. static struct qcom_icc_node qns_lpass_snoc = {
  529. .name = "qns_lpass_snoc",
  530. .channels = 1,
  531. .buswidth = 8,
  532. .num_links = 1,
  533. .link_nodes = { &qnm_lpass_anoc },
  534. };
  535. static struct qcom_icc_node qns_pcie_snoc = {
  536. .name = "qns_pcie_snoc",
  537. .channels = 1,
  538. .buswidth = 8,
  539. .num_links = 1,
  540. .link_nodes = { &qnm_pcie_anoc },
  541. };
  542. static struct qcom_icc_node srvc_aggre2_noc = {
  543. .name = "srvc_aggre2_noc",
  544. .channels = 1,
  545. .buswidth = 4,
  546. };
  547. static struct qcom_icc_node qns_camnoc_uncomp = {
  548. .name = "qns_camnoc_uncomp",
  549. .channels = 1,
  550. .buswidth = 32,
  551. };
  552. static struct qcom_icc_node qhs_a1_noc_cfg = {
  553. .name = "qhs_a1_noc_cfg",
  554. .channels = 1,
  555. .buswidth = 4,
  556. .num_links = 1,
  557. .link_nodes = { &qhm_a1noc_cfg },
  558. };
  559. static struct qcom_icc_node qhs_ahb2phy_east = {
  560. .name = "qhs_ahb2phy_east",
  561. .channels = 1,
  562. .buswidth = 4,
  563. };
  564. static struct qcom_icc_node qhs_ahb2phy_west = {
  565. .name = "qhs_ahb2phy_west",
  566. .channels = 1,
  567. .buswidth = 4,
  568. };
  569. static struct qcom_icc_node qhs_aop = {
  570. .name = "qhs_aop",
  571. .channels = 1,
  572. .buswidth = 4,
  573. };
  574. static struct qcom_icc_node qhs_aoss = {
  575. .name = "qhs_aoss",
  576. .channels = 1,
  577. .buswidth = 4,
  578. };
  579. static struct qcom_icc_node qhs_camera_cfg = {
  580. .name = "qhs_camera_cfg",
  581. .channels = 1,
  582. .buswidth = 4,
  583. };
  584. static struct qcom_icc_node qhs_clk_ctl = {
  585. .name = "qhs_clk_ctl",
  586. .channels = 1,
  587. .buswidth = 4,
  588. };
  589. static struct qcom_icc_node qhs_cpr_cx = {
  590. .name = "qhs_cpr_cx",
  591. .channels = 1,
  592. .buswidth = 4,
  593. };
  594. static struct qcom_icc_node qhs_cpr_mx = {
  595. .name = "qhs_cpr_mx",
  596. .channels = 1,
  597. .buswidth = 4,
  598. };
  599. static struct qcom_icc_node qhs_crypto0_cfg = {
  600. .name = "qhs_crypto0_cfg",
  601. .channels = 1,
  602. .buswidth = 4,
  603. };
  604. static struct qcom_icc_node qhs_ddrss_cfg = {
  605. .name = "qhs_ddrss_cfg",
  606. .channels = 1,
  607. .buswidth = 4,
  608. .num_links = 1,
  609. .link_nodes = { &qhm_cnoc },
  610. };
  611. static struct qcom_icc_node qhs_display_cfg = {
  612. .name = "qhs_display_cfg",
  613. .channels = 1,
  614. .buswidth = 4,
  615. };
  616. static struct qcom_icc_node qhs_emac_avb_cfg = {
  617. .name = "qhs_emac_avb_cfg",
  618. .channels = 1,
  619. .buswidth = 4,
  620. };
  621. static struct qcom_icc_node qhs_glm = {
  622. .name = "qhs_glm",
  623. .channels = 1,
  624. .buswidth = 4,
  625. };
  626. static struct qcom_icc_node qhs_gpuss_cfg = {
  627. .name = "qhs_gpuss_cfg",
  628. .channels = 1,
  629. .buswidth = 8,
  630. };
  631. static struct qcom_icc_node qhs_imem_cfg = {
  632. .name = "qhs_imem_cfg",
  633. .channels = 1,
  634. .buswidth = 4,
  635. };
  636. static struct qcom_icc_node qhs_ipa = {
  637. .name = "qhs_ipa",
  638. .channels = 1,
  639. .buswidth = 4,
  640. };
  641. static struct qcom_icc_node qhs_mnoc_cfg = {
  642. .name = "qhs_mnoc_cfg",
  643. .channels = 1,
  644. .buswidth = 4,
  645. .num_links = 1,
  646. .link_nodes = { &qhm_mnoc_cfg },
  647. };
  648. static struct qcom_icc_node qhs_pcie_config = {
  649. .name = "qhs_pcie_config",
  650. .channels = 1,
  651. .buswidth = 4,
  652. };
  653. static struct qcom_icc_node qhs_pimem_cfg = {
  654. .name = "qhs_pimem_cfg",
  655. .channels = 1,
  656. .buswidth = 4,
  657. };
  658. static struct qcom_icc_node qhs_prng = {
  659. .name = "qhs_prng",
  660. .channels = 1,
  661. .buswidth = 4,
  662. };
  663. static struct qcom_icc_node qhs_qdss_cfg = {
  664. .name = "qhs_qdss_cfg",
  665. .channels = 1,
  666. .buswidth = 4,
  667. };
  668. static struct qcom_icc_node qhs_qspi = {
  669. .name = "qhs_qspi",
  670. .channels = 1,
  671. .buswidth = 4,
  672. };
  673. static struct qcom_icc_node qhs_qup0 = {
  674. .name = "qhs_qup0",
  675. .channels = 1,
  676. .buswidth = 4,
  677. };
  678. static struct qcom_icc_node qhs_qup1 = {
  679. .name = "qhs_qup1",
  680. .channels = 1,
  681. .buswidth = 4,
  682. };
  683. static struct qcom_icc_node qhs_sdc1 = {
  684. .name = "qhs_sdc1",
  685. .channels = 1,
  686. .buswidth = 4,
  687. };
  688. static struct qcom_icc_node qhs_sdc2 = {
  689. .name = "qhs_sdc2",
  690. .channels = 1,
  691. .buswidth = 4,
  692. };
  693. static struct qcom_icc_node qhs_snoc_cfg = {
  694. .name = "qhs_snoc_cfg",
  695. .channels = 1,
  696. .buswidth = 4,
  697. .num_links = 1,
  698. .link_nodes = { &qhm_snoc_cfg },
  699. };
  700. static struct qcom_icc_node qhs_spdm = {
  701. .name = "qhs_spdm",
  702. .channels = 1,
  703. .buswidth = 4,
  704. };
  705. static struct qcom_icc_node qhs_tcsr = {
  706. .name = "qhs_tcsr",
  707. .channels = 1,
  708. .buswidth = 4,
  709. };
  710. static struct qcom_icc_node qhs_tlmm_east = {
  711. .name = "qhs_tlmm_east",
  712. .channels = 1,
  713. .buswidth = 4,
  714. };
  715. static struct qcom_icc_node qhs_tlmm_south = {
  716. .name = "qhs_tlmm_south",
  717. .channels = 1,
  718. .buswidth = 4,
  719. };
  720. static struct qcom_icc_node qhs_tlmm_west = {
  721. .name = "qhs_tlmm_west",
  722. .channels = 1,
  723. .buswidth = 4,
  724. };
  725. static struct qcom_icc_node qhs_ufs_mem_cfg = {
  726. .name = "qhs_ufs_mem_cfg",
  727. .channels = 1,
  728. .buswidth = 4,
  729. };
  730. static struct qcom_icc_node qhs_usb2 = {
  731. .name = "qhs_usb2",
  732. .channels = 1,
  733. .buswidth = 4,
  734. };
  735. static struct qcom_icc_node qhs_usb3 = {
  736. .name = "qhs_usb3",
  737. .channels = 1,
  738. .buswidth = 4,
  739. };
  740. static struct qcom_icc_node qhs_venus_cfg = {
  741. .name = "qhs_venus_cfg",
  742. .channels = 1,
  743. .buswidth = 4,
  744. };
  745. static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
  746. .name = "qhs_vsense_ctrl_cfg",
  747. .channels = 1,
  748. .buswidth = 4,
  749. };
  750. static struct qcom_icc_node qns_cnoc_a2noc = {
  751. .name = "qns_cnoc_a2noc",
  752. .channels = 1,
  753. .buswidth = 8,
  754. .num_links = 1,
  755. .link_nodes = { &qnm_cnoc },
  756. };
  757. static struct qcom_icc_node srvc_cnoc = {
  758. .name = "srvc_cnoc",
  759. .channels = 1,
  760. .buswidth = 4,
  761. };
  762. static struct qcom_icc_node qhs_dc_noc_gemnoc = {
  763. .name = "qhs_dc_noc_gemnoc",
  764. .channels = 1,
  765. .buswidth = 4,
  766. .num_links = 1,
  767. .link_nodes = { &qhm_gemnoc_cfg },
  768. };
  769. static struct qcom_icc_node qhs_llcc = {
  770. .name = "qhs_llcc",
  771. .channels = 1,
  772. .buswidth = 4,
  773. };
  774. static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg = {
  775. .name = "qhs_mdsp_ms_mpu_cfg",
  776. .channels = 1,
  777. .buswidth = 4,
  778. };
  779. static struct qcom_icc_node qns_gem_noc_snoc = {
  780. .name = "qns_gem_noc_snoc",
  781. .channels = 1,
  782. .buswidth = 8,
  783. .num_links = 1,
  784. .link_nodes = { &qnm_gemnoc },
  785. };
  786. static struct qcom_icc_node qns_llcc = {
  787. .name = "qns_llcc",
  788. .channels = 1,
  789. .buswidth = 16,
  790. .num_links = 1,
  791. .link_nodes = { &llcc_mc },
  792. };
  793. static struct qcom_icc_node qns_sys_pcie = {
  794. .name = "qns_sys_pcie",
  795. .channels = 1,
  796. .buswidth = 8,
  797. .num_links = 1,
  798. .link_nodes = { &qnm_gemnoc_pcie },
  799. };
  800. static struct qcom_icc_node srvc_gemnoc = {
  801. .name = "srvc_gemnoc",
  802. .channels = 1,
  803. .buswidth = 4,
  804. };
  805. static struct qcom_icc_node ebi = {
  806. .name = "ebi",
  807. .channels = 2,
  808. .buswidth = 4,
  809. };
  810. static struct qcom_icc_node qns2_mem_noc = {
  811. .name = "qns2_mem_noc",
  812. .channels = 1,
  813. .buswidth = 32,
  814. .num_links = 1,
  815. .link_nodes = { &qnm_mnoc_sf },
  816. };
  817. static struct qcom_icc_node qns_mem_noc_hf = {
  818. .name = "qns_mem_noc_hf",
  819. .channels = 1,
  820. .buswidth = 32,
  821. .num_links = 1,
  822. .link_nodes = { &qnm_mnoc_hf },
  823. };
  824. static struct qcom_icc_node srvc_mnoc = {
  825. .name = "srvc_mnoc",
  826. .channels = 1,
  827. .buswidth = 4,
  828. };
  829. static struct qcom_icc_node qhs_apss = {
  830. .name = "qhs_apss",
  831. .channels = 1,
  832. .buswidth = 8,
  833. };
  834. static struct qcom_icc_node qns_cnoc = {
  835. .name = "qns_cnoc",
  836. .channels = 1,
  837. .buswidth = 8,
  838. .num_links = 1,
  839. .link_nodes = { &qnm_snoc },
  840. };
  841. static struct qcom_icc_node qns_gemnoc_sf = {
  842. .name = "qns_gemnoc_sf",
  843. .channels = 1,
  844. .buswidth = 16,
  845. .num_links = 1,
  846. .link_nodes = { &qnm_snoc_sf },
  847. };
  848. static struct qcom_icc_node qns_memnoc_gc = {
  849. .name = "qns_memnoc_gc",
  850. .channels = 1,
  851. .buswidth = 8,
  852. .num_links = 1,
  853. .link_nodes = { &qnm_snoc_gc },
  854. };
  855. static struct qcom_icc_node qxs_imem = {
  856. .name = "qxs_imem",
  857. .channels = 1,
  858. .buswidth = 8,
  859. };
  860. static struct qcom_icc_node qxs_pimem = {
  861. .name = "qxs_pimem",
  862. .channels = 1,
  863. .buswidth = 8,
  864. };
  865. static struct qcom_icc_node srvc_snoc = {
  866. .name = "srvc_snoc",
  867. .channels = 1,
  868. .buswidth = 4,
  869. };
  870. static struct qcom_icc_node xs_pcie = {
  871. .name = "xs_pcie",
  872. .channels = 1,
  873. .buswidth = 8,
  874. };
  875. static struct qcom_icc_node xs_qdss_stm = {
  876. .name = "xs_qdss_stm",
  877. .channels = 1,
  878. .buswidth = 4,
  879. };
  880. static struct qcom_icc_node xs_sys_tcu_cfg = {
  881. .name = "xs_sys_tcu_cfg",
  882. .channels = 1,
  883. .buswidth = 8,
  884. };
  885. static struct qcom_icc_bcm bcm_acv = {
  886. .name = "ACV",
  887. .num_nodes = 1,
  888. .nodes = { &ebi },
  889. };
  890. static struct qcom_icc_bcm bcm_ce0 = {
  891. .name = "CE0",
  892. .num_nodes = 1,
  893. .nodes = { &qxm_crypto },
  894. };
  895. static struct qcom_icc_bcm bcm_cn0 = {
  896. .name = "CN0",
  897. .keepalive = true,
  898. .num_nodes = 37,
  899. .nodes = { &qhm_spdm, &qnm_snoc,
  900. &qhs_a1_noc_cfg, &qhs_aop,
  901. &qhs_aoss, &qhs_camera_cfg,
  902. &qhs_clk_ctl, &qhs_cpr_cx,
  903. &qhs_cpr_mx, &qhs_crypto0_cfg,
  904. &qhs_ddrss_cfg, &qhs_display_cfg,
  905. &qhs_emac_avb_cfg, &qhs_glm,
  906. &qhs_gpuss_cfg, &qhs_imem_cfg,
  907. &qhs_ipa, &qhs_mnoc_cfg,
  908. &qhs_pcie_config, &qhs_pimem_cfg,
  909. &qhs_prng, &qhs_qdss_cfg,
  910. &qhs_qup0, &qhs_qup1,
  911. &qhs_snoc_cfg, &qhs_spdm,
  912. &qhs_tcsr, &qhs_tlmm_east,
  913. &qhs_tlmm_south, &qhs_tlmm_west,
  914. &qhs_ufs_mem_cfg, &qhs_usb2,
  915. &qhs_usb3, &qhs_venus_cfg,
  916. &qhs_vsense_ctrl_cfg, &qns_cnoc_a2noc,
  917. &srvc_cnoc },
  918. };
  919. static struct qcom_icc_bcm bcm_cn1 = {
  920. .name = "CN1",
  921. .num_nodes = 8,
  922. .nodes = { &qhm_qspi, &xm_sdc1,
  923. &xm_sdc2, &qhs_ahb2phy_east,
  924. &qhs_ahb2phy_west, &qhs_qspi,
  925. &qhs_sdc1, &qhs_sdc2 },
  926. };
  927. static struct qcom_icc_bcm bcm_mc0 = {
  928. .name = "MC0",
  929. .keepalive = true,
  930. .num_nodes = 1,
  931. .nodes = { &ebi },
  932. };
  933. static struct qcom_icc_bcm bcm_mm0 = {
  934. .name = "MM0",
  935. .keepalive = true,
  936. .num_nodes = 1,
  937. .nodes = { &qns_mem_noc_hf },
  938. };
  939. static struct qcom_icc_bcm bcm_mm1 = {
  940. .name = "MM1",
  941. .num_nodes = 7,
  942. .nodes = { &qxm_camnoc_hf0_uncomp, &qxm_camnoc_hf1_uncomp,
  943. &qxm_camnoc_sf_uncomp, &qxm_camnoc_hf0,
  944. &qxm_camnoc_hf1, &qxm_mdp0,
  945. &qxm_rot },
  946. };
  947. static struct qcom_icc_bcm bcm_mm2 = {
  948. .name = "MM2",
  949. .num_nodes = 2,
  950. .nodes = { &qxm_camnoc_sf, &qns2_mem_noc },
  951. };
  952. static struct qcom_icc_bcm bcm_mm3 = {
  953. .name = "MM3",
  954. .num_nodes = 2,
  955. .nodes = { &qxm_venus0, &qxm_venus_arm9 },
  956. };
  957. static struct qcom_icc_bcm bcm_qup0 = {
  958. .name = "QUP0",
  959. .keepalive = true,
  960. .vote_scale = 1,
  961. .num_nodes = 2,
  962. .nodes = { &qhm_qup0, &qhm_qup1 },
  963. };
  964. static struct qcom_icc_bcm bcm_sh0 = {
  965. .name = "SH0",
  966. .keepalive = true,
  967. .num_nodes = 1,
  968. .nodes = { &qns_llcc },
  969. };
  970. static struct qcom_icc_bcm bcm_sh2 = {
  971. .name = "SH2",
  972. .num_nodes = 1,
  973. .nodes = { &acm_apps },
  974. };
  975. static struct qcom_icc_bcm bcm_sh3 = {
  976. .name = "SH3",
  977. .num_nodes = 1,
  978. .nodes = { &qns_gem_noc_snoc },
  979. };
  980. static struct qcom_icc_bcm bcm_sn0 = {
  981. .name = "SN0",
  982. .keepalive = true,
  983. .num_nodes = 1,
  984. .nodes = { &qns_gemnoc_sf },
  985. };
  986. static struct qcom_icc_bcm bcm_sn1 = {
  987. .name = "SN1",
  988. .num_nodes = 1,
  989. .nodes = { &qxs_imem },
  990. };
  991. static struct qcom_icc_bcm bcm_sn2 = {
  992. .name = "SN2",
  993. .num_nodes = 1,
  994. .nodes = { &qns_memnoc_gc },
  995. };
  996. static struct qcom_icc_bcm bcm_sn3 = {
  997. .name = "SN3",
  998. .num_nodes = 2,
  999. .nodes = { &srvc_aggre2_noc, &qns_cnoc },
  1000. };
  1001. static struct qcom_icc_bcm bcm_sn4 = {
  1002. .name = "SN4",
  1003. .num_nodes = 1,
  1004. .nodes = { &qxs_pimem },
  1005. };
  1006. static struct qcom_icc_bcm bcm_sn5 = {
  1007. .name = "SN5",
  1008. .num_nodes = 1,
  1009. .nodes = { &xs_qdss_stm },
  1010. };
  1011. static struct qcom_icc_bcm bcm_sn8 = {
  1012. .name = "SN8",
  1013. .num_nodes = 2,
  1014. .nodes = { &qnm_gemnoc_pcie, &xs_pcie },
  1015. };
  1016. static struct qcom_icc_bcm bcm_sn9 = {
  1017. .name = "SN9",
  1018. .num_nodes = 1,
  1019. .nodes = { &qnm_aggre1_noc },
  1020. };
  1021. static struct qcom_icc_bcm bcm_sn12 = {
  1022. .name = "SN12",
  1023. .num_nodes = 2,
  1024. .nodes = { &qxm_pimem, &xm_gic },
  1025. };
  1026. static struct qcom_icc_bcm bcm_sn13 = {
  1027. .name = "SN13",
  1028. .num_nodes = 1,
  1029. .nodes = { &qnm_lpass_anoc },
  1030. };
  1031. static struct qcom_icc_bcm bcm_sn14 = {
  1032. .name = "SN14",
  1033. .num_nodes = 1,
  1034. .nodes = { &qns_pcie_snoc },
  1035. };
  1036. static struct qcom_icc_bcm bcm_sn15 = {
  1037. .name = "SN15",
  1038. .num_nodes = 1,
  1039. .nodes = { &qnm_gemnoc },
  1040. };
  1041. static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
  1042. &bcm_ce0,
  1043. &bcm_cn1,
  1044. &bcm_qup0,
  1045. &bcm_sn3,
  1046. &bcm_sn14,
  1047. };
  1048. static struct qcom_icc_node * const aggre1_noc_nodes[] = {
  1049. [MASTER_A1NOC_CFG] = &qhm_a1noc_cfg,
  1050. [MASTER_QDSS_BAM] = &qhm_qdss_bam,
  1051. [MASTER_QSPI] = &qhm_qspi,
  1052. [MASTER_QUP_0] = &qhm_qup0,
  1053. [MASTER_BLSP_1] = &qhm_qup1,
  1054. [MASTER_CNOC_A2NOC] = &qnm_cnoc,
  1055. [MASTER_CRYPTO] = &qxm_crypto,
  1056. [MASTER_IPA] = &qxm_ipa,
  1057. [MASTER_EMAC_EVB] = &xm_emac_avb,
  1058. [MASTER_PCIE] = &xm_pcie,
  1059. [MASTER_QDSS_ETR] = &xm_qdss_etr,
  1060. [MASTER_SDCC_1] = &xm_sdc1,
  1061. [MASTER_SDCC_2] = &xm_sdc2,
  1062. [MASTER_UFS_MEM] = &xm_ufs_mem,
  1063. [MASTER_USB2] = &xm_usb2,
  1064. [MASTER_USB3_0] = &xm_usb3_0,
  1065. [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
  1066. [SLAVE_LPASS_SNOC] = &qns_lpass_snoc,
  1067. [SLAVE_ANOC_PCIE_SNOC] = &qns_pcie_snoc,
  1068. [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
  1069. };
  1070. static const struct qcom_icc_desc qcs615_aggre1_noc = {
  1071. .nodes = aggre1_noc_nodes,
  1072. .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
  1073. .bcms = aggre1_noc_bcms,
  1074. .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
  1075. };
  1076. static struct qcom_icc_bcm * const camnoc_virt_bcms[] = {
  1077. &bcm_mm1,
  1078. };
  1079. static struct qcom_icc_node * const camnoc_virt_nodes[] = {
  1080. [MASTER_CAMNOC_HF0_UNCOMP] = &qxm_camnoc_hf0_uncomp,
  1081. [MASTER_CAMNOC_HF1_UNCOMP] = &qxm_camnoc_hf1_uncomp,
  1082. [MASTER_CAMNOC_SF_UNCOMP] = &qxm_camnoc_sf_uncomp,
  1083. [SLAVE_CAMNOC_UNCOMP] = &qns_camnoc_uncomp,
  1084. };
  1085. static const struct qcom_icc_desc qcs615_camnoc_virt = {
  1086. .nodes = camnoc_virt_nodes,
  1087. .num_nodes = ARRAY_SIZE(camnoc_virt_nodes),
  1088. .bcms = camnoc_virt_bcms,
  1089. .num_bcms = ARRAY_SIZE(camnoc_virt_bcms),
  1090. };
  1091. static struct qcom_icc_bcm * const config_noc_bcms[] = {
  1092. &bcm_cn0,
  1093. &bcm_cn1,
  1094. };
  1095. static struct qcom_icc_node * const config_noc_nodes[] = {
  1096. [MASTER_SPDM] = &qhm_spdm,
  1097. [MASTER_SNOC_CNOC] = &qnm_snoc,
  1098. [MASTER_QDSS_DAP] = &xm_qdss_dap,
  1099. [SLAVE_A1NOC_CFG] = &qhs_a1_noc_cfg,
  1100. [SLAVE_AHB2PHY_EAST] = &qhs_ahb2phy_east,
  1101. [SLAVE_AHB2PHY_WEST] = &qhs_ahb2phy_west,
  1102. [SLAVE_AOP] = &qhs_aop,
  1103. [SLAVE_AOSS] = &qhs_aoss,
  1104. [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
  1105. [SLAVE_CLK_CTL] = &qhs_clk_ctl,
  1106. [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
  1107. [SLAVE_RBCPR_MX_CFG] = &qhs_cpr_mx,
  1108. [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
  1109. [SLAVE_CNOC_DDRSS] = &qhs_ddrss_cfg,
  1110. [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
  1111. [SLAVE_EMAC_AVB_CFG] = &qhs_emac_avb_cfg,
  1112. [SLAVE_GLM] = &qhs_glm,
  1113. [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
  1114. [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
  1115. [SLAVE_IPA_CFG] = &qhs_ipa,
  1116. [SLAVE_CNOC_MNOC_CFG] = &qhs_mnoc_cfg,
  1117. [SLAVE_PCIE_CFG] = &qhs_pcie_config,
  1118. [SLAVE_PIMEM_CFG] = &qhs_pimem_cfg,
  1119. [SLAVE_PRNG] = &qhs_prng,
  1120. [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
  1121. [SLAVE_QSPI] = &qhs_qspi,
  1122. [SLAVE_QUP_0] = &qhs_qup0,
  1123. [SLAVE_QUP_1] = &qhs_qup1,
  1124. [SLAVE_SDCC_1] = &qhs_sdc1,
  1125. [SLAVE_SDCC_2] = &qhs_sdc2,
  1126. [SLAVE_SNOC_CFG] = &qhs_snoc_cfg,
  1127. [SLAVE_SPDM_WRAPPER] = &qhs_spdm,
  1128. [SLAVE_TCSR] = &qhs_tcsr,
  1129. [SLAVE_TLMM_EAST] = &qhs_tlmm_east,
  1130. [SLAVE_TLMM_SOUTH] = &qhs_tlmm_south,
  1131. [SLAVE_TLMM_WEST] = &qhs_tlmm_west,
  1132. [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
  1133. [SLAVE_USB2] = &qhs_usb2,
  1134. [SLAVE_USB3] = &qhs_usb3,
  1135. [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
  1136. [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
  1137. [SLAVE_CNOC_A2NOC] = &qns_cnoc_a2noc,
  1138. [SLAVE_SERVICE_CNOC] = &srvc_cnoc,
  1139. };
  1140. static const struct qcom_icc_desc qcs615_config_noc = {
  1141. .nodes = config_noc_nodes,
  1142. .num_nodes = ARRAY_SIZE(config_noc_nodes),
  1143. .bcms = config_noc_bcms,
  1144. .num_bcms = ARRAY_SIZE(config_noc_bcms),
  1145. };
  1146. static struct qcom_icc_node * const dc_noc_nodes[] = {
  1147. [MASTER_CNOC_DC_NOC] = &qhm_cnoc,
  1148. [SLAVE_DC_NOC_GEMNOC] = &qhs_dc_noc_gemnoc,
  1149. [SLAVE_LLCC_CFG] = &qhs_llcc,
  1150. };
  1151. static const struct qcom_icc_desc qcs615_dc_noc = {
  1152. .nodes = dc_noc_nodes,
  1153. .num_nodes = ARRAY_SIZE(dc_noc_nodes),
  1154. };
  1155. static struct qcom_icc_bcm * const gem_noc_bcms[] = {
  1156. &bcm_sh0,
  1157. &bcm_sh2,
  1158. &bcm_sh3,
  1159. &bcm_mm1,
  1160. };
  1161. static struct qcom_icc_node * const gem_noc_nodes[] = {
  1162. [MASTER_APPSS_PROC] = &acm_apps,
  1163. [MASTER_GPU_TCU] = &acm_gpu_tcu,
  1164. [MASTER_SYS_TCU] = &acm_sys_tcu,
  1165. [MASTER_GEM_NOC_CFG] = &qhm_gemnoc_cfg,
  1166. [MASTER_GFX3D] = &qnm_gpu,
  1167. [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
  1168. [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
  1169. [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
  1170. [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
  1171. [SLAVE_MSS_PROC_MS_MPU_CFG] = &qhs_mdsp_ms_mpu_cfg,
  1172. [SLAVE_GEM_NOC_SNOC] = &qns_gem_noc_snoc,
  1173. [SLAVE_LLCC] = &qns_llcc,
  1174. [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_sys_pcie,
  1175. [SLAVE_SERVICE_GEM_NOC] = &srvc_gemnoc,
  1176. };
  1177. static const struct qcom_icc_desc qcs615_gem_noc = {
  1178. .nodes = gem_noc_nodes,
  1179. .num_nodes = ARRAY_SIZE(gem_noc_nodes),
  1180. .bcms = gem_noc_bcms,
  1181. .num_bcms = ARRAY_SIZE(gem_noc_bcms),
  1182. };
  1183. static struct qcom_icc_bcm * const mc_virt_bcms[] = {
  1184. &bcm_acv,
  1185. &bcm_mc0,
  1186. };
  1187. static struct qcom_icc_node * const mc_virt_nodes[] = {
  1188. [MASTER_LLCC] = &llcc_mc,
  1189. [SLAVE_EBI1] = &ebi,
  1190. };
  1191. static const struct qcom_icc_desc qcs615_mc_virt = {
  1192. .nodes = mc_virt_nodes,
  1193. .num_nodes = ARRAY_SIZE(mc_virt_nodes),
  1194. .bcms = mc_virt_bcms,
  1195. .num_bcms = ARRAY_SIZE(mc_virt_bcms),
  1196. };
  1197. static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
  1198. &bcm_mm0,
  1199. &bcm_mm1,
  1200. &bcm_mm2,
  1201. &bcm_mm3,
  1202. };
  1203. static struct qcom_icc_node * const mmss_noc_nodes[] = {
  1204. [MASTER_CNOC_MNOC_CFG] = &qhm_mnoc_cfg,
  1205. [MASTER_CAMNOC_HF0] = &qxm_camnoc_hf0,
  1206. [MASTER_CAMNOC_HF1] = &qxm_camnoc_hf1,
  1207. [MASTER_CAMNOC_SF] = &qxm_camnoc_sf,
  1208. [MASTER_MDP0] = &qxm_mdp0,
  1209. [MASTER_ROTATOR] = &qxm_rot,
  1210. [MASTER_VIDEO_P0] = &qxm_venus0,
  1211. [MASTER_VIDEO_PROC] = &qxm_venus_arm9,
  1212. [SLAVE_MNOC_SF_MEM_NOC] = &qns2_mem_noc,
  1213. [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
  1214. [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
  1215. };
  1216. static const struct qcom_icc_desc qcs615_mmss_noc = {
  1217. .nodes = mmss_noc_nodes,
  1218. .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
  1219. .bcms = mmss_noc_bcms,
  1220. .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
  1221. };
  1222. static struct qcom_icc_bcm * const system_noc_bcms[] = {
  1223. &bcm_sn0,
  1224. &bcm_sn1,
  1225. &bcm_sn2,
  1226. &bcm_sn3,
  1227. &bcm_sn4,
  1228. &bcm_sn5,
  1229. &bcm_sn8,
  1230. &bcm_sn9,
  1231. &bcm_sn12,
  1232. &bcm_sn13,
  1233. &bcm_sn15,
  1234. };
  1235. static struct qcom_icc_node * const system_noc_nodes[] = {
  1236. [MASTER_SNOC_CFG] = &qhm_snoc_cfg,
  1237. [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
  1238. [MASTER_GEM_NOC_SNOC] = &qnm_gemnoc,
  1239. [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
  1240. [MASTER_LPASS_ANOC] = &qnm_lpass_anoc,
  1241. [MASTER_ANOC_PCIE_SNOC] = &qnm_pcie_anoc,
  1242. [MASTER_PIMEM] = &qxm_pimem,
  1243. [MASTER_GIC] = &xm_gic,
  1244. [SLAVE_APPSS] = &qhs_apss,
  1245. [SLAVE_SNOC_CNOC] = &qns_cnoc,
  1246. [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
  1247. [SLAVE_SNOC_MEM_NOC_GC] = &qns_memnoc_gc,
  1248. [SLAVE_IMEM] = &qxs_imem,
  1249. [SLAVE_PIMEM] = &qxs_pimem,
  1250. [SLAVE_SERVICE_SNOC] = &srvc_snoc,
  1251. [SLAVE_PCIE_0] = &xs_pcie,
  1252. [SLAVE_QDSS_STM] = &xs_qdss_stm,
  1253. [SLAVE_TCU] = &xs_sys_tcu_cfg,
  1254. };
  1255. static const struct qcom_icc_desc qcs615_system_noc = {
  1256. .nodes = system_noc_nodes,
  1257. .num_nodes = ARRAY_SIZE(system_noc_nodes),
  1258. .bcms = system_noc_bcms,
  1259. .num_bcms = ARRAY_SIZE(system_noc_bcms),
  1260. };
  1261. static const struct of_device_id qnoc_of_match[] = {
  1262. { .compatible = "qcom,qcs615-aggre1-noc",
  1263. .data = &qcs615_aggre1_noc},
  1264. { .compatible = "qcom,qcs615-camnoc-virt",
  1265. .data = &qcs615_camnoc_virt},
  1266. { .compatible = "qcom,qcs615-config-noc",
  1267. .data = &qcs615_config_noc},
  1268. { .compatible = "qcom,qcs615-dc-noc",
  1269. .data = &qcs615_dc_noc},
  1270. { .compatible = "qcom,qcs615-gem-noc",
  1271. .data = &qcs615_gem_noc},
  1272. { .compatible = "qcom,qcs615-mc-virt",
  1273. .data = &qcs615_mc_virt},
  1274. { .compatible = "qcom,qcs615-mmss-noc",
  1275. .data = &qcs615_mmss_noc},
  1276. { .compatible = "qcom,qcs615-system-noc",
  1277. .data = &qcs615_system_noc},
  1278. { }
  1279. };
  1280. MODULE_DEVICE_TABLE(of, qnoc_of_match);
  1281. static struct platform_driver qnoc_driver = {
  1282. .probe = qcom_icc_rpmh_probe,
  1283. .remove = qcom_icc_rpmh_remove,
  1284. .driver = {
  1285. .name = "qnoc-qcs615",
  1286. .of_match_table = qnoc_of_match,
  1287. .sync_state = icc_sync_state,
  1288. },
  1289. };
  1290. static int __init qnoc_driver_init(void)
  1291. {
  1292. return platform_driver_register(&qnoc_driver);
  1293. }
  1294. core_initcall(qnoc_driver_init);
  1295. static void __exit qnoc_driver_exit(void)
  1296. {
  1297. platform_driver_unregister(&qnoc_driver);
  1298. }
  1299. module_exit(qnoc_driver_exit);
  1300. MODULE_DESCRIPTION("qcs615 NoC driver");
  1301. MODULE_LICENSE("GPL");