sdm670.c 33 KB

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