sm8650.c 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  5. * Copyright (c) 2023, Linaro Limited
  6. */
  7. #include <linux/device.h>
  8. #include <linux/interconnect.h>
  9. #include <linux/interconnect-provider.h>
  10. #include <linux/module.h>
  11. #include <linux/of_platform.h>
  12. #include <dt-bindings/interconnect/qcom,sm8650-rpmh.h>
  13. #include "bcm-voter.h"
  14. #include "icc-common.h"
  15. #include "icc-rpmh.h"
  16. static struct qcom_icc_node qhm_qspi;
  17. static struct qcom_icc_node qhm_qup1;
  18. static struct qcom_icc_node qxm_qup02;
  19. static struct qcom_icc_node xm_sdc4;
  20. static struct qcom_icc_node xm_ufs_mem;
  21. static struct qcom_icc_node xm_usb3_0;
  22. static struct qcom_icc_node qhm_qdss_bam;
  23. static struct qcom_icc_node qhm_qup2;
  24. static struct qcom_icc_node qxm_crypto;
  25. static struct qcom_icc_node qxm_ipa;
  26. static struct qcom_icc_node qxm_sp;
  27. static struct qcom_icc_node xm_qdss_etr_0;
  28. static struct qcom_icc_node xm_qdss_etr_1;
  29. static struct qcom_icc_node xm_sdc2;
  30. static struct qcom_icc_node qup0_core_master;
  31. static struct qcom_icc_node qup1_core_master;
  32. static struct qcom_icc_node qup2_core_master;
  33. static struct qcom_icc_node qsm_cfg;
  34. static struct qcom_icc_node qnm_gemnoc_cnoc;
  35. static struct qcom_icc_node qnm_gemnoc_pcie;
  36. static struct qcom_icc_node alm_gpu_tcu;
  37. static struct qcom_icc_node alm_sys_tcu;
  38. static struct qcom_icc_node alm_ubwc_p_tcu;
  39. static struct qcom_icc_node chm_apps;
  40. static struct qcom_icc_node qnm_gpu;
  41. static struct qcom_icc_node qnm_lpass_gemnoc;
  42. static struct qcom_icc_node qnm_mdsp;
  43. static struct qcom_icc_node qnm_mnoc_hf;
  44. static struct qcom_icc_node qnm_mnoc_sf;
  45. static struct qcom_icc_node qnm_nsp_gemnoc;
  46. static struct qcom_icc_node qnm_pcie;
  47. static struct qcom_icc_node qnm_snoc_sf;
  48. static struct qcom_icc_node qnm_ubwc_p;
  49. static struct qcom_icc_node xm_gic;
  50. static struct qcom_icc_node qnm_lpiaon_noc;
  51. static struct qcom_icc_node qnm_lpass_lpinoc;
  52. static struct qcom_icc_node qxm_lpinoc_dsp_axim;
  53. static struct qcom_icc_node llcc_mc;
  54. static struct qcom_icc_node qnm_camnoc_hf;
  55. static struct qcom_icc_node qnm_camnoc_icp;
  56. static struct qcom_icc_node qnm_camnoc_sf;
  57. static struct qcom_icc_node qnm_mdp;
  58. static struct qcom_icc_node qnm_vapss_hcp;
  59. static struct qcom_icc_node qnm_video;
  60. static struct qcom_icc_node qnm_video_cv_cpu;
  61. static struct qcom_icc_node qnm_video_cvp;
  62. static struct qcom_icc_node qnm_video_v_cpu;
  63. static struct qcom_icc_node qsm_mnoc_cfg;
  64. static struct qcom_icc_node qnm_nsp;
  65. static struct qcom_icc_node qsm_pcie_anoc_cfg;
  66. static struct qcom_icc_node xm_pcie3_0;
  67. static struct qcom_icc_node xm_pcie3_1;
  68. static struct qcom_icc_node qnm_aggre1_noc;
  69. static struct qcom_icc_node qnm_aggre2_noc;
  70. static struct qcom_icc_node qnm_apss_noc;
  71. static struct qcom_icc_node qns_a1noc_snoc;
  72. static struct qcom_icc_node qns_a2noc_snoc;
  73. static struct qcom_icc_node qup0_core_slave;
  74. static struct qcom_icc_node qup1_core_slave;
  75. static struct qcom_icc_node qup2_core_slave;
  76. static struct qcom_icc_node qhs_ahb2phy0;
  77. static struct qcom_icc_node qhs_ahb2phy1;
  78. static struct qcom_icc_node qhs_camera_cfg;
  79. static struct qcom_icc_node qhs_clk_ctl;
  80. static struct qcom_icc_node qhs_cpr_cx;
  81. static struct qcom_icc_node qhs_cpr_hmx;
  82. static struct qcom_icc_node qhs_cpr_mmcx;
  83. static struct qcom_icc_node qhs_cpr_mxa;
  84. static struct qcom_icc_node qhs_cpr_mxc;
  85. static struct qcom_icc_node qhs_cpr_nspcx;
  86. static struct qcom_icc_node qhs_crypto0_cfg;
  87. static struct qcom_icc_node qhs_cx_rdpm;
  88. static struct qcom_icc_node qhs_display_cfg;
  89. static struct qcom_icc_node qhs_gpuss_cfg;
  90. static struct qcom_icc_node qhs_i2c;
  91. static struct qcom_icc_node qhs_i3c_ibi0_cfg;
  92. static struct qcom_icc_node qhs_i3c_ibi1_cfg;
  93. static struct qcom_icc_node qhs_imem_cfg;
  94. static struct qcom_icc_node qhs_mss_cfg;
  95. static struct qcom_icc_node qhs_mx_2_rdpm;
  96. static struct qcom_icc_node qhs_mx_rdpm;
  97. static struct qcom_icc_node qhs_pcie0_cfg;
  98. static struct qcom_icc_node qhs_pcie1_cfg;
  99. static struct qcom_icc_node qhs_pcie_rscc;
  100. static struct qcom_icc_node qhs_pdm;
  101. static struct qcom_icc_node qhs_prng;
  102. static struct qcom_icc_node qhs_qdss_cfg;
  103. static struct qcom_icc_node qhs_qspi;
  104. static struct qcom_icc_node qhs_qup02;
  105. static struct qcom_icc_node qhs_qup1;
  106. static struct qcom_icc_node qhs_qup2;
  107. static struct qcom_icc_node qhs_sdc2;
  108. static struct qcom_icc_node qhs_sdc4;
  109. static struct qcom_icc_node qhs_spss_cfg;
  110. static struct qcom_icc_node qhs_tcsr;
  111. static struct qcom_icc_node qhs_tlmm;
  112. static struct qcom_icc_node qhs_ufs_mem_cfg;
  113. static struct qcom_icc_node qhs_usb3_0;
  114. static struct qcom_icc_node qhs_venus_cfg;
  115. static struct qcom_icc_node qhs_vsense_ctrl_cfg;
  116. static struct qcom_icc_node qss_mnoc_cfg;
  117. static struct qcom_icc_node qss_nsp_qtb_cfg;
  118. static struct qcom_icc_node qss_pcie_anoc_cfg;
  119. static struct qcom_icc_node srvc_cnoc_cfg;
  120. static struct qcom_icc_node xs_qdss_stm;
  121. static struct qcom_icc_node xs_sys_tcu_cfg;
  122. static struct qcom_icc_node qhs_aoss;
  123. static struct qcom_icc_node qhs_ipa;
  124. static struct qcom_icc_node qhs_ipc_router;
  125. static struct qcom_icc_node qhs_tme_cfg;
  126. static struct qcom_icc_node qss_apss;
  127. static struct qcom_icc_node qss_cfg;
  128. static struct qcom_icc_node qss_ddrss_cfg;
  129. static struct qcom_icc_node qxs_imem;
  130. static struct qcom_icc_node srvc_cnoc_main;
  131. static struct qcom_icc_node xs_pcie_0;
  132. static struct qcom_icc_node xs_pcie_1;
  133. static struct qcom_icc_node qns_gem_noc_cnoc;
  134. static struct qcom_icc_node qns_llcc;
  135. static struct qcom_icc_node qns_pcie;
  136. static struct qcom_icc_node qns_lpass_ag_noc_gemnoc;
  137. static struct qcom_icc_node qns_lpass_aggnoc;
  138. static struct qcom_icc_node qns_lpi_aon_noc;
  139. static struct qcom_icc_node ebi;
  140. static struct qcom_icc_node qns_mem_noc_hf;
  141. static struct qcom_icc_node qns_mem_noc_sf;
  142. static struct qcom_icc_node srvc_mnoc;
  143. static struct qcom_icc_node qns_nsp_gemnoc;
  144. static struct qcom_icc_node qns_pcie_mem_noc;
  145. static struct qcom_icc_node srvc_pcie_aggre_noc;
  146. static struct qcom_icc_node qns_gemnoc_sf;
  147. static const struct regmap_config icc_regmap_config = {
  148. .reg_bits = 32,
  149. .reg_stride = 4,
  150. .val_bits = 32,
  151. .fast_io = true,
  152. };
  153. static struct qcom_icc_qosbox qhm_qspi_qos = {
  154. .num_ports = 1,
  155. .port_offsets = { 0xc000 },
  156. .prio = 2,
  157. .urg_fwd = 0,
  158. .prio_fwd_disable = 0,
  159. };
  160. static struct qcom_icc_node qhm_qspi = {
  161. .name = "qhm_qspi",
  162. .channels = 1,
  163. .buswidth = 4,
  164. .qosbox = &qhm_qspi_qos,
  165. .num_links = 1,
  166. .link_nodes = { &qns_a1noc_snoc },
  167. };
  168. static struct qcom_icc_qosbox qhm_qup1_qos = {
  169. .num_ports = 1,
  170. .port_offsets = { 0xd000 },
  171. .prio = 2,
  172. .urg_fwd = 0,
  173. .prio_fwd_disable = 0,
  174. };
  175. static struct qcom_icc_node qhm_qup1 = {
  176. .name = "qhm_qup1",
  177. .channels = 1,
  178. .buswidth = 4,
  179. .qosbox = &qhm_qup1_qos,
  180. .num_links = 1,
  181. .link_nodes = { &qns_a1noc_snoc },
  182. };
  183. static struct qcom_icc_node qxm_qup02 = {
  184. .name = "qxm_qup02",
  185. .channels = 1,
  186. .buswidth = 8,
  187. .num_links = 1,
  188. .link_nodes = { &qns_a1noc_snoc },
  189. };
  190. static struct qcom_icc_qosbox xm_sdc4_qos = {
  191. .num_ports = 1,
  192. .port_offsets = { 0xe000 },
  193. .prio = 2,
  194. .urg_fwd = 0,
  195. .prio_fwd_disable = 0,
  196. };
  197. static struct qcom_icc_node xm_sdc4 = {
  198. .name = "xm_sdc4",
  199. .channels = 1,
  200. .buswidth = 8,
  201. .qosbox = &xm_sdc4_qos,
  202. .num_links = 1,
  203. .link_nodes = { &qns_a1noc_snoc },
  204. };
  205. static struct qcom_icc_qosbox xm_ufs_mem_qos = {
  206. .num_ports = 1,
  207. .port_offsets = { 0xf000 },
  208. .prio = 2,
  209. .urg_fwd = 0,
  210. .prio_fwd_disable = 0,
  211. };
  212. static struct qcom_icc_node xm_ufs_mem = {
  213. .name = "xm_ufs_mem",
  214. .channels = 1,
  215. .buswidth = 16,
  216. .qosbox = &xm_ufs_mem_qos,
  217. .num_links = 1,
  218. .link_nodes = { &qns_a1noc_snoc },
  219. };
  220. static struct qcom_icc_qosbox xm_usb3_0_qos = {
  221. .num_ports = 1,
  222. .port_offsets = { 0x10000 },
  223. .prio = 2,
  224. .urg_fwd = 0,
  225. .prio_fwd_disable = 0,
  226. };
  227. static struct qcom_icc_node xm_usb3_0 = {
  228. .name = "xm_usb3_0",
  229. .channels = 1,
  230. .buswidth = 8,
  231. .qosbox = &xm_usb3_0_qos,
  232. .num_links = 1,
  233. .link_nodes = { &qns_a1noc_snoc },
  234. };
  235. static struct qcom_icc_qosbox qhm_qdss_bam_qos = {
  236. .num_ports = 1,
  237. .port_offsets = { 0x12000 },
  238. .prio = 2,
  239. .urg_fwd = 0,
  240. .prio_fwd_disable = 0,
  241. };
  242. static struct qcom_icc_node qhm_qdss_bam = {
  243. .name = "qhm_qdss_bam",
  244. .channels = 1,
  245. .buswidth = 4,
  246. .qosbox = &qhm_qdss_bam_qos,
  247. .num_links = 1,
  248. .link_nodes = { &qns_a2noc_snoc },
  249. };
  250. static struct qcom_icc_qosbox qhm_qup2_qos = {
  251. .num_ports = 1,
  252. .port_offsets = { 0x13000 },
  253. .prio = 2,
  254. .urg_fwd = 0,
  255. .prio_fwd_disable = 0,
  256. };
  257. static struct qcom_icc_node qhm_qup2 = {
  258. .name = "qhm_qup2",
  259. .channels = 1,
  260. .buswidth = 4,
  261. .qosbox = &qhm_qup2_qos,
  262. .num_links = 1,
  263. .link_nodes = { &qns_a2noc_snoc },
  264. };
  265. static struct qcom_icc_qosbox qxm_crypto_qos = {
  266. .num_ports = 1,
  267. .port_offsets = { 0x15000 },
  268. .prio = 2,
  269. .urg_fwd = 1,
  270. .prio_fwd_disable = 0,
  271. };
  272. static struct qcom_icc_node qxm_crypto = {
  273. .name = "qxm_crypto",
  274. .channels = 1,
  275. .buswidth = 8,
  276. .qosbox = &qxm_crypto_qos,
  277. .num_links = 1,
  278. .link_nodes = { &qns_a2noc_snoc },
  279. };
  280. static struct qcom_icc_qosbox qxm_ipa_qos = {
  281. .num_ports = 1,
  282. .port_offsets = { 0x16000 },
  283. .prio = 2,
  284. .urg_fwd = 1,
  285. .prio_fwd_disable = 0,
  286. };
  287. static struct qcom_icc_node qxm_ipa = {
  288. .name = "qxm_ipa",
  289. .channels = 1,
  290. .buswidth = 8,
  291. .qosbox = &qxm_ipa_qos,
  292. .num_links = 1,
  293. .link_nodes = { &qns_a2noc_snoc },
  294. };
  295. static struct qcom_icc_node qxm_sp = {
  296. .name = "qxm_sp",
  297. .channels = 1,
  298. .buswidth = 8,
  299. .num_links = 1,
  300. .link_nodes = { &qns_a2noc_snoc },
  301. };
  302. static struct qcom_icc_qosbox xm_qdss_etr_0_qos = {
  303. .num_ports = 1,
  304. .port_offsets = { 0x17000 },
  305. .prio = 2,
  306. .urg_fwd = 0,
  307. .prio_fwd_disable = 0,
  308. };
  309. static struct qcom_icc_node xm_qdss_etr_0 = {
  310. .name = "xm_qdss_etr_0",
  311. .channels = 1,
  312. .buswidth = 8,
  313. .qosbox = &xm_qdss_etr_0_qos,
  314. .num_links = 1,
  315. .link_nodes = { &qns_a2noc_snoc },
  316. };
  317. static struct qcom_icc_qosbox xm_qdss_etr_1_qos = {
  318. .num_ports = 1,
  319. .port_offsets = { 0x18000 },
  320. .prio = 2,
  321. .urg_fwd = 0,
  322. .prio_fwd_disable = 0,
  323. };
  324. static struct qcom_icc_node xm_qdss_etr_1 = {
  325. .name = "xm_qdss_etr_1",
  326. .channels = 1,
  327. .buswidth = 8,
  328. .qosbox = &xm_qdss_etr_1_qos,
  329. .num_links = 1,
  330. .link_nodes = { &qns_a2noc_snoc },
  331. };
  332. static struct qcom_icc_qosbox xm_sdc2_qos = {
  333. .num_ports = 1,
  334. .port_offsets = { 0x19000 },
  335. .prio = 2,
  336. .urg_fwd = 0,
  337. .prio_fwd_disable = 0,
  338. };
  339. static struct qcom_icc_node xm_sdc2 = {
  340. .name = "xm_sdc2",
  341. .channels = 1,
  342. .buswidth = 8,
  343. .qosbox = &xm_sdc2_qos,
  344. .num_links = 1,
  345. .link_nodes = { &qns_a2noc_snoc },
  346. };
  347. static struct qcom_icc_node qup0_core_master = {
  348. .name = "qup0_core_master",
  349. .channels = 1,
  350. .buswidth = 4,
  351. .num_links = 1,
  352. .link_nodes = { &qup0_core_slave },
  353. };
  354. static struct qcom_icc_node qup1_core_master = {
  355. .name = "qup1_core_master",
  356. .channels = 1,
  357. .buswidth = 4,
  358. .num_links = 1,
  359. .link_nodes = { &qup1_core_slave },
  360. };
  361. static struct qcom_icc_node qup2_core_master = {
  362. .name = "qup2_core_master",
  363. .channels = 1,
  364. .buswidth = 4,
  365. .num_links = 1,
  366. .link_nodes = { &qup2_core_slave },
  367. };
  368. static struct qcom_icc_node qsm_cfg = {
  369. .name = "qsm_cfg",
  370. .channels = 1,
  371. .buswidth = 4,
  372. .num_links = 46,
  373. .link_nodes = { &qhs_ahb2phy0, &qhs_ahb2phy1,
  374. &qhs_camera_cfg, &qhs_clk_ctl,
  375. &qhs_cpr_cx, &qhs_cpr_hmx,
  376. &qhs_cpr_mmcx, &qhs_cpr_mxa,
  377. &qhs_cpr_mxc, &qhs_cpr_nspcx,
  378. &qhs_crypto0_cfg, &qhs_cx_rdpm,
  379. &qhs_display_cfg, &qhs_gpuss_cfg,
  380. &qhs_i2c, &qhs_i3c_ibi0_cfg,
  381. &qhs_i3c_ibi1_cfg, &qhs_imem_cfg,
  382. &qhs_mss_cfg, &qhs_mx_2_rdpm,
  383. &qhs_mx_rdpm, &qhs_pcie0_cfg,
  384. &qhs_pcie1_cfg, &qhs_pcie_rscc,
  385. &qhs_pdm, &qhs_prng,
  386. &qhs_qdss_cfg, &qhs_qspi,
  387. &qhs_qup02, &qhs_qup1,
  388. &qhs_qup2, &qhs_sdc2,
  389. &qhs_sdc4, &qhs_spss_cfg,
  390. &qhs_tcsr, &qhs_tlmm,
  391. &qhs_ufs_mem_cfg, &qhs_usb3_0,
  392. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  393. &qss_mnoc_cfg, &qss_nsp_qtb_cfg,
  394. &qss_pcie_anoc_cfg, &srvc_cnoc_cfg,
  395. &xs_qdss_stm, &xs_sys_tcu_cfg },
  396. };
  397. static struct qcom_icc_node qnm_gemnoc_cnoc = {
  398. .name = "qnm_gemnoc_cnoc",
  399. .channels = 1,
  400. .buswidth = 16,
  401. .num_links = 9,
  402. .link_nodes = { &qhs_aoss, &qhs_ipa,
  403. &qhs_ipc_router, &qhs_tme_cfg,
  404. &qss_apss, &qss_cfg,
  405. &qss_ddrss_cfg, &qxs_imem,
  406. &srvc_cnoc_main },
  407. };
  408. static struct qcom_icc_node qnm_gemnoc_pcie = {
  409. .name = "qnm_gemnoc_pcie",
  410. .channels = 1,
  411. .buswidth = 16,
  412. .num_links = 2,
  413. .link_nodes = { &xs_pcie_0, &xs_pcie_1 },
  414. };
  415. static struct qcom_icc_qosbox alm_gpu_tcu_qos = {
  416. .num_ports = 1,
  417. .port_offsets = { 0xbf000 },
  418. .prio = 1,
  419. .urg_fwd = 0,
  420. .prio_fwd_disable = 1,
  421. };
  422. static struct qcom_icc_node alm_gpu_tcu = {
  423. .name = "alm_gpu_tcu",
  424. .channels = 1,
  425. .buswidth = 8,
  426. .qosbox = &alm_gpu_tcu_qos,
  427. .num_links = 2,
  428. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  429. };
  430. static struct qcom_icc_qosbox alm_sys_tcu_qos = {
  431. .num_ports = 1,
  432. .port_offsets = { 0xc1000 },
  433. .prio = 6,
  434. .urg_fwd = 0,
  435. .prio_fwd_disable = 1,
  436. };
  437. static struct qcom_icc_node alm_sys_tcu = {
  438. .name = "alm_sys_tcu",
  439. .channels = 1,
  440. .buswidth = 8,
  441. .qosbox = &alm_sys_tcu_qos,
  442. .num_links = 2,
  443. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  444. };
  445. static struct qcom_icc_qosbox alm_ubwc_p_tcu_qos = {
  446. .num_ports = 1,
  447. .port_offsets = { 0xc5000 },
  448. .prio = 1,
  449. .urg_fwd = 0,
  450. .prio_fwd_disable = 1,
  451. };
  452. static struct qcom_icc_node alm_ubwc_p_tcu = {
  453. .name = "alm_ubwc_p_tcu",
  454. .channels = 1,
  455. .buswidth = 8,
  456. .qosbox = &alm_ubwc_p_tcu_qos,
  457. .num_links = 2,
  458. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  459. };
  460. static struct qcom_icc_node chm_apps = {
  461. .name = "chm_apps",
  462. .channels = 3,
  463. .buswidth = 32,
  464. .num_links = 3,
  465. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  466. &qns_pcie },
  467. };
  468. static struct qcom_icc_qosbox qnm_gpu_qos = {
  469. .num_ports = 2,
  470. .port_offsets = { 0x31000, 0x71000 },
  471. .prio = 0,
  472. .urg_fwd = 1,
  473. .prio_fwd_disable = 1,
  474. };
  475. static struct qcom_icc_node qnm_gpu = {
  476. .name = "qnm_gpu",
  477. .channels = 2,
  478. .buswidth = 32,
  479. .qosbox = &qnm_gpu_qos,
  480. .num_links = 2,
  481. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  482. };
  483. static struct qcom_icc_qosbox qnm_lpass_gemnoc_qos = {
  484. .num_ports = 1,
  485. .port_offsets = { 0xb5000 },
  486. .prio = 0,
  487. .urg_fwd = 1,
  488. .prio_fwd_disable = 0,
  489. };
  490. static struct qcom_icc_node qnm_lpass_gemnoc = {
  491. .name = "qnm_lpass_gemnoc",
  492. .channels = 1,
  493. .buswidth = 16,
  494. .qosbox = &qnm_lpass_gemnoc_qos,
  495. .num_links = 3,
  496. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  497. &qns_pcie },
  498. };
  499. static struct qcom_icc_node qnm_mdsp = {
  500. .name = "qnm_mdsp",
  501. .channels = 1,
  502. .buswidth = 16,
  503. .num_links = 3,
  504. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  505. &qns_pcie },
  506. };
  507. static struct qcom_icc_qosbox qnm_mnoc_hf_qos = {
  508. .num_ports = 2,
  509. .port_offsets = { 0x33000, 0x73000 },
  510. .prio = 0,
  511. .urg_fwd = 1,
  512. .prio_fwd_disable = 0,
  513. };
  514. static struct qcom_icc_node qnm_mnoc_hf = {
  515. .name = "qnm_mnoc_hf",
  516. .channels = 2,
  517. .buswidth = 32,
  518. .qosbox = &qnm_mnoc_hf_qos,
  519. .num_links = 2,
  520. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  521. };
  522. static struct qcom_icc_qosbox qnm_mnoc_sf_qos = {
  523. .num_ports = 2,
  524. .port_offsets = { 0x35000, 0x75000 },
  525. .prio = 0,
  526. .urg_fwd = 0,
  527. .prio_fwd_disable = 0,
  528. };
  529. static struct qcom_icc_node qnm_mnoc_sf = {
  530. .name = "qnm_mnoc_sf",
  531. .channels = 2,
  532. .buswidth = 32,
  533. .qosbox = &qnm_mnoc_sf_qos,
  534. .num_links = 2,
  535. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  536. };
  537. static struct qcom_icc_qosbox qnm_nsp_gemnoc_qos = {
  538. .num_ports = 2,
  539. .port_offsets = { 0x37000, 0x77000 },
  540. .prio = 0,
  541. .urg_fwd = 1,
  542. .prio_fwd_disable = 1,
  543. };
  544. static struct qcom_icc_node qnm_nsp_gemnoc = {
  545. .name = "qnm_nsp_gemnoc",
  546. .channels = 2,
  547. .buswidth = 32,
  548. .qosbox = &qnm_nsp_gemnoc_qos,
  549. .num_links = 3,
  550. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  551. &qns_pcie },
  552. };
  553. static struct qcom_icc_qosbox qnm_pcie_qos = {
  554. .num_ports = 1,
  555. .port_offsets = { 0xb7000 },
  556. .prio = 2,
  557. .urg_fwd = 1,
  558. .prio_fwd_disable = 0,
  559. };
  560. static struct qcom_icc_node qnm_pcie = {
  561. .name = "qnm_pcie",
  562. .channels = 1,
  563. .buswidth = 16,
  564. .qosbox = &qnm_pcie_qos,
  565. .num_links = 2,
  566. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  567. };
  568. static struct qcom_icc_qosbox qnm_snoc_sf_qos = {
  569. .num_ports = 1,
  570. .port_offsets = { 0xbb000 },
  571. .prio = 0,
  572. .urg_fwd = 1,
  573. .prio_fwd_disable = 0,
  574. };
  575. static struct qcom_icc_node qnm_snoc_sf = {
  576. .name = "qnm_snoc_sf",
  577. .channels = 1,
  578. .buswidth = 16,
  579. .qosbox = &qnm_snoc_sf_qos,
  580. .num_links = 3,
  581. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  582. &qns_pcie },
  583. };
  584. static struct qcom_icc_qosbox qnm_ubwc_p_qos = {
  585. .num_ports = 1,
  586. .port_offsets = { 0xc3000 },
  587. .prio = 1,
  588. .urg_fwd = 1,
  589. .prio_fwd_disable = 1,
  590. };
  591. static struct qcom_icc_node qnm_ubwc_p = {
  592. .name = "qnm_ubwc_p",
  593. .channels = 1,
  594. .buswidth = 32,
  595. .qosbox = &qnm_ubwc_p_qos,
  596. .num_links = 1,
  597. .link_nodes = { &qns_llcc },
  598. };
  599. static struct qcom_icc_qosbox xm_gic_qos = {
  600. .num_ports = 1,
  601. .port_offsets = { 0xb9000 },
  602. .prio = 4,
  603. .urg_fwd = 0,
  604. .prio_fwd_disable = 1,
  605. };
  606. static struct qcom_icc_node xm_gic = {
  607. .name = "xm_gic",
  608. .channels = 1,
  609. .buswidth = 8,
  610. .qosbox = &xm_gic_qos,
  611. .num_links = 1,
  612. .link_nodes = { &qns_llcc },
  613. };
  614. static struct qcom_icc_node qnm_lpiaon_noc = {
  615. .name = "qnm_lpiaon_noc",
  616. .channels = 1,
  617. .buswidth = 16,
  618. .num_links = 1,
  619. .link_nodes = { &qns_lpass_ag_noc_gemnoc },
  620. };
  621. static struct qcom_icc_node qnm_lpass_lpinoc = {
  622. .name = "qnm_lpass_lpinoc",
  623. .channels = 1,
  624. .buswidth = 16,
  625. .num_links = 1,
  626. .link_nodes = { &qns_lpass_aggnoc },
  627. };
  628. static struct qcom_icc_node qxm_lpinoc_dsp_axim = {
  629. .name = "qxm_lpinoc_dsp_axim",
  630. .channels = 1,
  631. .buswidth = 16,
  632. .num_links = 1,
  633. .link_nodes = { &qns_lpi_aon_noc },
  634. };
  635. static struct qcom_icc_node llcc_mc = {
  636. .name = "llcc_mc",
  637. .channels = 4,
  638. .buswidth = 4,
  639. .num_links = 1,
  640. .link_nodes = { &ebi },
  641. };
  642. static struct qcom_icc_qosbox qnm_camnoc_hf_qos = {
  643. .num_ports = 2,
  644. .port_offsets = { 0x28000, 0x29000 },
  645. .prio = 0,
  646. .urg_fwd = 1,
  647. .prio_fwd_disable = 0,
  648. };
  649. static struct qcom_icc_node qnm_camnoc_hf = {
  650. .name = "qnm_camnoc_hf",
  651. .channels = 2,
  652. .buswidth = 32,
  653. .qosbox = &qnm_camnoc_hf_qos,
  654. .num_links = 1,
  655. .link_nodes = { &qns_mem_noc_hf },
  656. };
  657. static struct qcom_icc_qosbox qnm_camnoc_icp_qos = {
  658. .num_ports = 1,
  659. .port_offsets = { 0x2a000 },
  660. .prio = 4,
  661. .urg_fwd = 1,
  662. .prio_fwd_disable = 0,
  663. };
  664. static struct qcom_icc_node qnm_camnoc_icp = {
  665. .name = "qnm_camnoc_icp",
  666. .channels = 1,
  667. .buswidth = 8,
  668. .qosbox = &qnm_camnoc_icp_qos,
  669. .num_links = 1,
  670. .link_nodes = { &qns_mem_noc_sf },
  671. };
  672. static struct qcom_icc_qosbox qnm_camnoc_sf_qos = {
  673. .num_ports = 2,
  674. .port_offsets = { 0x2b000, 0x2c000 },
  675. .prio = 0,
  676. .urg_fwd = 1,
  677. .prio_fwd_disable = 0,
  678. };
  679. static struct qcom_icc_node qnm_camnoc_sf = {
  680. .name = "qnm_camnoc_sf",
  681. .channels = 2,
  682. .buswidth = 32,
  683. .qosbox = &qnm_camnoc_sf_qos,
  684. .num_links = 1,
  685. .link_nodes = { &qns_mem_noc_sf },
  686. };
  687. static struct qcom_icc_qosbox qnm_mdp_qos = {
  688. .num_ports = 2,
  689. .port_offsets = { 0x2d000, 0x2e000 },
  690. .prio = 0,
  691. .urg_fwd = 1,
  692. .prio_fwd_disable = 0,
  693. };
  694. static struct qcom_icc_node qnm_mdp = {
  695. .name = "qnm_mdp",
  696. .channels = 2,
  697. .buswidth = 32,
  698. .qosbox = &qnm_mdp_qos,
  699. .num_links = 1,
  700. .link_nodes = { &qns_mem_noc_hf },
  701. };
  702. static struct qcom_icc_node qnm_vapss_hcp = {
  703. .name = "qnm_vapss_hcp",
  704. .channels = 1,
  705. .buswidth = 32,
  706. .num_links = 1,
  707. .link_nodes = { &qns_mem_noc_sf },
  708. };
  709. static struct qcom_icc_qosbox qnm_video_qos = {
  710. .num_ports = 2,
  711. .port_offsets = { 0x30000, 0x31000 },
  712. .prio = 0,
  713. .urg_fwd = 1,
  714. .prio_fwd_disable = 0,
  715. };
  716. static struct qcom_icc_node qnm_video = {
  717. .name = "qnm_video",
  718. .channels = 2,
  719. .buswidth = 32,
  720. .qosbox = &qnm_video_qos,
  721. .num_links = 1,
  722. .link_nodes = { &qns_mem_noc_sf },
  723. };
  724. static struct qcom_icc_qosbox qnm_video_cv_cpu_qos = {
  725. .num_ports = 1,
  726. .port_offsets = { 0x32000 },
  727. .prio = 4,
  728. .urg_fwd = 1,
  729. .prio_fwd_disable = 0,
  730. };
  731. static struct qcom_icc_node qnm_video_cv_cpu = {
  732. .name = "qnm_video_cv_cpu",
  733. .channels = 1,
  734. .buswidth = 8,
  735. .qosbox = &qnm_video_cv_cpu_qos,
  736. .num_links = 1,
  737. .link_nodes = { &qns_mem_noc_sf },
  738. };
  739. static struct qcom_icc_qosbox qnm_video_cvp_qos = {
  740. .num_ports = 2,
  741. .port_offsets = { 0x33000, 0x34000 },
  742. .prio = 0,
  743. .urg_fwd = 1,
  744. .prio_fwd_disable = 0,
  745. };
  746. static struct qcom_icc_node qnm_video_cvp = {
  747. .name = "qnm_video_cvp",
  748. .channels = 2,
  749. .buswidth = 32,
  750. .qosbox = &qnm_video_cvp_qos,
  751. .num_links = 1,
  752. .link_nodes = { &qns_mem_noc_sf },
  753. };
  754. static struct qcom_icc_qosbox qnm_video_v_cpu_qos = {
  755. .num_ports = 1,
  756. .port_offsets = { 0x35000 },
  757. .prio = 4,
  758. .urg_fwd = 1,
  759. .prio_fwd_disable = 0,
  760. };
  761. static struct qcom_icc_node qnm_video_v_cpu = {
  762. .name = "qnm_video_v_cpu",
  763. .channels = 1,
  764. .buswidth = 8,
  765. .qosbox = &qnm_video_v_cpu_qos,
  766. .num_links = 1,
  767. .link_nodes = { &qns_mem_noc_sf },
  768. };
  769. static struct qcom_icc_node qsm_mnoc_cfg = {
  770. .name = "qsm_mnoc_cfg",
  771. .channels = 1,
  772. .buswidth = 4,
  773. .num_links = 1,
  774. .link_nodes = { &srvc_mnoc },
  775. };
  776. static struct qcom_icc_node qnm_nsp = {
  777. .name = "qnm_nsp",
  778. .channels = 2,
  779. .buswidth = 32,
  780. .num_links = 1,
  781. .link_nodes = { &qns_nsp_gemnoc },
  782. };
  783. static struct qcom_icc_node qsm_pcie_anoc_cfg = {
  784. .name = "qsm_pcie_anoc_cfg",
  785. .channels = 1,
  786. .buswidth = 4,
  787. .num_links = 1,
  788. .link_nodes = { &srvc_pcie_aggre_noc },
  789. };
  790. static struct qcom_icc_qosbox xm_pcie3_0_qos = {
  791. .num_ports = 1,
  792. .port_offsets = { 0xb000 },
  793. .prio = 3,
  794. .urg_fwd = 0,
  795. .prio_fwd_disable = 0,
  796. };
  797. static struct qcom_icc_node xm_pcie3_0 = {
  798. .name = "xm_pcie3_0",
  799. .channels = 1,
  800. .buswidth = 8,
  801. .qosbox = &xm_pcie3_0_qos,
  802. .num_links = 1,
  803. .link_nodes = { &qns_pcie_mem_noc },
  804. };
  805. static struct qcom_icc_qosbox xm_pcie3_1_qos = {
  806. .num_ports = 1,
  807. .port_offsets = { 0xc000 },
  808. .prio = 2,
  809. .urg_fwd = 0,
  810. .prio_fwd_disable = 0,
  811. };
  812. static struct qcom_icc_node xm_pcie3_1 = {
  813. .name = "xm_pcie3_1",
  814. .channels = 1,
  815. .buswidth = 16,
  816. .qosbox = &xm_pcie3_1_qos,
  817. .num_links = 1,
  818. .link_nodes = { &qns_pcie_mem_noc },
  819. };
  820. static struct qcom_icc_node qnm_aggre1_noc = {
  821. .name = "qnm_aggre1_noc",
  822. .channels = 1,
  823. .buswidth = 16,
  824. .num_links = 1,
  825. .link_nodes = { &qns_gemnoc_sf },
  826. };
  827. static struct qcom_icc_node qnm_aggre2_noc = {
  828. .name = "qnm_aggre2_noc",
  829. .channels = 1,
  830. .buswidth = 16,
  831. .num_links = 1,
  832. .link_nodes = { &qns_gemnoc_sf },
  833. };
  834. static struct qcom_icc_qosbox qnm_apss_noc_qos = {
  835. .num_ports = 1,
  836. .port_offsets = { 0x1c000 },
  837. .prio = 2,
  838. .urg_fwd = 0,
  839. .prio_fwd_disable = 1,
  840. };
  841. static struct qcom_icc_node qnm_apss_noc = {
  842. .name = "qnm_apss_noc",
  843. .channels = 1,
  844. .buswidth = 4,
  845. .qosbox = &qnm_apss_noc_qos,
  846. .num_links = 1,
  847. .link_nodes = { &qns_gemnoc_sf },
  848. };
  849. static struct qcom_icc_node qns_a1noc_snoc = {
  850. .name = "qns_a1noc_snoc",
  851. .channels = 1,
  852. .buswidth = 16,
  853. .num_links = 1,
  854. .link_nodes = { &qnm_aggre1_noc },
  855. };
  856. static struct qcom_icc_node qns_a2noc_snoc = {
  857. .name = "qns_a2noc_snoc",
  858. .channels = 1,
  859. .buswidth = 16,
  860. .num_links = 1,
  861. .link_nodes = { &qnm_aggre2_noc },
  862. };
  863. static struct qcom_icc_node qup0_core_slave = {
  864. .name = "qup0_core_slave",
  865. .channels = 1,
  866. .buswidth = 4,
  867. };
  868. static struct qcom_icc_node qup1_core_slave = {
  869. .name = "qup1_core_slave",
  870. .channels = 1,
  871. .buswidth = 4,
  872. };
  873. static struct qcom_icc_node qup2_core_slave = {
  874. .name = "qup2_core_slave",
  875. .channels = 1,
  876. .buswidth = 4,
  877. };
  878. static struct qcom_icc_node qhs_ahb2phy0 = {
  879. .name = "qhs_ahb2phy0",
  880. .channels = 1,
  881. .buswidth = 4,
  882. };
  883. static struct qcom_icc_node qhs_ahb2phy1 = {
  884. .name = "qhs_ahb2phy1",
  885. .channels = 1,
  886. .buswidth = 4,
  887. };
  888. static struct qcom_icc_node qhs_camera_cfg = {
  889. .name = "qhs_camera_cfg",
  890. .channels = 1,
  891. .buswidth = 4,
  892. };
  893. static struct qcom_icc_node qhs_clk_ctl = {
  894. .name = "qhs_clk_ctl",
  895. .channels = 1,
  896. .buswidth = 4,
  897. };
  898. static struct qcom_icc_node qhs_cpr_cx = {
  899. .name = "qhs_cpr_cx",
  900. .channels = 1,
  901. .buswidth = 4,
  902. };
  903. static struct qcom_icc_node qhs_cpr_hmx = {
  904. .name = "qhs_cpr_hmx",
  905. .channels = 1,
  906. .buswidth = 4,
  907. };
  908. static struct qcom_icc_node qhs_cpr_mmcx = {
  909. .name = "qhs_cpr_mmcx",
  910. .channels = 1,
  911. .buswidth = 4,
  912. };
  913. static struct qcom_icc_node qhs_cpr_mxa = {
  914. .name = "qhs_cpr_mxa",
  915. .channels = 1,
  916. .buswidth = 4,
  917. };
  918. static struct qcom_icc_node qhs_cpr_mxc = {
  919. .name = "qhs_cpr_mxc",
  920. .channels = 1,
  921. .buswidth = 4,
  922. };
  923. static struct qcom_icc_node qhs_cpr_nspcx = {
  924. .name = "qhs_cpr_nspcx",
  925. .channels = 1,
  926. .buswidth = 4,
  927. };
  928. static struct qcom_icc_node qhs_crypto0_cfg = {
  929. .name = "qhs_crypto0_cfg",
  930. .channels = 1,
  931. .buswidth = 4,
  932. };
  933. static struct qcom_icc_node qhs_cx_rdpm = {
  934. .name = "qhs_cx_rdpm",
  935. .channels = 1,
  936. .buswidth = 4,
  937. };
  938. static struct qcom_icc_node qhs_display_cfg = {
  939. .name = "qhs_display_cfg",
  940. .channels = 1,
  941. .buswidth = 4,
  942. };
  943. static struct qcom_icc_node qhs_gpuss_cfg = {
  944. .name = "qhs_gpuss_cfg",
  945. .channels = 1,
  946. .buswidth = 8,
  947. };
  948. static struct qcom_icc_node qhs_i2c = {
  949. .name = "qhs_i2c",
  950. .channels = 1,
  951. .buswidth = 4,
  952. };
  953. static struct qcom_icc_node qhs_i3c_ibi0_cfg = {
  954. .name = "qhs_i3c_ibi0_cfg",
  955. .channels = 1,
  956. .buswidth = 4,
  957. };
  958. static struct qcom_icc_node qhs_i3c_ibi1_cfg = {
  959. .name = "qhs_i3c_ibi1_cfg",
  960. .channels = 1,
  961. .buswidth = 4,
  962. };
  963. static struct qcom_icc_node qhs_imem_cfg = {
  964. .name = "qhs_imem_cfg",
  965. .channels = 1,
  966. .buswidth = 4,
  967. };
  968. static struct qcom_icc_node qhs_mss_cfg = {
  969. .name = "qhs_mss_cfg",
  970. .channels = 1,
  971. .buswidth = 4,
  972. };
  973. static struct qcom_icc_node qhs_mx_2_rdpm = {
  974. .name = "qhs_mx_2_rdpm",
  975. .channels = 1,
  976. .buswidth = 4,
  977. };
  978. static struct qcom_icc_node qhs_mx_rdpm = {
  979. .name = "qhs_mx_rdpm",
  980. .channels = 1,
  981. .buswidth = 4,
  982. };
  983. static struct qcom_icc_node qhs_pcie0_cfg = {
  984. .name = "qhs_pcie0_cfg",
  985. .channels = 1,
  986. .buswidth = 4,
  987. };
  988. static struct qcom_icc_node qhs_pcie1_cfg = {
  989. .name = "qhs_pcie1_cfg",
  990. .channels = 1,
  991. .buswidth = 4,
  992. };
  993. static struct qcom_icc_node qhs_pcie_rscc = {
  994. .name = "qhs_pcie_rscc",
  995. .channels = 1,
  996. .buswidth = 4,
  997. };
  998. static struct qcom_icc_node qhs_pdm = {
  999. .name = "qhs_pdm",
  1000. .channels = 1,
  1001. .buswidth = 4,
  1002. };
  1003. static struct qcom_icc_node qhs_prng = {
  1004. .name = "qhs_prng",
  1005. .channels = 1,
  1006. .buswidth = 4,
  1007. };
  1008. static struct qcom_icc_node qhs_qdss_cfg = {
  1009. .name = "qhs_qdss_cfg",
  1010. .channels = 1,
  1011. .buswidth = 4,
  1012. };
  1013. static struct qcom_icc_node qhs_qspi = {
  1014. .name = "qhs_qspi",
  1015. .channels = 1,
  1016. .buswidth = 4,
  1017. };
  1018. static struct qcom_icc_node qhs_qup02 = {
  1019. .name = "qhs_qup02",
  1020. .channels = 1,
  1021. .buswidth = 4,
  1022. };
  1023. static struct qcom_icc_node qhs_qup1 = {
  1024. .name = "qhs_qup1",
  1025. .channels = 1,
  1026. .buswidth = 4,
  1027. };
  1028. static struct qcom_icc_node qhs_qup2 = {
  1029. .name = "qhs_qup2",
  1030. .channels = 1,
  1031. .buswidth = 4,
  1032. };
  1033. static struct qcom_icc_node qhs_sdc2 = {
  1034. .name = "qhs_sdc2",
  1035. .channels = 1,
  1036. .buswidth = 4,
  1037. };
  1038. static struct qcom_icc_node qhs_sdc4 = {
  1039. .name = "qhs_sdc4",
  1040. .channels = 1,
  1041. .buswidth = 4,
  1042. };
  1043. static struct qcom_icc_node qhs_spss_cfg = {
  1044. .name = "qhs_spss_cfg",
  1045. .channels = 1,
  1046. .buswidth = 4,
  1047. };
  1048. static struct qcom_icc_node qhs_tcsr = {
  1049. .name = "qhs_tcsr",
  1050. .channels = 1,
  1051. .buswidth = 4,
  1052. };
  1053. static struct qcom_icc_node qhs_tlmm = {
  1054. .name = "qhs_tlmm",
  1055. .channels = 1,
  1056. .buswidth = 4,
  1057. };
  1058. static struct qcom_icc_node qhs_ufs_mem_cfg = {
  1059. .name = "qhs_ufs_mem_cfg",
  1060. .channels = 1,
  1061. .buswidth = 4,
  1062. };
  1063. static struct qcom_icc_node qhs_usb3_0 = {
  1064. .name = "qhs_usb3_0",
  1065. .channels = 1,
  1066. .buswidth = 4,
  1067. };
  1068. static struct qcom_icc_node qhs_venus_cfg = {
  1069. .name = "qhs_venus_cfg",
  1070. .channels = 1,
  1071. .buswidth = 4,
  1072. };
  1073. static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
  1074. .name = "qhs_vsense_ctrl_cfg",
  1075. .channels = 1,
  1076. .buswidth = 4,
  1077. };
  1078. static struct qcom_icc_node qss_mnoc_cfg = {
  1079. .name = "qss_mnoc_cfg",
  1080. .channels = 1,
  1081. .buswidth = 4,
  1082. .num_links = 1,
  1083. .link_nodes = { &qsm_mnoc_cfg },
  1084. };
  1085. static struct qcom_icc_node qss_nsp_qtb_cfg = {
  1086. .name = "qss_nsp_qtb_cfg",
  1087. .channels = 1,
  1088. .buswidth = 4,
  1089. };
  1090. static struct qcom_icc_node qss_pcie_anoc_cfg = {
  1091. .name = "qss_pcie_anoc_cfg",
  1092. .channels = 1,
  1093. .buswidth = 4,
  1094. .num_links = 1,
  1095. .link_nodes = { &qsm_pcie_anoc_cfg },
  1096. };
  1097. static struct qcom_icc_node srvc_cnoc_cfg = {
  1098. .name = "srvc_cnoc_cfg",
  1099. .channels = 1,
  1100. .buswidth = 4,
  1101. };
  1102. static struct qcom_icc_node xs_qdss_stm = {
  1103. .name = "xs_qdss_stm",
  1104. .channels = 1,
  1105. .buswidth = 4,
  1106. };
  1107. static struct qcom_icc_node xs_sys_tcu_cfg = {
  1108. .name = "xs_sys_tcu_cfg",
  1109. .channels = 1,
  1110. .buswidth = 8,
  1111. };
  1112. static struct qcom_icc_node qhs_aoss = {
  1113. .name = "qhs_aoss",
  1114. .channels = 1,
  1115. .buswidth = 4,
  1116. };
  1117. static struct qcom_icc_node qhs_ipa = {
  1118. .name = "qhs_ipa",
  1119. .channels = 1,
  1120. .buswidth = 4,
  1121. };
  1122. static struct qcom_icc_node qhs_ipc_router = {
  1123. .name = "qhs_ipc_router",
  1124. .channels = 1,
  1125. .buswidth = 4,
  1126. };
  1127. static struct qcom_icc_node qhs_tme_cfg = {
  1128. .name = "qhs_tme_cfg",
  1129. .channels = 1,
  1130. .buswidth = 4,
  1131. };
  1132. static struct qcom_icc_node qss_apss = {
  1133. .name = "qss_apss",
  1134. .channels = 1,
  1135. .buswidth = 4,
  1136. };
  1137. static struct qcom_icc_node qss_cfg = {
  1138. .name = "qss_cfg",
  1139. .channels = 1,
  1140. .buswidth = 4,
  1141. .num_links = 1,
  1142. .link_nodes = { &qsm_cfg },
  1143. };
  1144. static struct qcom_icc_node qss_ddrss_cfg = {
  1145. .name = "qss_ddrss_cfg",
  1146. .channels = 1,
  1147. .buswidth = 4,
  1148. };
  1149. static struct qcom_icc_node qxs_imem = {
  1150. .name = "qxs_imem",
  1151. .channels = 1,
  1152. .buswidth = 8,
  1153. };
  1154. static struct qcom_icc_node srvc_cnoc_main = {
  1155. .name = "srvc_cnoc_main",
  1156. .channels = 1,
  1157. .buswidth = 4,
  1158. };
  1159. static struct qcom_icc_node xs_pcie_0 = {
  1160. .name = "xs_pcie_0",
  1161. .channels = 1,
  1162. .buswidth = 8,
  1163. };
  1164. static struct qcom_icc_node xs_pcie_1 = {
  1165. .name = "xs_pcie_1",
  1166. .channels = 1,
  1167. .buswidth = 16,
  1168. };
  1169. static struct qcom_icc_node qns_gem_noc_cnoc = {
  1170. .name = "qns_gem_noc_cnoc",
  1171. .channels = 1,
  1172. .buswidth = 16,
  1173. .num_links = 1,
  1174. .link_nodes = { &qnm_gemnoc_cnoc },
  1175. };
  1176. static struct qcom_icc_node qns_llcc = {
  1177. .name = "qns_llcc",
  1178. .channels = 4,
  1179. .buswidth = 16,
  1180. .num_links = 1,
  1181. .link_nodes = { &llcc_mc },
  1182. };
  1183. static struct qcom_icc_node qns_pcie = {
  1184. .name = "qns_pcie",
  1185. .channels = 1,
  1186. .buswidth = 8,
  1187. .num_links = 1,
  1188. .link_nodes = { &qnm_gemnoc_pcie },
  1189. };
  1190. static struct qcom_icc_node qns_lpass_ag_noc_gemnoc = {
  1191. .name = "qns_lpass_ag_noc_gemnoc",
  1192. .channels = 1,
  1193. .buswidth = 16,
  1194. .num_links = 1,
  1195. .link_nodes = { &qnm_lpass_gemnoc },
  1196. };
  1197. static struct qcom_icc_node qns_lpass_aggnoc = {
  1198. .name = "qns_lpass_aggnoc",
  1199. .channels = 1,
  1200. .buswidth = 16,
  1201. .num_links = 1,
  1202. .link_nodes = { &qnm_lpiaon_noc },
  1203. };
  1204. static struct qcom_icc_node qns_lpi_aon_noc = {
  1205. .name = "qns_lpi_aon_noc",
  1206. .channels = 1,
  1207. .buswidth = 16,
  1208. .num_links = 1,
  1209. .link_nodes = { &qnm_lpass_lpinoc },
  1210. };
  1211. static struct qcom_icc_node ebi = {
  1212. .name = "ebi",
  1213. .channels = 4,
  1214. .buswidth = 4,
  1215. };
  1216. static struct qcom_icc_node qns_mem_noc_hf = {
  1217. .name = "qns_mem_noc_hf",
  1218. .channels = 2,
  1219. .buswidth = 32,
  1220. .num_links = 1,
  1221. .link_nodes = { &qnm_mnoc_hf },
  1222. };
  1223. static struct qcom_icc_node qns_mem_noc_sf = {
  1224. .name = "qns_mem_noc_sf",
  1225. .channels = 2,
  1226. .buswidth = 32,
  1227. .num_links = 1,
  1228. .link_nodes = { &qnm_mnoc_sf },
  1229. };
  1230. static struct qcom_icc_node srvc_mnoc = {
  1231. .name = "srvc_mnoc",
  1232. .channels = 1,
  1233. .buswidth = 4,
  1234. };
  1235. static struct qcom_icc_node qns_nsp_gemnoc = {
  1236. .name = "qns_nsp_gemnoc",
  1237. .channels = 2,
  1238. .buswidth = 32,
  1239. .num_links = 1,
  1240. .link_nodes = { &qnm_nsp_gemnoc },
  1241. };
  1242. static struct qcom_icc_node qns_pcie_mem_noc = {
  1243. .name = "qns_pcie_mem_noc",
  1244. .channels = 1,
  1245. .buswidth = 16,
  1246. .num_links = 1,
  1247. .link_nodes = { &qnm_pcie },
  1248. };
  1249. static struct qcom_icc_node srvc_pcie_aggre_noc = {
  1250. .name = "srvc_pcie_aggre_noc",
  1251. .channels = 1,
  1252. .buswidth = 4,
  1253. };
  1254. static struct qcom_icc_node qns_gemnoc_sf = {
  1255. .name = "qns_gemnoc_sf",
  1256. .channels = 1,
  1257. .buswidth = 16,
  1258. .num_links = 1,
  1259. .link_nodes = { &qnm_snoc_sf },
  1260. };
  1261. static struct qcom_icc_bcm bcm_acv = {
  1262. .name = "ACV",
  1263. .enable_mask = BIT(0),
  1264. .num_nodes = 1,
  1265. .nodes = { &ebi },
  1266. };
  1267. static struct qcom_icc_bcm bcm_ce0 = {
  1268. .name = "CE0",
  1269. .num_nodes = 1,
  1270. .nodes = { &qxm_crypto },
  1271. };
  1272. static struct qcom_icc_bcm bcm_cn0 = {
  1273. .name = "CN0",
  1274. .enable_mask = BIT(0),
  1275. .keepalive = true,
  1276. .num_nodes = 59,
  1277. .nodes = { &qsm_cfg, &qhs_ahb2phy0,
  1278. &qhs_ahb2phy1, &qhs_camera_cfg,
  1279. &qhs_clk_ctl, &qhs_cpr_cx,
  1280. &qhs_cpr_hmx, &qhs_cpr_mmcx,
  1281. &qhs_cpr_mxa, &qhs_cpr_mxc,
  1282. &qhs_cpr_nspcx, &qhs_crypto0_cfg,
  1283. &qhs_cx_rdpm, &qhs_display_cfg,
  1284. &qhs_gpuss_cfg, &qhs_i2c,
  1285. &qhs_i3c_ibi0_cfg, &qhs_i3c_ibi1_cfg,
  1286. &qhs_imem_cfg, &qhs_mss_cfg,
  1287. &qhs_mx_2_rdpm, &qhs_mx_rdpm,
  1288. &qhs_pcie0_cfg, &qhs_pcie1_cfg,
  1289. &qhs_pcie_rscc, &qhs_pdm,
  1290. &qhs_prng, &qhs_qdss_cfg,
  1291. &qhs_qspi, &qhs_qup02,
  1292. &qhs_qup1, &qhs_qup2,
  1293. &qhs_sdc2, &qhs_sdc4,
  1294. &qhs_spss_cfg, &qhs_tcsr,
  1295. &qhs_tlmm, &qhs_ufs_mem_cfg,
  1296. &qhs_usb3_0, &qhs_venus_cfg,
  1297. &qhs_vsense_ctrl_cfg, &qss_mnoc_cfg,
  1298. &qss_nsp_qtb_cfg, &qss_pcie_anoc_cfg,
  1299. &srvc_cnoc_cfg, &xs_qdss_stm,
  1300. &xs_sys_tcu_cfg, &qnm_gemnoc_cnoc,
  1301. &qnm_gemnoc_pcie, &qhs_aoss,
  1302. &qhs_ipa, &qhs_ipc_router,
  1303. &qhs_tme_cfg, &qss_apss,
  1304. &qss_cfg, &qss_ddrss_cfg,
  1305. &qxs_imem, &srvc_cnoc_main,
  1306. &xs_pcie_0, &xs_pcie_1 },
  1307. };
  1308. static struct qcom_icc_bcm bcm_co0 = {
  1309. .name = "CO0",
  1310. .enable_mask = BIT(0),
  1311. .num_nodes = 2,
  1312. .nodes = { &qnm_nsp, &qns_nsp_gemnoc },
  1313. };
  1314. static struct qcom_icc_bcm bcm_lp0 = {
  1315. .name = "LP0",
  1316. .num_nodes = 2,
  1317. .nodes = { &qnm_lpass_lpinoc, &qns_lpass_aggnoc },
  1318. };
  1319. static struct qcom_icc_bcm bcm_mc0 = {
  1320. .name = "MC0",
  1321. .keepalive = true,
  1322. .num_nodes = 1,
  1323. .nodes = { &ebi },
  1324. };
  1325. static struct qcom_icc_bcm bcm_mm0 = {
  1326. .name = "MM0",
  1327. .num_nodes = 1,
  1328. .nodes = { &qns_mem_noc_hf },
  1329. };
  1330. static struct qcom_icc_bcm bcm_mm1 = {
  1331. .name = "MM1",
  1332. .enable_mask = BIT(0),
  1333. .num_nodes = 8,
  1334. .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp,
  1335. &qnm_camnoc_sf, &qnm_vapss_hcp,
  1336. &qnm_video_cv_cpu, &qnm_video_cvp,
  1337. &qnm_video_v_cpu, &qns_mem_noc_sf },
  1338. };
  1339. static struct qcom_icc_bcm bcm_qup0 = {
  1340. .name = "QUP0",
  1341. .keepalive = true,
  1342. .vote_scale = 1,
  1343. .num_nodes = 1,
  1344. .nodes = { &qup0_core_slave },
  1345. };
  1346. static struct qcom_icc_bcm bcm_qup1 = {
  1347. .name = "QUP1",
  1348. .keepalive = true,
  1349. .vote_scale = 1,
  1350. .num_nodes = 1,
  1351. .nodes = { &qup1_core_slave },
  1352. };
  1353. static struct qcom_icc_bcm bcm_qup2 = {
  1354. .name = "QUP2",
  1355. .keepalive = true,
  1356. .vote_scale = 1,
  1357. .num_nodes = 1,
  1358. .nodes = { &qup2_core_slave },
  1359. };
  1360. static struct qcom_icc_bcm bcm_sh0 = {
  1361. .name = "SH0",
  1362. .keepalive = true,
  1363. .num_nodes = 1,
  1364. .nodes = { &qns_llcc },
  1365. };
  1366. static struct qcom_icc_bcm bcm_sh1 = {
  1367. .name = "SH1",
  1368. .enable_mask = BIT(0),
  1369. .num_nodes = 15,
  1370. .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
  1371. &alm_ubwc_p_tcu, &chm_apps,
  1372. &qnm_gpu, &qnm_mdsp,
  1373. &qnm_mnoc_hf, &qnm_mnoc_sf,
  1374. &qnm_nsp_gemnoc, &qnm_pcie,
  1375. &qnm_snoc_sf, &qnm_ubwc_p,
  1376. &xm_gic, &qns_gem_noc_cnoc,
  1377. &qns_pcie },
  1378. };
  1379. static struct qcom_icc_bcm bcm_sn0 = {
  1380. .name = "SN0",
  1381. .keepalive = true,
  1382. .num_nodes = 1,
  1383. .nodes = { &qns_gemnoc_sf },
  1384. };
  1385. static struct qcom_icc_bcm bcm_sn2 = {
  1386. .name = "SN2",
  1387. .num_nodes = 1,
  1388. .nodes = { &qnm_aggre1_noc },
  1389. };
  1390. static struct qcom_icc_bcm bcm_sn3 = {
  1391. .name = "SN3",
  1392. .num_nodes = 1,
  1393. .nodes = { &qnm_aggre2_noc },
  1394. };
  1395. static struct qcom_icc_bcm bcm_sn4 = {
  1396. .name = "SN4",
  1397. .num_nodes = 1,
  1398. .nodes = { &qns_pcie_mem_noc },
  1399. };
  1400. static struct qcom_icc_node * const aggre1_noc_nodes[] = {
  1401. [MASTER_QSPI_0] = &qhm_qspi,
  1402. [MASTER_QUP_1] = &qhm_qup1,
  1403. [MASTER_QUP_3] = &qxm_qup02,
  1404. [MASTER_SDCC_4] = &xm_sdc4,
  1405. [MASTER_UFS_MEM] = &xm_ufs_mem,
  1406. [MASTER_USB3_0] = &xm_usb3_0,
  1407. [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
  1408. };
  1409. static const struct qcom_icc_desc sm8650_aggre1_noc = {
  1410. .config = &icc_regmap_config,
  1411. .nodes = aggre1_noc_nodes,
  1412. .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
  1413. };
  1414. static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
  1415. &bcm_ce0,
  1416. };
  1417. static struct qcom_icc_node * const aggre2_noc_nodes[] = {
  1418. [MASTER_QDSS_BAM] = &qhm_qdss_bam,
  1419. [MASTER_QUP_2] = &qhm_qup2,
  1420. [MASTER_CRYPTO] = &qxm_crypto,
  1421. [MASTER_IPA] = &qxm_ipa,
  1422. [MASTER_SP] = &qxm_sp,
  1423. [MASTER_QDSS_ETR] = &xm_qdss_etr_0,
  1424. [MASTER_QDSS_ETR_1] = &xm_qdss_etr_1,
  1425. [MASTER_SDCC_2] = &xm_sdc2,
  1426. [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
  1427. };
  1428. static const struct qcom_icc_desc sm8650_aggre2_noc = {
  1429. .config = &icc_regmap_config,
  1430. .nodes = aggre2_noc_nodes,
  1431. .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
  1432. .bcms = aggre2_noc_bcms,
  1433. .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
  1434. };
  1435. static struct qcom_icc_bcm * const clk_virt_bcms[] = {
  1436. &bcm_qup0,
  1437. &bcm_qup1,
  1438. &bcm_qup2,
  1439. };
  1440. static struct qcom_icc_node * const clk_virt_nodes[] = {
  1441. [MASTER_QUP_CORE_0] = &qup0_core_master,
  1442. [MASTER_QUP_CORE_1] = &qup1_core_master,
  1443. [MASTER_QUP_CORE_2] = &qup2_core_master,
  1444. [SLAVE_QUP_CORE_0] = &qup0_core_slave,
  1445. [SLAVE_QUP_CORE_1] = &qup1_core_slave,
  1446. [SLAVE_QUP_CORE_2] = &qup2_core_slave,
  1447. };
  1448. static const struct qcom_icc_desc sm8650_clk_virt = {
  1449. .nodes = clk_virt_nodes,
  1450. .num_nodes = ARRAY_SIZE(clk_virt_nodes),
  1451. .bcms = clk_virt_bcms,
  1452. .num_bcms = ARRAY_SIZE(clk_virt_bcms),
  1453. };
  1454. static struct qcom_icc_bcm * const config_noc_bcms[] = {
  1455. &bcm_cn0,
  1456. };
  1457. static struct qcom_icc_node * const config_noc_nodes[] = {
  1458. [MASTER_CNOC_CFG] = &qsm_cfg,
  1459. [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
  1460. [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
  1461. [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
  1462. [SLAVE_CLK_CTL] = &qhs_clk_ctl,
  1463. [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
  1464. [SLAVE_CPR_HMX] = &qhs_cpr_hmx,
  1465. [SLAVE_RBCPR_MMCX_CFG] = &qhs_cpr_mmcx,
  1466. [SLAVE_RBCPR_MXA_CFG] = &qhs_cpr_mxa,
  1467. [SLAVE_RBCPR_MXC_CFG] = &qhs_cpr_mxc,
  1468. [SLAVE_CPR_NSPCX] = &qhs_cpr_nspcx,
  1469. [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
  1470. [SLAVE_CX_RDPM] = &qhs_cx_rdpm,
  1471. [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
  1472. [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
  1473. [SLAVE_I2C] = &qhs_i2c,
  1474. [SLAVE_I3C_IBI0_CFG] = &qhs_i3c_ibi0_cfg,
  1475. [SLAVE_I3C_IBI1_CFG] = &qhs_i3c_ibi1_cfg,
  1476. [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
  1477. [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
  1478. [SLAVE_MX_2_RDPM] = &qhs_mx_2_rdpm,
  1479. [SLAVE_MX_RDPM] = &qhs_mx_rdpm,
  1480. [SLAVE_PCIE_0_CFG] = &qhs_pcie0_cfg,
  1481. [SLAVE_PCIE_1_CFG] = &qhs_pcie1_cfg,
  1482. [SLAVE_PCIE_RSCC] = &qhs_pcie_rscc,
  1483. [SLAVE_PDM] = &qhs_pdm,
  1484. [SLAVE_PRNG] = &qhs_prng,
  1485. [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
  1486. [SLAVE_QSPI_0] = &qhs_qspi,
  1487. [SLAVE_QUP_3] = &qhs_qup02,
  1488. [SLAVE_QUP_1] = &qhs_qup1,
  1489. [SLAVE_QUP_2] = &qhs_qup2,
  1490. [SLAVE_SDCC_2] = &qhs_sdc2,
  1491. [SLAVE_SDCC_4] = &qhs_sdc4,
  1492. [SLAVE_SPSS_CFG] = &qhs_spss_cfg,
  1493. [SLAVE_TCSR] = &qhs_tcsr,
  1494. [SLAVE_TLMM] = &qhs_tlmm,
  1495. [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
  1496. [SLAVE_USB3_0] = &qhs_usb3_0,
  1497. [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
  1498. [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
  1499. [SLAVE_CNOC_MNOC_CFG] = &qss_mnoc_cfg,
  1500. [SLAVE_NSP_QTB_CFG] = &qss_nsp_qtb_cfg,
  1501. [SLAVE_PCIE_ANOC_CFG] = &qss_pcie_anoc_cfg,
  1502. [SLAVE_SERVICE_CNOC_CFG] = &srvc_cnoc_cfg,
  1503. [SLAVE_QDSS_STM] = &xs_qdss_stm,
  1504. [SLAVE_TCU] = &xs_sys_tcu_cfg,
  1505. };
  1506. static const struct qcom_icc_desc sm8650_config_noc = {
  1507. .config = &icc_regmap_config,
  1508. .nodes = config_noc_nodes,
  1509. .num_nodes = ARRAY_SIZE(config_noc_nodes),
  1510. .bcms = config_noc_bcms,
  1511. .num_bcms = ARRAY_SIZE(config_noc_bcms),
  1512. };
  1513. static struct qcom_icc_bcm * const cnoc_main_bcms[] = {
  1514. &bcm_cn0,
  1515. };
  1516. static struct qcom_icc_node * const cnoc_main_nodes[] = {
  1517. [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
  1518. [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
  1519. [SLAVE_AOSS] = &qhs_aoss,
  1520. [SLAVE_IPA_CFG] = &qhs_ipa,
  1521. [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
  1522. [SLAVE_TME_CFG] = &qhs_tme_cfg,
  1523. [SLAVE_APPSS] = &qss_apss,
  1524. [SLAVE_CNOC_CFG] = &qss_cfg,
  1525. [SLAVE_DDRSS_CFG] = &qss_ddrss_cfg,
  1526. [SLAVE_IMEM] = &qxs_imem,
  1527. [SLAVE_SERVICE_CNOC] = &srvc_cnoc_main,
  1528. [SLAVE_PCIE_0] = &xs_pcie_0,
  1529. [SLAVE_PCIE_1] = &xs_pcie_1,
  1530. };
  1531. static const struct qcom_icc_desc sm8650_cnoc_main = {
  1532. .config = &icc_regmap_config,
  1533. .nodes = cnoc_main_nodes,
  1534. .num_nodes = ARRAY_SIZE(cnoc_main_nodes),
  1535. .bcms = cnoc_main_bcms,
  1536. .num_bcms = ARRAY_SIZE(cnoc_main_bcms),
  1537. };
  1538. static struct qcom_icc_bcm * const gem_noc_bcms[] = {
  1539. &bcm_sh0,
  1540. &bcm_sh1,
  1541. };
  1542. static struct qcom_icc_node * const gem_noc_nodes[] = {
  1543. [MASTER_GPU_TCU] = &alm_gpu_tcu,
  1544. [MASTER_SYS_TCU] = &alm_sys_tcu,
  1545. [MASTER_UBWC_P_TCU] = &alm_ubwc_p_tcu,
  1546. [MASTER_APPSS_PROC] = &chm_apps,
  1547. [MASTER_GFX3D] = &qnm_gpu,
  1548. [MASTER_LPASS_GEM_NOC] = &qnm_lpass_gemnoc,
  1549. [MASTER_MSS_PROC] = &qnm_mdsp,
  1550. [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
  1551. [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
  1552. [MASTER_COMPUTE_NOC] = &qnm_nsp_gemnoc,
  1553. [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
  1554. [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
  1555. [MASTER_UBWC_P] = &qnm_ubwc_p,
  1556. [MASTER_GIC] = &xm_gic,
  1557. [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
  1558. [SLAVE_LLCC] = &qns_llcc,
  1559. [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
  1560. };
  1561. static const struct qcom_icc_desc sm8650_gem_noc = {
  1562. .config = &icc_regmap_config,
  1563. .nodes = gem_noc_nodes,
  1564. .num_nodes = ARRAY_SIZE(gem_noc_nodes),
  1565. .bcms = gem_noc_bcms,
  1566. .num_bcms = ARRAY_SIZE(gem_noc_bcms),
  1567. };
  1568. static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
  1569. [MASTER_LPIAON_NOC] = &qnm_lpiaon_noc,
  1570. [SLAVE_LPASS_GEM_NOC] = &qns_lpass_ag_noc_gemnoc,
  1571. };
  1572. static const struct qcom_icc_desc sm8650_lpass_ag_noc = {
  1573. .config = &icc_regmap_config,
  1574. .nodes = lpass_ag_noc_nodes,
  1575. .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
  1576. };
  1577. static struct qcom_icc_bcm * const lpass_lpiaon_noc_bcms[] = {
  1578. &bcm_lp0,
  1579. };
  1580. static struct qcom_icc_node * const lpass_lpiaon_noc_nodes[] = {
  1581. [MASTER_LPASS_LPINOC] = &qnm_lpass_lpinoc,
  1582. [SLAVE_LPIAON_NOC_LPASS_AG_NOC] = &qns_lpass_aggnoc,
  1583. };
  1584. static const struct qcom_icc_desc sm8650_lpass_lpiaon_noc = {
  1585. .config = &icc_regmap_config,
  1586. .nodes = lpass_lpiaon_noc_nodes,
  1587. .num_nodes = ARRAY_SIZE(lpass_lpiaon_noc_nodes),
  1588. .bcms = lpass_lpiaon_noc_bcms,
  1589. .num_bcms = ARRAY_SIZE(lpass_lpiaon_noc_bcms),
  1590. };
  1591. static struct qcom_icc_node * const lpass_lpicx_noc_nodes[] = {
  1592. [MASTER_LPASS_PROC] = &qxm_lpinoc_dsp_axim,
  1593. [SLAVE_LPICX_NOC_LPIAON_NOC] = &qns_lpi_aon_noc,
  1594. };
  1595. static const struct qcom_icc_desc sm8650_lpass_lpicx_noc = {
  1596. .config = &icc_regmap_config,
  1597. .nodes = lpass_lpicx_noc_nodes,
  1598. .num_nodes = ARRAY_SIZE(lpass_lpicx_noc_nodes),
  1599. };
  1600. static struct qcom_icc_bcm * const mc_virt_bcms[] = {
  1601. &bcm_acv,
  1602. &bcm_mc0,
  1603. };
  1604. static struct qcom_icc_node * const mc_virt_nodes[] = {
  1605. [MASTER_LLCC] = &llcc_mc,
  1606. [SLAVE_EBI1] = &ebi,
  1607. };
  1608. static const struct qcom_icc_desc sm8650_mc_virt = {
  1609. .nodes = mc_virt_nodes,
  1610. .num_nodes = ARRAY_SIZE(mc_virt_nodes),
  1611. .bcms = mc_virt_bcms,
  1612. .num_bcms = ARRAY_SIZE(mc_virt_bcms),
  1613. };
  1614. static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
  1615. &bcm_mm0,
  1616. &bcm_mm1,
  1617. };
  1618. static struct qcom_icc_node * const mmss_noc_nodes[] = {
  1619. [MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
  1620. [MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
  1621. [MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
  1622. [MASTER_MDP] = &qnm_mdp,
  1623. [MASTER_CDSP_HCP] = &qnm_vapss_hcp,
  1624. [MASTER_VIDEO] = &qnm_video,
  1625. [MASTER_VIDEO_CV_PROC] = &qnm_video_cv_cpu,
  1626. [MASTER_VIDEO_PROC] = &qnm_video_cvp,
  1627. [MASTER_VIDEO_V_PROC] = &qnm_video_v_cpu,
  1628. [MASTER_CNOC_MNOC_CFG] = &qsm_mnoc_cfg,
  1629. [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
  1630. [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
  1631. [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
  1632. };
  1633. static const struct qcom_icc_desc sm8650_mmss_noc = {
  1634. .config = &icc_regmap_config,
  1635. .nodes = mmss_noc_nodes,
  1636. .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
  1637. .bcms = mmss_noc_bcms,
  1638. .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
  1639. };
  1640. static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
  1641. &bcm_co0,
  1642. };
  1643. static struct qcom_icc_node * const nsp_noc_nodes[] = {
  1644. [MASTER_CDSP_PROC] = &qnm_nsp,
  1645. [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
  1646. };
  1647. static const struct qcom_icc_desc sm8650_nsp_noc = {
  1648. .config = &icc_regmap_config,
  1649. .nodes = nsp_noc_nodes,
  1650. .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
  1651. .bcms = nsp_noc_bcms,
  1652. .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
  1653. };
  1654. static struct qcom_icc_bcm * const pcie_anoc_bcms[] = {
  1655. &bcm_sn4,
  1656. };
  1657. static struct qcom_icc_node * const pcie_anoc_nodes[] = {
  1658. [MASTER_PCIE_ANOC_CFG] = &qsm_pcie_anoc_cfg,
  1659. [MASTER_PCIE_0] = &xm_pcie3_0,
  1660. [MASTER_PCIE_1] = &xm_pcie3_1,
  1661. [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
  1662. [SLAVE_SERVICE_PCIE_ANOC] = &srvc_pcie_aggre_noc,
  1663. };
  1664. static const struct qcom_icc_desc sm8650_pcie_anoc = {
  1665. .config = &icc_regmap_config,
  1666. .nodes = pcie_anoc_nodes,
  1667. .num_nodes = ARRAY_SIZE(pcie_anoc_nodes),
  1668. .bcms = pcie_anoc_bcms,
  1669. .num_bcms = ARRAY_SIZE(pcie_anoc_bcms),
  1670. };
  1671. static struct qcom_icc_bcm * const system_noc_bcms[] = {
  1672. &bcm_sn0,
  1673. &bcm_sn2,
  1674. &bcm_sn3,
  1675. };
  1676. static struct qcom_icc_node * const system_noc_nodes[] = {
  1677. [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
  1678. [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
  1679. [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
  1680. [MASTER_APSS_NOC] = &qnm_apss_noc,
  1681. };
  1682. static const struct qcom_icc_desc sm8650_system_noc = {
  1683. .config = &icc_regmap_config,
  1684. .nodes = system_noc_nodes,
  1685. .num_nodes = ARRAY_SIZE(system_noc_nodes),
  1686. .bcms = system_noc_bcms,
  1687. .num_bcms = ARRAY_SIZE(system_noc_bcms),
  1688. };
  1689. static const struct of_device_id qnoc_of_match[] = {
  1690. { .compatible = "qcom,sm8650-aggre1-noc", .data = &sm8650_aggre1_noc },
  1691. { .compatible = "qcom,sm8650-aggre2-noc", .data = &sm8650_aggre2_noc },
  1692. { .compatible = "qcom,sm8650-clk-virt", .data = &sm8650_clk_virt },
  1693. { .compatible = "qcom,sm8650-config-noc", .data = &sm8650_config_noc },
  1694. { .compatible = "qcom,sm8650-cnoc-main", .data = &sm8650_cnoc_main },
  1695. { .compatible = "qcom,sm8650-gem-noc", .data = &sm8650_gem_noc },
  1696. { .compatible = "qcom,sm8650-lpass-ag-noc", .data = &sm8650_lpass_ag_noc },
  1697. { .compatible = "qcom,sm8650-lpass-lpiaon-noc", .data = &sm8650_lpass_lpiaon_noc },
  1698. { .compatible = "qcom,sm8650-lpass-lpicx-noc", .data = &sm8650_lpass_lpicx_noc },
  1699. { .compatible = "qcom,sm8650-mc-virt", .data = &sm8650_mc_virt },
  1700. { .compatible = "qcom,sm8650-mmss-noc", .data = &sm8650_mmss_noc },
  1701. { .compatible = "qcom,sm8650-nsp-noc", .data = &sm8650_nsp_noc },
  1702. { .compatible = "qcom,sm8650-pcie-anoc", .data = &sm8650_pcie_anoc },
  1703. { .compatible = "qcom,sm8650-system-noc", .data = &sm8650_system_noc },
  1704. { }
  1705. };
  1706. MODULE_DEVICE_TABLE(of, qnoc_of_match);
  1707. static struct platform_driver qnoc_driver = {
  1708. .probe = qcom_icc_rpmh_probe,
  1709. .remove = qcom_icc_rpmh_remove,
  1710. .driver = {
  1711. .name = "qnoc-sm8650",
  1712. .of_match_table = qnoc_of_match,
  1713. .sync_state = icc_sync_state,
  1714. },
  1715. };
  1716. static int __init qnoc_driver_init(void)
  1717. {
  1718. return platform_driver_register(&qnoc_driver);
  1719. }
  1720. core_initcall(qnoc_driver_init);
  1721. static void __exit qnoc_driver_exit(void)
  1722. {
  1723. platform_driver_unregister(&qnoc_driver);
  1724. }
  1725. module_exit(qnoc_driver_exit);
  1726. MODULE_DESCRIPTION("sm8650 NoC driver");
  1727. MODULE_LICENSE("GPL");