sc7280.c 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  5. *
  6. */
  7. #include <linux/device.h>
  8. #include <linux/interconnect.h>
  9. #include <linux/interconnect-provider.h>
  10. #include <linux/mod_devicetable.h>
  11. #include <linux/module.h>
  12. #include <linux/platform_device.h>
  13. #include <dt-bindings/interconnect/qcom,sc7280.h>
  14. #include "bcm-voter.h"
  15. #include "icc-rpmh.h"
  16. static struct qcom_icc_node qhm_qspi;
  17. static struct qcom_icc_node qhm_qup0;
  18. static struct qcom_icc_node qhm_qup1;
  19. static struct qcom_icc_node qnm_a1noc_cfg;
  20. static struct qcom_icc_node xm_sdc1;
  21. static struct qcom_icc_node xm_sdc2;
  22. static struct qcom_icc_node xm_sdc4;
  23. static struct qcom_icc_node xm_ufs_mem;
  24. static struct qcom_icc_node xm_usb2;
  25. static struct qcom_icc_node xm_usb3_0;
  26. static struct qcom_icc_node qhm_qdss_bam;
  27. static struct qcom_icc_node qnm_a2noc_cfg;
  28. static struct qcom_icc_node qnm_cnoc_datapath;
  29. static struct qcom_icc_node qxm_crypto;
  30. static struct qcom_icc_node qxm_ipa;
  31. static struct qcom_icc_node xm_pcie3_0;
  32. static struct qcom_icc_node xm_pcie3_1;
  33. static struct qcom_icc_node xm_qdss_etr;
  34. static struct qcom_icc_node qup0_core_master;
  35. static struct qcom_icc_node qup1_core_master;
  36. static struct qcom_icc_node qnm_cnoc3_cnoc2;
  37. static struct qcom_icc_node xm_qdss_dap;
  38. static struct qcom_icc_node qnm_cnoc2_cnoc3;
  39. static struct qcom_icc_node qnm_gemnoc_cnoc;
  40. static struct qcom_icc_node qnm_gemnoc_pcie;
  41. static struct qcom_icc_node qnm_cnoc_dc_noc;
  42. static struct qcom_icc_node alm_gpu_tcu;
  43. static struct qcom_icc_node alm_sys_tcu;
  44. static struct qcom_icc_node chm_apps;
  45. static struct qcom_icc_node qnm_cmpnoc;
  46. static struct qcom_icc_node qnm_gemnoc_cfg;
  47. static struct qcom_icc_node qnm_gpu;
  48. static struct qcom_icc_node qnm_mnoc_hf;
  49. static struct qcom_icc_node qnm_mnoc_sf;
  50. static struct qcom_icc_node qnm_pcie;
  51. static struct qcom_icc_node qnm_snoc_gc;
  52. static struct qcom_icc_node qnm_snoc_sf;
  53. static struct qcom_icc_node qhm_config_noc;
  54. static struct qcom_icc_node llcc_mc;
  55. static struct qcom_icc_node qnm_mnoc_cfg;
  56. static struct qcom_icc_node qnm_video0;
  57. static struct qcom_icc_node qnm_video_cpu;
  58. static struct qcom_icc_node qxm_camnoc_hf;
  59. static struct qcom_icc_node qxm_camnoc_icp;
  60. static struct qcom_icc_node qxm_camnoc_sf;
  61. static struct qcom_icc_node qxm_mdp0;
  62. static struct qcom_icc_node qhm_nsp_noc_config;
  63. static struct qcom_icc_node qxm_nsp;
  64. static struct qcom_icc_node qnm_aggre1_noc;
  65. static struct qcom_icc_node qnm_aggre2_noc;
  66. static struct qcom_icc_node qnm_snoc_cfg;
  67. static struct qcom_icc_node qxm_pimem;
  68. static struct qcom_icc_node xm_gic;
  69. static struct qcom_icc_node qns_a1noc_snoc;
  70. static struct qcom_icc_node srvc_aggre1_noc;
  71. static struct qcom_icc_node qns_a2noc_snoc;
  72. static struct qcom_icc_node qns_pcie_mem_noc;
  73. static struct qcom_icc_node srvc_aggre2_noc;
  74. static struct qcom_icc_node qup0_core_slave;
  75. static struct qcom_icc_node qup1_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_compute_cfg;
  81. static struct qcom_icc_node qhs_cpr_cx;
  82. static struct qcom_icc_node qhs_cpr_mx;
  83. static struct qcom_icc_node qhs_crypto0_cfg;
  84. static struct qcom_icc_node qhs_cx_rdpm;
  85. static struct qcom_icc_node qhs_dcc_cfg;
  86. static struct qcom_icc_node qhs_display_cfg;
  87. static struct qcom_icc_node qhs_gpuss_cfg;
  88. static struct qcom_icc_node qhs_hwkm;
  89. static struct qcom_icc_node qhs_imem_cfg;
  90. static struct qcom_icc_node qhs_ipa;
  91. static struct qcom_icc_node qhs_ipc_router;
  92. static struct qcom_icc_node qhs_lpass_cfg;
  93. static struct qcom_icc_node qhs_mss_cfg;
  94. static struct qcom_icc_node qhs_mx_rdpm;
  95. static struct qcom_icc_node qhs_pcie0_cfg;
  96. static struct qcom_icc_node qhs_pcie1_cfg;
  97. static struct qcom_icc_node qhs_pdm;
  98. static struct qcom_icc_node qhs_pimem_cfg;
  99. static struct qcom_icc_node qhs_pka_wrapper_cfg;
  100. static struct qcom_icc_node qhs_pmu_wrapper_cfg;
  101. static struct qcom_icc_node qhs_qdss_cfg;
  102. static struct qcom_icc_node qhs_qspi;
  103. static struct qcom_icc_node qhs_qup0;
  104. static struct qcom_icc_node qhs_qup1;
  105. static struct qcom_icc_node qhs_sdc1;
  106. static struct qcom_icc_node qhs_sdc2;
  107. static struct qcom_icc_node qhs_sdc4;
  108. static struct qcom_icc_node qhs_security;
  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_usb2;
  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 qns_a1_noc_cfg;
  117. static struct qcom_icc_node qns_a2_noc_cfg;
  118. static struct qcom_icc_node qns_cnoc2_cnoc3;
  119. static struct qcom_icc_node qns_mnoc_cfg;
  120. static struct qcom_icc_node qns_snoc_cfg;
  121. static struct qcom_icc_node qhs_aoss;
  122. static struct qcom_icc_node qhs_apss;
  123. static struct qcom_icc_node qns_cnoc3_cnoc2;
  124. static struct qcom_icc_node qns_cnoc_a2noc;
  125. static struct qcom_icc_node qns_ddrss_cfg;
  126. static struct qcom_icc_node qxs_boot_imem;
  127. static struct qcom_icc_node qxs_imem;
  128. static struct qcom_icc_node qxs_pimem;
  129. static struct qcom_icc_node xs_pcie_0;
  130. static struct qcom_icc_node xs_pcie_1;
  131. static struct qcom_icc_node xs_qdss_stm;
  132. static struct qcom_icc_node xs_sys_tcu_cfg;
  133. static struct qcom_icc_node qhs_llcc;
  134. static struct qcom_icc_node qns_gemnoc;
  135. static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg;
  136. static struct qcom_icc_node qhs_modem_ms_mpu_cfg;
  137. static struct qcom_icc_node qns_gem_noc_cnoc;
  138. static struct qcom_icc_node qns_llcc;
  139. static struct qcom_icc_node qns_pcie;
  140. static struct qcom_icc_node srvc_even_gemnoc;
  141. static struct qcom_icc_node srvc_odd_gemnoc;
  142. static struct qcom_icc_node srvc_sys_gemnoc;
  143. static struct qcom_icc_node qhs_lpass_core;
  144. static struct qcom_icc_node qhs_lpass_lpi;
  145. static struct qcom_icc_node qhs_lpass_mpu;
  146. static struct qcom_icc_node qhs_lpass_top;
  147. static struct qcom_icc_node srvc_niu_aml_noc;
  148. static struct qcom_icc_node srvc_niu_lpass_agnoc;
  149. static struct qcom_icc_node ebi;
  150. static struct qcom_icc_node qns_mem_noc_hf;
  151. static struct qcom_icc_node qns_mem_noc_sf;
  152. static struct qcom_icc_node srvc_mnoc;
  153. static struct qcom_icc_node qns_nsp_gemnoc;
  154. static struct qcom_icc_node service_nsp_noc;
  155. static struct qcom_icc_node qns_gemnoc_gc;
  156. static struct qcom_icc_node qns_gemnoc_sf;
  157. static struct qcom_icc_node srvc_snoc;
  158. static struct qcom_icc_node qhm_qspi = {
  159. .name = "qhm_qspi",
  160. .channels = 1,
  161. .buswidth = 4,
  162. .qosbox = &(const struct qcom_icc_qosbox) {
  163. .num_ports = 1,
  164. .port_offsets = { 0x7000 },
  165. .prio = 2,
  166. .urg_fwd = 0,
  167. },
  168. .num_links = 1,
  169. .link_nodes = { &qns_a1noc_snoc },
  170. };
  171. static struct qcom_icc_node qhm_qup0 = {
  172. .name = "qhm_qup0",
  173. .channels = 1,
  174. .buswidth = 4,
  175. .qosbox = &(const struct qcom_icc_qosbox) {
  176. .num_ports = 1,
  177. .port_offsets = { 0x11000 },
  178. .prio = 2,
  179. .urg_fwd = 0,
  180. },
  181. .num_links = 1,
  182. .link_nodes = { &qns_a1noc_snoc },
  183. };
  184. static struct qcom_icc_node qhm_qup1 = {
  185. .name = "qhm_qup1",
  186. .channels = 1,
  187. .buswidth = 4,
  188. .qosbox = &(const struct qcom_icc_qosbox) {
  189. .num_ports = 1,
  190. .port_offsets = { 0x8000 },
  191. .prio = 2,
  192. .urg_fwd = 0,
  193. },
  194. .num_links = 1,
  195. .link_nodes = { &qns_a1noc_snoc },
  196. };
  197. static struct qcom_icc_node qnm_a1noc_cfg = {
  198. .name = "qnm_a1noc_cfg",
  199. .channels = 1,
  200. .buswidth = 4,
  201. .num_links = 1,
  202. .link_nodes = { &srvc_aggre1_noc },
  203. };
  204. static struct qcom_icc_node xm_sdc1 = {
  205. .name = "xm_sdc1",
  206. .channels = 1,
  207. .buswidth = 8,
  208. .qosbox = &(const struct qcom_icc_qosbox) {
  209. .num_ports = 1,
  210. .port_offsets = { 0xc000 },
  211. .prio = 2,
  212. .urg_fwd = 0,
  213. },
  214. .num_links = 1,
  215. .link_nodes = { &qns_a1noc_snoc },
  216. };
  217. static struct qcom_icc_node xm_sdc2 = {
  218. .name = "xm_sdc2",
  219. .channels = 1,
  220. .buswidth = 8,
  221. .qosbox = &(const struct qcom_icc_qosbox) {
  222. .num_ports = 1,
  223. .port_offsets = { 0xe000 },
  224. .prio = 2,
  225. .urg_fwd = 0,
  226. },
  227. .num_links = 1,
  228. .link_nodes = { &qns_a1noc_snoc },
  229. };
  230. static struct qcom_icc_node xm_sdc4 = {
  231. .name = "xm_sdc4",
  232. .channels = 1,
  233. .buswidth = 8,
  234. .qosbox = &(const struct qcom_icc_qosbox) {
  235. .num_ports = 1,
  236. .port_offsets = { 0x9000 },
  237. .prio = 2,
  238. .urg_fwd = 0,
  239. },
  240. .num_links = 1,
  241. .link_nodes = { &qns_a1noc_snoc },
  242. };
  243. static struct qcom_icc_node xm_ufs_mem = {
  244. .name = "xm_ufs_mem",
  245. .channels = 1,
  246. .buswidth = 8,
  247. .qosbox = &(const struct qcom_icc_qosbox) {
  248. .num_ports = 1,
  249. .port_offsets = { 0xa000 },
  250. .prio = 2,
  251. .urg_fwd = 0,
  252. },
  253. .num_links = 1,
  254. .link_nodes = { &qns_a1noc_snoc },
  255. };
  256. static struct qcom_icc_node xm_usb2 = {
  257. .name = "xm_usb2",
  258. .channels = 1,
  259. .buswidth = 8,
  260. .num_links = 1,
  261. .link_nodes = { &qns_a1noc_snoc },
  262. };
  263. static struct qcom_icc_node xm_usb3_0 = {
  264. .name = "xm_usb3_0",
  265. .channels = 1,
  266. .buswidth = 8,
  267. .qosbox = &(const struct qcom_icc_qosbox) {
  268. .num_ports = 1,
  269. .port_offsets = { 0xb000 },
  270. .prio = 2,
  271. .urg_fwd = 0,
  272. },
  273. .num_links = 1,
  274. .link_nodes = { &qns_a1noc_snoc },
  275. };
  276. static struct qcom_icc_node qhm_qdss_bam = {
  277. .name = "qhm_qdss_bam",
  278. .channels = 1,
  279. .buswidth = 4,
  280. .qosbox = &(const struct qcom_icc_qosbox) {
  281. .num_ports = 1,
  282. .port_offsets = { 0x18000 },
  283. .prio = 2,
  284. .urg_fwd = 0,
  285. },
  286. .num_links = 1,
  287. .link_nodes = { &qns_a2noc_snoc },
  288. };
  289. static struct qcom_icc_node qnm_a2noc_cfg = {
  290. .name = "qnm_a2noc_cfg",
  291. .channels = 1,
  292. .buswidth = 4,
  293. .num_links = 1,
  294. .link_nodes = { &srvc_aggre2_noc },
  295. };
  296. static struct qcom_icc_node qnm_cnoc_datapath = {
  297. .name = "qnm_cnoc_datapath",
  298. .channels = 1,
  299. .buswidth = 8,
  300. .qosbox = &(const struct qcom_icc_qosbox) {
  301. .num_ports = 1,
  302. .port_offsets = { 0x1c000 },
  303. .prio = 2,
  304. .urg_fwd = 0,
  305. },
  306. .num_links = 1,
  307. .link_nodes = { &qns_a2noc_snoc },
  308. };
  309. static struct qcom_icc_node qxm_crypto = {
  310. .name = "qxm_crypto",
  311. .channels = 1,
  312. .buswidth = 8,
  313. .qosbox = &(const struct qcom_icc_qosbox) {
  314. .num_ports = 1,
  315. .port_offsets = { 0x1d000 },
  316. .prio = 2,
  317. .urg_fwd = 0,
  318. },
  319. .num_links = 1,
  320. .link_nodes = { &qns_a2noc_snoc },
  321. };
  322. static struct qcom_icc_node qxm_ipa = {
  323. .name = "qxm_ipa",
  324. .channels = 1,
  325. .buswidth = 8,
  326. .qosbox = &(const struct qcom_icc_qosbox) {
  327. .num_ports = 1,
  328. .port_offsets = { 0x10000 },
  329. .prio = 2,
  330. .urg_fwd = 0,
  331. },
  332. .num_links = 1,
  333. .link_nodes = { &qns_a2noc_snoc },
  334. };
  335. static struct qcom_icc_node xm_pcie3_0 = {
  336. .name = "xm_pcie3_0",
  337. .channels = 1,
  338. .buswidth = 8,
  339. .num_links = 1,
  340. .link_nodes = { &qns_pcie_mem_noc },
  341. };
  342. static struct qcom_icc_node xm_pcie3_1 = {
  343. .name = "xm_pcie3_1",
  344. .channels = 1,
  345. .buswidth = 8,
  346. .num_links = 1,
  347. .link_nodes = { &qns_pcie_mem_noc },
  348. };
  349. static struct qcom_icc_node xm_qdss_etr = {
  350. .name = "xm_qdss_etr",
  351. .channels = 1,
  352. .buswidth = 8,
  353. .qosbox = &(const struct qcom_icc_qosbox) {
  354. .num_ports = 1,
  355. .port_offsets = { 0x15000 },
  356. .prio = 2,
  357. .urg_fwd = 0,
  358. },
  359. .num_links = 1,
  360. .link_nodes = { &qns_a2noc_snoc },
  361. };
  362. static struct qcom_icc_node qup0_core_master = {
  363. .name = "qup0_core_master",
  364. .channels = 1,
  365. .buswidth = 4,
  366. .num_links = 1,
  367. .link_nodes = { &qup0_core_slave },
  368. };
  369. static struct qcom_icc_node qup1_core_master = {
  370. .name = "qup1_core_master",
  371. .channels = 1,
  372. .buswidth = 4,
  373. .num_links = 1,
  374. .link_nodes = { &qup1_core_slave },
  375. };
  376. static struct qcom_icc_node qnm_cnoc3_cnoc2 = {
  377. .name = "qnm_cnoc3_cnoc2",
  378. .channels = 1,
  379. .buswidth = 8,
  380. .num_links = 44,
  381. .link_nodes = { &qhs_ahb2phy0, &qhs_ahb2phy1,
  382. &qhs_camera_cfg, &qhs_clk_ctl,
  383. &qhs_compute_cfg, &qhs_cpr_cx,
  384. &qhs_cpr_mx, &qhs_crypto0_cfg,
  385. &qhs_cx_rdpm, &qhs_dcc_cfg,
  386. &qhs_display_cfg, &qhs_gpuss_cfg,
  387. &qhs_hwkm, &qhs_imem_cfg,
  388. &qhs_ipa, &qhs_ipc_router,
  389. &qhs_lpass_cfg, &qhs_mss_cfg,
  390. &qhs_mx_rdpm, &qhs_pcie0_cfg,
  391. &qhs_pcie1_cfg, &qhs_pdm,
  392. &qhs_pimem_cfg, &qhs_pka_wrapper_cfg,
  393. &qhs_pmu_wrapper_cfg, &qhs_qdss_cfg,
  394. &qhs_qspi, &qhs_qup0,
  395. &qhs_qup1, &qhs_sdc1,
  396. &qhs_sdc2, &qhs_sdc4,
  397. &qhs_security, &qhs_tcsr,
  398. &qhs_tlmm, &qhs_ufs_mem_cfg,
  399. &qhs_usb2, &qhs_usb3_0,
  400. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  401. &qns_a1_noc_cfg, &qns_a2_noc_cfg,
  402. &qns_mnoc_cfg, &qns_snoc_cfg },
  403. };
  404. static struct qcom_icc_node xm_qdss_dap = {
  405. .name = "xm_qdss_dap",
  406. .channels = 1,
  407. .buswidth = 8,
  408. .num_links = 45,
  409. .link_nodes = { &qhs_ahb2phy0, &qhs_ahb2phy1,
  410. &qhs_camera_cfg, &qhs_clk_ctl,
  411. &qhs_compute_cfg, &qhs_cpr_cx,
  412. &qhs_cpr_mx, &qhs_crypto0_cfg,
  413. &qhs_cx_rdpm, &qhs_dcc_cfg,
  414. &qhs_display_cfg, &qhs_gpuss_cfg,
  415. &qhs_hwkm, &qhs_imem_cfg,
  416. &qhs_ipa, &qhs_ipc_router,
  417. &qhs_lpass_cfg, &qhs_mss_cfg,
  418. &qhs_mx_rdpm, &qhs_pcie0_cfg,
  419. &qhs_pcie1_cfg, &qhs_pdm,
  420. &qhs_pimem_cfg, &qhs_pka_wrapper_cfg,
  421. &qhs_pmu_wrapper_cfg, &qhs_qdss_cfg,
  422. &qhs_qspi, &qhs_qup0,
  423. &qhs_qup1, &qhs_sdc1,
  424. &qhs_sdc2, &qhs_sdc4,
  425. &qhs_security, &qhs_tcsr,
  426. &qhs_tlmm, &qhs_ufs_mem_cfg,
  427. &qhs_usb2, &qhs_usb3_0,
  428. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  429. &qns_a1_noc_cfg, &qns_a2_noc_cfg,
  430. &qns_cnoc2_cnoc3, &qns_mnoc_cfg,
  431. &qns_snoc_cfg },
  432. };
  433. static struct qcom_icc_node qnm_cnoc2_cnoc3 = {
  434. .name = "qnm_cnoc2_cnoc3",
  435. .channels = 1,
  436. .buswidth = 8,
  437. .num_links = 9,
  438. .link_nodes = { &qhs_aoss, &qhs_apss,
  439. &qns_cnoc_a2noc, &qns_ddrss_cfg,
  440. &qxs_boot_imem, &qxs_imem,
  441. &qxs_pimem, &xs_qdss_stm,
  442. &xs_sys_tcu_cfg },
  443. };
  444. static struct qcom_icc_node qnm_gemnoc_cnoc = {
  445. .name = "qnm_gemnoc_cnoc",
  446. .channels = 1,
  447. .buswidth = 16,
  448. .num_links = 9,
  449. .link_nodes = { &qhs_aoss, &qhs_apss,
  450. &qns_cnoc3_cnoc2, &qns_ddrss_cfg,
  451. &qxs_boot_imem, &qxs_imem,
  452. &qxs_pimem, &xs_qdss_stm,
  453. &xs_sys_tcu_cfg },
  454. };
  455. static struct qcom_icc_node qnm_gemnoc_pcie = {
  456. .name = "qnm_gemnoc_pcie",
  457. .channels = 1,
  458. .buswidth = 8,
  459. .num_links = 2,
  460. .link_nodes = { &xs_pcie_0, &xs_pcie_1 },
  461. };
  462. static struct qcom_icc_node qnm_cnoc_dc_noc = {
  463. .name = "qnm_cnoc_dc_noc",
  464. .channels = 1,
  465. .buswidth = 4,
  466. .num_links = 2,
  467. .link_nodes = { &qhs_llcc, &qns_gemnoc },
  468. };
  469. static struct qcom_icc_node alm_gpu_tcu = {
  470. .name = "alm_gpu_tcu",
  471. .channels = 1,
  472. .buswidth = 8,
  473. .qosbox = &(const struct qcom_icc_qosbox) {
  474. .num_ports = 1,
  475. .port_offsets = { 0xd7000 },
  476. .prio = 2,
  477. .urg_fwd = 0,
  478. },
  479. .num_links = 2,
  480. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  481. };
  482. static struct qcom_icc_node alm_sys_tcu = {
  483. .name = "alm_sys_tcu",
  484. .channels = 1,
  485. .buswidth = 8,
  486. .qosbox = &(const struct qcom_icc_qosbox) {
  487. .num_ports = 1,
  488. .port_offsets = { 0xd6000 },
  489. .prio = 6,
  490. .urg_fwd = 0,
  491. },
  492. .num_links = 2,
  493. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  494. };
  495. static struct qcom_icc_node chm_apps = {
  496. .name = "chm_apps",
  497. .channels = 1,
  498. .buswidth = 32,
  499. .num_links = 3,
  500. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  501. &qns_pcie },
  502. };
  503. static struct qcom_icc_node qnm_cmpnoc = {
  504. .name = "qnm_cmpnoc",
  505. .channels = 2,
  506. .buswidth = 32,
  507. .qosbox = &(const struct qcom_icc_qosbox) {
  508. .num_ports = 2,
  509. .port_offsets = { 0x21000, 0x61000 },
  510. .prio = 0,
  511. .urg_fwd = 1,
  512. },
  513. .num_links = 2,
  514. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  515. };
  516. static struct qcom_icc_node qnm_gemnoc_cfg = {
  517. .name = "qnm_gemnoc_cfg",
  518. .channels = 1,
  519. .buswidth = 4,
  520. .num_links = 5,
  521. .link_nodes = { &qhs_mdsp_ms_mpu_cfg, &qhs_modem_ms_mpu_cfg,
  522. &srvc_even_gemnoc, &srvc_odd_gemnoc,
  523. &srvc_sys_gemnoc },
  524. };
  525. static struct qcom_icc_node qnm_gpu = {
  526. .name = "qnm_gpu",
  527. .channels = 2,
  528. .buswidth = 32,
  529. .qosbox = &(const struct qcom_icc_qosbox) {
  530. .num_ports = 2,
  531. .port_offsets = { 0x22000, 0x62000 },
  532. .prio = 0,
  533. .urg_fwd = 0,
  534. },
  535. .num_links = 2,
  536. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  537. };
  538. static struct qcom_icc_node qnm_mnoc_hf = {
  539. .name = "qnm_mnoc_hf",
  540. .channels = 2,
  541. .buswidth = 32,
  542. .qosbox = &(const struct qcom_icc_qosbox) {
  543. .num_ports = 2,
  544. .port_offsets = { 0x23000, 0x63000 },
  545. .prio = 0,
  546. .urg_fwd = 1,
  547. },
  548. .num_links = 1,
  549. .link_nodes = { &qns_llcc },
  550. };
  551. static struct qcom_icc_node qnm_mnoc_sf = {
  552. .name = "qnm_mnoc_sf",
  553. .channels = 1,
  554. .buswidth = 32,
  555. .qosbox = &(const struct qcom_icc_qosbox) {
  556. .num_ports = 1,
  557. .port_offsets = { 0xcf000 },
  558. .prio = 0,
  559. .urg_fwd = 1,
  560. },
  561. .num_links = 2,
  562. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  563. };
  564. static struct qcom_icc_node qnm_pcie = {
  565. .name = "qnm_pcie",
  566. .channels = 1,
  567. .buswidth = 16,
  568. .num_links = 2,
  569. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc },
  570. };
  571. static struct qcom_icc_node qnm_snoc_gc = {
  572. .name = "qnm_snoc_gc",
  573. .channels = 1,
  574. .buswidth = 8,
  575. .qosbox = &(const struct qcom_icc_qosbox) {
  576. .num_ports = 1,
  577. .port_offsets = { 0xd3000 },
  578. .prio = 0,
  579. .urg_fwd = 1,
  580. },
  581. .num_links = 1,
  582. .link_nodes = { &qns_llcc },
  583. };
  584. static struct qcom_icc_node qnm_snoc_sf = {
  585. .name = "qnm_snoc_sf",
  586. .channels = 1,
  587. .buswidth = 16,
  588. .qosbox = &(const struct qcom_icc_qosbox) {
  589. .num_ports = 1,
  590. .port_offsets = { 0xd4000 },
  591. .prio = 0,
  592. .urg_fwd = 1,
  593. },
  594. .num_links = 3,
  595. .link_nodes = { &qns_gem_noc_cnoc, &qns_llcc,
  596. &qns_pcie },
  597. };
  598. static struct qcom_icc_node qhm_config_noc = {
  599. .name = "qhm_config_noc",
  600. .channels = 1,
  601. .buswidth = 4,
  602. .num_links = 6,
  603. .link_nodes = { &qhs_lpass_core, &qhs_lpass_lpi,
  604. &qhs_lpass_mpu, &qhs_lpass_top,
  605. &srvc_niu_aml_noc, &srvc_niu_lpass_agnoc },
  606. };
  607. static struct qcom_icc_node llcc_mc = {
  608. .name = "llcc_mc",
  609. .channels = 2,
  610. .buswidth = 4,
  611. .num_links = 1,
  612. .link_nodes = { &ebi },
  613. };
  614. static struct qcom_icc_node qnm_mnoc_cfg = {
  615. .name = "qnm_mnoc_cfg",
  616. .channels = 1,
  617. .buswidth = 4,
  618. .num_links = 1,
  619. .link_nodes = { &srvc_mnoc },
  620. };
  621. static struct qcom_icc_node qnm_video0 = {
  622. .name = "qnm_video0",
  623. .channels = 1,
  624. .buswidth = 32,
  625. .qosbox = &(const struct qcom_icc_qosbox) {
  626. .num_ports = 1,
  627. .port_offsets = { 0x14000 },
  628. .prio = 0,
  629. .urg_fwd = 1,
  630. },
  631. .num_links = 1,
  632. .link_nodes = { &qns_mem_noc_sf },
  633. };
  634. static struct qcom_icc_node qnm_video_cpu = {
  635. .name = "qnm_video_cpu",
  636. .channels = 1,
  637. .buswidth = 8,
  638. .qosbox = &(const struct qcom_icc_qosbox) {
  639. .num_ports = 1,
  640. .port_offsets = { 0x15000 },
  641. .prio = 0,
  642. .urg_fwd = 1,
  643. },
  644. .num_links = 1,
  645. .link_nodes = { &qns_mem_noc_sf },
  646. };
  647. static struct qcom_icc_node qxm_camnoc_hf = {
  648. .name = "qxm_camnoc_hf",
  649. .channels = 2,
  650. .buswidth = 32,
  651. .qosbox = &(const struct qcom_icc_qosbox) {
  652. .num_ports = 2,
  653. .port_offsets = { 0x10000, 0x10180 },
  654. .prio = 0,
  655. .urg_fwd = 1,
  656. },
  657. .num_links = 1,
  658. .link_nodes = { &qns_mem_noc_hf },
  659. };
  660. static struct qcom_icc_node qxm_camnoc_icp = {
  661. .name = "qxm_camnoc_icp",
  662. .channels = 1,
  663. .buswidth = 8,
  664. .qosbox = &(const struct qcom_icc_qosbox) {
  665. .num_ports = 1,
  666. .port_offsets = { 0x11000 },
  667. .prio = 0,
  668. .urg_fwd = 1,
  669. },
  670. .num_links = 1,
  671. .link_nodes = { &qns_mem_noc_sf },
  672. };
  673. static struct qcom_icc_node qxm_camnoc_sf = {
  674. .name = "qxm_camnoc_sf",
  675. .channels = 1,
  676. .buswidth = 32,
  677. .qosbox = &(const struct qcom_icc_qosbox) {
  678. .num_ports = 1,
  679. .port_offsets = { 0x12000 },
  680. .prio = 0,
  681. .urg_fwd = 1,
  682. },
  683. .num_links = 1,
  684. .link_nodes = { &qns_mem_noc_sf },
  685. };
  686. static struct qcom_icc_node qxm_mdp0 = {
  687. .name = "qxm_mdp0",
  688. .channels = 1,
  689. .buswidth = 32,
  690. .qosbox = &(const struct qcom_icc_qosbox) {
  691. .num_ports = 1,
  692. .port_offsets = { 0x16000 },
  693. .prio = 0,
  694. .urg_fwd = 1,
  695. },
  696. .num_links = 1,
  697. .link_nodes = { &qns_mem_noc_hf },
  698. };
  699. static struct qcom_icc_node qhm_nsp_noc_config = {
  700. .name = "qhm_nsp_noc_config",
  701. .channels = 1,
  702. .buswidth = 4,
  703. .num_links = 1,
  704. .link_nodes = { &service_nsp_noc },
  705. };
  706. static struct qcom_icc_node qxm_nsp = {
  707. .name = "qxm_nsp",
  708. .channels = 2,
  709. .buswidth = 32,
  710. .num_links = 1,
  711. .link_nodes = { &qns_nsp_gemnoc },
  712. };
  713. static struct qcom_icc_node qnm_aggre1_noc = {
  714. .name = "qnm_aggre1_noc",
  715. .channels = 1,
  716. .buswidth = 16,
  717. .num_links = 1,
  718. .link_nodes = { &qns_gemnoc_sf },
  719. };
  720. static struct qcom_icc_node qnm_aggre2_noc = {
  721. .name = "qnm_aggre2_noc",
  722. .channels = 1,
  723. .buswidth = 16,
  724. .num_links = 1,
  725. .link_nodes = { &qns_gemnoc_sf },
  726. };
  727. static struct qcom_icc_node qnm_snoc_cfg = {
  728. .name = "qnm_snoc_cfg",
  729. .channels = 1,
  730. .buswidth = 4,
  731. .num_links = 1,
  732. .link_nodes = { &srvc_snoc },
  733. };
  734. static struct qcom_icc_node qxm_pimem = {
  735. .name = "qxm_pimem",
  736. .channels = 1,
  737. .buswidth = 8,
  738. .qosbox = &(const struct qcom_icc_qosbox) {
  739. .num_ports = 1,
  740. .port_offsets = { 0x8000 },
  741. .prio = 2,
  742. .urg_fwd = 0,
  743. },
  744. .num_links = 1,
  745. .link_nodes = { &qns_gemnoc_gc },
  746. };
  747. static struct qcom_icc_node xm_gic = {
  748. .name = "xm_gic",
  749. .channels = 1,
  750. .buswidth = 8,
  751. .qosbox = &(const struct qcom_icc_qosbox) {
  752. .num_ports = 1,
  753. .port_offsets = { 0xa000 },
  754. .prio = 2,
  755. .urg_fwd = 0,
  756. },
  757. .num_links = 1,
  758. .link_nodes = { &qns_gemnoc_gc },
  759. };
  760. static struct qcom_icc_node qns_a1noc_snoc = {
  761. .name = "qns_a1noc_snoc",
  762. .channels = 1,
  763. .buswidth = 16,
  764. .num_links = 1,
  765. .link_nodes = { &qnm_aggre1_noc },
  766. };
  767. static struct qcom_icc_node srvc_aggre1_noc = {
  768. .name = "srvc_aggre1_noc",
  769. .channels = 1,
  770. .buswidth = 4,
  771. };
  772. static struct qcom_icc_node qns_a2noc_snoc = {
  773. .name = "qns_a2noc_snoc",
  774. .channels = 1,
  775. .buswidth = 16,
  776. .num_links = 1,
  777. .link_nodes = { &qnm_aggre2_noc },
  778. };
  779. static struct qcom_icc_node qns_pcie_mem_noc = {
  780. .name = "qns_pcie_mem_noc",
  781. .channels = 1,
  782. .buswidth = 16,
  783. .num_links = 1,
  784. .link_nodes = { &qnm_pcie },
  785. };
  786. static struct qcom_icc_node srvc_aggre2_noc = {
  787. .name = "srvc_aggre2_noc",
  788. .channels = 1,
  789. .buswidth = 4,
  790. };
  791. static struct qcom_icc_node qup0_core_slave = {
  792. .name = "qup0_core_slave",
  793. .channels = 1,
  794. .buswidth = 4,
  795. };
  796. static struct qcom_icc_node qup1_core_slave = {
  797. .name = "qup1_core_slave",
  798. .channels = 1,
  799. .buswidth = 4,
  800. };
  801. static struct qcom_icc_node qhs_ahb2phy0 = {
  802. .name = "qhs_ahb2phy0",
  803. .channels = 1,
  804. .buswidth = 4,
  805. };
  806. static struct qcom_icc_node qhs_ahb2phy1 = {
  807. .name = "qhs_ahb2phy1",
  808. .channels = 1,
  809. .buswidth = 4,
  810. };
  811. static struct qcom_icc_node qhs_camera_cfg = {
  812. .name = "qhs_camera_cfg",
  813. .channels = 1,
  814. .buswidth = 4,
  815. };
  816. static struct qcom_icc_node qhs_clk_ctl = {
  817. .name = "qhs_clk_ctl",
  818. .channels = 1,
  819. .buswidth = 4,
  820. };
  821. static struct qcom_icc_node qhs_compute_cfg = {
  822. .name = "qhs_compute_cfg",
  823. .channels = 1,
  824. .buswidth = 4,
  825. .num_links = 1,
  826. .link_nodes = { &qhm_nsp_noc_config },
  827. };
  828. static struct qcom_icc_node qhs_cpr_cx = {
  829. .name = "qhs_cpr_cx",
  830. .channels = 1,
  831. .buswidth = 4,
  832. };
  833. static struct qcom_icc_node qhs_cpr_mx = {
  834. .name = "qhs_cpr_mx",
  835. .channels = 1,
  836. .buswidth = 4,
  837. };
  838. static struct qcom_icc_node qhs_crypto0_cfg = {
  839. .name = "qhs_crypto0_cfg",
  840. .channels = 1,
  841. .buswidth = 4,
  842. };
  843. static struct qcom_icc_node qhs_cx_rdpm = {
  844. .name = "qhs_cx_rdpm",
  845. .channels = 1,
  846. .buswidth = 4,
  847. };
  848. static struct qcom_icc_node qhs_dcc_cfg = {
  849. .name = "qhs_dcc_cfg",
  850. .channels = 1,
  851. .buswidth = 4,
  852. };
  853. static struct qcom_icc_node qhs_display_cfg = {
  854. .name = "qhs_display_cfg",
  855. .channels = 1,
  856. .buswidth = 4,
  857. };
  858. static struct qcom_icc_node qhs_gpuss_cfg = {
  859. .name = "qhs_gpuss_cfg",
  860. .channels = 1,
  861. .buswidth = 8,
  862. };
  863. static struct qcom_icc_node qhs_hwkm = {
  864. .name = "qhs_hwkm",
  865. .channels = 1,
  866. .buswidth = 4,
  867. };
  868. static struct qcom_icc_node qhs_imem_cfg = {
  869. .name = "qhs_imem_cfg",
  870. .channels = 1,
  871. .buswidth = 4,
  872. };
  873. static struct qcom_icc_node qhs_ipa = {
  874. .name = "qhs_ipa",
  875. .channels = 1,
  876. .buswidth = 4,
  877. };
  878. static struct qcom_icc_node qhs_ipc_router = {
  879. .name = "qhs_ipc_router",
  880. .channels = 1,
  881. .buswidth = 4,
  882. };
  883. static struct qcom_icc_node qhs_lpass_cfg = {
  884. .name = "qhs_lpass_cfg",
  885. .channels = 1,
  886. .buswidth = 4,
  887. .num_links = 1,
  888. .link_nodes = { &qhm_config_noc },
  889. };
  890. static struct qcom_icc_node qhs_mss_cfg = {
  891. .name = "qhs_mss_cfg",
  892. .channels = 1,
  893. .buswidth = 4,
  894. };
  895. static struct qcom_icc_node qhs_mx_rdpm = {
  896. .name = "qhs_mx_rdpm",
  897. .channels = 1,
  898. .buswidth = 4,
  899. };
  900. static struct qcom_icc_node qhs_pcie0_cfg = {
  901. .name = "qhs_pcie0_cfg",
  902. .channels = 1,
  903. .buswidth = 4,
  904. };
  905. static struct qcom_icc_node qhs_pcie1_cfg = {
  906. .name = "qhs_pcie1_cfg",
  907. .channels = 1,
  908. .buswidth = 4,
  909. };
  910. static struct qcom_icc_node qhs_pdm = {
  911. .name = "qhs_pdm",
  912. .channels = 1,
  913. .buswidth = 4,
  914. };
  915. static struct qcom_icc_node qhs_pimem_cfg = {
  916. .name = "qhs_pimem_cfg",
  917. .channels = 1,
  918. .buswidth = 4,
  919. };
  920. static struct qcom_icc_node qhs_pka_wrapper_cfg = {
  921. .name = "qhs_pka_wrapper_cfg",
  922. .channels = 1,
  923. .buswidth = 4,
  924. };
  925. static struct qcom_icc_node qhs_pmu_wrapper_cfg = {
  926. .name = "qhs_pmu_wrapper_cfg",
  927. .channels = 1,
  928. .buswidth = 4,
  929. };
  930. static struct qcom_icc_node qhs_qdss_cfg = {
  931. .name = "qhs_qdss_cfg",
  932. .channels = 1,
  933. .buswidth = 4,
  934. };
  935. static struct qcom_icc_node qhs_qspi = {
  936. .name = "qhs_qspi",
  937. .channels = 1,
  938. .buswidth = 4,
  939. };
  940. static struct qcom_icc_node qhs_qup0 = {
  941. .name = "qhs_qup0",
  942. .channels = 1,
  943. .buswidth = 4,
  944. };
  945. static struct qcom_icc_node qhs_qup1 = {
  946. .name = "qhs_qup1",
  947. .channels = 1,
  948. .buswidth = 4,
  949. };
  950. static struct qcom_icc_node qhs_sdc1 = {
  951. .name = "qhs_sdc1",
  952. .channels = 1,
  953. .buswidth = 4,
  954. };
  955. static struct qcom_icc_node qhs_sdc2 = {
  956. .name = "qhs_sdc2",
  957. .channels = 1,
  958. .buswidth = 4,
  959. };
  960. static struct qcom_icc_node qhs_sdc4 = {
  961. .name = "qhs_sdc4",
  962. .channels = 1,
  963. .buswidth = 4,
  964. };
  965. static struct qcom_icc_node qhs_security = {
  966. .name = "qhs_security",
  967. .channels = 1,
  968. .buswidth = 4,
  969. };
  970. static struct qcom_icc_node qhs_tcsr = {
  971. .name = "qhs_tcsr",
  972. .channels = 1,
  973. .buswidth = 4,
  974. };
  975. static struct qcom_icc_node qhs_tlmm = {
  976. .name = "qhs_tlmm",
  977. .channels = 1,
  978. .buswidth = 4,
  979. };
  980. static struct qcom_icc_node qhs_ufs_mem_cfg = {
  981. .name = "qhs_ufs_mem_cfg",
  982. .channels = 1,
  983. .buswidth = 4,
  984. };
  985. static struct qcom_icc_node qhs_usb2 = {
  986. .name = "qhs_usb2",
  987. .channels = 1,
  988. .buswidth = 4,
  989. };
  990. static struct qcom_icc_node qhs_usb3_0 = {
  991. .name = "qhs_usb3_0",
  992. .channels = 1,
  993. .buswidth = 4,
  994. };
  995. static struct qcom_icc_node qhs_venus_cfg = {
  996. .name = "qhs_venus_cfg",
  997. .channels = 1,
  998. .buswidth = 4,
  999. };
  1000. static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
  1001. .name = "qhs_vsense_ctrl_cfg",
  1002. .channels = 1,
  1003. .buswidth = 4,
  1004. };
  1005. static struct qcom_icc_node qns_a1_noc_cfg = {
  1006. .name = "qns_a1_noc_cfg",
  1007. .channels = 1,
  1008. .buswidth = 4,
  1009. .num_links = 1,
  1010. .link_nodes = { &qnm_a1noc_cfg },
  1011. };
  1012. static struct qcom_icc_node qns_a2_noc_cfg = {
  1013. .name = "qns_a2_noc_cfg",
  1014. .channels = 1,
  1015. .buswidth = 4,
  1016. .num_links = 1,
  1017. .link_nodes = { &qnm_a2noc_cfg },
  1018. };
  1019. static struct qcom_icc_node qns_cnoc2_cnoc3 = {
  1020. .name = "qns_cnoc2_cnoc3",
  1021. .channels = 1,
  1022. .buswidth = 8,
  1023. .num_links = 1,
  1024. .link_nodes = { &qnm_cnoc2_cnoc3 },
  1025. };
  1026. static struct qcom_icc_node qns_mnoc_cfg = {
  1027. .name = "qns_mnoc_cfg",
  1028. .channels = 1,
  1029. .buswidth = 4,
  1030. .num_links = 1,
  1031. .link_nodes = { &qnm_mnoc_cfg },
  1032. };
  1033. static struct qcom_icc_node qns_snoc_cfg = {
  1034. .name = "qns_snoc_cfg",
  1035. .channels = 1,
  1036. .buswidth = 4,
  1037. .num_links = 1,
  1038. .link_nodes = { &qnm_snoc_cfg },
  1039. };
  1040. static struct qcom_icc_node qhs_aoss = {
  1041. .name = "qhs_aoss",
  1042. .channels = 1,
  1043. .buswidth = 4,
  1044. };
  1045. static struct qcom_icc_node qhs_apss = {
  1046. .name = "qhs_apss",
  1047. .channels = 1,
  1048. .buswidth = 8,
  1049. };
  1050. static struct qcom_icc_node qns_cnoc3_cnoc2 = {
  1051. .name = "qns_cnoc3_cnoc2",
  1052. .channels = 1,
  1053. .buswidth = 8,
  1054. .num_links = 1,
  1055. .link_nodes = { &qnm_cnoc3_cnoc2 },
  1056. };
  1057. static struct qcom_icc_node qns_cnoc_a2noc = {
  1058. .name = "qns_cnoc_a2noc",
  1059. .channels = 1,
  1060. .buswidth = 8,
  1061. .num_links = 1,
  1062. .link_nodes = { &qnm_cnoc_datapath },
  1063. };
  1064. static struct qcom_icc_node qns_ddrss_cfg = {
  1065. .name = "qns_ddrss_cfg",
  1066. .channels = 1,
  1067. .buswidth = 4,
  1068. .num_links = 1,
  1069. .link_nodes = { &qnm_cnoc_dc_noc },
  1070. };
  1071. static struct qcom_icc_node qxs_boot_imem = {
  1072. .name = "qxs_boot_imem",
  1073. .channels = 1,
  1074. .buswidth = 8,
  1075. };
  1076. static struct qcom_icc_node qxs_imem = {
  1077. .name = "qxs_imem",
  1078. .channels = 1,
  1079. .buswidth = 8,
  1080. };
  1081. static struct qcom_icc_node qxs_pimem = {
  1082. .name = "qxs_pimem",
  1083. .channels = 1,
  1084. .buswidth = 8,
  1085. };
  1086. static struct qcom_icc_node xs_pcie_0 = {
  1087. .name = "xs_pcie_0",
  1088. .channels = 1,
  1089. .buswidth = 8,
  1090. };
  1091. static struct qcom_icc_node xs_pcie_1 = {
  1092. .name = "xs_pcie_1",
  1093. .channels = 1,
  1094. .buswidth = 8,
  1095. };
  1096. static struct qcom_icc_node xs_qdss_stm = {
  1097. .name = "xs_qdss_stm",
  1098. .channels = 1,
  1099. .buswidth = 4,
  1100. };
  1101. static struct qcom_icc_node xs_sys_tcu_cfg = {
  1102. .name = "xs_sys_tcu_cfg",
  1103. .channels = 1,
  1104. .buswidth = 8,
  1105. };
  1106. static struct qcom_icc_node qhs_llcc = {
  1107. .name = "qhs_llcc",
  1108. .channels = 1,
  1109. .buswidth = 4,
  1110. };
  1111. static struct qcom_icc_node qns_gemnoc = {
  1112. .name = "qns_gemnoc",
  1113. .channels = 1,
  1114. .buswidth = 4,
  1115. .num_links = 1,
  1116. .link_nodes = { &qnm_gemnoc_cfg },
  1117. };
  1118. static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg = {
  1119. .name = "qhs_mdsp_ms_mpu_cfg",
  1120. .channels = 1,
  1121. .buswidth = 4,
  1122. };
  1123. static struct qcom_icc_node qhs_modem_ms_mpu_cfg = {
  1124. .name = "qhs_modem_ms_mpu_cfg",
  1125. .channels = 1,
  1126. .buswidth = 4,
  1127. };
  1128. static struct qcom_icc_node qns_gem_noc_cnoc = {
  1129. .name = "qns_gem_noc_cnoc",
  1130. .channels = 1,
  1131. .buswidth = 16,
  1132. .num_links = 1,
  1133. .link_nodes = { &qnm_gemnoc_cnoc },
  1134. };
  1135. static struct qcom_icc_node qns_llcc = {
  1136. .name = "qns_llcc",
  1137. .channels = 2,
  1138. .buswidth = 16,
  1139. .num_links = 1,
  1140. .link_nodes = { &llcc_mc },
  1141. };
  1142. static struct qcom_icc_node qns_pcie = {
  1143. .name = "qns_pcie",
  1144. .channels = 1,
  1145. .buswidth = 8,
  1146. .num_links = 1,
  1147. .link_nodes = { &qnm_gemnoc_pcie },
  1148. };
  1149. static struct qcom_icc_node srvc_even_gemnoc = {
  1150. .name = "srvc_even_gemnoc",
  1151. .channels = 1,
  1152. .buswidth = 4,
  1153. };
  1154. static struct qcom_icc_node srvc_odd_gemnoc = {
  1155. .name = "srvc_odd_gemnoc",
  1156. .channels = 1,
  1157. .buswidth = 4,
  1158. };
  1159. static struct qcom_icc_node srvc_sys_gemnoc = {
  1160. .name = "srvc_sys_gemnoc",
  1161. .channels = 1,
  1162. .buswidth = 4,
  1163. };
  1164. static struct qcom_icc_node qhs_lpass_core = {
  1165. .name = "qhs_lpass_core",
  1166. .channels = 1,
  1167. .buswidth = 4,
  1168. };
  1169. static struct qcom_icc_node qhs_lpass_lpi = {
  1170. .name = "qhs_lpass_lpi",
  1171. .channels = 1,
  1172. .buswidth = 4,
  1173. };
  1174. static struct qcom_icc_node qhs_lpass_mpu = {
  1175. .name = "qhs_lpass_mpu",
  1176. .channels = 1,
  1177. .buswidth = 4,
  1178. };
  1179. static struct qcom_icc_node qhs_lpass_top = {
  1180. .name = "qhs_lpass_top",
  1181. .channels = 1,
  1182. .buswidth = 4,
  1183. };
  1184. static struct qcom_icc_node srvc_niu_aml_noc = {
  1185. .name = "srvc_niu_aml_noc",
  1186. .channels = 1,
  1187. .buswidth = 4,
  1188. };
  1189. static struct qcom_icc_node srvc_niu_lpass_agnoc = {
  1190. .name = "srvc_niu_lpass_agnoc",
  1191. .channels = 1,
  1192. .buswidth = 4,
  1193. };
  1194. static struct qcom_icc_node ebi = {
  1195. .name = "ebi",
  1196. .channels = 2,
  1197. .buswidth = 4,
  1198. };
  1199. static struct qcom_icc_node qns_mem_noc_hf = {
  1200. .name = "qns_mem_noc_hf",
  1201. .channels = 2,
  1202. .buswidth = 32,
  1203. .num_links = 1,
  1204. .link_nodes = { &qnm_mnoc_hf },
  1205. };
  1206. static struct qcom_icc_node qns_mem_noc_sf = {
  1207. .name = "qns_mem_noc_sf",
  1208. .channels = 1,
  1209. .buswidth = 32,
  1210. .num_links = 1,
  1211. .link_nodes = { &qnm_mnoc_sf },
  1212. };
  1213. static struct qcom_icc_node srvc_mnoc = {
  1214. .name = "srvc_mnoc",
  1215. .channels = 1,
  1216. .buswidth = 4,
  1217. };
  1218. static struct qcom_icc_node qns_nsp_gemnoc = {
  1219. .name = "qns_nsp_gemnoc",
  1220. .channels = 2,
  1221. .buswidth = 32,
  1222. .num_links = 1,
  1223. .link_nodes = { &qnm_cmpnoc },
  1224. };
  1225. static struct qcom_icc_node service_nsp_noc = {
  1226. .name = "service_nsp_noc",
  1227. .channels = 1,
  1228. .buswidth = 4,
  1229. };
  1230. static struct qcom_icc_node qns_gemnoc_gc = {
  1231. .name = "qns_gemnoc_gc",
  1232. .channels = 1,
  1233. .buswidth = 8,
  1234. .num_links = 1,
  1235. .link_nodes = { &qnm_snoc_gc },
  1236. };
  1237. static struct qcom_icc_node qns_gemnoc_sf = {
  1238. .name = "qns_gemnoc_sf",
  1239. .channels = 1,
  1240. .buswidth = 16,
  1241. .num_links = 1,
  1242. .link_nodes = { &qnm_snoc_sf },
  1243. };
  1244. static struct qcom_icc_node srvc_snoc = {
  1245. .name = "srvc_snoc",
  1246. .channels = 1,
  1247. .buswidth = 4,
  1248. };
  1249. static struct qcom_icc_bcm bcm_acv = {
  1250. .name = "ACV",
  1251. .enable_mask = BIT(3),
  1252. .num_nodes = 1,
  1253. .nodes = { &ebi },
  1254. };
  1255. static struct qcom_icc_bcm bcm_ce0 = {
  1256. .name = "CE0",
  1257. .num_nodes = 1,
  1258. .nodes = { &qxm_crypto },
  1259. };
  1260. static struct qcom_icc_bcm bcm_cn0 = {
  1261. .name = "CN0",
  1262. .keepalive = true,
  1263. .num_nodes = 2,
  1264. .nodes = { &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie },
  1265. };
  1266. static struct qcom_icc_bcm bcm_cn1 = {
  1267. .name = "CN1",
  1268. .num_nodes = 47,
  1269. .nodes = { &qnm_cnoc3_cnoc2, &xm_qdss_dap,
  1270. &qhs_ahb2phy0, &qhs_ahb2phy1,
  1271. &qhs_camera_cfg, &qhs_clk_ctl,
  1272. &qhs_compute_cfg, &qhs_cpr_cx,
  1273. &qhs_cpr_mx, &qhs_crypto0_cfg,
  1274. &qhs_cx_rdpm, &qhs_dcc_cfg,
  1275. &qhs_display_cfg, &qhs_gpuss_cfg,
  1276. &qhs_hwkm, &qhs_imem_cfg,
  1277. &qhs_ipa, &qhs_ipc_router,
  1278. &qhs_mss_cfg, &qhs_mx_rdpm,
  1279. &qhs_pcie0_cfg, &qhs_pcie1_cfg,
  1280. &qhs_pimem_cfg, &qhs_pka_wrapper_cfg,
  1281. &qhs_pmu_wrapper_cfg, &qhs_qdss_cfg,
  1282. &qhs_qup0, &qhs_qup1,
  1283. &qhs_security, &qhs_tcsr,
  1284. &qhs_tlmm, &qhs_ufs_mem_cfg, &qhs_usb2,
  1285. &qhs_usb3_0, &qhs_venus_cfg,
  1286. &qhs_vsense_ctrl_cfg, &qns_a1_noc_cfg,
  1287. &qns_a2_noc_cfg, &qns_cnoc2_cnoc3,
  1288. &qns_mnoc_cfg, &qns_snoc_cfg,
  1289. &qnm_cnoc2_cnoc3, &qhs_aoss,
  1290. &qhs_apss, &qns_cnoc3_cnoc2,
  1291. &qns_cnoc_a2noc, &qns_ddrss_cfg },
  1292. };
  1293. static struct qcom_icc_bcm bcm_cn2 = {
  1294. .name = "CN2",
  1295. .num_nodes = 6,
  1296. .nodes = { &qhs_lpass_cfg, &qhs_pdm,
  1297. &qhs_qspi, &qhs_sdc1,
  1298. &qhs_sdc2, &qhs_sdc4 },
  1299. };
  1300. static struct qcom_icc_bcm bcm_co0 = {
  1301. .name = "CO0",
  1302. .num_nodes = 1,
  1303. .nodes = { &qns_nsp_gemnoc },
  1304. };
  1305. static struct qcom_icc_bcm bcm_co3 = {
  1306. .name = "CO3",
  1307. .num_nodes = 1,
  1308. .nodes = { &qxm_nsp },
  1309. };
  1310. static struct qcom_icc_bcm bcm_mc0 = {
  1311. .name = "MC0",
  1312. .keepalive = true,
  1313. .num_nodes = 1,
  1314. .nodes = { &ebi },
  1315. };
  1316. static struct qcom_icc_bcm bcm_mm0 = {
  1317. .name = "MM0",
  1318. .keepalive = true,
  1319. .num_nodes = 1,
  1320. .nodes = { &qns_mem_noc_hf },
  1321. };
  1322. static struct qcom_icc_bcm bcm_mm1 = {
  1323. .name = "MM1",
  1324. .num_nodes = 2,
  1325. .nodes = { &qxm_camnoc_hf, &qxm_mdp0 },
  1326. };
  1327. static struct qcom_icc_bcm bcm_mm4 = {
  1328. .name = "MM4",
  1329. .num_nodes = 1,
  1330. .nodes = { &qns_mem_noc_sf },
  1331. };
  1332. static struct qcom_icc_bcm bcm_mm5 = {
  1333. .name = "MM5",
  1334. .num_nodes = 3,
  1335. .nodes = { &qnm_video0, &qxm_camnoc_icp,
  1336. &qxm_camnoc_sf },
  1337. };
  1338. static struct qcom_icc_bcm bcm_qup0 = {
  1339. .name = "QUP0",
  1340. .vote_scale = 1,
  1341. .num_nodes = 1,
  1342. .nodes = { &qup0_core_slave },
  1343. };
  1344. static struct qcom_icc_bcm bcm_qup1 = {
  1345. .name = "QUP1",
  1346. .vote_scale = 1,
  1347. .num_nodes = 1,
  1348. .nodes = { &qup1_core_slave },
  1349. };
  1350. static struct qcom_icc_bcm bcm_sh0 = {
  1351. .name = "SH0",
  1352. .keepalive = true,
  1353. .num_nodes = 1,
  1354. .nodes = { &qns_llcc },
  1355. };
  1356. static struct qcom_icc_bcm bcm_sh2 = {
  1357. .name = "SH2",
  1358. .num_nodes = 2,
  1359. .nodes = { &alm_gpu_tcu, &alm_sys_tcu },
  1360. };
  1361. static struct qcom_icc_bcm bcm_sh3 = {
  1362. .name = "SH3",
  1363. .num_nodes = 1,
  1364. .nodes = { &qnm_cmpnoc },
  1365. };
  1366. static struct qcom_icc_bcm bcm_sh4 = {
  1367. .name = "SH4",
  1368. .num_nodes = 1,
  1369. .nodes = { &chm_apps },
  1370. };
  1371. static struct qcom_icc_bcm bcm_sn0 = {
  1372. .name = "SN0",
  1373. .keepalive = true,
  1374. .num_nodes = 1,
  1375. .nodes = { &qns_gemnoc_sf },
  1376. };
  1377. static struct qcom_icc_bcm bcm_sn2 = {
  1378. .name = "SN2",
  1379. .num_nodes = 1,
  1380. .nodes = { &qns_gemnoc_gc },
  1381. };
  1382. static struct qcom_icc_bcm bcm_sn3 = {
  1383. .name = "SN3",
  1384. .num_nodes = 1,
  1385. .nodes = { &qxs_pimem },
  1386. };
  1387. static struct qcom_icc_bcm bcm_sn4 = {
  1388. .name = "SN4",
  1389. .num_nodes = 1,
  1390. .nodes = { &xs_qdss_stm },
  1391. };
  1392. static struct qcom_icc_bcm bcm_sn5 = {
  1393. .name = "SN5",
  1394. .num_nodes = 1,
  1395. .nodes = { &xm_pcie3_0 },
  1396. };
  1397. static struct qcom_icc_bcm bcm_sn6 = {
  1398. .name = "SN6",
  1399. .num_nodes = 1,
  1400. .nodes = { &xm_pcie3_1 },
  1401. };
  1402. static struct qcom_icc_bcm bcm_sn7 = {
  1403. .name = "SN7",
  1404. .num_nodes = 1,
  1405. .nodes = { &qnm_aggre1_noc },
  1406. };
  1407. static struct qcom_icc_bcm bcm_sn8 = {
  1408. .name = "SN8",
  1409. .num_nodes = 1,
  1410. .nodes = { &qnm_aggre2_noc },
  1411. };
  1412. static struct qcom_icc_bcm bcm_sn14 = {
  1413. .name = "SN14",
  1414. .num_nodes = 1,
  1415. .nodes = { &qns_pcie_mem_noc },
  1416. };
  1417. static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
  1418. &bcm_sn5,
  1419. &bcm_sn6,
  1420. &bcm_sn14,
  1421. };
  1422. static struct qcom_icc_node * const aggre1_noc_nodes[] = {
  1423. [MASTER_QSPI_0] = &qhm_qspi,
  1424. [MASTER_QUP_0] = &qhm_qup0,
  1425. [MASTER_QUP_1] = &qhm_qup1,
  1426. [MASTER_A1NOC_CFG] = &qnm_a1noc_cfg,
  1427. [MASTER_PCIE_0] = &xm_pcie3_0,
  1428. [MASTER_PCIE_1] = &xm_pcie3_1,
  1429. [MASTER_SDCC_1] = &xm_sdc1,
  1430. [MASTER_SDCC_2] = &xm_sdc2,
  1431. [MASTER_SDCC_4] = &xm_sdc4,
  1432. [MASTER_UFS_MEM] = &xm_ufs_mem,
  1433. [MASTER_USB2] = &xm_usb2,
  1434. [MASTER_USB3_0] = &xm_usb3_0,
  1435. [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
  1436. [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
  1437. [SLAVE_SERVICE_A1NOC] = &srvc_aggre1_noc,
  1438. };
  1439. static const struct regmap_config sc7280_aggre1_noc_regmap_config = {
  1440. .reg_bits = 32,
  1441. .reg_stride = 4,
  1442. .val_bits = 32,
  1443. .max_register = 0x1c080,
  1444. .fast_io = true,
  1445. };
  1446. static const struct qcom_icc_desc sc7280_aggre1_noc = {
  1447. .config = &sc7280_aggre1_noc_regmap_config,
  1448. .nodes = aggre1_noc_nodes,
  1449. .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
  1450. .bcms = aggre1_noc_bcms,
  1451. .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
  1452. .qos_requires_clocks = true,
  1453. };
  1454. static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
  1455. &bcm_ce0,
  1456. };
  1457. static const struct regmap_config sc7280_aggre2_noc_regmap_config = {
  1458. .reg_bits = 32,
  1459. .reg_stride = 4,
  1460. .val_bits = 32,
  1461. .max_register = 0x2b080,
  1462. .fast_io = true,
  1463. };
  1464. static struct qcom_icc_node * const aggre2_noc_nodes[] = {
  1465. [MASTER_QDSS_BAM] = &qhm_qdss_bam,
  1466. [MASTER_A2NOC_CFG] = &qnm_a2noc_cfg,
  1467. [MASTER_CNOC_A2NOC] = &qnm_cnoc_datapath,
  1468. [MASTER_CRYPTO] = &qxm_crypto,
  1469. [MASTER_IPA] = &qxm_ipa,
  1470. [MASTER_QDSS_ETR] = &xm_qdss_etr,
  1471. [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
  1472. [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
  1473. };
  1474. static const struct qcom_icc_desc sc7280_aggre2_noc = {
  1475. .config = &sc7280_aggre2_noc_regmap_config,
  1476. .nodes = aggre2_noc_nodes,
  1477. .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
  1478. .bcms = aggre2_noc_bcms,
  1479. .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
  1480. .qos_requires_clocks = true,
  1481. };
  1482. static struct qcom_icc_bcm * const clk_virt_bcms[] = {
  1483. &bcm_qup0,
  1484. &bcm_qup1,
  1485. };
  1486. static struct qcom_icc_node * const clk_virt_nodes[] = {
  1487. [MASTER_QUP_CORE_0] = &qup0_core_master,
  1488. [MASTER_QUP_CORE_1] = &qup1_core_master,
  1489. [SLAVE_QUP_CORE_0] = &qup0_core_slave,
  1490. [SLAVE_QUP_CORE_1] = &qup1_core_slave,
  1491. };
  1492. static const struct qcom_icc_desc sc7280_clk_virt = {
  1493. .nodes = clk_virt_nodes,
  1494. .num_nodes = ARRAY_SIZE(clk_virt_nodes),
  1495. .bcms = clk_virt_bcms,
  1496. .num_bcms = ARRAY_SIZE(clk_virt_bcms),
  1497. };
  1498. static struct qcom_icc_bcm * const cnoc2_bcms[] = {
  1499. &bcm_cn1,
  1500. &bcm_cn2,
  1501. };
  1502. static struct qcom_icc_node * const cnoc2_nodes[] = {
  1503. [MASTER_CNOC3_CNOC2] = &qnm_cnoc3_cnoc2,
  1504. [MASTER_QDSS_DAP] = &xm_qdss_dap,
  1505. [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
  1506. [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
  1507. [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
  1508. [SLAVE_CLK_CTL] = &qhs_clk_ctl,
  1509. [SLAVE_CDSP_CFG] = &qhs_compute_cfg,
  1510. [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
  1511. [SLAVE_RBCPR_MX_CFG] = &qhs_cpr_mx,
  1512. [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
  1513. [SLAVE_CX_RDPM] = &qhs_cx_rdpm,
  1514. [SLAVE_DCC_CFG] = &qhs_dcc_cfg,
  1515. [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
  1516. [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
  1517. [SLAVE_HWKM] = &qhs_hwkm,
  1518. [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
  1519. [SLAVE_IPA_CFG] = &qhs_ipa,
  1520. [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
  1521. [SLAVE_LPASS] = &qhs_lpass_cfg,
  1522. [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
  1523. [SLAVE_MX_RDPM] = &qhs_mx_rdpm,
  1524. [SLAVE_PCIE_0_CFG] = &qhs_pcie0_cfg,
  1525. [SLAVE_PCIE_1_CFG] = &qhs_pcie1_cfg,
  1526. [SLAVE_PDM] = &qhs_pdm,
  1527. [SLAVE_PIMEM_CFG] = &qhs_pimem_cfg,
  1528. [SLAVE_PKA_WRAPPER_CFG] = &qhs_pka_wrapper_cfg,
  1529. [SLAVE_PMU_WRAPPER_CFG] = &qhs_pmu_wrapper_cfg,
  1530. [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
  1531. [SLAVE_QSPI_0] = &qhs_qspi,
  1532. [SLAVE_QUP_0] = &qhs_qup0,
  1533. [SLAVE_QUP_1] = &qhs_qup1,
  1534. [SLAVE_SDCC_1] = &qhs_sdc1,
  1535. [SLAVE_SDCC_2] = &qhs_sdc2,
  1536. [SLAVE_SDCC_4] = &qhs_sdc4,
  1537. [SLAVE_SECURITY] = &qhs_security,
  1538. [SLAVE_TCSR] = &qhs_tcsr,
  1539. [SLAVE_TLMM] = &qhs_tlmm,
  1540. [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
  1541. [SLAVE_USB2] = &qhs_usb2,
  1542. [SLAVE_USB3_0] = &qhs_usb3_0,
  1543. [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
  1544. [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
  1545. [SLAVE_A1NOC_CFG] = &qns_a1_noc_cfg,
  1546. [SLAVE_A2NOC_CFG] = &qns_a2_noc_cfg,
  1547. [SLAVE_CNOC2_CNOC3] = &qns_cnoc2_cnoc3,
  1548. [SLAVE_CNOC_MNOC_CFG] = &qns_mnoc_cfg,
  1549. [SLAVE_SNOC_CFG] = &qns_snoc_cfg,
  1550. };
  1551. static const struct regmap_config sc7280_cnoc2_regmap_config = {
  1552. .reg_bits = 32,
  1553. .reg_stride = 4,
  1554. .val_bits = 32,
  1555. .max_register = 0x1000,
  1556. .fast_io = true,
  1557. };
  1558. static const struct qcom_icc_desc sc7280_cnoc2 = {
  1559. .config = &sc7280_cnoc2_regmap_config,
  1560. .nodes = cnoc2_nodes,
  1561. .num_nodes = ARRAY_SIZE(cnoc2_nodes),
  1562. .bcms = cnoc2_bcms,
  1563. .num_bcms = ARRAY_SIZE(cnoc2_bcms),
  1564. };
  1565. static struct qcom_icc_bcm * const cnoc3_bcms[] = {
  1566. &bcm_cn0,
  1567. &bcm_cn1,
  1568. &bcm_sn3,
  1569. &bcm_sn4,
  1570. };
  1571. static struct qcom_icc_node * const cnoc3_nodes[] = {
  1572. [MASTER_CNOC2_CNOC3] = &qnm_cnoc2_cnoc3,
  1573. [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
  1574. [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
  1575. [SLAVE_AOSS] = &qhs_aoss,
  1576. [SLAVE_APPSS] = &qhs_apss,
  1577. [SLAVE_CNOC3_CNOC2] = &qns_cnoc3_cnoc2,
  1578. [SLAVE_CNOC_A2NOC] = &qns_cnoc_a2noc,
  1579. [SLAVE_DDRSS_CFG] = &qns_ddrss_cfg,
  1580. [SLAVE_BOOT_IMEM] = &qxs_boot_imem,
  1581. [SLAVE_IMEM] = &qxs_imem,
  1582. [SLAVE_PIMEM] = &qxs_pimem,
  1583. [SLAVE_PCIE_0] = &xs_pcie_0,
  1584. [SLAVE_PCIE_1] = &xs_pcie_1,
  1585. [SLAVE_QDSS_STM] = &xs_qdss_stm,
  1586. [SLAVE_TCU] = &xs_sys_tcu_cfg,
  1587. };
  1588. static const struct regmap_config sc7280_cnoc3_regmap_config = {
  1589. .reg_bits = 32,
  1590. .reg_stride = 4,
  1591. .val_bits = 32,
  1592. .max_register = 0x1000,
  1593. .fast_io = true,
  1594. };
  1595. static const struct qcom_icc_desc sc7280_cnoc3 = {
  1596. .config = &sc7280_cnoc3_regmap_config,
  1597. .nodes = cnoc3_nodes,
  1598. .num_nodes = ARRAY_SIZE(cnoc3_nodes),
  1599. .bcms = cnoc3_bcms,
  1600. .num_bcms = ARRAY_SIZE(cnoc3_bcms),
  1601. };
  1602. static struct qcom_icc_bcm * const dc_noc_bcms[] = {
  1603. };
  1604. static struct qcom_icc_node * const dc_noc_nodes[] = {
  1605. [MASTER_CNOC_DC_NOC] = &qnm_cnoc_dc_noc,
  1606. [SLAVE_LLCC_CFG] = &qhs_llcc,
  1607. [SLAVE_GEM_NOC_CFG] = &qns_gemnoc,
  1608. };
  1609. static const struct regmap_config sc7280_dc_noc_regmap_config = {
  1610. .reg_bits = 32,
  1611. .reg_stride = 4,
  1612. .val_bits = 32,
  1613. .max_register = 0x5080,
  1614. .fast_io = true,
  1615. };
  1616. static const struct qcom_icc_desc sc7280_dc_noc = {
  1617. .config = &sc7280_dc_noc_regmap_config,
  1618. .nodes = dc_noc_nodes,
  1619. .num_nodes = ARRAY_SIZE(dc_noc_nodes),
  1620. .bcms = dc_noc_bcms,
  1621. .num_bcms = ARRAY_SIZE(dc_noc_bcms),
  1622. };
  1623. static struct qcom_icc_bcm * const gem_noc_bcms[] = {
  1624. &bcm_sh0,
  1625. &bcm_sh2,
  1626. &bcm_sh3,
  1627. &bcm_sh4,
  1628. };
  1629. static struct qcom_icc_node * const gem_noc_nodes[] = {
  1630. [MASTER_GPU_TCU] = &alm_gpu_tcu,
  1631. [MASTER_SYS_TCU] = &alm_sys_tcu,
  1632. [MASTER_APPSS_PROC] = &chm_apps,
  1633. [MASTER_COMPUTE_NOC] = &qnm_cmpnoc,
  1634. [MASTER_GEM_NOC_CFG] = &qnm_gemnoc_cfg,
  1635. [MASTER_GFX3D] = &qnm_gpu,
  1636. [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
  1637. [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
  1638. [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
  1639. [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
  1640. [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
  1641. [SLAVE_MSS_PROC_MS_MPU_CFG] = &qhs_mdsp_ms_mpu_cfg,
  1642. [SLAVE_MCDMA_MS_MPU_CFG] = &qhs_modem_ms_mpu_cfg,
  1643. [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
  1644. [SLAVE_LLCC] = &qns_llcc,
  1645. [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
  1646. [SLAVE_SERVICE_GEM_NOC_1] = &srvc_even_gemnoc,
  1647. [SLAVE_SERVICE_GEM_NOC_2] = &srvc_odd_gemnoc,
  1648. [SLAVE_SERVICE_GEM_NOC] = &srvc_sys_gemnoc,
  1649. };
  1650. static const struct regmap_config sc7280_gem_noc_regmap_config = {
  1651. .reg_bits = 32,
  1652. .reg_stride = 4,
  1653. .val_bits = 32,
  1654. .max_register = 0xe2200,
  1655. .fast_io = true,
  1656. };
  1657. static const struct qcom_icc_desc sc7280_gem_noc = {
  1658. .config = &sc7280_gem_noc_regmap_config,
  1659. .nodes = gem_noc_nodes,
  1660. .num_nodes = ARRAY_SIZE(gem_noc_nodes),
  1661. .bcms = gem_noc_bcms,
  1662. .num_bcms = ARRAY_SIZE(gem_noc_bcms),
  1663. };
  1664. static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] = {
  1665. };
  1666. static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
  1667. [MASTER_CNOC_LPASS_AG_NOC] = &qhm_config_noc,
  1668. [SLAVE_LPASS_CORE_CFG] = &qhs_lpass_core,
  1669. [SLAVE_LPASS_LPI_CFG] = &qhs_lpass_lpi,
  1670. [SLAVE_LPASS_MPU_CFG] = &qhs_lpass_mpu,
  1671. [SLAVE_LPASS_TOP_CFG] = &qhs_lpass_top,
  1672. [SLAVE_SERVICES_LPASS_AML_NOC] = &srvc_niu_aml_noc,
  1673. [SLAVE_SERVICE_LPASS_AG_NOC] = &srvc_niu_lpass_agnoc,
  1674. };
  1675. static const struct regmap_config sc7280_lpass_ag_noc_regmap_config = {
  1676. .reg_bits = 32,
  1677. .reg_stride = 4,
  1678. .val_bits = 32,
  1679. .max_register = 0xf080,
  1680. .fast_io = true,
  1681. };
  1682. static const struct qcom_icc_desc sc7280_lpass_ag_noc = {
  1683. .config = &sc7280_lpass_ag_noc_regmap_config,
  1684. .nodes = lpass_ag_noc_nodes,
  1685. .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
  1686. .bcms = lpass_ag_noc_bcms,
  1687. .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms),
  1688. };
  1689. static struct qcom_icc_bcm * const mc_virt_bcms[] = {
  1690. &bcm_acv,
  1691. &bcm_mc0,
  1692. };
  1693. static struct qcom_icc_node * const mc_virt_nodes[] = {
  1694. [MASTER_LLCC] = &llcc_mc,
  1695. [SLAVE_EBI1] = &ebi,
  1696. };
  1697. static const struct regmap_config sc7280_mc_virt_regmap_config = {
  1698. .reg_bits = 32,
  1699. .reg_stride = 4,
  1700. .val_bits = 32,
  1701. .max_register = 0x4,
  1702. .fast_io = true,
  1703. };
  1704. static const struct qcom_icc_desc sc7280_mc_virt = {
  1705. .config = &sc7280_mc_virt_regmap_config,
  1706. .nodes = mc_virt_nodes,
  1707. .num_nodes = ARRAY_SIZE(mc_virt_nodes),
  1708. .bcms = mc_virt_bcms,
  1709. .num_bcms = ARRAY_SIZE(mc_virt_bcms),
  1710. };
  1711. static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
  1712. &bcm_mm0,
  1713. &bcm_mm1,
  1714. &bcm_mm4,
  1715. &bcm_mm5,
  1716. };
  1717. static struct qcom_icc_node * const mmss_noc_nodes[] = {
  1718. [MASTER_CNOC_MNOC_CFG] = &qnm_mnoc_cfg,
  1719. [MASTER_VIDEO_P0] = &qnm_video0,
  1720. [MASTER_VIDEO_PROC] = &qnm_video_cpu,
  1721. [MASTER_CAMNOC_HF] = &qxm_camnoc_hf,
  1722. [MASTER_CAMNOC_ICP] = &qxm_camnoc_icp,
  1723. [MASTER_CAMNOC_SF] = &qxm_camnoc_sf,
  1724. [MASTER_MDP0] = &qxm_mdp0,
  1725. [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
  1726. [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
  1727. [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
  1728. };
  1729. static const struct regmap_config sc7280_mmss_noc_regmap_config = {
  1730. .reg_bits = 32,
  1731. .reg_stride = 4,
  1732. .val_bits = 32,
  1733. .max_register = 0x1e080,
  1734. .fast_io = true,
  1735. };
  1736. static const struct qcom_icc_desc sc7280_mmss_noc = {
  1737. .config = &sc7280_mmss_noc_regmap_config,
  1738. .nodes = mmss_noc_nodes,
  1739. .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
  1740. .bcms = mmss_noc_bcms,
  1741. .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
  1742. };
  1743. static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
  1744. &bcm_co0,
  1745. &bcm_co3,
  1746. };
  1747. static struct qcom_icc_node * const nsp_noc_nodes[] = {
  1748. [MASTER_CDSP_NOC_CFG] = &qhm_nsp_noc_config,
  1749. [MASTER_CDSP_PROC] = &qxm_nsp,
  1750. [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
  1751. [SLAVE_SERVICE_NSP_NOC] = &service_nsp_noc,
  1752. };
  1753. static const struct regmap_config sc7280_nsp_noc_regmap_config = {
  1754. .reg_bits = 32,
  1755. .reg_stride = 4,
  1756. .val_bits = 32,
  1757. .max_register = 0x10000,
  1758. .fast_io = true,
  1759. };
  1760. static const struct qcom_icc_desc sc7280_nsp_noc = {
  1761. .config = &sc7280_nsp_noc_regmap_config,
  1762. .nodes = nsp_noc_nodes,
  1763. .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
  1764. .bcms = nsp_noc_bcms,
  1765. .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
  1766. };
  1767. static struct qcom_icc_bcm * const system_noc_bcms[] = {
  1768. &bcm_sn0,
  1769. &bcm_sn2,
  1770. &bcm_sn7,
  1771. &bcm_sn8,
  1772. };
  1773. static struct qcom_icc_node * const system_noc_nodes[] = {
  1774. [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
  1775. [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
  1776. [MASTER_SNOC_CFG] = &qnm_snoc_cfg,
  1777. [MASTER_PIMEM] = &qxm_pimem,
  1778. [MASTER_GIC] = &xm_gic,
  1779. [SLAVE_SNOC_GEM_NOC_GC] = &qns_gemnoc_gc,
  1780. [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
  1781. [SLAVE_SERVICE_SNOC] = &srvc_snoc,
  1782. };
  1783. static const struct regmap_config sc7280_system_noc_regmap_config = {
  1784. .reg_bits = 32,
  1785. .reg_stride = 4,
  1786. .val_bits = 32,
  1787. .max_register = 0x15480,
  1788. .fast_io = true,
  1789. };
  1790. static const struct qcom_icc_desc sc7280_system_noc = {
  1791. .config = &sc7280_system_noc_regmap_config,
  1792. .nodes = system_noc_nodes,
  1793. .num_nodes = ARRAY_SIZE(system_noc_nodes),
  1794. .bcms = system_noc_bcms,
  1795. .num_bcms = ARRAY_SIZE(system_noc_bcms),
  1796. };
  1797. static const struct of_device_id qnoc_of_match[] = {
  1798. { .compatible = "qcom,sc7280-aggre1-noc",
  1799. .data = &sc7280_aggre1_noc},
  1800. { .compatible = "qcom,sc7280-aggre2-noc",
  1801. .data = &sc7280_aggre2_noc},
  1802. { .compatible = "qcom,sc7280-clk-virt",
  1803. .data = &sc7280_clk_virt},
  1804. { .compatible = "qcom,sc7280-cnoc2",
  1805. .data = &sc7280_cnoc2},
  1806. { .compatible = "qcom,sc7280-cnoc3",
  1807. .data = &sc7280_cnoc3},
  1808. { .compatible = "qcom,sc7280-dc-noc",
  1809. .data = &sc7280_dc_noc},
  1810. { .compatible = "qcom,sc7280-gem-noc",
  1811. .data = &sc7280_gem_noc},
  1812. { .compatible = "qcom,sc7280-lpass-ag-noc",
  1813. .data = &sc7280_lpass_ag_noc},
  1814. { .compatible = "qcom,sc7280-mc-virt",
  1815. .data = &sc7280_mc_virt},
  1816. { .compatible = "qcom,sc7280-mmss-noc",
  1817. .data = &sc7280_mmss_noc},
  1818. { .compatible = "qcom,sc7280-nsp-noc",
  1819. .data = &sc7280_nsp_noc},
  1820. { .compatible = "qcom,sc7280-system-noc",
  1821. .data = &sc7280_system_noc},
  1822. { }
  1823. };
  1824. MODULE_DEVICE_TABLE(of, qnoc_of_match);
  1825. static struct platform_driver qnoc_driver = {
  1826. .probe = qcom_icc_rpmh_probe,
  1827. .remove = qcom_icc_rpmh_remove,
  1828. .driver = {
  1829. .name = "qnoc-sc7280",
  1830. .of_match_table = qnoc_of_match,
  1831. .sync_state = icc_sync_state,
  1832. },
  1833. };
  1834. module_platform_driver(qnoc_driver);
  1835. MODULE_DESCRIPTION("SC7280 NoC driver");
  1836. MODULE_LICENSE("GPL v2");