sm6350.c 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2022 Luca Weiss <luca.weiss@fairphone.com>
  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,sm6350.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_qup_0;
  16. static struct qcom_icc_node xm_emmc;
  17. static struct qcom_icc_node xm_ufs_mem;
  18. static struct qcom_icc_node qhm_a2noc_cfg;
  19. static struct qcom_icc_node qhm_qdss_bam;
  20. static struct qcom_icc_node qhm_qup_1;
  21. static struct qcom_icc_node qxm_crypto;
  22. static struct qcom_icc_node qxm_ipa;
  23. static struct qcom_icc_node xm_qdss_etr;
  24. static struct qcom_icc_node xm_sdc2;
  25. static struct qcom_icc_node xm_usb3_0;
  26. static struct qcom_icc_node qxm_camnoc_hf0_uncomp;
  27. static struct qcom_icc_node qxm_camnoc_icp_uncomp;
  28. static struct qcom_icc_node qxm_camnoc_sf_uncomp;
  29. static struct qcom_icc_node qup0_core_master;
  30. static struct qcom_icc_node qup1_core_master;
  31. static struct qcom_icc_node qnm_npu;
  32. static struct qcom_icc_node qxm_npu_dsp;
  33. static struct qcom_icc_node qnm_snoc;
  34. static struct qcom_icc_node xm_qdss_dap;
  35. static struct qcom_icc_node qhm_cnoc_dc_noc;
  36. static struct qcom_icc_node acm_apps;
  37. static struct qcom_icc_node acm_sys_tcu;
  38. static struct qcom_icc_node qhm_gemnoc_cfg;
  39. static struct qcom_icc_node qnm_cmpnoc;
  40. static struct qcom_icc_node qnm_mnoc_hf;
  41. static struct qcom_icc_node qnm_mnoc_sf;
  42. static struct qcom_icc_node qnm_snoc_gc;
  43. static struct qcom_icc_node qnm_snoc_sf;
  44. static struct qcom_icc_node qxm_gpu;
  45. static struct qcom_icc_node llcc_mc;
  46. static struct qcom_icc_node qhm_mnoc_cfg;
  47. static struct qcom_icc_node qnm_video0;
  48. static struct qcom_icc_node qnm_video_cvp;
  49. static struct qcom_icc_node qxm_camnoc_hf;
  50. static struct qcom_icc_node qxm_camnoc_icp;
  51. static struct qcom_icc_node qxm_camnoc_sf;
  52. static struct qcom_icc_node qxm_mdp0;
  53. static struct qcom_icc_node amm_npu_sys;
  54. static struct qcom_icc_node qhm_npu_cfg;
  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_aggre2_noc;
  58. static struct qcom_icc_node qnm_gemnoc;
  59. static struct qcom_icc_node qxm_pimem;
  60. static struct qcom_icc_node xm_gic;
  61. static struct qcom_icc_node qns_a1noc_snoc;
  62. static struct qcom_icc_node srvc_aggre1_noc;
  63. static struct qcom_icc_node qns_a2noc_snoc;
  64. static struct qcom_icc_node srvc_aggre2_noc;
  65. static struct qcom_icc_node qns_camnoc_uncomp;
  66. static struct qcom_icc_node qup0_core_slave;
  67. static struct qcom_icc_node qup1_core_slave;
  68. static struct qcom_icc_node qns_cdsp_gemnoc;
  69. static struct qcom_icc_node qhs_a1_noc_cfg;
  70. static struct qcom_icc_node qhs_a2_noc_cfg;
  71. static struct qcom_icc_node qhs_ahb2phy0;
  72. static struct qcom_icc_node qhs_ahb2phy2;
  73. static struct qcom_icc_node qhs_aoss;
  74. static struct qcom_icc_node qhs_boot_rom;
  75. static struct qcom_icc_node qhs_camera_cfg;
  76. static struct qcom_icc_node qhs_camera_nrt_thrott_cfg;
  77. static struct qcom_icc_node qhs_camera_rt_throttle_cfg;
  78. static struct qcom_icc_node qhs_clk_ctl;
  79. static struct qcom_icc_node qhs_cpr_cx;
  80. static struct qcom_icc_node qhs_cpr_mx;
  81. static struct qcom_icc_node qhs_crypto0_cfg;
  82. static struct qcom_icc_node qhs_dcc_cfg;
  83. static struct qcom_icc_node qhs_ddrss_cfg;
  84. static struct qcom_icc_node qhs_display_cfg;
  85. static struct qcom_icc_node qhs_display_throttle_cfg;
  86. static struct qcom_icc_node qhs_emmc_cfg;
  87. static struct qcom_icc_node qhs_glm;
  88. static struct qcom_icc_node qhs_gpuss_cfg;
  89. static struct qcom_icc_node qhs_imem_cfg;
  90. static struct qcom_icc_node qhs_ipa;
  91. static struct qcom_icc_node qhs_mnoc_cfg;
  92. static struct qcom_icc_node qhs_mss_cfg;
  93. static struct qcom_icc_node qhs_npu_cfg;
  94. static struct qcom_icc_node qhs_pdm;
  95. static struct qcom_icc_node qhs_pimem_cfg;
  96. static struct qcom_icc_node qhs_prng;
  97. static struct qcom_icc_node qhs_qdss_cfg;
  98. static struct qcom_icc_node qhs_qm_cfg;
  99. static struct qcom_icc_node qhs_qm_mpu_cfg;
  100. static struct qcom_icc_node qhs_qup0;
  101. static struct qcom_icc_node qhs_qup1;
  102. static struct qcom_icc_node qhs_sdc2;
  103. static struct qcom_icc_node qhs_security;
  104. static struct qcom_icc_node qhs_snoc_cfg;
  105. static struct qcom_icc_node qhs_tcsr;
  106. static struct qcom_icc_node qhs_ufs_mem_cfg;
  107. static struct qcom_icc_node qhs_usb3_0;
  108. static struct qcom_icc_node qhs_venus_cfg;
  109. static struct qcom_icc_node qhs_venus_throttle_cfg;
  110. static struct qcom_icc_node qhs_vsense_ctrl_cfg;
  111. static struct qcom_icc_node srvc_cnoc;
  112. static struct qcom_icc_node qhs_gemnoc;
  113. static struct qcom_icc_node qhs_llcc;
  114. static struct qcom_icc_node qhs_mcdma_ms_mpu_cfg;
  115. static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg;
  116. static struct qcom_icc_node qns_gem_noc_snoc;
  117. static struct qcom_icc_node qns_llcc;
  118. static struct qcom_icc_node srvc_gemnoc;
  119. static struct qcom_icc_node ebi;
  120. static struct qcom_icc_node qns_mem_noc_hf;
  121. static struct qcom_icc_node qns_mem_noc_sf;
  122. static struct qcom_icc_node srvc_mnoc;
  123. static struct qcom_icc_node qhs_cal_dp0;
  124. static struct qcom_icc_node qhs_cp;
  125. static struct qcom_icc_node qhs_dma_bwmon;
  126. static struct qcom_icc_node qhs_dpm;
  127. static struct qcom_icc_node qhs_isense;
  128. static struct qcom_icc_node qhs_llm;
  129. static struct qcom_icc_node qhs_tcm;
  130. static struct qcom_icc_node qns_npu_sys;
  131. static struct qcom_icc_node srvc_noc;
  132. static struct qcom_icc_node qhs_apss;
  133. static struct qcom_icc_node qns_cnoc;
  134. static struct qcom_icc_node qns_gemnoc_gc;
  135. static struct qcom_icc_node qns_gemnoc_sf;
  136. static struct qcom_icc_node qxs_imem;
  137. static struct qcom_icc_node qxs_pimem;
  138. static struct qcom_icc_node srvc_snoc;
  139. static struct qcom_icc_node xs_qdss_stm;
  140. static struct qcom_icc_node xs_sys_tcu_cfg;
  141. static struct qcom_icc_node qhm_a1noc_cfg = {
  142. .name = "qhm_a1noc_cfg",
  143. .channels = 1,
  144. .buswidth = 4,
  145. .num_links = 1,
  146. .link_nodes = { &srvc_aggre1_noc },
  147. };
  148. static struct qcom_icc_qosbox qhm_qup_0_qos = {
  149. .num_ports = 1,
  150. .port_offsets = { 0xa000 },
  151. .prio = 2,
  152. .urg_fwd = 0,
  153. };
  154. static struct qcom_icc_node qhm_qup_0 = {
  155. .name = "qhm_qup_0",
  156. .channels = 1,
  157. .buswidth = 4,
  158. .qosbox = &qhm_qup_0_qos,
  159. .num_links = 1,
  160. .link_nodes = { &qns_a1noc_snoc },
  161. };
  162. static struct qcom_icc_qosbox xm_emmc_qos = {
  163. .num_ports = 1,
  164. .port_offsets = { 0x7000 },
  165. .prio = 2,
  166. .urg_fwd = 0,
  167. };
  168. static struct qcom_icc_node xm_emmc = {
  169. .name = "xm_emmc",
  170. .channels = 1,
  171. .buswidth = 8,
  172. .qosbox = &xm_emmc_qos,
  173. .num_links = 1,
  174. .link_nodes = { &qns_a1noc_snoc },
  175. };
  176. static struct qcom_icc_qosbox xm_ufs_mem_qos = {
  177. .num_ports = 1,
  178. .port_offsets = { 0x8000 },
  179. .prio = 4,
  180. .urg_fwd = 0,
  181. };
  182. static struct qcom_icc_node xm_ufs_mem = {
  183. .name = "xm_ufs_mem",
  184. .channels = 1,
  185. .buswidth = 8,
  186. .qosbox = &xm_ufs_mem_qos,
  187. .num_links = 1,
  188. .link_nodes = { &qns_a1noc_snoc },
  189. };
  190. static struct qcom_icc_node qhm_a2noc_cfg = {
  191. .name = "qhm_a2noc_cfg",
  192. .channels = 1,
  193. .buswidth = 4,
  194. .num_links = 1,
  195. .link_nodes = { &srvc_aggre2_noc },
  196. };
  197. static struct qcom_icc_qosbox qhm_qdss_bam_qos = {
  198. .num_ports = 1,
  199. .port_offsets = { 0xb000 },
  200. .prio = 2,
  201. .urg_fwd = 0,
  202. };
  203. static struct qcom_icc_node qhm_qdss_bam = {
  204. .name = "qhm_qdss_bam",
  205. .channels = 1,
  206. .buswidth = 4,
  207. .qosbox = &qhm_qdss_bam_qos,
  208. .num_links = 1,
  209. .link_nodes = { &qns_a2noc_snoc },
  210. };
  211. static struct qcom_icc_qosbox qhm_qup_1_qos = {
  212. .num_ports = 1,
  213. .port_offsets = { 0x9000 },
  214. .prio = 2,
  215. .urg_fwd = 0,
  216. };
  217. static struct qcom_icc_node qhm_qup_1 = {
  218. .name = "qhm_qup_1",
  219. .channels = 1,
  220. .buswidth = 4,
  221. .qosbox = &qhm_qup_1_qos,
  222. .num_links = 1,
  223. .link_nodes = { &qns_a2noc_snoc },
  224. };
  225. static struct qcom_icc_qosbox qxm_crypto_qos = {
  226. .num_ports = 1,
  227. .port_offsets = { 0x6000 },
  228. .prio = 2,
  229. .urg_fwd = 0,
  230. };
  231. static struct qcom_icc_node qxm_crypto = {
  232. .name = "qxm_crypto",
  233. .channels = 1,
  234. .buswidth = 8,
  235. .qosbox = &qxm_crypto_qos,
  236. .num_links = 1,
  237. .link_nodes = { &qns_a2noc_snoc },
  238. };
  239. static struct qcom_icc_qosbox qxm_ipa_qos = {
  240. .num_ports = 1,
  241. .port_offsets = { 0x7000 },
  242. .prio = 2,
  243. .urg_fwd = 0,
  244. };
  245. static struct qcom_icc_node qxm_ipa = {
  246. .name = "qxm_ipa",
  247. .channels = 1,
  248. .buswidth = 8,
  249. .qosbox = &qxm_ipa_qos,
  250. .num_links = 1,
  251. .link_nodes = { &qns_a2noc_snoc },
  252. };
  253. static struct qcom_icc_qosbox xm_qdss_etr_qos = {
  254. .num_ports = 1,
  255. .port_offsets = { 0xc000 },
  256. .prio = 2,
  257. .urg_fwd = 0,
  258. };
  259. static struct qcom_icc_node xm_qdss_etr = {
  260. .name = "xm_qdss_etr",
  261. .channels = 1,
  262. .buswidth = 8,
  263. .qosbox = &xm_qdss_etr_qos,
  264. .num_links = 1,
  265. .link_nodes = { &qns_a2noc_snoc },
  266. };
  267. static struct qcom_icc_qosbox xm_sdc2_qos = {
  268. .num_ports = 1,
  269. .port_offsets = { 0x18000 },
  270. .prio = 2,
  271. .urg_fwd = 0,
  272. };
  273. static struct qcom_icc_node xm_sdc2 = {
  274. .name = "xm_sdc2",
  275. .channels = 1,
  276. .buswidth = 8,
  277. .qosbox = &xm_sdc2_qos,
  278. .num_links = 1,
  279. .link_nodes = { &qns_a2noc_snoc },
  280. };
  281. static struct qcom_icc_qosbox xm_usb3_0_qos = {
  282. .num_ports = 1,
  283. .port_offsets = { 0xd000 },
  284. .prio = 2,
  285. .urg_fwd = 0,
  286. };
  287. static struct qcom_icc_node xm_usb3_0 = {
  288. .name = "xm_usb3_0",
  289. .channels = 1,
  290. .buswidth = 8,
  291. .qosbox = &xm_usb3_0_qos,
  292. .num_links = 1,
  293. .link_nodes = { &qns_a2noc_snoc },
  294. };
  295. static struct qcom_icc_node qxm_camnoc_hf0_uncomp = {
  296. .name = "qxm_camnoc_hf0_uncomp",
  297. .channels = 2,
  298. .buswidth = 32,
  299. .num_links = 1,
  300. .link_nodes = { &qns_camnoc_uncomp },
  301. };
  302. static struct qcom_icc_node qxm_camnoc_icp_uncomp = {
  303. .name = "qxm_camnoc_icp_uncomp",
  304. .channels = 1,
  305. .buswidth = 32,
  306. .num_links = 1,
  307. .link_nodes = { &qns_camnoc_uncomp },
  308. };
  309. static struct qcom_icc_node qxm_camnoc_sf_uncomp = {
  310. .name = "qxm_camnoc_sf_uncomp",
  311. .channels = 1,
  312. .buswidth = 32,
  313. .num_links = 1,
  314. .link_nodes = { &qns_camnoc_uncomp },
  315. };
  316. static struct qcom_icc_node qup0_core_master = {
  317. .name = "qup0_core_master",
  318. .channels = 1,
  319. .buswidth = 4,
  320. .num_links = 1,
  321. .link_nodes = { &qup0_core_slave },
  322. };
  323. static struct qcom_icc_node qup1_core_master = {
  324. .name = "qup1_core_master",
  325. .channels = 1,
  326. .buswidth = 4,
  327. .num_links = 1,
  328. .link_nodes = { &qup1_core_slave },
  329. };
  330. static struct qcom_icc_qosbox qnm_npu_qos = {
  331. .num_ports = 2,
  332. .port_offsets = { 0xf000, 0x11000 },
  333. .prio = 0,
  334. .urg_fwd = 1,
  335. };
  336. static struct qcom_icc_node qnm_npu = {
  337. .name = "qnm_npu",
  338. .channels = 2,
  339. .buswidth = 32,
  340. .qosbox = &qnm_npu_qos,
  341. .num_links = 1,
  342. .link_nodes = { &qns_cdsp_gemnoc },
  343. };
  344. static struct qcom_icc_qosbox qxm_npu_dsp_qos = {
  345. .num_ports = 1,
  346. .port_offsets = { 0x13000 },
  347. .prio = 0,
  348. .urg_fwd = 1,
  349. };
  350. static struct qcom_icc_node qxm_npu_dsp = {
  351. .name = "qxm_npu_dsp",
  352. .channels = 1,
  353. .buswidth = 8,
  354. .qosbox = &qxm_npu_dsp_qos,
  355. .num_links = 1,
  356. .link_nodes = { &qns_cdsp_gemnoc },
  357. };
  358. static struct qcom_icc_node qnm_snoc = {
  359. .name = "qnm_snoc",
  360. .channels = 1,
  361. .buswidth = 8,
  362. .num_links = 42,
  363. .link_nodes = { &qhs_camera_cfg,
  364. &qhs_sdc2,
  365. &qhs_mnoc_cfg,
  366. &qhs_ufs_mem_cfg,
  367. &qhs_qm_cfg,
  368. &qhs_snoc_cfg,
  369. &qhs_qm_mpu_cfg,
  370. &qhs_glm,
  371. &qhs_pdm,
  372. &qhs_camera_nrt_thrott_cfg,
  373. &qhs_a2_noc_cfg,
  374. &qhs_qdss_cfg,
  375. &qhs_vsense_ctrl_cfg,
  376. &qhs_camera_rt_throttle_cfg,
  377. &qhs_display_cfg,
  378. &qhs_tcsr,
  379. &qhs_dcc_cfg,
  380. &qhs_ddrss_cfg,
  381. &qhs_display_throttle_cfg,
  382. &qhs_npu_cfg,
  383. &qhs_ahb2phy0,
  384. &qhs_gpuss_cfg,
  385. &qhs_boot_rom,
  386. &qhs_venus_cfg,
  387. &qhs_ipa,
  388. &qhs_security,
  389. &qhs_imem_cfg,
  390. &qhs_mss_cfg,
  391. &srvc_cnoc,
  392. &qhs_usb3_0,
  393. &qhs_venus_throttle_cfg,
  394. &qhs_cpr_cx,
  395. &qhs_a1_noc_cfg,
  396. &qhs_aoss,
  397. &qhs_prng,
  398. &qhs_emmc_cfg,
  399. &qhs_crypto0_cfg,
  400. &qhs_pimem_cfg,
  401. &qhs_cpr_mx,
  402. &qhs_qup0,
  403. &qhs_qup1,
  404. &qhs_clk_ctl },
  405. };
  406. static struct qcom_icc_node xm_qdss_dap = {
  407. .name = "xm_qdss_dap",
  408. .channels = 1,
  409. .buswidth = 8,
  410. .num_links = 42,
  411. .link_nodes = { &qhs_camera_cfg,
  412. &qhs_sdc2,
  413. &qhs_mnoc_cfg,
  414. &qhs_ufs_mem_cfg,
  415. &qhs_qm_cfg,
  416. &qhs_snoc_cfg,
  417. &qhs_qm_mpu_cfg,
  418. &qhs_glm,
  419. &qhs_pdm,
  420. &qhs_camera_nrt_thrott_cfg,
  421. &qhs_a2_noc_cfg,
  422. &qhs_qdss_cfg,
  423. &qhs_vsense_ctrl_cfg,
  424. &qhs_camera_rt_throttle_cfg,
  425. &qhs_display_cfg,
  426. &qhs_tcsr,
  427. &qhs_dcc_cfg,
  428. &qhs_ddrss_cfg,
  429. &qhs_display_throttle_cfg,
  430. &qhs_npu_cfg,
  431. &qhs_ahb2phy0,
  432. &qhs_gpuss_cfg,
  433. &qhs_boot_rom,
  434. &qhs_venus_cfg,
  435. &qhs_ipa,
  436. &qhs_security,
  437. &qhs_imem_cfg,
  438. &qhs_mss_cfg,
  439. &srvc_cnoc,
  440. &qhs_usb3_0,
  441. &qhs_venus_throttle_cfg,
  442. &qhs_cpr_cx,
  443. &qhs_a1_noc_cfg,
  444. &qhs_aoss,
  445. &qhs_prng,
  446. &qhs_emmc_cfg,
  447. &qhs_crypto0_cfg,
  448. &qhs_pimem_cfg,
  449. &qhs_cpr_mx,
  450. &qhs_qup0,
  451. &qhs_qup1,
  452. &qhs_clk_ctl },
  453. };
  454. static struct qcom_icc_node qhm_cnoc_dc_noc = {
  455. .name = "qhm_cnoc_dc_noc",
  456. .channels = 1,
  457. .buswidth = 4,
  458. .num_links = 2,
  459. .link_nodes = { &qhs_llcc,
  460. &qhs_gemnoc },
  461. };
  462. static struct qcom_icc_qosbox acm_apps_qos = {
  463. .num_ports = 2,
  464. .port_offsets = { 0x2f100, 0x2f000 },
  465. .prio = 0,
  466. .urg_fwd = 0,
  467. };
  468. static struct qcom_icc_node acm_apps = {
  469. .name = "acm_apps",
  470. .channels = 1,
  471. .buswidth = 16,
  472. .qosbox = &acm_apps_qos,
  473. .num_links = 2,
  474. .link_nodes = { &qns_llcc,
  475. &qns_gem_noc_snoc },
  476. };
  477. static struct qcom_icc_qosbox acm_sys_tcu_qos = {
  478. .num_ports = 1,
  479. .port_offsets = { 0x35000 },
  480. .prio = 6,
  481. .urg_fwd = 0,
  482. };
  483. static struct qcom_icc_node acm_sys_tcu = {
  484. .name = "acm_sys_tcu",
  485. .channels = 1,
  486. .buswidth = 8,
  487. .qosbox = &acm_sys_tcu_qos,
  488. .num_links = 2,
  489. .link_nodes = { &qns_llcc,
  490. &qns_gem_noc_snoc },
  491. };
  492. static struct qcom_icc_node qhm_gemnoc_cfg = {
  493. .name = "qhm_gemnoc_cfg",
  494. .channels = 1,
  495. .buswidth = 4,
  496. .num_links = 3,
  497. .link_nodes = { &qhs_mcdma_ms_mpu_cfg,
  498. &srvc_gemnoc,
  499. &qhs_mdsp_ms_mpu_cfg },
  500. };
  501. static struct qcom_icc_qosbox qnm_cmpnoc_qos = {
  502. .num_ports = 1,
  503. .port_offsets = { 0x2e000 },
  504. .prio = 0,
  505. .urg_fwd = 1,
  506. };
  507. static struct qcom_icc_node qnm_cmpnoc = {
  508. .name = "qnm_cmpnoc",
  509. .channels = 1,
  510. .buswidth = 32,
  511. .qosbox = &qnm_cmpnoc_qos,
  512. .num_links = 2,
  513. .link_nodes = { &qns_llcc,
  514. &qns_gem_noc_snoc },
  515. };
  516. static struct qcom_icc_qosbox qnm_mnoc_hf_qos = {
  517. .num_ports = 1,
  518. .port_offsets = { 0x30000 },
  519. .prio = 0,
  520. .urg_fwd = 1,
  521. };
  522. static struct qcom_icc_node qnm_mnoc_hf = {
  523. .name = "qnm_mnoc_hf",
  524. .channels = 1,
  525. .buswidth = 32,
  526. .qosbox = &qnm_mnoc_hf_qos,
  527. .num_links = 2,
  528. .link_nodes = { &qns_llcc,
  529. &qns_gem_noc_snoc },
  530. };
  531. static struct qcom_icc_qosbox qnm_mnoc_sf_qos = {
  532. .num_ports = 1,
  533. .port_offsets = { 0x34000 },
  534. .prio = 0,
  535. .urg_fwd = 1,
  536. };
  537. static struct qcom_icc_node qnm_mnoc_sf = {
  538. .name = "qnm_mnoc_sf",
  539. .channels = 1,
  540. .buswidth = 32,
  541. .qosbox = &qnm_mnoc_sf_qos,
  542. .num_links = 2,
  543. .link_nodes = { &qns_llcc,
  544. &qns_gem_noc_snoc },
  545. };
  546. static struct qcom_icc_qosbox qnm_snoc_gc_qos = {
  547. .num_ports = 1,
  548. .port_offsets = { 0x32000 },
  549. .prio = 0,
  550. .urg_fwd = 1,
  551. };
  552. static struct qcom_icc_node qnm_snoc_gc = {
  553. .name = "qnm_snoc_gc",
  554. .channels = 1,
  555. .buswidth = 8,
  556. .qosbox = &qnm_snoc_gc_qos,
  557. .num_links = 1,
  558. .link_nodes = { &qns_llcc },
  559. };
  560. static struct qcom_icc_qosbox qnm_snoc_sf_qos = {
  561. .num_ports = 1,
  562. .port_offsets = { 0x31000 },
  563. .prio = 0,
  564. .urg_fwd = 1,
  565. };
  566. static struct qcom_icc_node qnm_snoc_sf = {
  567. .name = "qnm_snoc_sf",
  568. .channels = 1,
  569. .buswidth = 16,
  570. .qosbox = &qnm_snoc_sf_qos,
  571. .num_links = 1,
  572. .link_nodes = { &qns_llcc },
  573. };
  574. static struct qcom_icc_qosbox qxm_gpu_qos = {
  575. .num_ports = 2,
  576. .port_offsets = { 0x33000, 0x33080 },
  577. .prio = 0,
  578. .urg_fwd = 0,
  579. };
  580. static struct qcom_icc_node qxm_gpu = {
  581. .name = "qxm_gpu",
  582. .channels = 2,
  583. .buswidth = 32,
  584. .qosbox = &qxm_gpu_qos,
  585. .num_links = 2,
  586. .link_nodes = { &qns_llcc,
  587. &qns_gem_noc_snoc },
  588. };
  589. static struct qcom_icc_node llcc_mc = {
  590. .name = "llcc_mc",
  591. .channels = 2,
  592. .buswidth = 4,
  593. .num_links = 1,
  594. .link_nodes = { &ebi },
  595. };
  596. static struct qcom_icc_node qhm_mnoc_cfg = {
  597. .name = "qhm_mnoc_cfg",
  598. .channels = 1,
  599. .buswidth = 4,
  600. .num_links = 1,
  601. .link_nodes = { &srvc_mnoc },
  602. };
  603. static struct qcom_icc_qosbox qnm_video0_qos = {
  604. .num_ports = 1,
  605. .port_offsets = { 0xf000 },
  606. .prio = 2,
  607. .urg_fwd = 1,
  608. };
  609. static struct qcom_icc_node qnm_video0 = {
  610. .name = "qnm_video0",
  611. .channels = 1,
  612. .buswidth = 32,
  613. .qosbox = &qnm_video0_qos,
  614. .num_links = 1,
  615. .link_nodes = { &qns_mem_noc_sf },
  616. };
  617. static struct qcom_icc_qosbox qnm_video_cvp_qos = {
  618. .num_ports = 1,
  619. .port_offsets = { 0xe000 },
  620. .prio = 5,
  621. .urg_fwd = 1,
  622. };
  623. static struct qcom_icc_node qnm_video_cvp = {
  624. .name = "qnm_video_cvp",
  625. .channels = 1,
  626. .buswidth = 8,
  627. .qosbox = &qnm_video_cvp_qos,
  628. .num_links = 1,
  629. .link_nodes = { &qns_mem_noc_sf },
  630. };
  631. static struct qcom_icc_qosbox qxm_camnoc_hf_qos = {
  632. .num_ports = 2,
  633. .port_offsets = { 0xa000, 0xb000 },
  634. .prio = 3,
  635. .urg_fwd = 1,
  636. };
  637. static struct qcom_icc_node qxm_camnoc_hf = {
  638. .name = "qxm_camnoc_hf",
  639. .channels = 2,
  640. .buswidth = 32,
  641. .qosbox = &qxm_camnoc_hf_qos,
  642. .num_links = 1,
  643. .link_nodes = { &qns_mem_noc_hf },
  644. };
  645. static struct qcom_icc_qosbox qxm_camnoc_icp_qos = {
  646. .num_ports = 1,
  647. .port_offsets = { 0xd000 },
  648. .prio = 5,
  649. .urg_fwd = 0,
  650. };
  651. static struct qcom_icc_node qxm_camnoc_icp = {
  652. .name = "qxm_camnoc_icp",
  653. .channels = 1,
  654. .buswidth = 8,
  655. .qosbox = &qxm_camnoc_icp_qos,
  656. .num_links = 1,
  657. .link_nodes = { &qns_mem_noc_sf },
  658. };
  659. static struct qcom_icc_qosbox qxm_camnoc_sf_qos = {
  660. .num_ports = 1,
  661. .port_offsets = { 0x9000 },
  662. .prio = 3,
  663. .urg_fwd = 1,
  664. };
  665. static struct qcom_icc_node qxm_camnoc_sf = {
  666. .name = "qxm_camnoc_sf",
  667. .channels = 1,
  668. .buswidth = 32,
  669. .qosbox = &qxm_camnoc_sf_qos,
  670. .num_links = 1,
  671. .link_nodes = { &qns_mem_noc_sf },
  672. };
  673. static struct qcom_icc_qosbox qxm_mdp0_qos = {
  674. .num_ports = 1,
  675. .port_offsets = { 0xc000 },
  676. .prio = 3,
  677. .urg_fwd = 1,
  678. };
  679. static struct qcom_icc_node qxm_mdp0 = {
  680. .name = "qxm_mdp0",
  681. .channels = 1,
  682. .buswidth = 32,
  683. .qosbox = &qxm_mdp0_qos,
  684. .num_links = 1,
  685. .link_nodes = { &qns_mem_noc_hf },
  686. };
  687. static struct qcom_icc_node amm_npu_sys = {
  688. .name = "amm_npu_sys",
  689. .channels = 2,
  690. .buswidth = 32,
  691. .num_links = 1,
  692. .link_nodes = { &qns_npu_sys },
  693. };
  694. static struct qcom_icc_node qhm_npu_cfg = {
  695. .name = "qhm_npu_cfg",
  696. .channels = 1,
  697. .buswidth = 4,
  698. .num_links = 8,
  699. .link_nodes = { &srvc_noc,
  700. &qhs_isense,
  701. &qhs_llm,
  702. &qhs_dma_bwmon,
  703. &qhs_cp,
  704. &qhs_tcm,
  705. &qhs_cal_dp0,
  706. &qhs_dpm },
  707. };
  708. static struct qcom_icc_node qhm_snoc_cfg = {
  709. .name = "qhm_snoc_cfg",
  710. .channels = 1,
  711. .buswidth = 4,
  712. .num_links = 1,
  713. .link_nodes = { &srvc_snoc },
  714. };
  715. static struct qcom_icc_node qnm_aggre1_noc = {
  716. .name = "qnm_aggre1_noc",
  717. .channels = 1,
  718. .buswidth = 16,
  719. .num_links = 6,
  720. .link_nodes = { &qns_gemnoc_sf,
  721. &qxs_pimem,
  722. &qxs_imem,
  723. &qhs_apss,
  724. &qns_cnoc,
  725. &xs_qdss_stm },
  726. };
  727. static struct qcom_icc_node qnm_aggre2_noc = {
  728. .name = "qnm_aggre2_noc",
  729. .channels = 1,
  730. .buswidth = 16,
  731. .num_links = 7,
  732. .link_nodes = { &qns_gemnoc_sf,
  733. &qxs_pimem,
  734. &qxs_imem,
  735. &qhs_apss,
  736. &qns_cnoc,
  737. &xs_sys_tcu_cfg,
  738. &xs_qdss_stm },
  739. };
  740. static struct qcom_icc_node qnm_gemnoc = {
  741. .name = "qnm_gemnoc",
  742. .channels = 1,
  743. .buswidth = 8,
  744. .num_links = 6,
  745. .link_nodes = { &qxs_pimem,
  746. &qxs_imem,
  747. &qhs_apss,
  748. &qns_cnoc,
  749. &xs_sys_tcu_cfg,
  750. &xs_qdss_stm },
  751. };
  752. static struct qcom_icc_qosbox qxm_pimem_qos = {
  753. .num_ports = 1,
  754. .port_offsets = { 0xd000 },
  755. .prio = 2,
  756. .urg_fwd = 0,
  757. };
  758. static struct qcom_icc_node qxm_pimem = {
  759. .name = "qxm_pimem",
  760. .channels = 1,
  761. .buswidth = 8,
  762. .qosbox = &qxm_pimem_qos,
  763. .num_links = 2,
  764. .link_nodes = { &qns_gemnoc_gc,
  765. &qxs_imem },
  766. };
  767. static struct qcom_icc_qosbox xm_gic_qos = {
  768. .num_ports = 1,
  769. .port_offsets = { 0xb000 },
  770. .prio = 3,
  771. .urg_fwd = 0,
  772. };
  773. static struct qcom_icc_node xm_gic = {
  774. .name = "xm_gic",
  775. .channels = 1,
  776. .buswidth = 8,
  777. .qosbox = &xm_gic_qos,
  778. .num_links = 1,
  779. .link_nodes = { &qns_gemnoc_gc },
  780. };
  781. static struct qcom_icc_node qns_a1noc_snoc = {
  782. .name = "qns_a1noc_snoc",
  783. .channels = 1,
  784. .buswidth = 16,
  785. .num_links = 1,
  786. .link_nodes = { &qnm_aggre1_noc },
  787. };
  788. static struct qcom_icc_node srvc_aggre1_noc = {
  789. .name = "srvc_aggre1_noc",
  790. .channels = 1,
  791. .buswidth = 4,
  792. };
  793. static struct qcom_icc_node qns_a2noc_snoc = {
  794. .name = "qns_a2noc_snoc",
  795. .channels = 1,
  796. .buswidth = 16,
  797. .num_links = 1,
  798. .link_nodes = { &qnm_aggre2_noc },
  799. };
  800. static struct qcom_icc_node srvc_aggre2_noc = {
  801. .name = "srvc_aggre2_noc",
  802. .channels = 1,
  803. .buswidth = 4,
  804. };
  805. static struct qcom_icc_node qns_camnoc_uncomp = {
  806. .name = "qns_camnoc_uncomp",
  807. .channels = 1,
  808. .buswidth = 32,
  809. };
  810. static struct qcom_icc_node qup0_core_slave = {
  811. .name = "qup0_core_slave",
  812. .channels = 1,
  813. .buswidth = 4,
  814. };
  815. static struct qcom_icc_node qup1_core_slave = {
  816. .name = "qup1_core_slave",
  817. .channels = 1,
  818. .buswidth = 4,
  819. };
  820. static struct qcom_icc_node qns_cdsp_gemnoc = {
  821. .name = "qns_cdsp_gemnoc",
  822. .channels = 1,
  823. .buswidth = 32,
  824. .num_links = 1,
  825. .link_nodes = { &qnm_cmpnoc },
  826. };
  827. static struct qcom_icc_node qhs_a1_noc_cfg = {
  828. .name = "qhs_a1_noc_cfg",
  829. .channels = 1,
  830. .buswidth = 4,
  831. .num_links = 1,
  832. .link_nodes = { &qhm_a1noc_cfg },
  833. };
  834. static struct qcom_icc_node qhs_a2_noc_cfg = {
  835. .name = "qhs_a2_noc_cfg",
  836. .channels = 1,
  837. .buswidth = 4,
  838. .num_links = 1,
  839. .link_nodes = { &qhm_a2noc_cfg },
  840. };
  841. static struct qcom_icc_node qhs_ahb2phy0 = {
  842. .name = "qhs_ahb2phy0",
  843. .channels = 1,
  844. .buswidth = 4,
  845. };
  846. static struct qcom_icc_node qhs_ahb2phy2 = {
  847. .name = "qhs_ahb2phy2",
  848. .channels = 1,
  849. .buswidth = 4,
  850. };
  851. static struct qcom_icc_node qhs_aoss = {
  852. .name = "qhs_aoss",
  853. .channels = 1,
  854. .buswidth = 4,
  855. };
  856. static struct qcom_icc_node qhs_boot_rom = {
  857. .name = "qhs_boot_rom",
  858. .channels = 1,
  859. .buswidth = 4,
  860. };
  861. static struct qcom_icc_node qhs_camera_cfg = {
  862. .name = "qhs_camera_cfg",
  863. .channels = 1,
  864. .buswidth = 4,
  865. };
  866. static struct qcom_icc_node qhs_camera_nrt_thrott_cfg = {
  867. .name = "qhs_camera_nrt_thrott_cfg",
  868. .channels = 1,
  869. .buswidth = 4,
  870. };
  871. static struct qcom_icc_node qhs_camera_rt_throttle_cfg = {
  872. .name = "qhs_camera_rt_throttle_cfg",
  873. .channels = 1,
  874. .buswidth = 4,
  875. };
  876. static struct qcom_icc_node qhs_clk_ctl = {
  877. .name = "qhs_clk_ctl",
  878. .channels = 1,
  879. .buswidth = 4,
  880. };
  881. static struct qcom_icc_node qhs_cpr_cx = {
  882. .name = "qhs_cpr_cx",
  883. .channels = 1,
  884. .buswidth = 4,
  885. };
  886. static struct qcom_icc_node qhs_cpr_mx = {
  887. .name = "qhs_cpr_mx",
  888. .channels = 1,
  889. .buswidth = 4,
  890. };
  891. static struct qcom_icc_node qhs_crypto0_cfg = {
  892. .name = "qhs_crypto0_cfg",
  893. .channels = 1,
  894. .buswidth = 4,
  895. };
  896. static struct qcom_icc_node qhs_dcc_cfg = {
  897. .name = "qhs_dcc_cfg",
  898. .channels = 1,
  899. .buswidth = 4,
  900. };
  901. static struct qcom_icc_node qhs_ddrss_cfg = {
  902. .name = "qhs_ddrss_cfg",
  903. .channels = 1,
  904. .buswidth = 4,
  905. .num_links = 1,
  906. .link_nodes = { &qhm_cnoc_dc_noc },
  907. };
  908. static struct qcom_icc_node qhs_display_cfg = {
  909. .name = "qhs_display_cfg",
  910. .channels = 1,
  911. .buswidth = 4,
  912. };
  913. static struct qcom_icc_node qhs_display_throttle_cfg = {
  914. .name = "qhs_display_throttle_cfg",
  915. .channels = 1,
  916. .buswidth = 4,
  917. };
  918. static struct qcom_icc_node qhs_emmc_cfg = {
  919. .name = "qhs_emmc_cfg",
  920. .channels = 1,
  921. .buswidth = 4,
  922. };
  923. static struct qcom_icc_node qhs_glm = {
  924. .name = "qhs_glm",
  925. .channels = 1,
  926. .buswidth = 4,
  927. };
  928. static struct qcom_icc_node qhs_gpuss_cfg = {
  929. .name = "qhs_gpuss_cfg",
  930. .channels = 1,
  931. .buswidth = 8,
  932. };
  933. static struct qcom_icc_node qhs_imem_cfg = {
  934. .name = "qhs_imem_cfg",
  935. .channels = 1,
  936. .buswidth = 4,
  937. };
  938. static struct qcom_icc_node qhs_ipa = {
  939. .name = "qhs_ipa",
  940. .channels = 1,
  941. .buswidth = 4,
  942. };
  943. static struct qcom_icc_node qhs_mnoc_cfg = {
  944. .name = "qhs_mnoc_cfg",
  945. .channels = 1,
  946. .buswidth = 4,
  947. .num_links = 1,
  948. .link_nodes = { &qhm_mnoc_cfg },
  949. };
  950. static struct qcom_icc_node qhs_mss_cfg = {
  951. .name = "qhs_mss_cfg",
  952. .channels = 1,
  953. .buswidth = 4,
  954. };
  955. static struct qcom_icc_node qhs_npu_cfg = {
  956. .name = "qhs_npu_cfg",
  957. .channels = 1,
  958. .buswidth = 4,
  959. .num_links = 1,
  960. .link_nodes = { &qhm_npu_cfg },
  961. };
  962. static struct qcom_icc_node qhs_pdm = {
  963. .name = "qhs_pdm",
  964. .channels = 1,
  965. .buswidth = 4,
  966. };
  967. static struct qcom_icc_node qhs_pimem_cfg = {
  968. .name = "qhs_pimem_cfg",
  969. .channels = 1,
  970. .buswidth = 4,
  971. };
  972. static struct qcom_icc_node qhs_prng = {
  973. .name = "qhs_prng",
  974. .channels = 1,
  975. .buswidth = 4,
  976. };
  977. static struct qcom_icc_node qhs_qdss_cfg = {
  978. .name = "qhs_qdss_cfg",
  979. .channels = 1,
  980. .buswidth = 4,
  981. };
  982. static struct qcom_icc_node qhs_qm_cfg = {
  983. .name = "qhs_qm_cfg",
  984. .channels = 1,
  985. .buswidth = 4,
  986. };
  987. static struct qcom_icc_node qhs_qm_mpu_cfg = {
  988. .name = "qhs_qm_mpu_cfg",
  989. .channels = 1,
  990. .buswidth = 4,
  991. };
  992. static struct qcom_icc_node qhs_qup0 = {
  993. .name = "qhs_qup0",
  994. .channels = 1,
  995. .buswidth = 4,
  996. };
  997. static struct qcom_icc_node qhs_qup1 = {
  998. .name = "qhs_qup1",
  999. .channels = 1,
  1000. .buswidth = 4,
  1001. };
  1002. static struct qcom_icc_node qhs_sdc2 = {
  1003. .name = "qhs_sdc2",
  1004. .channels = 1,
  1005. .buswidth = 4,
  1006. };
  1007. static struct qcom_icc_node qhs_security = {
  1008. .name = "qhs_security",
  1009. .channels = 1,
  1010. .buswidth = 4,
  1011. };
  1012. static struct qcom_icc_node qhs_snoc_cfg = {
  1013. .name = "qhs_snoc_cfg",
  1014. .channels = 1,
  1015. .buswidth = 4,
  1016. .num_links = 1,
  1017. .link_nodes = { &qhm_snoc_cfg },
  1018. };
  1019. static struct qcom_icc_node qhs_tcsr = {
  1020. .name = "qhs_tcsr",
  1021. .channels = 1,
  1022. .buswidth = 4,
  1023. };
  1024. static struct qcom_icc_node qhs_ufs_mem_cfg = {
  1025. .name = "qhs_ufs_mem_cfg",
  1026. .channels = 1,
  1027. .buswidth = 4,
  1028. };
  1029. static struct qcom_icc_node qhs_usb3_0 = {
  1030. .name = "qhs_usb3_0",
  1031. .channels = 1,
  1032. .buswidth = 4,
  1033. };
  1034. static struct qcom_icc_node qhs_venus_cfg = {
  1035. .name = "qhs_venus_cfg",
  1036. .channels = 1,
  1037. .buswidth = 4,
  1038. };
  1039. static struct qcom_icc_node qhs_venus_throttle_cfg = {
  1040. .name = "qhs_venus_throttle_cfg",
  1041. .channels = 1,
  1042. .buswidth = 4,
  1043. };
  1044. static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
  1045. .name = "qhs_vsense_ctrl_cfg",
  1046. .channels = 1,
  1047. .buswidth = 4,
  1048. };
  1049. static struct qcom_icc_node srvc_cnoc = {
  1050. .name = "srvc_cnoc",
  1051. .channels = 1,
  1052. .buswidth = 4,
  1053. };
  1054. static struct qcom_icc_node qhs_gemnoc = {
  1055. .name = "qhs_gemnoc",
  1056. .channels = 1,
  1057. .buswidth = 4,
  1058. .num_links = 1,
  1059. .link_nodes = { &qhm_gemnoc_cfg },
  1060. };
  1061. static struct qcom_icc_node qhs_llcc = {
  1062. .name = "qhs_llcc",
  1063. .channels = 1,
  1064. .buswidth = 4,
  1065. };
  1066. static struct qcom_icc_node qhs_mcdma_ms_mpu_cfg = {
  1067. .name = "qhs_mcdma_ms_mpu_cfg",
  1068. .channels = 1,
  1069. .buswidth = 4,
  1070. };
  1071. static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg = {
  1072. .name = "qhs_mdsp_ms_mpu_cfg",
  1073. .channels = 1,
  1074. .buswidth = 4,
  1075. };
  1076. static struct qcom_icc_node qns_gem_noc_snoc = {
  1077. .name = "qns_gem_noc_snoc",
  1078. .channels = 1,
  1079. .buswidth = 8,
  1080. .num_links = 1,
  1081. .link_nodes = { &qnm_gemnoc },
  1082. };
  1083. static struct qcom_icc_node qns_llcc = {
  1084. .name = "qns_llcc",
  1085. .channels = 1,
  1086. .buswidth = 16,
  1087. .num_links = 1,
  1088. .link_nodes = { &llcc_mc },
  1089. };
  1090. static struct qcom_icc_node srvc_gemnoc = {
  1091. .name = "srvc_gemnoc",
  1092. .channels = 1,
  1093. .buswidth = 4,
  1094. };
  1095. static struct qcom_icc_node ebi = {
  1096. .name = "ebi",
  1097. .channels = 2,
  1098. .buswidth = 4,
  1099. };
  1100. static struct qcom_icc_node qns_mem_noc_hf = {
  1101. .name = "qns_mem_noc_hf",
  1102. .channels = 1,
  1103. .buswidth = 32,
  1104. .num_links = 1,
  1105. .link_nodes = { &qnm_mnoc_hf },
  1106. };
  1107. static struct qcom_icc_node qns_mem_noc_sf = {
  1108. .name = "qns_mem_noc_sf",
  1109. .channels = 1,
  1110. .buswidth = 32,
  1111. .num_links = 1,
  1112. .link_nodes = { &qnm_mnoc_sf },
  1113. };
  1114. static struct qcom_icc_node srvc_mnoc = {
  1115. .name = "srvc_mnoc",
  1116. .channels = 1,
  1117. .buswidth = 4,
  1118. };
  1119. static struct qcom_icc_node qhs_cal_dp0 = {
  1120. .name = "qhs_cal_dp0",
  1121. .channels = 1,
  1122. .buswidth = 4,
  1123. };
  1124. static struct qcom_icc_node qhs_cp = {
  1125. .name = "qhs_cp",
  1126. .channels = 1,
  1127. .buswidth = 4,
  1128. };
  1129. static struct qcom_icc_node qhs_dma_bwmon = {
  1130. .name = "qhs_dma_bwmon",
  1131. .channels = 1,
  1132. .buswidth = 4,
  1133. };
  1134. static struct qcom_icc_node qhs_dpm = {
  1135. .name = "qhs_dpm",
  1136. .channels = 1,
  1137. .buswidth = 4,
  1138. };
  1139. static struct qcom_icc_node qhs_isense = {
  1140. .name = "qhs_isense",
  1141. .channels = 1,
  1142. .buswidth = 4,
  1143. };
  1144. static struct qcom_icc_node qhs_llm = {
  1145. .name = "qhs_llm",
  1146. .channels = 1,
  1147. .buswidth = 4,
  1148. };
  1149. static struct qcom_icc_node qhs_tcm = {
  1150. .name = "qhs_tcm",
  1151. .channels = 1,
  1152. .buswidth = 4,
  1153. };
  1154. static struct qcom_icc_node qns_npu_sys = {
  1155. .name = "qns_npu_sys",
  1156. .channels = 2,
  1157. .buswidth = 32,
  1158. };
  1159. static struct qcom_icc_node srvc_noc = {
  1160. .name = "srvc_noc",
  1161. .channels = 1,
  1162. .buswidth = 4,
  1163. };
  1164. static struct qcom_icc_node qhs_apss = {
  1165. .name = "qhs_apss",
  1166. .channels = 1,
  1167. .buswidth = 8,
  1168. };
  1169. static struct qcom_icc_node qns_cnoc = {
  1170. .name = "qns_cnoc",
  1171. .channels = 1,
  1172. .buswidth = 8,
  1173. .num_links = 1,
  1174. .link_nodes = { &qnm_snoc },
  1175. };
  1176. static struct qcom_icc_node qns_gemnoc_gc = {
  1177. .name = "qns_gemnoc_gc",
  1178. .channels = 1,
  1179. .buswidth = 8,
  1180. .num_links = 1,
  1181. .link_nodes = { &qnm_snoc_gc },
  1182. };
  1183. static struct qcom_icc_node qns_gemnoc_sf = {
  1184. .name = "qns_gemnoc_sf",
  1185. .channels = 1,
  1186. .buswidth = 16,
  1187. .num_links = 1,
  1188. .link_nodes = { &qnm_snoc_sf },
  1189. };
  1190. static struct qcom_icc_node qxs_imem = {
  1191. .name = "qxs_imem",
  1192. .channels = 1,
  1193. .buswidth = 8,
  1194. };
  1195. static struct qcom_icc_node qxs_pimem = {
  1196. .name = "qxs_pimem",
  1197. .channels = 1,
  1198. .buswidth = 8,
  1199. };
  1200. static struct qcom_icc_node srvc_snoc = {
  1201. .name = "srvc_snoc",
  1202. .channels = 1,
  1203. .buswidth = 4,
  1204. };
  1205. static struct qcom_icc_node xs_qdss_stm = {
  1206. .name = "xs_qdss_stm",
  1207. .channels = 1,
  1208. .buswidth = 4,
  1209. };
  1210. static struct qcom_icc_node xs_sys_tcu_cfg = {
  1211. .name = "xs_sys_tcu_cfg",
  1212. .channels = 1,
  1213. .buswidth = 8,
  1214. };
  1215. static struct qcom_icc_bcm bcm_acv = {
  1216. .name = "ACV",
  1217. .enable_mask = BIT(3),
  1218. .keepalive = false,
  1219. .num_nodes = 1,
  1220. .nodes = { &ebi },
  1221. };
  1222. static struct qcom_icc_bcm bcm_ce0 = {
  1223. .name = "CE0",
  1224. .keepalive = false,
  1225. .num_nodes = 1,
  1226. .nodes = { &qxm_crypto },
  1227. };
  1228. static struct qcom_icc_bcm bcm_cn0 = {
  1229. .name = "CN0",
  1230. .keepalive = true,
  1231. .num_nodes = 41,
  1232. .nodes = { &qnm_snoc,
  1233. &xm_qdss_dap,
  1234. &qhs_a1_noc_cfg,
  1235. &qhs_a2_noc_cfg,
  1236. &qhs_ahb2phy0,
  1237. &qhs_aoss,
  1238. &qhs_boot_rom,
  1239. &qhs_camera_cfg,
  1240. &qhs_camera_nrt_thrott_cfg,
  1241. &qhs_camera_rt_throttle_cfg,
  1242. &qhs_clk_ctl,
  1243. &qhs_cpr_cx,
  1244. &qhs_cpr_mx,
  1245. &qhs_crypto0_cfg,
  1246. &qhs_dcc_cfg,
  1247. &qhs_ddrss_cfg,
  1248. &qhs_display_cfg,
  1249. &qhs_display_throttle_cfg,
  1250. &qhs_glm,
  1251. &qhs_gpuss_cfg,
  1252. &qhs_imem_cfg,
  1253. &qhs_ipa,
  1254. &qhs_mnoc_cfg,
  1255. &qhs_mss_cfg,
  1256. &qhs_npu_cfg,
  1257. &qhs_pimem_cfg,
  1258. &qhs_prng,
  1259. &qhs_qdss_cfg,
  1260. &qhs_qm_cfg,
  1261. &qhs_qm_mpu_cfg,
  1262. &qhs_qup0,
  1263. &qhs_qup1,
  1264. &qhs_security,
  1265. &qhs_snoc_cfg,
  1266. &qhs_tcsr,
  1267. &qhs_ufs_mem_cfg,
  1268. &qhs_usb3_0,
  1269. &qhs_venus_cfg,
  1270. &qhs_venus_throttle_cfg,
  1271. &qhs_vsense_ctrl_cfg,
  1272. &srvc_cnoc
  1273. },
  1274. };
  1275. static struct qcom_icc_bcm bcm_cn1 = {
  1276. .name = "CN1",
  1277. .keepalive = false,
  1278. .num_nodes = 6,
  1279. .nodes = { &xm_emmc,
  1280. &xm_sdc2,
  1281. &qhs_ahb2phy2,
  1282. &qhs_emmc_cfg,
  1283. &qhs_pdm,
  1284. &qhs_sdc2
  1285. },
  1286. };
  1287. static struct qcom_icc_bcm bcm_co0 = {
  1288. .name = "CO0",
  1289. .keepalive = false,
  1290. .num_nodes = 1,
  1291. .nodes = { &qns_cdsp_gemnoc },
  1292. };
  1293. static struct qcom_icc_bcm bcm_co2 = {
  1294. .name = "CO2",
  1295. .keepalive = false,
  1296. .num_nodes = 1,
  1297. .nodes = { &qnm_npu },
  1298. };
  1299. static struct qcom_icc_bcm bcm_co3 = {
  1300. .name = "CO3",
  1301. .keepalive = false,
  1302. .num_nodes = 1,
  1303. .nodes = { &qxm_npu_dsp },
  1304. };
  1305. static struct qcom_icc_bcm bcm_mc0 = {
  1306. .name = "MC0",
  1307. .keepalive = true,
  1308. .num_nodes = 1,
  1309. .nodes = { &ebi },
  1310. };
  1311. static struct qcom_icc_bcm bcm_mm0 = {
  1312. .name = "MM0",
  1313. .keepalive = true,
  1314. .num_nodes = 1,
  1315. .nodes = { &qns_mem_noc_hf },
  1316. };
  1317. static struct qcom_icc_bcm bcm_mm1 = {
  1318. .name = "MM1",
  1319. .keepalive = true,
  1320. .num_nodes = 5,
  1321. .nodes = { &qxm_camnoc_hf0_uncomp,
  1322. &qxm_camnoc_icp_uncomp,
  1323. &qxm_camnoc_sf_uncomp,
  1324. &qxm_camnoc_hf,
  1325. &qxm_mdp0
  1326. },
  1327. };
  1328. static struct qcom_icc_bcm bcm_mm2 = {
  1329. .name = "MM2",
  1330. .keepalive = false,
  1331. .num_nodes = 1,
  1332. .nodes = { &qns_mem_noc_sf },
  1333. };
  1334. static struct qcom_icc_bcm bcm_mm3 = {
  1335. .name = "MM3",
  1336. .keepalive = false,
  1337. .num_nodes = 4,
  1338. .nodes = { &qhm_mnoc_cfg, &qnm_video0, &qnm_video_cvp, &qxm_camnoc_sf },
  1339. };
  1340. static struct qcom_icc_bcm bcm_qup0 = {
  1341. .name = "QUP0",
  1342. .keepalive = false,
  1343. .num_nodes = 4,
  1344. .nodes = { &qup0_core_master, &qup1_core_master, &qup0_core_slave, &qup1_core_slave },
  1345. };
  1346. static struct qcom_icc_bcm bcm_sh0 = {
  1347. .name = "SH0",
  1348. .keepalive = true,
  1349. .num_nodes = 1,
  1350. .nodes = { &qns_llcc },
  1351. };
  1352. static struct qcom_icc_bcm bcm_sh2 = {
  1353. .name = "SH2",
  1354. .keepalive = false,
  1355. .num_nodes = 1,
  1356. .nodes = { &acm_sys_tcu },
  1357. };
  1358. static struct qcom_icc_bcm bcm_sh3 = {
  1359. .name = "SH3",
  1360. .keepalive = false,
  1361. .num_nodes = 1,
  1362. .nodes = { &qnm_cmpnoc },
  1363. };
  1364. static struct qcom_icc_bcm bcm_sh4 = {
  1365. .name = "SH4",
  1366. .keepalive = false,
  1367. .num_nodes = 1,
  1368. .nodes = { &acm_apps },
  1369. };
  1370. static struct qcom_icc_bcm bcm_sn0 = {
  1371. .name = "SN0",
  1372. .keepalive = true,
  1373. .num_nodes = 1,
  1374. .nodes = { &qns_gemnoc_sf },
  1375. };
  1376. static struct qcom_icc_bcm bcm_sn1 = {
  1377. .name = "SN1",
  1378. .keepalive = false,
  1379. .num_nodes = 1,
  1380. .nodes = { &qxs_imem },
  1381. };
  1382. static struct qcom_icc_bcm bcm_sn2 = {
  1383. .name = "SN2",
  1384. .keepalive = false,
  1385. .num_nodes = 1,
  1386. .nodes = { &qns_gemnoc_gc },
  1387. };
  1388. static struct qcom_icc_bcm bcm_sn3 = {
  1389. .name = "SN3",
  1390. .keepalive = false,
  1391. .num_nodes = 1,
  1392. .nodes = { &qxs_pimem },
  1393. };
  1394. static struct qcom_icc_bcm bcm_sn4 = {
  1395. .name = "SN4",
  1396. .keepalive = false,
  1397. .num_nodes = 1,
  1398. .nodes = { &xs_qdss_stm },
  1399. };
  1400. static struct qcom_icc_bcm bcm_sn5 = {
  1401. .name = "SN5",
  1402. .keepalive = false,
  1403. .num_nodes = 1,
  1404. .nodes = { &qnm_aggre1_noc },
  1405. };
  1406. static struct qcom_icc_bcm bcm_sn6 = {
  1407. .name = "SN6",
  1408. .keepalive = false,
  1409. .num_nodes = 1,
  1410. .nodes = { &qnm_aggre2_noc },
  1411. };
  1412. static struct qcom_icc_bcm bcm_sn10 = {
  1413. .name = "SN10",
  1414. .keepalive = false,
  1415. .num_nodes = 1,
  1416. .nodes = { &qnm_gemnoc },
  1417. };
  1418. static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
  1419. &bcm_cn1,
  1420. };
  1421. static struct qcom_icc_node * const aggre1_noc_nodes[] = {
  1422. [MASTER_A1NOC_CFG] = &qhm_a1noc_cfg,
  1423. [MASTER_QUP_0] = &qhm_qup_0,
  1424. [MASTER_EMMC] = &xm_emmc,
  1425. [MASTER_UFS_MEM] = &xm_ufs_mem,
  1426. [A1NOC_SNOC_SLV] = &qns_a1noc_snoc,
  1427. [SLAVE_SERVICE_A1NOC] = &srvc_aggre1_noc,
  1428. };
  1429. static const struct regmap_config sm6350_aggre1_noc_regmap_config = {
  1430. .reg_bits = 32,
  1431. .reg_stride = 4,
  1432. .val_bits = 32,
  1433. .max_register = 0x15080,
  1434. .fast_io = true,
  1435. };
  1436. static const struct qcom_icc_desc sm6350_aggre1_noc = {
  1437. .config = &sm6350_aggre1_noc_regmap_config,
  1438. .nodes = aggre1_noc_nodes,
  1439. .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
  1440. .bcms = aggre1_noc_bcms,
  1441. .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
  1442. .qos_requires_clocks = true,
  1443. };
  1444. static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
  1445. &bcm_ce0,
  1446. &bcm_cn1,
  1447. };
  1448. static struct qcom_icc_node * const aggre2_noc_nodes[] = {
  1449. [MASTER_A2NOC_CFG] = &qhm_a2noc_cfg,
  1450. [MASTER_QDSS_BAM] = &qhm_qdss_bam,
  1451. [MASTER_QUP_1] = &qhm_qup_1,
  1452. [MASTER_CRYPTO_CORE_0] = &qxm_crypto,
  1453. [MASTER_IPA] = &qxm_ipa,
  1454. [MASTER_QDSS_ETR] = &xm_qdss_etr,
  1455. [MASTER_SDCC_2] = &xm_sdc2,
  1456. [MASTER_USB3] = &xm_usb3_0,
  1457. [A2NOC_SNOC_SLV] = &qns_a2noc_snoc,
  1458. [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
  1459. };
  1460. static const struct regmap_config sm6350_aggre2_noc_regmap_config = {
  1461. .reg_bits = 32,
  1462. .reg_stride = 4,
  1463. .val_bits = 32,
  1464. .max_register = 0x1f880,
  1465. .fast_io = true,
  1466. };
  1467. static const struct qcom_icc_desc sm6350_aggre2_noc = {
  1468. .config = &sm6350_aggre2_noc_regmap_config,
  1469. .nodes = aggre2_noc_nodes,
  1470. .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
  1471. .bcms = aggre2_noc_bcms,
  1472. .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
  1473. .qos_requires_clocks = true,
  1474. };
  1475. static struct qcom_icc_bcm * const clk_virt_bcms[] = {
  1476. &bcm_acv,
  1477. &bcm_mc0,
  1478. &bcm_mm1,
  1479. &bcm_qup0,
  1480. };
  1481. static struct qcom_icc_node * const clk_virt_nodes[] = {
  1482. [MASTER_CAMNOC_HF0_UNCOMP] = &qxm_camnoc_hf0_uncomp,
  1483. [MASTER_CAMNOC_ICP_UNCOMP] = &qxm_camnoc_icp_uncomp,
  1484. [MASTER_CAMNOC_SF_UNCOMP] = &qxm_camnoc_sf_uncomp,
  1485. [MASTER_QUP_CORE_0] = &qup0_core_master,
  1486. [MASTER_QUP_CORE_1] = &qup1_core_master,
  1487. [MASTER_LLCC] = &llcc_mc,
  1488. [SLAVE_CAMNOC_UNCOMP] = &qns_camnoc_uncomp,
  1489. [SLAVE_QUP_CORE_0] = &qup0_core_slave,
  1490. [SLAVE_QUP_CORE_1] = &qup1_core_slave,
  1491. [SLAVE_EBI_CH0] = &ebi,
  1492. };
  1493. static const struct qcom_icc_desc sm6350_clk_virt = {
  1494. .nodes = clk_virt_nodes,
  1495. .num_nodes = ARRAY_SIZE(clk_virt_nodes),
  1496. .bcms = clk_virt_bcms,
  1497. .num_bcms = ARRAY_SIZE(clk_virt_bcms),
  1498. };
  1499. static struct qcom_icc_bcm * const compute_noc_bcms[] = {
  1500. &bcm_co0,
  1501. &bcm_co2,
  1502. &bcm_co3,
  1503. };
  1504. static struct qcom_icc_node * const compute_noc_nodes[] = {
  1505. [MASTER_NPU] = &qnm_npu,
  1506. [MASTER_NPU_PROC] = &qxm_npu_dsp,
  1507. [SLAVE_CDSP_GEM_NOC] = &qns_cdsp_gemnoc,
  1508. };
  1509. static const struct regmap_config sm6350_compute_noc_regmap_config = {
  1510. .reg_bits = 32,
  1511. .reg_stride = 4,
  1512. .val_bits = 32,
  1513. .max_register = 0x1f880,
  1514. .fast_io = true,
  1515. };
  1516. static const struct qcom_icc_desc sm6350_compute_noc = {
  1517. .config = &sm6350_compute_noc_regmap_config,
  1518. .nodes = compute_noc_nodes,
  1519. .num_nodes = ARRAY_SIZE(compute_noc_nodes),
  1520. .bcms = compute_noc_bcms,
  1521. .num_bcms = ARRAY_SIZE(compute_noc_bcms),
  1522. };
  1523. static struct qcom_icc_bcm * const config_noc_bcms[] = {
  1524. &bcm_cn0,
  1525. &bcm_cn1,
  1526. };
  1527. static struct qcom_icc_node * const config_noc_nodes[] = {
  1528. [SNOC_CNOC_MAS] = &qnm_snoc,
  1529. [MASTER_QDSS_DAP] = &xm_qdss_dap,
  1530. [SLAVE_A1NOC_CFG] = &qhs_a1_noc_cfg,
  1531. [SLAVE_A2NOC_CFG] = &qhs_a2_noc_cfg,
  1532. [SLAVE_AHB2PHY] = &qhs_ahb2phy0,
  1533. [SLAVE_AHB2PHY_2] = &qhs_ahb2phy2,
  1534. [SLAVE_AOSS] = &qhs_aoss,
  1535. [SLAVE_BOOT_ROM] = &qhs_boot_rom,
  1536. [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
  1537. [SLAVE_CAMERA_NRT_THROTTLE_CFG] = &qhs_camera_nrt_thrott_cfg,
  1538. [SLAVE_CAMERA_RT_THROTTLE_CFG] = &qhs_camera_rt_throttle_cfg,
  1539. [SLAVE_CLK_CTL] = &qhs_clk_ctl,
  1540. [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
  1541. [SLAVE_RBCPR_MX_CFG] = &qhs_cpr_mx,
  1542. [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
  1543. [SLAVE_DCC_CFG] = &qhs_dcc_cfg,
  1544. [SLAVE_CNOC_DDRSS] = &qhs_ddrss_cfg,
  1545. [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
  1546. [SLAVE_DISPLAY_THROTTLE_CFG] = &qhs_display_throttle_cfg,
  1547. [SLAVE_EMMC_CFG] = &qhs_emmc_cfg,
  1548. [SLAVE_GLM] = &qhs_glm,
  1549. [SLAVE_GRAPHICS_3D_CFG] = &qhs_gpuss_cfg,
  1550. [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
  1551. [SLAVE_IPA_CFG] = &qhs_ipa,
  1552. [SLAVE_CNOC_MNOC_CFG] = &qhs_mnoc_cfg,
  1553. [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
  1554. [SLAVE_NPU_CFG] = &qhs_npu_cfg,
  1555. [SLAVE_PDM] = &qhs_pdm,
  1556. [SLAVE_PIMEM_CFG] = &qhs_pimem_cfg,
  1557. [SLAVE_PRNG] = &qhs_prng,
  1558. [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
  1559. [SLAVE_QM_CFG] = &qhs_qm_cfg,
  1560. [SLAVE_QM_MPU_CFG] = &qhs_qm_mpu_cfg,
  1561. [SLAVE_QUP_0] = &qhs_qup0,
  1562. [SLAVE_QUP_1] = &qhs_qup1,
  1563. [SLAVE_SDCC_2] = &qhs_sdc2,
  1564. [SLAVE_SECURITY] = &qhs_security,
  1565. [SLAVE_SNOC_CFG] = &qhs_snoc_cfg,
  1566. [SLAVE_TCSR] = &qhs_tcsr,
  1567. [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
  1568. [SLAVE_USB3] = &qhs_usb3_0,
  1569. [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
  1570. [SLAVE_VENUS_THROTTLE_CFG] = &qhs_venus_throttle_cfg,
  1571. [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
  1572. [SLAVE_SERVICE_CNOC] = &srvc_cnoc,
  1573. };
  1574. static const struct qcom_icc_desc sm6350_config_noc = {
  1575. .nodes = config_noc_nodes,
  1576. .num_nodes = ARRAY_SIZE(config_noc_nodes),
  1577. .bcms = config_noc_bcms,
  1578. .num_bcms = ARRAY_SIZE(config_noc_bcms),
  1579. };
  1580. static struct qcom_icc_node * const dc_noc_nodes[] = {
  1581. [MASTER_CNOC_DC_NOC] = &qhm_cnoc_dc_noc,
  1582. [SLAVE_GEM_NOC_CFG] = &qhs_gemnoc,
  1583. [SLAVE_LLCC_CFG] = &qhs_llcc,
  1584. };
  1585. static const struct regmap_config sm6350_dc_noc_regmap_config = {
  1586. .reg_bits = 32,
  1587. .reg_stride = 4,
  1588. .val_bits = 32,
  1589. .max_register = 0x3200,
  1590. .fast_io = true,
  1591. };
  1592. static const struct qcom_icc_desc sm6350_dc_noc = {
  1593. .config = &sm6350_dc_noc_regmap_config,
  1594. .nodes = dc_noc_nodes,
  1595. .num_nodes = ARRAY_SIZE(dc_noc_nodes),
  1596. };
  1597. static struct qcom_icc_bcm * const gem_noc_bcms[] = {
  1598. &bcm_sh0,
  1599. &bcm_sh2,
  1600. &bcm_sh3,
  1601. &bcm_sh4,
  1602. };
  1603. static struct qcom_icc_node * const gem_noc_nodes[] = {
  1604. [MASTER_AMPSS_M0] = &acm_apps,
  1605. [MASTER_SYS_TCU] = &acm_sys_tcu,
  1606. [MASTER_GEM_NOC_CFG] = &qhm_gemnoc_cfg,
  1607. [MASTER_COMPUTE_NOC] = &qnm_cmpnoc,
  1608. [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
  1609. [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
  1610. [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
  1611. [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
  1612. [MASTER_GRAPHICS_3D] = &qxm_gpu,
  1613. [SLAVE_MCDMA_MS_MPU_CFG] = &qhs_mcdma_ms_mpu_cfg,
  1614. [SLAVE_MSS_PROC_MS_MPU_CFG] = &qhs_mdsp_ms_mpu_cfg,
  1615. [SLAVE_GEM_NOC_SNOC] = &qns_gem_noc_snoc,
  1616. [SLAVE_LLCC] = &qns_llcc,
  1617. [SLAVE_SERVICE_GEM_NOC] = &srvc_gemnoc,
  1618. };
  1619. static const struct regmap_config sm6350_gem_noc_regmap_config = {
  1620. .reg_bits = 32,
  1621. .reg_stride = 4,
  1622. .val_bits = 32,
  1623. .max_register = 0x3e200,
  1624. .fast_io = true,
  1625. };
  1626. static const struct qcom_icc_desc sm6350_gem_noc = {
  1627. .config = &sm6350_gem_noc_regmap_config,
  1628. .nodes = gem_noc_nodes,
  1629. .num_nodes = ARRAY_SIZE(gem_noc_nodes),
  1630. .bcms = gem_noc_bcms,
  1631. .num_bcms = ARRAY_SIZE(gem_noc_bcms),
  1632. };
  1633. static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
  1634. &bcm_mm0,
  1635. &bcm_mm1,
  1636. &bcm_mm2,
  1637. &bcm_mm3,
  1638. };
  1639. static struct qcom_icc_node * const mmss_noc_nodes[] = {
  1640. [MASTER_CNOC_MNOC_CFG] = &qhm_mnoc_cfg,
  1641. [MASTER_VIDEO_P0] = &qnm_video0,
  1642. [MASTER_VIDEO_PROC] = &qnm_video_cvp,
  1643. [MASTER_CAMNOC_HF] = &qxm_camnoc_hf,
  1644. [MASTER_CAMNOC_ICP] = &qxm_camnoc_icp,
  1645. [MASTER_CAMNOC_SF] = &qxm_camnoc_sf,
  1646. [MASTER_MDP_PORT0] = &qxm_mdp0,
  1647. [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
  1648. [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
  1649. [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
  1650. };
  1651. static const struct regmap_config sm6350_mmss_noc_regmap_config = {
  1652. .reg_bits = 32,
  1653. .reg_stride = 4,
  1654. .val_bits = 32,
  1655. .max_register = 0x1c100,
  1656. .fast_io = true,
  1657. };
  1658. static const struct qcom_icc_desc sm6350_mmss_noc = {
  1659. .config = &sm6350_mmss_noc_regmap_config,
  1660. .nodes = mmss_noc_nodes,
  1661. .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
  1662. .bcms = mmss_noc_bcms,
  1663. .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
  1664. };
  1665. static struct qcom_icc_node * const npu_noc_nodes[] = {
  1666. [MASTER_NPU_SYS] = &amm_npu_sys,
  1667. [MASTER_NPU_NOC_CFG] = &qhm_npu_cfg,
  1668. [SLAVE_NPU_CAL_DP0] = &qhs_cal_dp0,
  1669. [SLAVE_NPU_CP] = &qhs_cp,
  1670. [SLAVE_NPU_INT_DMA_BWMON_CFG] = &qhs_dma_bwmon,
  1671. [SLAVE_NPU_DPM] = &qhs_dpm,
  1672. [SLAVE_ISENSE_CFG] = &qhs_isense,
  1673. [SLAVE_NPU_LLM_CFG] = &qhs_llm,
  1674. [SLAVE_NPU_TCM] = &qhs_tcm,
  1675. [SLAVE_NPU_COMPUTE_NOC] = &qns_npu_sys,
  1676. [SLAVE_SERVICE_NPU_NOC] = &srvc_noc,
  1677. };
  1678. static const struct qcom_icc_desc sm6350_npu_noc = {
  1679. .nodes = npu_noc_nodes,
  1680. .num_nodes = ARRAY_SIZE(npu_noc_nodes),
  1681. };
  1682. static struct qcom_icc_bcm * const system_noc_bcms[] = {
  1683. &bcm_sn0,
  1684. &bcm_sn1,
  1685. &bcm_sn10,
  1686. &bcm_sn2,
  1687. &bcm_sn3,
  1688. &bcm_sn4,
  1689. &bcm_sn5,
  1690. &bcm_sn6,
  1691. };
  1692. static struct qcom_icc_node * const system_noc_nodes[] = {
  1693. [MASTER_SNOC_CFG] = &qhm_snoc_cfg,
  1694. [A1NOC_SNOC_MAS] = &qnm_aggre1_noc,
  1695. [A2NOC_SNOC_MAS] = &qnm_aggre2_noc,
  1696. [MASTER_GEM_NOC_SNOC] = &qnm_gemnoc,
  1697. [MASTER_PIMEM] = &qxm_pimem,
  1698. [MASTER_GIC] = &xm_gic,
  1699. [SLAVE_APPSS] = &qhs_apss,
  1700. [SNOC_CNOC_SLV] = &qns_cnoc,
  1701. [SLAVE_SNOC_GEM_NOC_GC] = &qns_gemnoc_gc,
  1702. [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
  1703. [SLAVE_OCIMEM] = &qxs_imem,
  1704. [SLAVE_PIMEM] = &qxs_pimem,
  1705. [SLAVE_SERVICE_SNOC] = &srvc_snoc,
  1706. [SLAVE_QDSS_STM] = &xs_qdss_stm,
  1707. [SLAVE_TCU] = &xs_sys_tcu_cfg,
  1708. };
  1709. static const struct regmap_config sm6350_system_noc_regmap_config = {
  1710. .reg_bits = 32,
  1711. .reg_stride = 4,
  1712. .val_bits = 32,
  1713. .max_register = 0x17080,
  1714. .fast_io = true,
  1715. };
  1716. static const struct qcom_icc_desc sm6350_system_noc = {
  1717. .config = &sm6350_system_noc_regmap_config,
  1718. .nodes = system_noc_nodes,
  1719. .num_nodes = ARRAY_SIZE(system_noc_nodes),
  1720. .bcms = system_noc_bcms,
  1721. .num_bcms = ARRAY_SIZE(system_noc_bcms),
  1722. };
  1723. static const struct of_device_id qnoc_of_match[] = {
  1724. { .compatible = "qcom,sm6350-aggre1-noc",
  1725. .data = &sm6350_aggre1_noc},
  1726. { .compatible = "qcom,sm6350-aggre2-noc",
  1727. .data = &sm6350_aggre2_noc},
  1728. { .compatible = "qcom,sm6350-clk-virt",
  1729. .data = &sm6350_clk_virt},
  1730. { .compatible = "qcom,sm6350-compute-noc",
  1731. .data = &sm6350_compute_noc},
  1732. { .compatible = "qcom,sm6350-config-noc",
  1733. .data = &sm6350_config_noc},
  1734. { .compatible = "qcom,sm6350-dc-noc",
  1735. .data = &sm6350_dc_noc},
  1736. { .compatible = "qcom,sm6350-gem-noc",
  1737. .data = &sm6350_gem_noc},
  1738. { .compatible = "qcom,sm6350-mmss-noc",
  1739. .data = &sm6350_mmss_noc},
  1740. { .compatible = "qcom,sm6350-npu-noc",
  1741. .data = &sm6350_npu_noc},
  1742. { .compatible = "qcom,sm6350-system-noc",
  1743. .data = &sm6350_system_noc},
  1744. { }
  1745. };
  1746. MODULE_DEVICE_TABLE(of, qnoc_of_match);
  1747. static struct platform_driver qnoc_driver = {
  1748. .probe = qcom_icc_rpmh_probe,
  1749. .remove = qcom_icc_rpmh_remove,
  1750. .driver = {
  1751. .name = "qnoc-sm6350",
  1752. .of_match_table = qnoc_of_match,
  1753. .sync_state = icc_sync_state,
  1754. },
  1755. };
  1756. module_platform_driver(qnoc_driver);
  1757. MODULE_DESCRIPTION("Qualcomm SM6350 NoC driver");
  1758. MODULE_LICENSE("GPL v2");