sm8550.c 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614
  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) 2022, Linaro Limited
  6. *
  7. */
  8. #include <linux/device.h>
  9. #include <linux/interconnect.h>
  10. #include <linux/interconnect-provider.h>
  11. #include <linux/module.h>
  12. #include <linux/mod_devicetable.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/property.h>
  15. #include <dt-bindings/interconnect/qcom,sm8550-rpmh.h>
  16. #include "bcm-voter.h"
  17. #include "icc-common.h"
  18. #include "icc-rpmh.h"
  19. static struct qcom_icc_node qhm_qspi;
  20. static struct qcom_icc_node qhm_qup1;
  21. static struct qcom_icc_node xm_sdc4;
  22. static struct qcom_icc_node xm_ufs_mem;
  23. static struct qcom_icc_node xm_usb3_0;
  24. static struct qcom_icc_node qhm_qdss_bam;
  25. static struct qcom_icc_node qhm_qup2;
  26. static struct qcom_icc_node qxm_crypto;
  27. static struct qcom_icc_node qxm_ipa;
  28. static struct qcom_icc_node qxm_sp;
  29. static struct qcom_icc_node xm_qdss_etr_0;
  30. static struct qcom_icc_node xm_qdss_etr_1;
  31. static struct qcom_icc_node xm_sdc2;
  32. static struct qcom_icc_node qup0_core_master;
  33. static struct qcom_icc_node qup1_core_master;
  34. static struct qcom_icc_node qup2_core_master;
  35. static struct qcom_icc_node qsm_cfg;
  36. static struct qcom_icc_node qnm_gemnoc_cnoc;
  37. static struct qcom_icc_node qnm_gemnoc_pcie;
  38. static struct qcom_icc_node alm_gpu_tcu;
  39. static struct qcom_icc_node alm_sys_tcu;
  40. static struct qcom_icc_node chm_apps;
  41. static struct qcom_icc_node qnm_gpu;
  42. static struct qcom_icc_node qnm_lpass_gemnoc;
  43. static struct qcom_icc_node qnm_mdsp;
  44. static struct qcom_icc_node qnm_mnoc_hf;
  45. static struct qcom_icc_node qnm_mnoc_sf;
  46. static struct qcom_icc_node qnm_nsp_gemnoc;
  47. static struct qcom_icc_node qnm_pcie;
  48. static struct qcom_icc_node qnm_snoc_gc;
  49. static struct qcom_icc_node qnm_snoc_sf;
  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 qxm_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 qhm_gic;
  69. static struct qcom_icc_node qnm_aggre1_noc;
  70. static struct qcom_icc_node qnm_aggre2_noc;
  71. static struct qcom_icc_node xm_gic;
  72. static struct qcom_icc_node qns_a1noc_snoc;
  73. static struct qcom_icc_node qns_a2noc_snoc;
  74. static struct qcom_icc_node qup0_core_slave;
  75. static struct qcom_icc_node qup1_core_slave;
  76. static struct qcom_icc_node qup2_core_slave;
  77. static struct qcom_icc_node qhs_ahb2phy0;
  78. static struct qcom_icc_node qhs_ahb2phy1;
  79. static struct qcom_icc_node qhs_apss;
  80. static struct qcom_icc_node qhs_camera_cfg;
  81. static struct qcom_icc_node qhs_clk_ctl;
  82. static struct qcom_icc_node qhs_cpr_cx;
  83. static struct qcom_icc_node qhs_cpr_mmcx;
  84. static struct qcom_icc_node qhs_cpr_mxa;
  85. static struct qcom_icc_node qhs_cpr_mxc;
  86. static struct qcom_icc_node qhs_cpr_nspcx;
  87. static struct qcom_icc_node qhs_crypto0_cfg;
  88. static struct qcom_icc_node qhs_cx_rdpm;
  89. static struct qcom_icc_node qhs_display_cfg;
  90. static struct qcom_icc_node qhs_gpuss_cfg;
  91. static struct qcom_icc_node qhs_i2c;
  92. static struct qcom_icc_node qhs_imem_cfg;
  93. static struct qcom_icc_node qhs_ipa;
  94. static struct qcom_icc_node qhs_ipc_router;
  95. static struct qcom_icc_node qhs_mss_cfg;
  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_pdm;
  100. static struct qcom_icc_node qhs_pimem_cfg;
  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_qup1;
  105. static struct qcom_icc_node qhs_qup2;
  106. static struct qcom_icc_node qhs_sdc2;
  107. static struct qcom_icc_node qhs_sdc4;
  108. static struct qcom_icc_node qhs_spss_cfg;
  109. static struct qcom_icc_node qhs_tcsr;
  110. static struct qcom_icc_node qhs_tlmm;
  111. static struct qcom_icc_node qhs_ufs_mem_cfg;
  112. static struct qcom_icc_node qhs_usb3_0;
  113. static struct qcom_icc_node qhs_venus_cfg;
  114. static struct qcom_icc_node qhs_vsense_ctrl_cfg;
  115. static struct qcom_icc_node qss_lpass_qtb_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 xs_qdss_stm;
  120. static struct qcom_icc_node xs_sys_tcu_cfg;
  121. static struct qcom_icc_node qhs_aoss;
  122. static struct qcom_icc_node qhs_tme_cfg;
  123. static struct qcom_icc_node qss_cfg;
  124. static struct qcom_icc_node qss_ddrss_cfg;
  125. static struct qcom_icc_node qxs_boot_imem;
  126. static struct qcom_icc_node qxs_imem;
  127. static struct qcom_icc_node xs_pcie_0;
  128. static struct qcom_icc_node xs_pcie_1;
  129. static struct qcom_icc_node qns_gem_noc_cnoc;
  130. static struct qcom_icc_node qns_llcc;
  131. static struct qcom_icc_node qns_pcie;
  132. static struct qcom_icc_node qns_lpass_ag_noc_gemnoc;
  133. static struct qcom_icc_node qns_lpass_aggnoc;
  134. static struct qcom_icc_node qns_lpi_aon_noc;
  135. static struct qcom_icc_node ebi;
  136. static struct qcom_icc_node qns_mem_noc_hf;
  137. static struct qcom_icc_node qns_mem_noc_sf;
  138. static struct qcom_icc_node srvc_mnoc;
  139. static struct qcom_icc_node qns_nsp_gemnoc;
  140. static struct qcom_icc_node qns_pcie_mem_noc;
  141. static struct qcom_icc_node srvc_pcie_aggre_noc;
  142. static struct qcom_icc_node qns_gemnoc_gc;
  143. static struct qcom_icc_node qns_gemnoc_sf;
  144. static struct qcom_icc_node qhm_qspi = {
  145. .name = "qhm_qspi",
  146. .channels = 1,
  147. .buswidth = 4,
  148. .num_links = 1,
  149. .link_nodes = { &qns_a1noc_snoc },
  150. };
  151. static struct qcom_icc_node qhm_qup1 = {
  152. .name = "qhm_qup1",
  153. .channels = 1,
  154. .buswidth = 4,
  155. .num_links = 1,
  156. .link_nodes = { &qns_a1noc_snoc },
  157. };
  158. static struct qcom_icc_node xm_sdc4 = {
  159. .name = "xm_sdc4",
  160. .channels = 1,
  161. .buswidth = 8,
  162. .num_links = 1,
  163. .link_nodes = { &qns_a1noc_snoc },
  164. };
  165. static struct qcom_icc_node xm_ufs_mem = {
  166. .name = "xm_ufs_mem",
  167. .channels = 1,
  168. .buswidth = 16,
  169. .num_links = 1,
  170. .link_nodes = { &qns_a1noc_snoc },
  171. };
  172. static struct qcom_icc_node xm_usb3_0 = {
  173. .name = "xm_usb3_0",
  174. .channels = 1,
  175. .buswidth = 8,
  176. .num_links = 1,
  177. .link_nodes = { &qns_a1noc_snoc },
  178. };
  179. static struct qcom_icc_node qhm_qdss_bam = {
  180. .name = "qhm_qdss_bam",
  181. .channels = 1,
  182. .buswidth = 4,
  183. .num_links = 1,
  184. .link_nodes = { &qns_a2noc_snoc },
  185. };
  186. static struct qcom_icc_node qhm_qup2 = {
  187. .name = "qhm_qup2",
  188. .channels = 1,
  189. .buswidth = 4,
  190. .num_links = 1,
  191. .link_nodes = { &qns_a2noc_snoc },
  192. };
  193. static struct qcom_icc_node qxm_crypto = {
  194. .name = "qxm_crypto",
  195. .channels = 1,
  196. .buswidth = 8,
  197. .num_links = 1,
  198. .link_nodes = { &qns_a2noc_snoc },
  199. };
  200. static struct qcom_icc_node qxm_ipa = {
  201. .name = "qxm_ipa",
  202. .channels = 1,
  203. .buswidth = 8,
  204. .num_links = 1,
  205. .link_nodes = { &qns_a2noc_snoc },
  206. };
  207. static struct qcom_icc_node qxm_sp = {
  208. .name = "qxm_sp",
  209. .channels = 1,
  210. .buswidth = 8,
  211. .num_links = 1,
  212. .link_nodes = { &qns_a2noc_snoc },
  213. };
  214. static struct qcom_icc_node xm_qdss_etr_0 = {
  215. .name = "xm_qdss_etr_0",
  216. .channels = 1,
  217. .buswidth = 8,
  218. .num_links = 1,
  219. .link_nodes = { &qns_a2noc_snoc },
  220. };
  221. static struct qcom_icc_node xm_qdss_etr_1 = {
  222. .name = "xm_qdss_etr_1",
  223. .channels = 1,
  224. .buswidth = 8,
  225. .num_links = 1,
  226. .link_nodes = { &qns_a2noc_snoc },
  227. };
  228. static struct qcom_icc_node xm_sdc2 = {
  229. .name = "xm_sdc2",
  230. .channels = 1,
  231. .buswidth = 8,
  232. .num_links = 1,
  233. .link_nodes = { &qns_a2noc_snoc },
  234. };
  235. static struct qcom_icc_node qup0_core_master = {
  236. .name = "qup0_core_master",
  237. .channels = 1,
  238. .buswidth = 4,
  239. .num_links = 1,
  240. .link_nodes = { &qup0_core_slave },
  241. };
  242. static struct qcom_icc_node qup1_core_master = {
  243. .name = "qup1_core_master",
  244. .channels = 1,
  245. .buswidth = 4,
  246. .num_links = 1,
  247. .link_nodes = { &qup1_core_slave },
  248. };
  249. static struct qcom_icc_node qup2_core_master = {
  250. .name = "qup2_core_master",
  251. .channels = 1,
  252. .buswidth = 4,
  253. .num_links = 1,
  254. .link_nodes = { &qup2_core_slave },
  255. };
  256. static struct qcom_icc_node qsm_cfg = {
  257. .name = "qsm_cfg",
  258. .channels = 1,
  259. .buswidth = 4,
  260. .num_links = 44,
  261. .link_nodes = { &qhs_ahb2phy0, &qhs_ahb2phy1,
  262. &qhs_apss, &qhs_camera_cfg,
  263. &qhs_clk_ctl, &qhs_cpr_cx,
  264. &qhs_cpr_mmcx, &qhs_cpr_mxa,
  265. &qhs_cpr_mxc, &qhs_cpr_nspcx,
  266. &qhs_crypto0_cfg, &qhs_cx_rdpm,
  267. &qhs_display_cfg, &qhs_gpuss_cfg,
  268. &qhs_i2c, &qhs_imem_cfg,
  269. &qhs_ipa, &qhs_ipc_router,
  270. &qhs_mss_cfg, &qhs_mx_rdpm,
  271. &qhs_pcie0_cfg, &qhs_pcie1_cfg,
  272. &qhs_pdm, &qhs_pimem_cfg,
  273. &qhs_prng, &qhs_qdss_cfg,
  274. &qhs_qspi, &qhs_qup1,
  275. &qhs_qup2, &qhs_sdc2,
  276. &qhs_sdc4, &qhs_spss_cfg,
  277. &qhs_tcsr, &qhs_tlmm,
  278. &qhs_ufs_mem_cfg, &qhs_usb3_0,
  279. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  280. &qss_lpass_qtb_cfg, &qss_mnoc_cfg,
  281. &qss_nsp_qtb_cfg, &qss_pcie_anoc_cfg,
  282. &xs_qdss_stm, &xs_sys_tcu_cfg },
  283. };
  284. static struct qcom_icc_node qnm_gemnoc_cnoc = {
  285. .name = "qnm_gemnoc_cnoc",
  286. .channels = 1,
  287. .buswidth = 16,
  288. .num_links = 6,
  289. .link_nodes = { &qhs_aoss, &qhs_tme_cfg,
  290. &qss_cfg, &qss_ddrss_cfg,
  291. &qxs_boot_imem, &qxs_imem },
  292. };
  293. static struct qcom_icc_node qnm_gemnoc_pcie = {
  294. .name = "qnm_gemnoc_pcie",
  295. .channels = 1,
  296. .buswidth = 8,
  297. .num_links = 2,
  298. .link_nodes = { &xs_pcie_0, &xs_pcie_1 },
  299. };
  300. static struct qcom_icc_node alm_gpu_tcu = {
  301. .name = "alm_gpu_tcu",
  302. .channels = 1,
  303. .buswidth = 8,
  304. .num_links = 2,
  305. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  306. };
  307. static struct qcom_icc_node alm_sys_tcu = {
  308. .name = "alm_sys_tcu",
  309. .channels = 1,
  310. .buswidth = 8,
  311. .num_links = 2,
  312. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  313. };
  314. static struct qcom_icc_node chm_apps = {
  315. .name = "chm_apps",
  316. .channels = 3,
  317. .buswidth = 32,
  318. .num_links = 3,
  319. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  320. &qns_pcie },
  321. };
  322. static struct qcom_icc_node qnm_gpu = {
  323. .name = "qnm_gpu",
  324. .channels = 2,
  325. .buswidth = 32,
  326. .num_links = 2,
  327. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  328. };
  329. static struct qcom_icc_node qnm_lpass_gemnoc = {
  330. .name = "qnm_lpass_gemnoc",
  331. .channels = 1,
  332. .buswidth = 16,
  333. .num_links = 3,
  334. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  335. &qns_pcie },
  336. };
  337. static struct qcom_icc_node qnm_mdsp = {
  338. .name = "qnm_mdsp",
  339. .channels = 1,
  340. .buswidth = 16,
  341. .num_links = 3,
  342. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  343. &qns_pcie },
  344. };
  345. static struct qcom_icc_node qnm_mnoc_hf = {
  346. .name = "qnm_mnoc_hf",
  347. .channels = 2,
  348. .buswidth = 32,
  349. .num_links = 2,
  350. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  351. };
  352. static struct qcom_icc_node qnm_mnoc_sf = {
  353. .name = "qnm_mnoc_sf",
  354. .channels = 2,
  355. .buswidth = 32,
  356. .num_links = 2,
  357. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  358. };
  359. static struct qcom_icc_node qnm_nsp_gemnoc = {
  360. .name = "qnm_nsp_gemnoc",
  361. .channels = 2,
  362. .buswidth = 32,
  363. .num_links = 2,
  364. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  365. };
  366. static struct qcom_icc_node qnm_pcie = {
  367. .name = "qnm_pcie",
  368. .channels = 1,
  369. .buswidth = 16,
  370. .num_links = 2,
  371. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  372. };
  373. static struct qcom_icc_node qnm_snoc_gc = {
  374. .name = "qnm_snoc_gc",
  375. .channels = 1,
  376. .buswidth = 8,
  377. .num_links = 1,
  378. .link_nodes = { &qns_llcc },
  379. };
  380. static struct qcom_icc_node qnm_snoc_sf = {
  381. .name = "qnm_snoc_sf",
  382. .channels = 1,
  383. .buswidth = 16,
  384. .num_links = 3,
  385. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  386. &qns_pcie },
  387. };
  388. static struct qcom_icc_node qnm_lpiaon_noc = {
  389. .name = "qnm_lpiaon_noc",
  390. .channels = 1,
  391. .buswidth = 16,
  392. .num_links = 1,
  393. .link_nodes = { &qns_lpass_ag_noc_gemnoc },
  394. };
  395. static struct qcom_icc_node qnm_lpass_lpinoc = {
  396. .name = "qnm_lpass_lpinoc",
  397. .channels = 1,
  398. .buswidth = 16,
  399. .num_links = 1,
  400. .link_nodes = { &qns_lpass_aggnoc },
  401. };
  402. static struct qcom_icc_node qxm_lpinoc_dsp_axim = {
  403. .name = "qxm_lpinoc_dsp_axim",
  404. .channels = 1,
  405. .buswidth = 16,
  406. .num_links = 1,
  407. .link_nodes = { &qns_lpi_aon_noc },
  408. };
  409. static struct qcom_icc_node llcc_mc = {
  410. .name = "llcc_mc",
  411. .channels = 4,
  412. .buswidth = 4,
  413. .num_links = 1,
  414. .link_nodes = { &ebi },
  415. };
  416. static struct qcom_icc_node qnm_camnoc_hf = {
  417. .name = "qnm_camnoc_hf",
  418. .channels = 2,
  419. .buswidth = 32,
  420. .num_links = 1,
  421. .link_nodes = { &qns_mem_noc_hf },
  422. };
  423. static struct qcom_icc_node qnm_camnoc_icp = {
  424. .name = "qnm_camnoc_icp",
  425. .channels = 1,
  426. .buswidth = 8,
  427. .num_links = 1,
  428. .link_nodes = { &qns_mem_noc_sf },
  429. };
  430. static struct qcom_icc_node qnm_camnoc_sf = {
  431. .name = "qnm_camnoc_sf",
  432. .channels = 2,
  433. .buswidth = 32,
  434. .num_links = 1,
  435. .link_nodes = { &qns_mem_noc_sf },
  436. };
  437. static struct qcom_icc_node qnm_mdp = {
  438. .name = "qnm_mdp",
  439. .channels = 2,
  440. .buswidth = 32,
  441. .num_links = 1,
  442. .link_nodes = { &qns_mem_noc_hf },
  443. };
  444. static struct qcom_icc_node qnm_vapss_hcp = {
  445. .name = "qnm_vapss_hcp",
  446. .channels = 1,
  447. .buswidth = 32,
  448. .num_links = 1,
  449. .link_nodes = { &qns_mem_noc_sf },
  450. };
  451. static struct qcom_icc_node qnm_video = {
  452. .name = "qnm_video",
  453. .channels = 2,
  454. .buswidth = 32,
  455. .num_links = 1,
  456. .link_nodes = { &qns_mem_noc_sf },
  457. };
  458. static struct qcom_icc_node qnm_video_cv_cpu = {
  459. .name = "qnm_video_cv_cpu",
  460. .channels = 1,
  461. .buswidth = 8,
  462. .num_links = 1,
  463. .link_nodes = { &qns_mem_noc_sf },
  464. };
  465. static struct qcom_icc_node qnm_video_cvp = {
  466. .name = "qnm_video_cvp",
  467. .channels = 1,
  468. .buswidth = 32,
  469. .num_links = 1,
  470. .link_nodes = { &qns_mem_noc_sf },
  471. };
  472. static struct qcom_icc_node qnm_video_v_cpu = {
  473. .name = "qnm_video_v_cpu",
  474. .channels = 1,
  475. .buswidth = 8,
  476. .num_links = 1,
  477. .link_nodes = { &qns_mem_noc_sf },
  478. };
  479. static struct qcom_icc_node qsm_mnoc_cfg = {
  480. .name = "qsm_mnoc_cfg",
  481. .channels = 1,
  482. .buswidth = 4,
  483. .num_links = 1,
  484. .link_nodes = { &srvc_mnoc },
  485. };
  486. static struct qcom_icc_node qxm_nsp = {
  487. .name = "qxm_nsp",
  488. .channels = 2,
  489. .buswidth = 32,
  490. .num_links = 1,
  491. .link_nodes = { &qns_nsp_gemnoc },
  492. };
  493. static struct qcom_icc_node qsm_pcie_anoc_cfg = {
  494. .name = "qsm_pcie_anoc_cfg",
  495. .channels = 1,
  496. .buswidth = 4,
  497. .num_links = 1,
  498. .link_nodes = { &srvc_pcie_aggre_noc },
  499. };
  500. static struct qcom_icc_node xm_pcie3_0 = {
  501. .name = "xm_pcie3_0",
  502. .channels = 1,
  503. .buswidth = 8,
  504. .num_links = 1,
  505. .link_nodes = { &qns_pcie_mem_noc },
  506. };
  507. static struct qcom_icc_node xm_pcie3_1 = {
  508. .name = "xm_pcie3_1",
  509. .channels = 1,
  510. .buswidth = 16,
  511. .num_links = 1,
  512. .link_nodes = { &qns_pcie_mem_noc },
  513. };
  514. static struct qcom_icc_node qhm_gic = {
  515. .name = "qhm_gic",
  516. .channels = 1,
  517. .buswidth = 4,
  518. .num_links = 1,
  519. .link_nodes = { &qns_gemnoc_sf },
  520. };
  521. static struct qcom_icc_node qnm_aggre1_noc = {
  522. .name = "qnm_aggre1_noc",
  523. .channels = 1,
  524. .buswidth = 16,
  525. .num_links = 1,
  526. .link_nodes = { &qns_gemnoc_sf },
  527. };
  528. static struct qcom_icc_node qnm_aggre2_noc = {
  529. .name = "qnm_aggre2_noc",
  530. .channels = 1,
  531. .buswidth = 16,
  532. .num_links = 1,
  533. .link_nodes = { &qns_gemnoc_sf },
  534. };
  535. static struct qcom_icc_node xm_gic = {
  536. .name = "xm_gic",
  537. .channels = 1,
  538. .buswidth = 8,
  539. .num_links = 1,
  540. .link_nodes = { &qns_gemnoc_gc },
  541. };
  542. static struct qcom_icc_node qns_a1noc_snoc = {
  543. .name = "qns_a1noc_snoc",
  544. .channels = 1,
  545. .buswidth = 16,
  546. .num_links = 1,
  547. .link_nodes = { &qnm_aggre1_noc },
  548. };
  549. static struct qcom_icc_node qns_a2noc_snoc = {
  550. .name = "qns_a2noc_snoc",
  551. .channels = 1,
  552. .buswidth = 16,
  553. .num_links = 1,
  554. .link_nodes = { &qnm_aggre2_noc },
  555. };
  556. static struct qcom_icc_node qup0_core_slave = {
  557. .name = "qup0_core_slave",
  558. .channels = 1,
  559. .buswidth = 4,
  560. };
  561. static struct qcom_icc_node qup1_core_slave = {
  562. .name = "qup1_core_slave",
  563. .channels = 1,
  564. .buswidth = 4,
  565. };
  566. static struct qcom_icc_node qup2_core_slave = {
  567. .name = "qup2_core_slave",
  568. .channels = 1,
  569. .buswidth = 4,
  570. };
  571. static struct qcom_icc_node qhs_ahb2phy0 = {
  572. .name = "qhs_ahb2phy0",
  573. .channels = 1,
  574. .buswidth = 4,
  575. };
  576. static struct qcom_icc_node qhs_ahb2phy1 = {
  577. .name = "qhs_ahb2phy1",
  578. .channels = 1,
  579. .buswidth = 4,
  580. };
  581. static struct qcom_icc_node qhs_apss = {
  582. .name = "qhs_apss",
  583. .channels = 1,
  584. .buswidth = 8,
  585. };
  586. static struct qcom_icc_node qhs_camera_cfg = {
  587. .name = "qhs_camera_cfg",
  588. .channels = 1,
  589. .buswidth = 4,
  590. };
  591. static struct qcom_icc_node qhs_clk_ctl = {
  592. .name = "qhs_clk_ctl",
  593. .channels = 1,
  594. .buswidth = 4,
  595. };
  596. static struct qcom_icc_node qhs_cpr_cx = {
  597. .name = "qhs_cpr_cx",
  598. .channels = 1,
  599. .buswidth = 4,
  600. };
  601. static struct qcom_icc_node qhs_cpr_mmcx = {
  602. .name = "qhs_cpr_mmcx",
  603. .channels = 1,
  604. .buswidth = 4,
  605. };
  606. static struct qcom_icc_node qhs_cpr_mxa = {
  607. .name = "qhs_cpr_mxa",
  608. .channels = 1,
  609. .buswidth = 4,
  610. };
  611. static struct qcom_icc_node qhs_cpr_mxc = {
  612. .name = "qhs_cpr_mxc",
  613. .channels = 1,
  614. .buswidth = 4,
  615. };
  616. static struct qcom_icc_node qhs_cpr_nspcx = {
  617. .name = "qhs_cpr_nspcx",
  618. .channels = 1,
  619. .buswidth = 4,
  620. };
  621. static struct qcom_icc_node qhs_crypto0_cfg = {
  622. .name = "qhs_crypto0_cfg",
  623. .channels = 1,
  624. .buswidth = 4,
  625. };
  626. static struct qcom_icc_node qhs_cx_rdpm = {
  627. .name = "qhs_cx_rdpm",
  628. .channels = 1,
  629. .buswidth = 4,
  630. };
  631. static struct qcom_icc_node qhs_display_cfg = {
  632. .name = "qhs_display_cfg",
  633. .channels = 1,
  634. .buswidth = 4,
  635. };
  636. static struct qcom_icc_node qhs_gpuss_cfg = {
  637. .name = "qhs_gpuss_cfg",
  638. .channels = 1,
  639. .buswidth = 8,
  640. };
  641. static struct qcom_icc_node qhs_i2c = {
  642. .name = "qhs_i2c",
  643. .channels = 1,
  644. .buswidth = 4,
  645. };
  646. static struct qcom_icc_node qhs_imem_cfg = {
  647. .name = "qhs_imem_cfg",
  648. .channels = 1,
  649. .buswidth = 4,
  650. };
  651. static struct qcom_icc_node qhs_ipa = {
  652. .name = "qhs_ipa",
  653. .channels = 1,
  654. .buswidth = 4,
  655. };
  656. static struct qcom_icc_node qhs_ipc_router = {
  657. .name = "qhs_ipc_router",
  658. .channels = 1,
  659. .buswidth = 4,
  660. };
  661. static struct qcom_icc_node qhs_mss_cfg = {
  662. .name = "qhs_mss_cfg",
  663. .channels = 1,
  664. .buswidth = 4,
  665. };
  666. static struct qcom_icc_node qhs_mx_rdpm = {
  667. .name = "qhs_mx_rdpm",
  668. .channels = 1,
  669. .buswidth = 4,
  670. };
  671. static struct qcom_icc_node qhs_pcie0_cfg = {
  672. .name = "qhs_pcie0_cfg",
  673. .channels = 1,
  674. .buswidth = 4,
  675. };
  676. static struct qcom_icc_node qhs_pcie1_cfg = {
  677. .name = "qhs_pcie1_cfg",
  678. .channels = 1,
  679. .buswidth = 4,
  680. };
  681. static struct qcom_icc_node qhs_pdm = {
  682. .name = "qhs_pdm",
  683. .channels = 1,
  684. .buswidth = 4,
  685. };
  686. static struct qcom_icc_node qhs_pimem_cfg = {
  687. .name = "qhs_pimem_cfg",
  688. .channels = 1,
  689. .buswidth = 4,
  690. };
  691. static struct qcom_icc_node qhs_prng = {
  692. .name = "qhs_prng",
  693. .channels = 1,
  694. .buswidth = 4,
  695. };
  696. static struct qcom_icc_node qhs_qdss_cfg = {
  697. .name = "qhs_qdss_cfg",
  698. .channels = 1,
  699. .buswidth = 4,
  700. };
  701. static struct qcom_icc_node qhs_qspi = {
  702. .name = "qhs_qspi",
  703. .channels = 1,
  704. .buswidth = 4,
  705. };
  706. static struct qcom_icc_node qhs_qup1 = {
  707. .name = "qhs_qup1",
  708. .channels = 1,
  709. .buswidth = 4,
  710. };
  711. static struct qcom_icc_node qhs_qup2 = {
  712. .name = "qhs_qup2",
  713. .channels = 1,
  714. .buswidth = 4,
  715. };
  716. static struct qcom_icc_node qhs_sdc2 = {
  717. .name = "qhs_sdc2",
  718. .channels = 1,
  719. .buswidth = 4,
  720. };
  721. static struct qcom_icc_node qhs_sdc4 = {
  722. .name = "qhs_sdc4",
  723. .channels = 1,
  724. .buswidth = 4,
  725. };
  726. static struct qcom_icc_node qhs_spss_cfg = {
  727. .name = "qhs_spss_cfg",
  728. .channels = 1,
  729. .buswidth = 4,
  730. };
  731. static struct qcom_icc_node qhs_tcsr = {
  732. .name = "qhs_tcsr",
  733. .channels = 1,
  734. .buswidth = 4,
  735. };
  736. static struct qcom_icc_node qhs_tlmm = {
  737. .name = "qhs_tlmm",
  738. .channels = 1,
  739. .buswidth = 4,
  740. };
  741. static struct qcom_icc_node qhs_ufs_mem_cfg = {
  742. .name = "qhs_ufs_mem_cfg",
  743. .channels = 1,
  744. .buswidth = 4,
  745. };
  746. static struct qcom_icc_node qhs_usb3_0 = {
  747. .name = "qhs_usb3_0",
  748. .channels = 1,
  749. .buswidth = 4,
  750. };
  751. static struct qcom_icc_node qhs_venus_cfg = {
  752. .name = "qhs_venus_cfg",
  753. .channels = 1,
  754. .buswidth = 4,
  755. };
  756. static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
  757. .name = "qhs_vsense_ctrl_cfg",
  758. .channels = 1,
  759. .buswidth = 4,
  760. };
  761. static struct qcom_icc_node qss_lpass_qtb_cfg = {
  762. .name = "qss_lpass_qtb_cfg",
  763. .channels = 1,
  764. .buswidth = 4,
  765. };
  766. static struct qcom_icc_node qss_mnoc_cfg = {
  767. .name = "qss_mnoc_cfg",
  768. .channels = 1,
  769. .buswidth = 4,
  770. .num_links = 1,
  771. .link_nodes = { &qsm_mnoc_cfg },
  772. };
  773. static struct qcom_icc_node qss_nsp_qtb_cfg = {
  774. .name = "qss_nsp_qtb_cfg",
  775. .channels = 1,
  776. .buswidth = 4,
  777. };
  778. static struct qcom_icc_node qss_pcie_anoc_cfg = {
  779. .name = "qss_pcie_anoc_cfg",
  780. .channels = 1,
  781. .buswidth = 4,
  782. .num_links = 1,
  783. .link_nodes = { &qsm_pcie_anoc_cfg },
  784. };
  785. static struct qcom_icc_node xs_qdss_stm = {
  786. .name = "xs_qdss_stm",
  787. .channels = 1,
  788. .buswidth = 4,
  789. };
  790. static struct qcom_icc_node xs_sys_tcu_cfg = {
  791. .name = "xs_sys_tcu_cfg",
  792. .channels = 1,
  793. .buswidth = 8,
  794. };
  795. static struct qcom_icc_node qhs_aoss = {
  796. .name = "qhs_aoss",
  797. .channels = 1,
  798. .buswidth = 4,
  799. };
  800. static struct qcom_icc_node qhs_tme_cfg = {
  801. .name = "qhs_tme_cfg",
  802. .channels = 1,
  803. .buswidth = 4,
  804. };
  805. static struct qcom_icc_node qss_cfg = {
  806. .name = "qss_cfg",
  807. .channels = 1,
  808. .buswidth = 4,
  809. .num_links = 1,
  810. .link_nodes = { &qsm_cfg },
  811. };
  812. static struct qcom_icc_node qss_ddrss_cfg = {
  813. .name = "qss_ddrss_cfg",
  814. .channels = 1,
  815. .buswidth = 4,
  816. };
  817. static struct qcom_icc_node qxs_boot_imem = {
  818. .name = "qxs_boot_imem",
  819. .channels = 1,
  820. .buswidth = 8,
  821. };
  822. static struct qcom_icc_node qxs_imem = {
  823. .name = "qxs_imem",
  824. .channels = 1,
  825. .buswidth = 8,
  826. };
  827. static struct qcom_icc_node xs_pcie_0 = {
  828. .name = "xs_pcie_0",
  829. .channels = 1,
  830. .buswidth = 8,
  831. };
  832. static struct qcom_icc_node xs_pcie_1 = {
  833. .name = "xs_pcie_1",
  834. .channels = 1,
  835. .buswidth = 16,
  836. };
  837. static struct qcom_icc_node qns_gem_noc_cnoc = {
  838. .name = "qns_gem_noc_cnoc",
  839. .channels = 1,
  840. .buswidth = 16,
  841. .num_links = 1,
  842. .link_nodes = { &qnm_gemnoc_cnoc },
  843. };
  844. static struct qcom_icc_node qns_llcc = {
  845. .name = "qns_llcc",
  846. .channels = 4,
  847. .buswidth = 16,
  848. .num_links = 1,
  849. .link_nodes = { &llcc_mc },
  850. };
  851. static struct qcom_icc_node qns_pcie = {
  852. .name = "qns_pcie",
  853. .channels = 1,
  854. .buswidth = 8,
  855. .num_links = 1,
  856. .link_nodes = { &qnm_gemnoc_pcie },
  857. };
  858. static struct qcom_icc_node qns_lpass_ag_noc_gemnoc = {
  859. .name = "qns_lpass_ag_noc_gemnoc",
  860. .channels = 1,
  861. .buswidth = 16,
  862. .num_links = 1,
  863. .link_nodes = { &qnm_lpass_gemnoc },
  864. };
  865. static struct qcom_icc_node qns_lpass_aggnoc = {
  866. .name = "qns_lpass_aggnoc",
  867. .channels = 1,
  868. .buswidth = 16,
  869. .num_links = 1,
  870. .link_nodes = { &qnm_lpiaon_noc },
  871. };
  872. static struct qcom_icc_node qns_lpi_aon_noc = {
  873. .name = "qns_lpi_aon_noc",
  874. .channels = 1,
  875. .buswidth = 16,
  876. .num_links = 1,
  877. .link_nodes = { &qnm_lpass_lpinoc },
  878. };
  879. static struct qcom_icc_node ebi = {
  880. .name = "ebi",
  881. .channels = 4,
  882. .buswidth = 4,
  883. };
  884. static struct qcom_icc_node qns_mem_noc_hf = {
  885. .name = "qns_mem_noc_hf",
  886. .channels = 2,
  887. .buswidth = 32,
  888. .num_links = 1,
  889. .link_nodes = { &qnm_mnoc_hf },
  890. };
  891. static struct qcom_icc_node qns_mem_noc_sf = {
  892. .name = "qns_mem_noc_sf",
  893. .channels = 2,
  894. .buswidth = 32,
  895. .num_links = 1,
  896. .link_nodes = { &qnm_mnoc_sf },
  897. };
  898. static struct qcom_icc_node srvc_mnoc = {
  899. .name = "srvc_mnoc",
  900. .channels = 1,
  901. .buswidth = 4,
  902. };
  903. static struct qcom_icc_node qns_nsp_gemnoc = {
  904. .name = "qns_nsp_gemnoc",
  905. .channels = 2,
  906. .buswidth = 32,
  907. .num_links = 1,
  908. .link_nodes = { &qnm_nsp_gemnoc },
  909. };
  910. static struct qcom_icc_node qns_pcie_mem_noc = {
  911. .name = "qns_pcie_mem_noc",
  912. .channels = 1,
  913. .buswidth = 16,
  914. .num_links = 1,
  915. .link_nodes = { &qnm_pcie },
  916. };
  917. static struct qcom_icc_node srvc_pcie_aggre_noc = {
  918. .name = "srvc_pcie_aggre_noc",
  919. .channels = 1,
  920. .buswidth = 4,
  921. };
  922. static struct qcom_icc_node qns_gemnoc_gc = {
  923. .name = "qns_gemnoc_gc",
  924. .channels = 1,
  925. .buswidth = 8,
  926. .num_links = 1,
  927. .link_nodes = { &qnm_snoc_gc },
  928. };
  929. static struct qcom_icc_node qns_gemnoc_sf = {
  930. .name = "qns_gemnoc_sf",
  931. .channels = 1,
  932. .buswidth = 16,
  933. .num_links = 1,
  934. .link_nodes = { &qnm_snoc_sf },
  935. };
  936. static struct qcom_icc_bcm bcm_acv = {
  937. .name = "ACV",
  938. .enable_mask = 0x8,
  939. .num_nodes = 1,
  940. .nodes = { &ebi },
  941. };
  942. static struct qcom_icc_bcm bcm_ce0 = {
  943. .name = "CE0",
  944. .num_nodes = 1,
  945. .nodes = { &qxm_crypto },
  946. };
  947. static struct qcom_icc_bcm bcm_cn0 = {
  948. .name = "CN0",
  949. .enable_mask = 0x1,
  950. .keepalive = true,
  951. .num_nodes = 54,
  952. .nodes = { &qsm_cfg, &qhs_ahb2phy0,
  953. &qhs_ahb2phy1, &qhs_apss,
  954. &qhs_camera_cfg, &qhs_clk_ctl,
  955. &qhs_cpr_cx, &qhs_cpr_mmcx,
  956. &qhs_cpr_mxa, &qhs_cpr_mxc,
  957. &qhs_cpr_nspcx, &qhs_crypto0_cfg,
  958. &qhs_cx_rdpm, &qhs_gpuss_cfg,
  959. &qhs_i2c, &qhs_imem_cfg,
  960. &qhs_ipa, &qhs_ipc_router,
  961. &qhs_mss_cfg, &qhs_mx_rdpm,
  962. &qhs_pcie0_cfg, &qhs_pcie1_cfg,
  963. &qhs_pdm, &qhs_pimem_cfg,
  964. &qhs_prng, &qhs_qdss_cfg,
  965. &qhs_qspi, &qhs_qup1,
  966. &qhs_qup2, &qhs_sdc2,
  967. &qhs_sdc4, &qhs_spss_cfg,
  968. &qhs_tcsr, &qhs_tlmm,
  969. &qhs_ufs_mem_cfg, &qhs_usb3_0,
  970. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  971. &qss_lpass_qtb_cfg, &qss_mnoc_cfg,
  972. &qss_nsp_qtb_cfg, &qss_pcie_anoc_cfg,
  973. &xs_qdss_stm, &xs_sys_tcu_cfg,
  974. &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie,
  975. &qhs_aoss, &qhs_tme_cfg,
  976. &qss_cfg, &qss_ddrss_cfg,
  977. &qxs_boot_imem, &qxs_imem,
  978. &xs_pcie_0, &xs_pcie_1 },
  979. };
  980. static struct qcom_icc_bcm bcm_cn1 = {
  981. .name = "CN1",
  982. .num_nodes = 1,
  983. .nodes = { &qhs_display_cfg },
  984. };
  985. static struct qcom_icc_bcm bcm_co0 = {
  986. .name = "CO0",
  987. .enable_mask = 0x1,
  988. .num_nodes = 2,
  989. .nodes = { &qxm_nsp, &qns_nsp_gemnoc },
  990. };
  991. static struct qcom_icc_bcm bcm_lp0 = {
  992. .name = "LP0",
  993. .num_nodes = 2,
  994. .nodes = { &qnm_lpass_lpinoc, &qns_lpass_aggnoc },
  995. };
  996. static struct qcom_icc_bcm bcm_mc0 = {
  997. .name = "MC0",
  998. .keepalive = true,
  999. .num_nodes = 1,
  1000. .nodes = { &ebi },
  1001. };
  1002. static struct qcom_icc_bcm bcm_mm0 = {
  1003. .name = "MM0",
  1004. .num_nodes = 1,
  1005. .nodes = { &qns_mem_noc_hf },
  1006. };
  1007. static struct qcom_icc_bcm bcm_mm1 = {
  1008. .name = "MM1",
  1009. .enable_mask = 0x1,
  1010. .num_nodes = 8,
  1011. .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp,
  1012. &qnm_camnoc_sf, &qnm_vapss_hcp,
  1013. &qnm_video_cv_cpu, &qnm_video_cvp,
  1014. &qnm_video_v_cpu, &qns_mem_noc_sf },
  1015. };
  1016. static struct qcom_icc_bcm bcm_qup0 = {
  1017. .name = "QUP0",
  1018. .keepalive = true,
  1019. .vote_scale = 1,
  1020. .num_nodes = 1,
  1021. .nodes = { &qup0_core_slave },
  1022. };
  1023. static struct qcom_icc_bcm bcm_qup1 = {
  1024. .name = "QUP1",
  1025. .keepalive = true,
  1026. .vote_scale = 1,
  1027. .num_nodes = 1,
  1028. .nodes = { &qup1_core_slave },
  1029. };
  1030. static struct qcom_icc_bcm bcm_qup2 = {
  1031. .name = "QUP2",
  1032. .keepalive = true,
  1033. .vote_scale = 1,
  1034. .num_nodes = 1,
  1035. .nodes = { &qup2_core_slave },
  1036. };
  1037. static struct qcom_icc_bcm bcm_sh0 = {
  1038. .name = "SH0",
  1039. .keepalive = true,
  1040. .num_nodes = 1,
  1041. .nodes = { &qns_llcc },
  1042. };
  1043. static struct qcom_icc_bcm bcm_sh1 = {
  1044. .name = "SH1",
  1045. .enable_mask = 0x1,
  1046. .num_nodes = 13,
  1047. .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
  1048. &chm_apps, &qnm_gpu,
  1049. &qnm_mdsp, &qnm_mnoc_hf,
  1050. &qnm_mnoc_sf, &qnm_nsp_gemnoc,
  1051. &qnm_pcie, &qnm_snoc_gc,
  1052. &qnm_snoc_sf, &qns_gem_noc_cnoc,
  1053. &qns_pcie },
  1054. };
  1055. static struct qcom_icc_bcm bcm_sn0 = {
  1056. .name = "SN0",
  1057. .keepalive = true,
  1058. .num_nodes = 1,
  1059. .nodes = { &qns_gemnoc_sf },
  1060. };
  1061. static struct qcom_icc_bcm bcm_sn1 = {
  1062. .name = "SN1",
  1063. .enable_mask = 0x1,
  1064. .num_nodes = 3,
  1065. .nodes = { &qhm_gic, &xm_gic,
  1066. &qns_gemnoc_gc },
  1067. };
  1068. static struct qcom_icc_bcm bcm_sn2 = {
  1069. .name = "SN2",
  1070. .num_nodes = 1,
  1071. .nodes = { &qnm_aggre1_noc },
  1072. };
  1073. static struct qcom_icc_bcm bcm_sn3 = {
  1074. .name = "SN3",
  1075. .num_nodes = 1,
  1076. .nodes = { &qnm_aggre2_noc },
  1077. };
  1078. static struct qcom_icc_bcm bcm_sn7 = {
  1079. .name = "SN7",
  1080. .num_nodes = 1,
  1081. .nodes = { &qns_pcie_mem_noc },
  1082. };
  1083. static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
  1084. };
  1085. static struct qcom_icc_node * const aggre1_noc_nodes[] = {
  1086. [MASTER_QSPI_0] = &qhm_qspi,
  1087. [MASTER_QUP_1] = &qhm_qup1,
  1088. [MASTER_SDCC_4] = &xm_sdc4,
  1089. [MASTER_UFS_MEM] = &xm_ufs_mem,
  1090. [MASTER_USB3_0] = &xm_usb3_0,
  1091. [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
  1092. };
  1093. static const struct qcom_icc_desc sm8550_aggre1_noc = {
  1094. .nodes = aggre1_noc_nodes,
  1095. .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
  1096. .bcms = aggre1_noc_bcms,
  1097. .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
  1098. };
  1099. static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
  1100. &bcm_ce0,
  1101. };
  1102. static struct qcom_icc_node * const aggre2_noc_nodes[] = {
  1103. [MASTER_QDSS_BAM] = &qhm_qdss_bam,
  1104. [MASTER_QUP_2] = &qhm_qup2,
  1105. [MASTER_CRYPTO] = &qxm_crypto,
  1106. [MASTER_IPA] = &qxm_ipa,
  1107. [MASTER_SP] = &qxm_sp,
  1108. [MASTER_QDSS_ETR] = &xm_qdss_etr_0,
  1109. [MASTER_QDSS_ETR_1] = &xm_qdss_etr_1,
  1110. [MASTER_SDCC_2] = &xm_sdc2,
  1111. [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
  1112. };
  1113. static const struct qcom_icc_desc sm8550_aggre2_noc = {
  1114. .nodes = aggre2_noc_nodes,
  1115. .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
  1116. .bcms = aggre2_noc_bcms,
  1117. .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
  1118. };
  1119. static struct qcom_icc_bcm * const clk_virt_bcms[] = {
  1120. &bcm_qup0,
  1121. &bcm_qup1,
  1122. &bcm_qup2,
  1123. };
  1124. static struct qcom_icc_node * const clk_virt_nodes[] = {
  1125. [MASTER_QUP_CORE_0] = &qup0_core_master,
  1126. [MASTER_QUP_CORE_1] = &qup1_core_master,
  1127. [MASTER_QUP_CORE_2] = &qup2_core_master,
  1128. [SLAVE_QUP_CORE_0] = &qup0_core_slave,
  1129. [SLAVE_QUP_CORE_1] = &qup1_core_slave,
  1130. [SLAVE_QUP_CORE_2] = &qup2_core_slave,
  1131. };
  1132. static const struct qcom_icc_desc sm8550_clk_virt = {
  1133. .nodes = clk_virt_nodes,
  1134. .num_nodes = ARRAY_SIZE(clk_virt_nodes),
  1135. .bcms = clk_virt_bcms,
  1136. .num_bcms = ARRAY_SIZE(clk_virt_bcms),
  1137. };
  1138. static struct qcom_icc_bcm * const config_noc_bcms[] = {
  1139. &bcm_cn0,
  1140. &bcm_cn1,
  1141. };
  1142. static struct qcom_icc_node * const config_noc_nodes[] = {
  1143. [MASTER_CNOC_CFG] = &qsm_cfg,
  1144. [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
  1145. [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
  1146. [SLAVE_APPSS] = &qhs_apss,
  1147. [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
  1148. [SLAVE_CLK_CTL] = &qhs_clk_ctl,
  1149. [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
  1150. [SLAVE_RBCPR_MMCX_CFG] = &qhs_cpr_mmcx,
  1151. [SLAVE_RBCPR_MXA_CFG] = &qhs_cpr_mxa,
  1152. [SLAVE_RBCPR_MXC_CFG] = &qhs_cpr_mxc,
  1153. [SLAVE_CPR_NSPCX] = &qhs_cpr_nspcx,
  1154. [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
  1155. [SLAVE_CX_RDPM] = &qhs_cx_rdpm,
  1156. [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
  1157. [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
  1158. [SLAVE_I2C] = &qhs_i2c,
  1159. [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
  1160. [SLAVE_IPA_CFG] = &qhs_ipa,
  1161. [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
  1162. [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
  1163. [SLAVE_MX_RDPM] = &qhs_mx_rdpm,
  1164. [SLAVE_PCIE_0_CFG] = &qhs_pcie0_cfg,
  1165. [SLAVE_PCIE_1_CFG] = &qhs_pcie1_cfg,
  1166. [SLAVE_PDM] = &qhs_pdm,
  1167. [SLAVE_PIMEM_CFG] = &qhs_pimem_cfg,
  1168. [SLAVE_PRNG] = &qhs_prng,
  1169. [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
  1170. [SLAVE_QSPI_0] = &qhs_qspi,
  1171. [SLAVE_QUP_1] = &qhs_qup1,
  1172. [SLAVE_QUP_2] = &qhs_qup2,
  1173. [SLAVE_SDCC_2] = &qhs_sdc2,
  1174. [SLAVE_SDCC_4] = &qhs_sdc4,
  1175. [SLAVE_SPSS_CFG] = &qhs_spss_cfg,
  1176. [SLAVE_TCSR] = &qhs_tcsr,
  1177. [SLAVE_TLMM] = &qhs_tlmm,
  1178. [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
  1179. [SLAVE_USB3_0] = &qhs_usb3_0,
  1180. [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
  1181. [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
  1182. [SLAVE_LPASS_QTB_CFG] = &qss_lpass_qtb_cfg,
  1183. [SLAVE_CNOC_MNOC_CFG] = &qss_mnoc_cfg,
  1184. [SLAVE_NSP_QTB_CFG] = &qss_nsp_qtb_cfg,
  1185. [SLAVE_PCIE_ANOC_CFG] = &qss_pcie_anoc_cfg,
  1186. [SLAVE_QDSS_STM] = &xs_qdss_stm,
  1187. [SLAVE_TCU] = &xs_sys_tcu_cfg,
  1188. };
  1189. static const struct qcom_icc_desc sm8550_config_noc = {
  1190. .nodes = config_noc_nodes,
  1191. .num_nodes = ARRAY_SIZE(config_noc_nodes),
  1192. .bcms = config_noc_bcms,
  1193. .num_bcms = ARRAY_SIZE(config_noc_bcms),
  1194. };
  1195. static struct qcom_icc_bcm * const cnoc_main_bcms[] = {
  1196. &bcm_cn0,
  1197. };
  1198. static struct qcom_icc_node * const cnoc_main_nodes[] = {
  1199. [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
  1200. [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
  1201. [SLAVE_AOSS] = &qhs_aoss,
  1202. [SLAVE_TME_CFG] = &qhs_tme_cfg,
  1203. [SLAVE_CNOC_CFG] = &qss_cfg,
  1204. [SLAVE_DDRSS_CFG] = &qss_ddrss_cfg,
  1205. [SLAVE_BOOT_IMEM] = &qxs_boot_imem,
  1206. [SLAVE_IMEM] = &qxs_imem,
  1207. [SLAVE_PCIE_0] = &xs_pcie_0,
  1208. [SLAVE_PCIE_1] = &xs_pcie_1,
  1209. };
  1210. static const struct qcom_icc_desc sm8550_cnoc_main = {
  1211. .nodes = cnoc_main_nodes,
  1212. .num_nodes = ARRAY_SIZE(cnoc_main_nodes),
  1213. .bcms = cnoc_main_bcms,
  1214. .num_bcms = ARRAY_SIZE(cnoc_main_bcms),
  1215. };
  1216. static struct qcom_icc_bcm * const gem_noc_bcms[] = {
  1217. &bcm_sh0,
  1218. &bcm_sh1,
  1219. };
  1220. static struct qcom_icc_node * const gem_noc_nodes[] = {
  1221. [MASTER_GPU_TCU] = &alm_gpu_tcu,
  1222. [MASTER_SYS_TCU] = &alm_sys_tcu,
  1223. [MASTER_APPSS_PROC] = &chm_apps,
  1224. [MASTER_GFX3D] = &qnm_gpu,
  1225. [MASTER_LPASS_GEM_NOC] = &qnm_lpass_gemnoc,
  1226. [MASTER_MSS_PROC] = &qnm_mdsp,
  1227. [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
  1228. [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
  1229. [MASTER_COMPUTE_NOC] = &qnm_nsp_gemnoc,
  1230. [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
  1231. [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
  1232. [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
  1233. [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
  1234. [SLAVE_LLCC] = &qns_llcc,
  1235. [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
  1236. };
  1237. static const struct qcom_icc_desc sm8550_gem_noc = {
  1238. .nodes = gem_noc_nodes,
  1239. .num_nodes = ARRAY_SIZE(gem_noc_nodes),
  1240. .bcms = gem_noc_bcms,
  1241. .num_bcms = ARRAY_SIZE(gem_noc_bcms),
  1242. };
  1243. static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] = {
  1244. };
  1245. static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
  1246. [MASTER_LPIAON_NOC] = &qnm_lpiaon_noc,
  1247. [SLAVE_LPASS_GEM_NOC] = &qns_lpass_ag_noc_gemnoc,
  1248. };
  1249. static const struct qcom_icc_desc sm8550_lpass_ag_noc = {
  1250. .nodes = lpass_ag_noc_nodes,
  1251. .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
  1252. .bcms = lpass_ag_noc_bcms,
  1253. .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms),
  1254. };
  1255. static struct qcom_icc_bcm * const lpass_lpiaon_noc_bcms[] = {
  1256. &bcm_lp0,
  1257. };
  1258. static struct qcom_icc_node * const lpass_lpiaon_noc_nodes[] = {
  1259. [MASTER_LPASS_LPINOC] = &qnm_lpass_lpinoc,
  1260. [SLAVE_LPIAON_NOC_LPASS_AG_NOC] = &qns_lpass_aggnoc,
  1261. };
  1262. static const struct qcom_icc_desc sm8550_lpass_lpiaon_noc = {
  1263. .nodes = lpass_lpiaon_noc_nodes,
  1264. .num_nodes = ARRAY_SIZE(lpass_lpiaon_noc_nodes),
  1265. .bcms = lpass_lpiaon_noc_bcms,
  1266. .num_bcms = ARRAY_SIZE(lpass_lpiaon_noc_bcms),
  1267. };
  1268. static struct qcom_icc_bcm * const lpass_lpicx_noc_bcms[] = {
  1269. };
  1270. static struct qcom_icc_node * const lpass_lpicx_noc_nodes[] = {
  1271. [MASTER_LPASS_PROC] = &qxm_lpinoc_dsp_axim,
  1272. [SLAVE_LPICX_NOC_LPIAON_NOC] = &qns_lpi_aon_noc,
  1273. };
  1274. static const struct qcom_icc_desc sm8550_lpass_lpicx_noc = {
  1275. .nodes = lpass_lpicx_noc_nodes,
  1276. .num_nodes = ARRAY_SIZE(lpass_lpicx_noc_nodes),
  1277. .bcms = lpass_lpicx_noc_bcms,
  1278. .num_bcms = ARRAY_SIZE(lpass_lpicx_noc_bcms),
  1279. };
  1280. static struct qcom_icc_bcm * const mc_virt_bcms[] = {
  1281. &bcm_acv,
  1282. &bcm_mc0,
  1283. };
  1284. static struct qcom_icc_node * const mc_virt_nodes[] = {
  1285. [MASTER_LLCC] = &llcc_mc,
  1286. [SLAVE_EBI1] = &ebi,
  1287. };
  1288. static const struct qcom_icc_desc sm8550_mc_virt = {
  1289. .nodes = mc_virt_nodes,
  1290. .num_nodes = ARRAY_SIZE(mc_virt_nodes),
  1291. .bcms = mc_virt_bcms,
  1292. .num_bcms = ARRAY_SIZE(mc_virt_bcms),
  1293. };
  1294. static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
  1295. &bcm_mm0,
  1296. &bcm_mm1,
  1297. };
  1298. static struct qcom_icc_node * const mmss_noc_nodes[] = {
  1299. [MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
  1300. [MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
  1301. [MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
  1302. [MASTER_MDP] = &qnm_mdp,
  1303. [MASTER_CDSP_HCP] = &qnm_vapss_hcp,
  1304. [MASTER_VIDEO] = &qnm_video,
  1305. [MASTER_VIDEO_CV_PROC] = &qnm_video_cv_cpu,
  1306. [MASTER_VIDEO_PROC] = &qnm_video_cvp,
  1307. [MASTER_VIDEO_V_PROC] = &qnm_video_v_cpu,
  1308. [MASTER_CNOC_MNOC_CFG] = &qsm_mnoc_cfg,
  1309. [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
  1310. [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
  1311. [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
  1312. };
  1313. static const struct qcom_icc_desc sm8550_mmss_noc = {
  1314. .nodes = mmss_noc_nodes,
  1315. .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
  1316. .bcms = mmss_noc_bcms,
  1317. .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
  1318. };
  1319. static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
  1320. &bcm_co0,
  1321. };
  1322. static struct qcom_icc_node * const nsp_noc_nodes[] = {
  1323. [MASTER_CDSP_PROC] = &qxm_nsp,
  1324. [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
  1325. };
  1326. static const struct qcom_icc_desc sm8550_nsp_noc = {
  1327. .nodes = nsp_noc_nodes,
  1328. .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
  1329. .bcms = nsp_noc_bcms,
  1330. .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
  1331. };
  1332. static struct qcom_icc_bcm * const pcie_anoc_bcms[] = {
  1333. &bcm_sn7,
  1334. };
  1335. static struct qcom_icc_node * const pcie_anoc_nodes[] = {
  1336. [MASTER_PCIE_ANOC_CFG] = &qsm_pcie_anoc_cfg,
  1337. [MASTER_PCIE_0] = &xm_pcie3_0,
  1338. [MASTER_PCIE_1] = &xm_pcie3_1,
  1339. [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
  1340. [SLAVE_SERVICE_PCIE_ANOC] = &srvc_pcie_aggre_noc,
  1341. };
  1342. static const struct qcom_icc_desc sm8550_pcie_anoc = {
  1343. .nodes = pcie_anoc_nodes,
  1344. .num_nodes = ARRAY_SIZE(pcie_anoc_nodes),
  1345. .bcms = pcie_anoc_bcms,
  1346. .num_bcms = ARRAY_SIZE(pcie_anoc_bcms),
  1347. };
  1348. static struct qcom_icc_bcm * const system_noc_bcms[] = {
  1349. &bcm_sn0,
  1350. &bcm_sn1,
  1351. &bcm_sn2,
  1352. &bcm_sn3,
  1353. };
  1354. static struct qcom_icc_node * const system_noc_nodes[] = {
  1355. [MASTER_GIC_AHB] = &qhm_gic,
  1356. [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
  1357. [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
  1358. [MASTER_GIC] = &xm_gic,
  1359. [SLAVE_SNOC_GEM_NOC_GC] = &qns_gemnoc_gc,
  1360. [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
  1361. };
  1362. static const struct qcom_icc_desc sm8550_system_noc = {
  1363. .nodes = system_noc_nodes,
  1364. .num_nodes = ARRAY_SIZE(system_noc_nodes),
  1365. .bcms = system_noc_bcms,
  1366. .num_bcms = ARRAY_SIZE(system_noc_bcms),
  1367. };
  1368. static const struct of_device_id qnoc_of_match[] = {
  1369. { .compatible = "qcom,sm8550-aggre1-noc",
  1370. .data = &sm8550_aggre1_noc},
  1371. { .compatible = "qcom,sm8550-aggre2-noc",
  1372. .data = &sm8550_aggre2_noc},
  1373. { .compatible = "qcom,sm8550-clk-virt",
  1374. .data = &sm8550_clk_virt},
  1375. { .compatible = "qcom,sm8550-config-noc",
  1376. .data = &sm8550_config_noc},
  1377. { .compatible = "qcom,sm8550-cnoc-main",
  1378. .data = &sm8550_cnoc_main},
  1379. { .compatible = "qcom,sm8550-gem-noc",
  1380. .data = &sm8550_gem_noc},
  1381. { .compatible = "qcom,sm8550-lpass-ag-noc",
  1382. .data = &sm8550_lpass_ag_noc},
  1383. { .compatible = "qcom,sm8550-lpass-lpiaon-noc",
  1384. .data = &sm8550_lpass_lpiaon_noc},
  1385. { .compatible = "qcom,sm8550-lpass-lpicx-noc",
  1386. .data = &sm8550_lpass_lpicx_noc},
  1387. { .compatible = "qcom,sm8550-mc-virt",
  1388. .data = &sm8550_mc_virt},
  1389. { .compatible = "qcom,sm8550-mmss-noc",
  1390. .data = &sm8550_mmss_noc},
  1391. { .compatible = "qcom,sm8550-nsp-noc",
  1392. .data = &sm8550_nsp_noc},
  1393. { .compatible = "qcom,sm8550-pcie-anoc",
  1394. .data = &sm8550_pcie_anoc},
  1395. { .compatible = "qcom,sm8550-system-noc",
  1396. .data = &sm8550_system_noc},
  1397. { }
  1398. };
  1399. MODULE_DEVICE_TABLE(of, qnoc_of_match);
  1400. static struct platform_driver qnoc_driver = {
  1401. .probe = qcom_icc_rpmh_probe,
  1402. .remove = qcom_icc_rpmh_remove,
  1403. .driver = {
  1404. .name = "qnoc-sm8550",
  1405. .of_match_table = qnoc_of_match,
  1406. .sync_state = icc_sync_state,
  1407. },
  1408. };
  1409. static int __init qnoc_driver_init(void)
  1410. {
  1411. return platform_driver_register(&qnoc_driver);
  1412. }
  1413. core_initcall(qnoc_driver_init);
  1414. static void __exit qnoc_driver_exit(void)
  1415. {
  1416. platform_driver_unregister(&qnoc_driver);
  1417. }
  1418. module_exit(qnoc_driver_exit);
  1419. MODULE_DESCRIPTION("sm8550 NoC driver");
  1420. MODULE_LICENSE("GPL");