anorak.c 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. */
  6. #include <dt-bindings/interconnect/qcom,anorak.h>
  7. #include <linux/device.h>
  8. #include <linux/interconnect.h>
  9. #include <linux/interconnect-provider.h>
  10. #include <linux/io.h>
  11. #include <linux/module.h>
  12. #include <linux/of_device.h>
  13. #include <linux/of_platform.h>
  14. #include <linux/platform_device.h>
  15. #include <linux/sort.h>
  16. #include "icc-rpmh.h"
  17. #include "qnoc-qos.h"
  18. static const struct regmap_config icc_regmap_config = {
  19. .reg_bits = 32,
  20. .reg_stride = 4,
  21. .val_bits = 32,
  22. };
  23. static struct qcom_icc_qosbox qhm_qup1_qos = {
  24. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  25. .num_ports = 1,
  26. .offsets = { 0x7000 },
  27. .config = &(struct qos_config) {
  28. .prio = 2,
  29. .urg_fwd = 0,
  30. .prio_fwd_disable = 1,
  31. },
  32. };
  33. static struct qcom_icc_node qhm_qup1 = {
  34. .name = "qhm_qup1",
  35. .id = MASTER_QUP_1,
  36. .channels = 1,
  37. .buswidth = 4,
  38. .noc_ops = &qcom_qnoc4_ops,
  39. .qosbox = &qhm_qup1_qos,
  40. .num_links = 1,
  41. .links = { SLAVE_A1NOC_SNOC },
  42. };
  43. static struct qcom_icc_node qnm_a1noc_cfg = {
  44. .name = "qnm_a1noc_cfg",
  45. .id = MASTER_A1NOC_CFG,
  46. .channels = 1,
  47. .buswidth = 4,
  48. .noc_ops = &qcom_qnoc4_ops,
  49. .num_links = 1,
  50. .links = { SLAVE_SERVICE_A1NOC },
  51. };
  52. static struct qcom_icc_qosbox xm_ufs_mem_qos = {
  53. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  54. .num_ports = 1,
  55. .offsets = { 0x8000 },
  56. .config = &(struct qos_config) {
  57. .prio = 2,
  58. .urg_fwd = 0,
  59. .prio_fwd_disable = 1,
  60. },
  61. };
  62. static struct qcom_icc_node xm_ufs_mem = {
  63. .name = "xm_ufs_mem",
  64. .id = MASTER_UFS_MEM,
  65. .channels = 1,
  66. .buswidth = 8,
  67. .noc_ops = &qcom_qnoc4_ops,
  68. .qosbox = &xm_ufs_mem_qos,
  69. .num_links = 1,
  70. .links = { SLAVE_A1NOC_SNOC },
  71. };
  72. static struct qcom_icc_qosbox xm_usb3_0_qos = {
  73. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  74. .num_ports = 1,
  75. .offsets = { 0x9000 },
  76. .config = &(struct qos_config) {
  77. .prio = 2,
  78. .urg_fwd = 0,
  79. .prio_fwd_disable = 1,
  80. },
  81. };
  82. static struct qcom_icc_node xm_usb3_0 = {
  83. .name = "xm_usb3_0",
  84. .id = MASTER_USB3_0,
  85. .channels = 1,
  86. .buswidth = 8,
  87. .noc_ops = &qcom_qnoc4_ops,
  88. .qosbox = &xm_usb3_0_qos,
  89. .num_links = 1,
  90. .links = { SLAVE_A1NOC_SNOC },
  91. };
  92. static struct qcom_icc_qosbox qhm_qdss_bam_qos = {
  93. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  94. .num_ports = 1,
  95. .offsets = { 0x12000 },
  96. .config = &(struct qos_config) {
  97. .prio = 2,
  98. .urg_fwd = 0,
  99. .prio_fwd_disable = 1,
  100. },
  101. };
  102. static struct qcom_icc_node qhm_qdss_bam = {
  103. .name = "qhm_qdss_bam",
  104. .id = MASTER_QDSS_BAM,
  105. .channels = 1,
  106. .buswidth = 4,
  107. .noc_ops = &qcom_qnoc4_ops,
  108. .qosbox = &qhm_qdss_bam_qos,
  109. .num_links = 1,
  110. .links = { SLAVE_A2NOC_SNOC },
  111. };
  112. static struct qcom_icc_qosbox qhm_qup0_qos = {
  113. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  114. .num_ports = 1,
  115. .offsets = { 0x13000 },
  116. .config = &(struct qos_config) {
  117. .prio = 2,
  118. .urg_fwd = 0,
  119. .prio_fwd_disable = 1,
  120. },
  121. };
  122. static struct qcom_icc_node qhm_qup0 = {
  123. .name = "qhm_qup0",
  124. .id = MASTER_QUP_0,
  125. .channels = 1,
  126. .buswidth = 4,
  127. .noc_ops = &qcom_qnoc4_ops,
  128. .qosbox = &qhm_qup0_qos,
  129. .num_links = 1,
  130. .links = { SLAVE_A2NOC_SNOC },
  131. };
  132. static struct qcom_icc_node qnm_a2noc_cfg = {
  133. .name = "qnm_a2noc_cfg",
  134. .id = MASTER_A2NOC_CFG,
  135. .channels = 1,
  136. .buswidth = 4,
  137. .noc_ops = &qcom_qnoc4_ops,
  138. .num_links = 1,
  139. .links = { SLAVE_SERVICE_A2NOC },
  140. };
  141. static struct qcom_icc_qosbox qnm_cnoc_datapath_qos = {
  142. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  143. .num_ports = 1,
  144. .offsets = { 0x14000 },
  145. .config = &(struct qos_config) {
  146. .prio = 2,
  147. .urg_fwd = 0,
  148. .prio_fwd_disable = 1,
  149. },
  150. };
  151. static struct qcom_icc_node qnm_cnoc_datapath = {
  152. .name = "qnm_cnoc_datapath",
  153. .id = MASTER_CNOC_A2NOC,
  154. .channels = 1,
  155. .buswidth = 8,
  156. .noc_ops = &qcom_qnoc4_ops,
  157. .qosbox = &qnm_cnoc_datapath_qos,
  158. .num_links = 1,
  159. .links = { SLAVE_A2NOC_SNOC },
  160. };
  161. static struct qcom_icc_qosbox qxm_crypto_qos = {
  162. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  163. .num_ports = 1,
  164. .offsets = { 0x15000 },
  165. .config = &(struct qos_config) {
  166. .prio = 2,
  167. .urg_fwd = 0,
  168. .prio_fwd_disable = 1,
  169. },
  170. };
  171. static struct qcom_icc_node qxm_crypto = {
  172. .name = "qxm_crypto",
  173. .id = MASTER_CRYPTO,
  174. .channels = 1,
  175. .buswidth = 8,
  176. .noc_ops = &qcom_qnoc4_ops,
  177. .qosbox = &qxm_crypto_qos,
  178. .num_links = 1,
  179. .links = { SLAVE_A2NOC_SNOC },
  180. };
  181. static struct qcom_icc_qosbox qxm_ipa_qos = {
  182. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  183. .num_ports = 1,
  184. .offsets = { 0xe000 },
  185. .config = &(struct qos_config) {
  186. .prio = 2,
  187. .urg_fwd = 0,
  188. .prio_fwd_disable = 1,
  189. },
  190. };
  191. static struct qcom_icc_node qxm_ipa = {
  192. .name = "qxm_ipa",
  193. .id = MASTER_IPA,
  194. .channels = 1,
  195. .buswidth = 8,
  196. .noc_ops = &qcom_qnoc4_ops,
  197. .qosbox = &qxm_ipa_qos,
  198. .num_links = 1,
  199. .links = { SLAVE_A2NOC_SNOC },
  200. };
  201. static struct qcom_icc_node qxm_sp = {
  202. .name = "qxm_sp",
  203. .id = MASTER_SP,
  204. .channels = 1,
  205. .buswidth = 8,
  206. .noc_ops = &qcom_qnoc4_ops,
  207. .num_links = 1,
  208. .links = { SLAVE_A2NOC_SNOC },
  209. };
  210. static struct qcom_icc_qosbox xm_qdss_etr_0_qos = {
  211. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  212. .num_ports = 1,
  213. .offsets = { 0x10000 },
  214. .config = &(struct qos_config) {
  215. .prio = 2,
  216. .urg_fwd = 0,
  217. .prio_fwd_disable = 1,
  218. },
  219. };
  220. static struct qcom_icc_node xm_qdss_etr_0 = {
  221. .name = "xm_qdss_etr_0",
  222. .id = MASTER_QDSS_ETR,
  223. .channels = 1,
  224. .buswidth = 8,
  225. .noc_ops = &qcom_qnoc4_ops,
  226. .qosbox = &xm_qdss_etr_0_qos,
  227. .num_links = 1,
  228. .links = { SLAVE_A2NOC_SNOC },
  229. };
  230. static struct qcom_icc_qosbox xm_qdss_etr_1_qos = {
  231. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  232. .num_ports = 1,
  233. .offsets = { 0xd000 },
  234. .config = &(struct qos_config) {
  235. .prio = 2,
  236. .urg_fwd = 0,
  237. .prio_fwd_disable = 1,
  238. },
  239. };
  240. static struct qcom_icc_node xm_qdss_etr_1 = {
  241. .name = "xm_qdss_etr_1",
  242. .id = MASTER_QDSS_ETR_1,
  243. .channels = 1,
  244. .buswidth = 8,
  245. .noc_ops = &qcom_qnoc4_ops,
  246. .qosbox = &xm_qdss_etr_1_qos,
  247. .num_links = 1,
  248. .links = { SLAVE_A2NOC_SNOC },
  249. };
  250. static struct qcom_icc_qosbox xm_sdc2_qos = {
  251. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  252. .num_ports = 1,
  253. .offsets = { 0x11000 },
  254. .config = &(struct qos_config) {
  255. .prio = 2,
  256. .urg_fwd = 0,
  257. .prio_fwd_disable = 1,
  258. },
  259. };
  260. static struct qcom_icc_node xm_sdc2 = {
  261. .name = "xm_sdc2",
  262. .id = MASTER_SDCC_2,
  263. .channels = 1,
  264. .buswidth = 8,
  265. .noc_ops = &qcom_qnoc4_ops,
  266. .qosbox = &xm_sdc2_qos,
  267. .num_links = 1,
  268. .links = { SLAVE_A2NOC_SNOC },
  269. };
  270. static struct qcom_icc_node qup0_core_master = {
  271. .name = "qup0_core_master",
  272. .id = MASTER_QUP_CORE_0,
  273. .channels = 1,
  274. .buswidth = 4,
  275. .noc_ops = &qcom_qnoc4_ops,
  276. .num_links = 1,
  277. .links = { SLAVE_QUP_CORE_0 },
  278. };
  279. static struct qcom_icc_node qup1_core_master = {
  280. .name = "qup1_core_master",
  281. .id = MASTER_QUP_CORE_1,
  282. .channels = 1,
  283. .buswidth = 4,
  284. .noc_ops = &qcom_qnoc4_ops,
  285. .num_links = 1,
  286. .links = { SLAVE_QUP_CORE_1 },
  287. };
  288. static struct qcom_icc_node qnm_gemnoc_cnoc = {
  289. .name = "qnm_gemnoc_cnoc",
  290. .id = MASTER_GEM_NOC_CNOC,
  291. .channels = 1,
  292. .buswidth = 16,
  293. .noc_ops = &qcom_qnoc4_ops,
  294. .num_links = 44,
  295. .links = { SLAVE_AHB2PHY_SOUTH, SLAVE_AHB2PHY_NORTH,
  296. SLAVE_AOSS, SLAVE_CAMERA_CFG,
  297. SLAVE_CLK_CTL, SLAVE_CDSP_CFG,
  298. SLAVE_RBCPR_CX_CFG, SLAVE_RBCPR_MMCX_CFG,
  299. SLAVE_RBCPR_MXA_CFG, SLAVE_RBCPR_MXC_CFG,
  300. SLAVE_CRYPTO_0_CFG, SLAVE_CX_RDPM,
  301. SLAVE_DISPLAY_CFG, SLAVE_DISPLAY1_CFG,
  302. SLAVE_GFX3D_CFG, SLAVE_IMEM_CFG,
  303. SLAVE_IPA_CFG, SLAVE_IPC_ROUTER_CFG,
  304. SLAVE_LPASS, SLAVE_MX_RDPM,
  305. SLAVE_PDM, SLAVE_PRNG,
  306. SLAVE_QDSS_CFG, SLAVE_QUP_0,
  307. SLAVE_QUP_1, SLAVE_SDCC_2,
  308. SLAVE_SPSS_CFG, SLAVE_TCSR,
  309. SLAVE_TLMM, SLAVE_TME_CFG,
  310. SLAVE_UFS_MEM_CFG, SLAVE_USB3_0,
  311. SLAVE_VENUS_CFG, SLAVE_VSENSE_CTRL_CFG,
  312. SLAVE_A1NOC_CFG, SLAVE_A2NOC_CFG,
  313. SLAVE_DDRSS_CFG, SLAVE_CNOC_MNOC_CFG,
  314. SLAVE_PCIE_ANOC_CFG, SLAVE_SNOC_CFG,
  315. SLAVE_IMEM, SLAVE_SERVICE_CNOC,
  316. SLAVE_QDSS_STM, SLAVE_TCU },
  317. };
  318. static struct qcom_icc_node xm_qdss_dap = {
  319. .name = "xm_qdss_dap",
  320. .id = MASTER_QDSS_DAP,
  321. .channels = 1,
  322. .buswidth = 8,
  323. .noc_ops = &qcom_qnoc4_ops,
  324. .num_links = 45,
  325. .links = { SLAVE_AHB2PHY_SOUTH, SLAVE_AHB2PHY_NORTH,
  326. SLAVE_AOSS, SLAVE_CAMERA_CFG,
  327. SLAVE_CLK_CTL, SLAVE_CDSP_CFG,
  328. SLAVE_RBCPR_CX_CFG, SLAVE_RBCPR_MMCX_CFG,
  329. SLAVE_RBCPR_MXA_CFG, SLAVE_RBCPR_MXC_CFG,
  330. SLAVE_CRYPTO_0_CFG, SLAVE_CX_RDPM,
  331. SLAVE_DISPLAY_CFG, SLAVE_DISPLAY1_CFG,
  332. SLAVE_GFX3D_CFG, SLAVE_IMEM_CFG,
  333. SLAVE_IPA_CFG, SLAVE_IPC_ROUTER_CFG,
  334. SLAVE_LPASS, SLAVE_MX_RDPM,
  335. SLAVE_PDM, SLAVE_PRNG,
  336. SLAVE_QDSS_CFG, SLAVE_QUP_0,
  337. SLAVE_QUP_1, SLAVE_SDCC_2,
  338. SLAVE_SPSS_CFG, SLAVE_TCSR,
  339. SLAVE_TLMM, SLAVE_TME_CFG,
  340. SLAVE_UFS_MEM_CFG, SLAVE_USB3_0,
  341. SLAVE_VENUS_CFG, SLAVE_VSENSE_CTRL_CFG,
  342. SLAVE_A1NOC_CFG, SLAVE_A2NOC_CFG,
  343. SLAVE_CNOC_A2NOC, SLAVE_DDRSS_CFG,
  344. SLAVE_CNOC_MNOC_CFG, SLAVE_PCIE_ANOC_CFG,
  345. SLAVE_SNOC_CFG, SLAVE_IMEM,
  346. SLAVE_SERVICE_CNOC, SLAVE_QDSS_STM,
  347. SLAVE_TCU },
  348. };
  349. static struct qcom_icc_qosbox alm_gpu_tcu_qos = {
  350. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  351. .num_ports = 1,
  352. .offsets = { 0xa5000 },
  353. .config = &(struct qos_config) {
  354. .prio = 6,
  355. .urg_fwd = 0,
  356. .prio_fwd_disable = 1,
  357. },
  358. };
  359. static struct qcom_icc_node alm_gpu_tcu = {
  360. .name = "alm_gpu_tcu",
  361. .id = MASTER_GPU_TCU,
  362. .channels = 1,
  363. .buswidth = 8,
  364. .noc_ops = &qcom_qnoc4_ops,
  365. .qosbox = &alm_gpu_tcu_qos,
  366. .num_links = 2,
  367. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  368. };
  369. static struct qcom_icc_qosbox alm_sys_tcu_qos = {
  370. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  371. .num_ports = 1,
  372. .offsets = { 0xa6000 },
  373. .config = &(struct qos_config) {
  374. .prio = 6,
  375. .urg_fwd = 0,
  376. .prio_fwd_disable = 1,
  377. },
  378. };
  379. static struct qcom_icc_node alm_sys_tcu = {
  380. .name = "alm_sys_tcu",
  381. .id = MASTER_SYS_TCU,
  382. .channels = 1,
  383. .buswidth = 8,
  384. .noc_ops = &qcom_qnoc4_ops,
  385. .qosbox = &alm_sys_tcu_qos,
  386. .num_links = 2,
  387. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  388. };
  389. static struct qcom_icc_node chm_apps = {
  390. .name = "chm_apps",
  391. .id = MASTER_APPSS_PROC,
  392. .channels = 2,
  393. .buswidth = 32,
  394. .noc_ops = &qcom_qnoc4_ops,
  395. .num_links = 2,
  396. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  397. };
  398. static struct qcom_icc_qosbox qnm_gpu_qos = {
  399. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  400. .num_ports = 2,
  401. .offsets = { 0x19000, 0x59000 },
  402. .config = &(struct qos_config) {
  403. .prio = 0,
  404. .urg_fwd = 1,
  405. },
  406. };
  407. static struct qcom_icc_node qnm_gpu = {
  408. .name = "qnm_gpu",
  409. .id = MASTER_GFX3D,
  410. .channels = 2,
  411. .buswidth = 32,
  412. .noc_ops = &qcom_qnoc4_ops,
  413. .qosbox = &qnm_gpu_qos,
  414. .num_links = 2,
  415. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  416. };
  417. static struct qcom_icc_qosbox qnm_mnoc_hf_qos = {
  418. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  419. .num_ports = 2,
  420. .offsets = { 0x1a000, 0x5a000 },
  421. .config = &(struct qos_config) {
  422. .prio = 0,
  423. .urg_fwd = 1,
  424. },
  425. };
  426. static struct qcom_icc_node qnm_mnoc_hf = {
  427. .name = "qnm_mnoc_hf",
  428. .id = MASTER_MNOC_HF_MEM_NOC,
  429. .channels = 2,
  430. .buswidth = 32,
  431. .noc_ops = &qcom_qnoc4_ops,
  432. .qosbox = &qnm_mnoc_hf_qos,
  433. .num_links = 2,
  434. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  435. };
  436. static struct qcom_icc_qosbox qnm_mnoc_sf_qos = {
  437. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  438. .num_ports = 2,
  439. .offsets = { 0x1b000, 0x5b000 },
  440. .config = &(struct qos_config) {
  441. .prio = 0,
  442. .urg_fwd = 1,
  443. },
  444. };
  445. static struct qcom_icc_node qnm_mnoc_sf = {
  446. .name = "qnm_mnoc_sf",
  447. .id = MASTER_MNOC_SF_MEM_NOC,
  448. .channels = 2,
  449. .buswidth = 32,
  450. .noc_ops = &qcom_qnoc4_ops,
  451. .qosbox = &qnm_mnoc_sf_qos,
  452. .num_links = 2,
  453. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  454. };
  455. static struct qcom_icc_qosbox qnm_nsp_gemnoc_qos = {
  456. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  457. .num_ports = 2,
  458. .offsets = { 0x1c000, 0x5c000 },
  459. .config = &(struct qos_config) {
  460. .prio = 0,
  461. .urg_fwd = 0,
  462. .prio_fwd_disable = 1,
  463. },
  464. };
  465. static struct qcom_icc_node qnm_nsp_gemnoc = {
  466. .name = "qnm_nsp_gemnoc",
  467. .id = MASTER_COMPUTE_NOC,
  468. .channels = 2,
  469. .buswidth = 32,
  470. .noc_ops = &qcom_qnoc4_ops,
  471. .qosbox = &qnm_nsp_gemnoc_qos,
  472. .num_links = 2,
  473. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  474. };
  475. static struct qcom_icc_qosbox qnm_pcie_qos = {
  476. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  477. .num_ports = 1,
  478. .offsets = { 0xa7000 },
  479. .config = &(struct qos_config) {
  480. .prio = 0,
  481. .urg_fwd = 1,
  482. },
  483. };
  484. static struct qcom_icc_node qnm_pcie = {
  485. .name = "qnm_pcie",
  486. .id = MASTER_ANOC_PCIE_GEM_NOC,
  487. .channels = 1,
  488. .buswidth = 16,
  489. .noc_ops = &qcom_qnoc4_ops,
  490. .qosbox = &qnm_pcie_qos,
  491. .num_links = 2,
  492. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  493. };
  494. static struct qcom_icc_qosbox qnm_snoc_gc_qos = {
  495. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  496. .num_ports = 1,
  497. .offsets = { 0xa8000 },
  498. .config = &(struct qos_config) {
  499. .prio = 0,
  500. .urg_fwd = 1,
  501. },
  502. };
  503. static struct qcom_icc_node qnm_snoc_gc = {
  504. .name = "qnm_snoc_gc",
  505. .id = MASTER_SNOC_GC_MEM_NOC,
  506. .channels = 1,
  507. .buswidth = 8,
  508. .noc_ops = &qcom_qnoc4_ops,
  509. .qosbox = &qnm_snoc_gc_qos,
  510. .num_links = 1,
  511. .links = { SLAVE_LLCC },
  512. };
  513. static struct qcom_icc_qosbox qnm_snoc_sf_qos = {
  514. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  515. .num_ports = 1,
  516. .offsets = { 0xa9000 },
  517. .config = &(struct qos_config) {
  518. .prio = 0,
  519. .urg_fwd = 1,
  520. },
  521. };
  522. static struct qcom_icc_node qnm_snoc_sf = {
  523. .name = "qnm_snoc_sf",
  524. .id = MASTER_SNOC_SF_MEM_NOC,
  525. .channels = 1,
  526. .buswidth = 16,
  527. .noc_ops = &qcom_qnoc4_ops,
  528. .qosbox = &qnm_snoc_sf_qos,
  529. .num_links = 2,
  530. .links = { SLAVE_GEM_NOC_CNOC, SLAVE_LLCC },
  531. };
  532. static struct qcom_icc_node qhm_config_noc = {
  533. .name = "qhm_config_noc",
  534. .id = MASTER_CNOC_LPASS_AG_NOC,
  535. .channels = 1,
  536. .buswidth = 4,
  537. .noc_ops = &qcom_qnoc4_ops,
  538. .num_links = 6,
  539. .links = { SLAVE_LPASS_CORE_CFG, SLAVE_LPASS_LPI_CFG,
  540. SLAVE_LPASS_MPU_CFG, SLAVE_LPASS_TOP_CFG,
  541. SLAVE_SERVICES_LPASS_AML_NOC, SLAVE_SERVICE_LPASS_AG_NOC },
  542. };
  543. static struct qcom_icc_node qxm_lpass_dsp = {
  544. .name = "qxm_lpass_dsp",
  545. .id = MASTER_LPASS_PROC,
  546. .channels = 1,
  547. .buswidth = 8,
  548. .noc_ops = &qcom_qnoc4_ops,
  549. .num_links = 4,
  550. .links = { SLAVE_LPASS_TOP_CFG, SLAVE_LPASS_SNOC,
  551. SLAVE_SERVICES_LPASS_AML_NOC, SLAVE_SERVICE_LPASS_AG_NOC },
  552. };
  553. static struct qcom_icc_node llcc_mc = {
  554. .name = "llcc_mc",
  555. .id = MASTER_LLCC,
  556. .channels = 4,
  557. .buswidth = 4,
  558. .noc_ops = &qcom_qnoc4_ops,
  559. .num_links = 1,
  560. .links = { SLAVE_EBI1 },
  561. };
  562. static struct qcom_icc_qosbox qnm_camnoc_hf_qos = {
  563. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  564. .num_ports = 2,
  565. .offsets = { 0x15000, 0x15080 },
  566. .config = &(struct qos_config) {
  567. .prio = 0,
  568. .urg_fwd = 1,
  569. },
  570. };
  571. static struct qcom_icc_node qnm_camnoc_hf = {
  572. .name = "qnm_camnoc_hf",
  573. .id = MASTER_CAMNOC_HF,
  574. .channels = 2,
  575. .buswidth = 32,
  576. .noc_ops = &qcom_qnoc4_ops,
  577. .qosbox = &qnm_camnoc_hf_qos,
  578. .num_links = 1,
  579. .links = { SLAVE_MNOC_HF_MEM_NOC },
  580. };
  581. static struct qcom_icc_qosbox qnm_camnoc_icp_qos = {
  582. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  583. .num_ports = 1,
  584. .offsets = { 0x16000 },
  585. .config = &(struct qos_config) {
  586. .prio = 4,
  587. .urg_fwd = 0,
  588. .prio_fwd_disable = 1,
  589. },
  590. };
  591. static struct qcom_icc_node qnm_camnoc_icp = {
  592. .name = "qnm_camnoc_icp",
  593. .id = MASTER_CAMNOC_ICP,
  594. .channels = 1,
  595. .buswidth = 8,
  596. .noc_ops = &qcom_qnoc4_ops,
  597. .qosbox = &qnm_camnoc_icp_qos,
  598. .num_links = 1,
  599. .links = { SLAVE_MNOC_SF_MEM_NOC },
  600. };
  601. static struct qcom_icc_qosbox qnm_camnoc_sf_qos = {
  602. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  603. .num_ports = 2,
  604. .offsets = { 0x17000, 0x17080 },
  605. .config = &(struct qos_config) {
  606. .prio = 0,
  607. .urg_fwd = 1,
  608. },
  609. };
  610. static struct qcom_icc_node qnm_camnoc_sf = {
  611. .name = "qnm_camnoc_sf",
  612. .id = MASTER_CAMNOC_SF,
  613. .channels = 2,
  614. .buswidth = 32,
  615. .noc_ops = &qcom_qnoc4_ops,
  616. .qosbox = &qnm_camnoc_sf_qos,
  617. .num_links = 1,
  618. .links = { SLAVE_MNOC_SF_MEM_NOC },
  619. };
  620. static struct qcom_icc_qosbox qnm_mdp0_qos = {
  621. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  622. .num_ports = 2,
  623. .offsets = { 0x1b000, 0x1b080 },
  624. .config = &(struct qos_config) {
  625. .prio = 0,
  626. .urg_fwd = 1,
  627. },
  628. };
  629. static struct qcom_icc_node qnm_mdp0 = {
  630. .name = "qnm_mdp0",
  631. .id = MASTER_MDP0,
  632. .channels = 2,
  633. .buswidth = 32,
  634. .noc_ops = &qcom_qnoc4_ops,
  635. .qosbox = &qnm_mdp0_qos,
  636. .num_links = 1,
  637. .links = { SLAVE_MNOC_HF_MEM_NOC },
  638. };
  639. static struct qcom_icc_qosbox qnm_mdp1_qos = {
  640. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  641. .num_ports = 2,
  642. .offsets = { 0x1c000, 0x1c080 },
  643. .config = &(struct qos_config) {
  644. .prio = 0,
  645. .urg_fwd = 1,
  646. },
  647. };
  648. static struct qcom_icc_node qnm_mdp1 = {
  649. .name = "qnm_mdp1",
  650. .id = MASTER_MDP1,
  651. .channels = 2,
  652. .buswidth = 32,
  653. .noc_ops = &qcom_qnoc4_ops,
  654. .qosbox = &qnm_mdp1_qos,
  655. .num_links = 1,
  656. .links = { SLAVE_MNOC_HF_MEM_NOC },
  657. };
  658. static struct qcom_icc_node qnm_mnoc_cfg = {
  659. .name = "qnm_mnoc_cfg",
  660. .id = MASTER_CNOC_MNOC_CFG,
  661. .channels = 1,
  662. .buswidth = 4,
  663. .noc_ops = &qcom_qnoc4_ops,
  664. .num_links = 1,
  665. .links = { SLAVE_SERVICE_MNOC },
  666. };
  667. static struct qcom_icc_node qnm_vapss_hcp = {
  668. .name = "qnm_vapss_hcp",
  669. .id = MASTER_CDSP_HCP,
  670. .channels = 1,
  671. .buswidth = 32,
  672. .noc_ops = &qcom_qnoc4_ops,
  673. .num_links = 1,
  674. .links = { SLAVE_MNOC_SF_MEM_NOC },
  675. };
  676. static struct qcom_icc_qosbox qnm_video_qos = {
  677. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  678. .num_ports = 2,
  679. .offsets = { 0x19000, 0x19080 },
  680. .config = &(struct qos_config) {
  681. .prio = 0,
  682. .urg_fwd = 1,
  683. },
  684. };
  685. static struct qcom_icc_node qnm_video = {
  686. .name = "qnm_video",
  687. .id = MASTER_VIDEO,
  688. .channels = 2,
  689. .buswidth = 32,
  690. .noc_ops = &qcom_qnoc4_ops,
  691. .qosbox = &qnm_video_qos,
  692. .num_links = 1,
  693. .links = { SLAVE_MNOC_SF_MEM_NOC },
  694. };
  695. static struct qcom_icc_qosbox qnm_video_cv_cpu_qos = {
  696. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  697. .num_ports = 1,
  698. .offsets = { 0x1a080 },
  699. .config = &(struct qos_config) {
  700. .prio = 4,
  701. .urg_fwd = 0,
  702. .prio_fwd_disable = 1,
  703. },
  704. };
  705. static struct qcom_icc_node qnm_video_cv_cpu = {
  706. .name = "qnm_video_cv_cpu",
  707. .id = MASTER_VIDEO_CV_PROC,
  708. .channels = 1,
  709. .buswidth = 8,
  710. .noc_ops = &qcom_qnoc4_ops,
  711. .qosbox = &qnm_video_cv_cpu_qos,
  712. .num_links = 1,
  713. .links = { SLAVE_MNOC_SF_MEM_NOC },
  714. };
  715. static struct qcom_icc_qosbox qnm_video_cvp_qos = {
  716. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  717. .num_ports = 1,
  718. .offsets = { 0x1a000 },
  719. .config = &(struct qos_config) {
  720. .prio = 0,
  721. .urg_fwd = 1,
  722. },
  723. };
  724. static struct qcom_icc_node qnm_video_cvp = {
  725. .name = "qnm_video_cvp",
  726. .id = MASTER_VIDEO_PROC,
  727. .channels = 1,
  728. .buswidth = 32,
  729. .noc_ops = &qcom_qnoc4_ops,
  730. .qosbox = &qnm_video_cvp_qos,
  731. .num_links = 1,
  732. .links = { SLAVE_MNOC_SF_MEM_NOC },
  733. };
  734. static struct qcom_icc_qosbox qnm_video_v_cpu_qos = {
  735. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  736. .num_ports = 1,
  737. .offsets = { 0x1a100 },
  738. .config = &(struct qos_config) {
  739. .prio = 4,
  740. .urg_fwd = 0,
  741. .prio_fwd_disable = 1,
  742. },
  743. };
  744. static struct qcom_icc_node qnm_video_v_cpu = {
  745. .name = "qnm_video_v_cpu",
  746. .id = MASTER_VIDEO_V_PROC,
  747. .channels = 1,
  748. .buswidth = 8,
  749. .noc_ops = &qcom_qnoc4_ops,
  750. .qosbox = &qnm_video_v_cpu_qos,
  751. .num_links = 1,
  752. .links = { SLAVE_MNOC_SF_MEM_NOC },
  753. };
  754. static struct qcom_icc_node qhm_nsp_noc_config = {
  755. .name = "qhm_nsp_noc_config",
  756. .id = MASTER_CDSP_NOC_CFG,
  757. .channels = 1,
  758. .buswidth = 4,
  759. .noc_ops = &qcom_qnoc4_ops,
  760. .num_links = 1,
  761. .links = { SLAVE_SERVICE_NSP_NOC },
  762. };
  763. static struct qcom_icc_node qxm_nsp = {
  764. .name = "qxm_nsp",
  765. .id = MASTER_CDSP_PROC,
  766. .channels = 2,
  767. .buswidth = 32,
  768. .noc_ops = &qcom_qnoc4_ops,
  769. .num_links = 1,
  770. .links = { SLAVE_CDSP_MEM_NOC },
  771. };
  772. static struct qcom_icc_node qnm_pcie_anoc_cfg = {
  773. .name = "qnm_pcie_anoc_cfg",
  774. .id = MASTER_PCIE_ANOC_CFG,
  775. .channels = 1,
  776. .buswidth = 4,
  777. .noc_ops = &qcom_qnoc4_ops,
  778. .num_links = 1,
  779. .links = { SLAVE_SERVICE_PCIE_ANOC },
  780. };
  781. static struct qcom_icc_qosbox xm_pcie3_0_qos = {
  782. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  783. .num_ports = 1,
  784. .offsets = { 0xa000 },
  785. .config = &(struct qos_config) {
  786. .prio = 3,
  787. .urg_fwd = 0,
  788. .prio_fwd_disable = 1,
  789. },
  790. };
  791. static struct qcom_icc_node xm_pcie3_0 = {
  792. .name = "xm_pcie3_0",
  793. .id = MASTER_PCIE_0,
  794. .channels = 1,
  795. .buswidth = 8,
  796. .noc_ops = &qcom_qnoc4_ops,
  797. .qosbox = &xm_pcie3_0_qos,
  798. .num_links = 1,
  799. .links = { SLAVE_ANOC_PCIE_GEM_NOC },
  800. };
  801. static struct qcom_icc_qosbox xm_pcie3_1_qos = {
  802. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  803. .num_ports = 1,
  804. .offsets = { 0xb000 },
  805. .config = &(struct qos_config) {
  806. .prio = 2,
  807. .urg_fwd = 0,
  808. .prio_fwd_disable = 1,
  809. },
  810. };
  811. static struct qcom_icc_node xm_pcie3_1 = {
  812. .name = "xm_pcie3_1",
  813. .id = MASTER_PCIE_1,
  814. .channels = 1,
  815. .buswidth = 8,
  816. .noc_ops = &qcom_qnoc4_ops,
  817. .qosbox = &xm_pcie3_1_qos,
  818. .num_links = 1,
  819. .links = { SLAVE_ANOC_PCIE_GEM_NOC },
  820. };
  821. static struct qcom_icc_qosbox xm_pcie4_0_qos = {
  822. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  823. .num_ports = 1,
  824. .offsets = { 0xc000 },
  825. .config = &(struct qos_config) {
  826. .prio = 2,
  827. .urg_fwd = 0,
  828. .prio_fwd_disable = 1,
  829. },
  830. };
  831. static struct qcom_icc_node xm_pcie4_0 = {
  832. .name = "xm_pcie4_0",
  833. .id = MASTER_PCIE_4,
  834. .channels = 1,
  835. .buswidth = 16,
  836. .noc_ops = &qcom_qnoc4_ops,
  837. .qosbox = &xm_pcie4_0_qos,
  838. .num_links = 1,
  839. .links = { SLAVE_ANOC_PCIE_GEM_NOC },
  840. };
  841. static struct qcom_icc_qosbox qhm_gic_qos = {
  842. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  843. .num_ports = 1,
  844. .offsets = { 0x11000 },
  845. .config = &(struct qos_config) {
  846. .prio = 2,
  847. .urg_fwd = 0,
  848. .prio_fwd_disable = 1,
  849. },
  850. };
  851. static struct qcom_icc_node qhm_gic = {
  852. .name = "qhm_gic",
  853. .id = MASTER_GIC_AHB,
  854. .channels = 1,
  855. .buswidth = 4,
  856. .noc_ops = &qcom_qnoc4_ops,
  857. .qosbox = &qhm_gic_qos,
  858. .num_links = 1,
  859. .links = { SLAVE_SNOC_GEM_NOC_SF },
  860. };
  861. static struct qcom_icc_node qnm_aggre1_noc = {
  862. .name = "qnm_aggre1_noc",
  863. .id = MASTER_A1NOC_SNOC,
  864. .channels = 1,
  865. .buswidth = 16,
  866. .noc_ops = &qcom_qnoc4_ops,
  867. .num_links = 1,
  868. .links = { SLAVE_SNOC_GEM_NOC_SF },
  869. };
  870. static struct qcom_icc_node qnm_aggre2_noc = {
  871. .name = "qnm_aggre2_noc",
  872. .id = MASTER_A2NOC_SNOC,
  873. .channels = 1,
  874. .buswidth = 16,
  875. .noc_ops = &qcom_qnoc4_ops,
  876. .num_links = 1,
  877. .links = { SLAVE_SNOC_GEM_NOC_SF },
  878. };
  879. static struct qcom_icc_qosbox qnm_lpass_noc_qos = {
  880. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  881. .num_ports = 1,
  882. .offsets = { 0x12000 },
  883. .config = &(struct qos_config) {
  884. .prio = 0,
  885. .urg_fwd = 0,
  886. },
  887. };
  888. static struct qcom_icc_node qnm_lpass_noc = {
  889. .name = "qnm_lpass_noc",
  890. .id = MASTER_LPASS_ANOC,
  891. .channels = 1,
  892. .buswidth = 16,
  893. .noc_ops = &qcom_qnoc4_ops,
  894. .qosbox = &qnm_lpass_noc_qos,
  895. .num_links = 1,
  896. .links = { SLAVE_SNOC_GEM_NOC_SF },
  897. };
  898. static struct qcom_icc_node qnm_snoc_cfg = {
  899. .name = "qnm_snoc_cfg",
  900. .id = MASTER_SNOC_CFG,
  901. .channels = 1,
  902. .buswidth = 4,
  903. .noc_ops = &qcom_qnoc4_ops,
  904. .num_links = 1,
  905. .links = { SLAVE_SERVICE_SNOC },
  906. };
  907. static struct qcom_icc_qosbox xm_gic_qos = {
  908. .regs = icc_qnoc_qos_regs[ICC_QNOC_QOSGEN_TYPE_RPMH],
  909. .num_ports = 1,
  910. .offsets = { 0x13000 },
  911. .config = &(struct qos_config) {
  912. .prio = 2,
  913. .urg_fwd = 0,
  914. .prio_fwd_disable = 1,
  915. },
  916. };
  917. static struct qcom_icc_node xm_gic = {
  918. .name = "xm_gic",
  919. .id = MASTER_GIC,
  920. .channels = 1,
  921. .buswidth = 8,
  922. .noc_ops = &qcom_qnoc4_ops,
  923. .qosbox = &xm_gic_qos,
  924. .num_links = 1,
  925. .links = { SLAVE_SNOC_GEM_NOC_GC },
  926. };
  927. static struct qcom_icc_node qnm_mnoc_hf_disp = {
  928. .name = "qnm_mnoc_hf_disp",
  929. .id = MASTER_MNOC_HF_MEM_NOC_DISP,
  930. .channels = 2,
  931. .buswidth = 32,
  932. .noc_ops = &qcom_qnoc4_ops,
  933. .num_links = 1,
  934. .links = { SLAVE_LLCC_DISP },
  935. };
  936. static struct qcom_icc_node qnm_pcie_disp = {
  937. .name = "qnm_pcie_disp",
  938. .id = MASTER_ANOC_PCIE_GEM_NOC_DISP,
  939. .channels = 1,
  940. .buswidth = 16,
  941. .noc_ops = &qcom_qnoc4_ops,
  942. .num_links = 1,
  943. .links = { SLAVE_LLCC_DISP },
  944. };
  945. static struct qcom_icc_node llcc_mc_disp = {
  946. .name = "llcc_mc_disp",
  947. .id = MASTER_LLCC_DISP,
  948. .channels = 4,
  949. .buswidth = 4,
  950. .noc_ops = &qcom_qnoc4_ops,
  951. .num_links = 1,
  952. .links = { SLAVE_EBI1_DISP },
  953. };
  954. static struct qcom_icc_node qnm_mdp0_disp = {
  955. .name = "qnm_mdp0_disp",
  956. .id = MASTER_MDP0_DISP,
  957. .channels = 2,
  958. .buswidth = 32,
  959. .noc_ops = &qcom_qnoc4_ops,
  960. .num_links = 1,
  961. .links = { SLAVE_MNOC_HF_MEM_NOC_DISP },
  962. };
  963. static struct qcom_icc_node qnm_mnoc_hf_disp2 = {
  964. .name = "qnm_mnoc_hf_disp2",
  965. .id = MASTER_MNOC_HF_MEM_NOC_DISP2,
  966. .channels = 2,
  967. .buswidth = 32,
  968. .noc_ops = &qcom_qnoc4_ops,
  969. .num_links = 1,
  970. .links = { SLAVE_LLCC_DISP2 },
  971. };
  972. static struct qcom_icc_node qnm_pcie_disp2 = {
  973. .name = "qnm_pcie_disp2",
  974. .id = MASTER_ANOC_PCIE_GEM_NOC_DISP2,
  975. .channels = 1,
  976. .buswidth = 16,
  977. .noc_ops = &qcom_qnoc4_ops,
  978. .num_links = 1,
  979. .links = { SLAVE_LLCC_DISP2 },
  980. };
  981. static struct qcom_icc_node llcc_mc_disp2 = {
  982. .name = "llcc_mc_disp2",
  983. .id = MASTER_LLCC_DISP2,
  984. .channels = 4,
  985. .buswidth = 4,
  986. .noc_ops = &qcom_qnoc4_ops,
  987. .num_links = 1,
  988. .links = { SLAVE_EBI1_DISP2 },
  989. };
  990. static struct qcom_icc_node qnm_mdp1_disp2 = {
  991. .name = "qnm_mdp1_disp2",
  992. .id = MASTER_MDP1_DISP2,
  993. .channels = 2,
  994. .buswidth = 32,
  995. .noc_ops = &qcom_qnoc4_ops,
  996. .num_links = 1,
  997. .links = { SLAVE_MNOC_HF_MEM_NOC_DISP2 },
  998. };
  999. static struct qcom_icc_node qns_a1noc_snoc = {
  1000. .name = "qns_a1noc_snoc",
  1001. .id = SLAVE_A1NOC_SNOC,
  1002. .channels = 1,
  1003. .buswidth = 16,
  1004. .noc_ops = &qcom_qnoc4_ops,
  1005. .num_links = 1,
  1006. .links = { MASTER_A1NOC_SNOC },
  1007. };
  1008. static struct qcom_icc_node srvc_aggre1_noc = {
  1009. .name = "srvc_aggre1_noc",
  1010. .id = SLAVE_SERVICE_A1NOC,
  1011. .channels = 1,
  1012. .buswidth = 4,
  1013. .noc_ops = &qcom_qnoc4_ops,
  1014. .num_links = 0,
  1015. };
  1016. static struct qcom_icc_node qns_a2noc_snoc = {
  1017. .name = "qns_a2noc_snoc",
  1018. .id = SLAVE_A2NOC_SNOC,
  1019. .channels = 1,
  1020. .buswidth = 16,
  1021. .noc_ops = &qcom_qnoc4_ops,
  1022. .num_links = 1,
  1023. .links = { MASTER_A2NOC_SNOC },
  1024. };
  1025. static struct qcom_icc_node srvc_aggre2_noc = {
  1026. .name = "srvc_aggre2_noc",
  1027. .id = SLAVE_SERVICE_A2NOC,
  1028. .channels = 1,
  1029. .buswidth = 4,
  1030. .noc_ops = &qcom_qnoc4_ops,
  1031. .num_links = 0,
  1032. };
  1033. static struct qcom_icc_node qup0_core_slave = {
  1034. .name = "qup0_core_slave",
  1035. .id = SLAVE_QUP_CORE_0,
  1036. .channels = 1,
  1037. .buswidth = 4,
  1038. .noc_ops = &qcom_qnoc4_ops,
  1039. .num_links = 0,
  1040. };
  1041. static struct qcom_icc_node qup1_core_slave = {
  1042. .name = "qup1_core_slave",
  1043. .id = SLAVE_QUP_CORE_1,
  1044. .channels = 1,
  1045. .buswidth = 4,
  1046. .noc_ops = &qcom_qnoc4_ops,
  1047. .num_links = 0,
  1048. };
  1049. static struct qcom_icc_node qhs_ahb2phy0 = {
  1050. .name = "qhs_ahb2phy0",
  1051. .id = SLAVE_AHB2PHY_SOUTH,
  1052. .channels = 1,
  1053. .buswidth = 4,
  1054. .noc_ops = &qcom_qnoc4_ops,
  1055. .num_links = 0,
  1056. };
  1057. static struct qcom_icc_node qhs_ahb2phy1 = {
  1058. .name = "qhs_ahb2phy1",
  1059. .id = SLAVE_AHB2PHY_NORTH,
  1060. .channels = 1,
  1061. .buswidth = 4,
  1062. .noc_ops = &qcom_qnoc4_ops,
  1063. .num_links = 0,
  1064. };
  1065. static struct qcom_icc_node qhs_aoss = {
  1066. .name = "qhs_aoss",
  1067. .id = SLAVE_AOSS,
  1068. .channels = 1,
  1069. .buswidth = 4,
  1070. .noc_ops = &qcom_qnoc4_ops,
  1071. .num_links = 0,
  1072. };
  1073. static struct qcom_icc_node qhs_camera_cfg = {
  1074. .name = "qhs_camera_cfg",
  1075. .id = SLAVE_CAMERA_CFG,
  1076. .channels = 1,
  1077. .buswidth = 4,
  1078. .noc_ops = &qcom_qnoc4_ops,
  1079. .num_links = 0,
  1080. };
  1081. static struct qcom_icc_node qhs_clk_ctl = {
  1082. .name = "qhs_clk_ctl",
  1083. .id = SLAVE_CLK_CTL,
  1084. .channels = 1,
  1085. .buswidth = 4,
  1086. .noc_ops = &qcom_qnoc4_ops,
  1087. .num_links = 0,
  1088. };
  1089. static struct qcom_icc_node qhs_compute_cfg = {
  1090. .name = "qhs_compute_cfg",
  1091. .id = SLAVE_CDSP_CFG,
  1092. .channels = 1,
  1093. .buswidth = 4,
  1094. .noc_ops = &qcom_qnoc4_ops,
  1095. .num_links = 1,
  1096. .links = { MASTER_CDSP_NOC_CFG },
  1097. };
  1098. static struct qcom_icc_node qhs_cpr_cx = {
  1099. .name = "qhs_cpr_cx",
  1100. .id = SLAVE_RBCPR_CX_CFG,
  1101. .channels = 1,
  1102. .buswidth = 4,
  1103. .noc_ops = &qcom_qnoc4_ops,
  1104. .num_links = 0,
  1105. };
  1106. static struct qcom_icc_node qhs_cpr_mmcx = {
  1107. .name = "qhs_cpr_mmcx",
  1108. .id = SLAVE_RBCPR_MMCX_CFG,
  1109. .channels = 1,
  1110. .buswidth = 4,
  1111. .noc_ops = &qcom_qnoc4_ops,
  1112. .num_links = 0,
  1113. };
  1114. static struct qcom_icc_node qhs_cpr_mxa = {
  1115. .name = "qhs_cpr_mxa",
  1116. .id = SLAVE_RBCPR_MXA_CFG,
  1117. .channels = 1,
  1118. .buswidth = 4,
  1119. .noc_ops = &qcom_qnoc4_ops,
  1120. .num_links = 0,
  1121. };
  1122. static struct qcom_icc_node qhs_cpr_mxc = {
  1123. .name = "qhs_cpr_mxc",
  1124. .id = SLAVE_RBCPR_MXC_CFG,
  1125. .channels = 1,
  1126. .buswidth = 4,
  1127. .noc_ops = &qcom_qnoc4_ops,
  1128. .num_links = 0,
  1129. };
  1130. static struct qcom_icc_node qhs_crypto0_cfg = {
  1131. .name = "qhs_crypto0_cfg",
  1132. .id = SLAVE_CRYPTO_0_CFG,
  1133. .channels = 1,
  1134. .buswidth = 4,
  1135. .noc_ops = &qcom_qnoc4_ops,
  1136. .num_links = 0,
  1137. };
  1138. static struct qcom_icc_node qhs_cx_rdpm = {
  1139. .name = "qhs_cx_rdpm",
  1140. .id = SLAVE_CX_RDPM,
  1141. .channels = 1,
  1142. .buswidth = 4,
  1143. .noc_ops = &qcom_qnoc4_ops,
  1144. .num_links = 0,
  1145. };
  1146. static struct qcom_icc_node qhs_display_0_cfg = {
  1147. .name = "qhs_display_0_cfg",
  1148. .id = SLAVE_DISPLAY_CFG,
  1149. .channels = 1,
  1150. .buswidth = 4,
  1151. .noc_ops = &qcom_qnoc4_ops,
  1152. .num_links = 0,
  1153. };
  1154. static struct qcom_icc_node qhs_display_1_cfg = {
  1155. .name = "qhs_display_1_cfg",
  1156. .id = SLAVE_DISPLAY1_CFG,
  1157. .channels = 1,
  1158. .buswidth = 4,
  1159. .noc_ops = &qcom_qnoc4_ops,
  1160. .num_links = 0,
  1161. };
  1162. static struct qcom_icc_node qhs_gpuss_cfg = {
  1163. .name = "qhs_gpuss_cfg",
  1164. .id = SLAVE_GFX3D_CFG,
  1165. .channels = 1,
  1166. .buswidth = 8,
  1167. .noc_ops = &qcom_qnoc4_ops,
  1168. .num_links = 0,
  1169. };
  1170. static struct qcom_icc_node qhs_imem_cfg = {
  1171. .name = "qhs_imem_cfg",
  1172. .id = SLAVE_IMEM_CFG,
  1173. .channels = 1,
  1174. .buswidth = 4,
  1175. .noc_ops = &qcom_qnoc4_ops,
  1176. .num_links = 0,
  1177. };
  1178. static struct qcom_icc_node qhs_ipa = {
  1179. .name = "qhs_ipa",
  1180. .id = SLAVE_IPA_CFG,
  1181. .channels = 1,
  1182. .buswidth = 4,
  1183. .noc_ops = &qcom_qnoc4_ops,
  1184. .num_links = 0,
  1185. };
  1186. static struct qcom_icc_node qhs_ipc_router = {
  1187. .name = "qhs_ipc_router",
  1188. .id = SLAVE_IPC_ROUTER_CFG,
  1189. .channels = 1,
  1190. .buswidth = 4,
  1191. .noc_ops = &qcom_qnoc4_ops,
  1192. .num_links = 0,
  1193. };
  1194. static struct qcom_icc_node qhs_lpass_cfg = {
  1195. .name = "qhs_lpass_cfg",
  1196. .id = SLAVE_LPASS,
  1197. .channels = 1,
  1198. .buswidth = 4,
  1199. .noc_ops = &qcom_qnoc4_ops,
  1200. .num_links = 1,
  1201. .links = { MASTER_CNOC_LPASS_AG_NOC },
  1202. };
  1203. static struct qcom_icc_node qhs_mx_rdpm = {
  1204. .name = "qhs_mx_rdpm",
  1205. .id = SLAVE_MX_RDPM,
  1206. .channels = 1,
  1207. .buswidth = 4,
  1208. .noc_ops = &qcom_qnoc4_ops,
  1209. .num_links = 0,
  1210. };
  1211. static struct qcom_icc_node qhs_pdm = {
  1212. .name = "qhs_pdm",
  1213. .id = SLAVE_PDM,
  1214. .channels = 1,
  1215. .buswidth = 4,
  1216. .noc_ops = &qcom_qnoc4_ops,
  1217. .num_links = 0,
  1218. };
  1219. static struct qcom_icc_node qhs_prng = {
  1220. .name = "qhs_prng",
  1221. .id = SLAVE_PRNG,
  1222. .channels = 1,
  1223. .buswidth = 4,
  1224. .noc_ops = &qcom_qnoc4_ops,
  1225. .num_links = 0,
  1226. };
  1227. static struct qcom_icc_node qhs_qdss_cfg = {
  1228. .name = "qhs_qdss_cfg",
  1229. .id = SLAVE_QDSS_CFG,
  1230. .channels = 1,
  1231. .buswidth = 4,
  1232. .noc_ops = &qcom_qnoc4_ops,
  1233. .num_links = 0,
  1234. };
  1235. static struct qcom_icc_node qhs_qup0 = {
  1236. .name = "qhs_qup0",
  1237. .id = SLAVE_QUP_0,
  1238. .channels = 1,
  1239. .buswidth = 4,
  1240. .noc_ops = &qcom_qnoc4_ops,
  1241. .num_links = 0,
  1242. };
  1243. static struct qcom_icc_node qhs_qup1 = {
  1244. .name = "qhs_qup1",
  1245. .id = SLAVE_QUP_1,
  1246. .channels = 1,
  1247. .buswidth = 4,
  1248. .noc_ops = &qcom_qnoc4_ops,
  1249. .num_links = 0,
  1250. };
  1251. static struct qcom_icc_node qhs_sdc2 = {
  1252. .name = "qhs_sdc2",
  1253. .id = SLAVE_SDCC_2,
  1254. .channels = 1,
  1255. .buswidth = 4,
  1256. .noc_ops = &qcom_qnoc4_ops,
  1257. .num_links = 0,
  1258. };
  1259. static struct qcom_icc_node qhs_spss_cfg = {
  1260. .name = "qhs_spss_cfg",
  1261. .id = SLAVE_SPSS_CFG,
  1262. .channels = 1,
  1263. .buswidth = 4,
  1264. .noc_ops = &qcom_qnoc4_ops,
  1265. .num_links = 0,
  1266. };
  1267. static struct qcom_icc_node qhs_tcsr = {
  1268. .name = "qhs_tcsr",
  1269. .id = SLAVE_TCSR,
  1270. .channels = 1,
  1271. .buswidth = 4,
  1272. .noc_ops = &qcom_qnoc4_ops,
  1273. .num_links = 0,
  1274. };
  1275. static struct qcom_icc_node qhs_tlmm = {
  1276. .name = "qhs_tlmm",
  1277. .id = SLAVE_TLMM,
  1278. .channels = 1,
  1279. .buswidth = 4,
  1280. .noc_ops = &qcom_qnoc4_ops,
  1281. .num_links = 0,
  1282. };
  1283. static struct qcom_icc_node qhs_tme_cfg = {
  1284. .name = "qhs_tme_cfg",
  1285. .id = SLAVE_TME_CFG,
  1286. .channels = 1,
  1287. .buswidth = 4,
  1288. .noc_ops = &qcom_qnoc4_ops,
  1289. .num_links = 0,
  1290. };
  1291. static struct qcom_icc_node qhs_ufs_mem_cfg = {
  1292. .name = "qhs_ufs_mem_cfg",
  1293. .id = SLAVE_UFS_MEM_CFG,
  1294. .channels = 1,
  1295. .buswidth = 4,
  1296. .noc_ops = &qcom_qnoc4_ops,
  1297. .num_links = 0,
  1298. };
  1299. static struct qcom_icc_node qhs_usb3_0 = {
  1300. .name = "qhs_usb3_0",
  1301. .id = SLAVE_USB3_0,
  1302. .channels = 1,
  1303. .buswidth = 4,
  1304. .noc_ops = &qcom_qnoc4_ops,
  1305. .num_links = 0,
  1306. };
  1307. static struct qcom_icc_node qhs_venus_cfg = {
  1308. .name = "qhs_venus_cfg",
  1309. .id = SLAVE_VENUS_CFG,
  1310. .channels = 1,
  1311. .buswidth = 4,
  1312. .noc_ops = &qcom_qnoc4_ops,
  1313. .num_links = 0,
  1314. };
  1315. static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
  1316. .name = "qhs_vsense_ctrl_cfg",
  1317. .id = SLAVE_VSENSE_CTRL_CFG,
  1318. .channels = 1,
  1319. .buswidth = 4,
  1320. .noc_ops = &qcom_qnoc4_ops,
  1321. .num_links = 0,
  1322. };
  1323. static struct qcom_icc_node qns_a1_noc_cfg = {
  1324. .name = "qns_a1_noc_cfg",
  1325. .id = SLAVE_A1NOC_CFG,
  1326. .channels = 1,
  1327. .buswidth = 4,
  1328. .noc_ops = &qcom_qnoc4_ops,
  1329. .num_links = 1,
  1330. .links = { MASTER_A1NOC_CFG },
  1331. };
  1332. static struct qcom_icc_node qns_a2_noc_cfg = {
  1333. .name = "qns_a2_noc_cfg",
  1334. .id = SLAVE_A2NOC_CFG,
  1335. .channels = 1,
  1336. .buswidth = 4,
  1337. .noc_ops = &qcom_qnoc4_ops,
  1338. .num_links = 1,
  1339. .links = { MASTER_A2NOC_CFG },
  1340. };
  1341. static struct qcom_icc_node qns_cnoc_a2noc = {
  1342. .name = "qns_cnoc_a2noc",
  1343. .id = SLAVE_CNOC_A2NOC,
  1344. .channels = 1,
  1345. .buswidth = 8,
  1346. .noc_ops = &qcom_qnoc4_ops,
  1347. .num_links = 1,
  1348. .links = { MASTER_CNOC_A2NOC },
  1349. };
  1350. static struct qcom_icc_node qns_ddrss_cfg = {
  1351. .name = "qns_ddrss_cfg",
  1352. .id = SLAVE_DDRSS_CFG,
  1353. .channels = 1,
  1354. .buswidth = 4,
  1355. .noc_ops = &qcom_qnoc4_ops,
  1356. .num_links = 0,
  1357. };
  1358. static struct qcom_icc_node qns_mnoc_cfg = {
  1359. .name = "qns_mnoc_cfg",
  1360. .id = SLAVE_CNOC_MNOC_CFG,
  1361. .channels = 1,
  1362. .buswidth = 4,
  1363. .noc_ops = &qcom_qnoc4_ops,
  1364. .num_links = 1,
  1365. .links = { MASTER_CNOC_MNOC_CFG },
  1366. };
  1367. static struct qcom_icc_node qns_pcie_anoc_cfg = {
  1368. .name = "qns_pcie_anoc_cfg",
  1369. .id = SLAVE_PCIE_ANOC_CFG,
  1370. .channels = 1,
  1371. .buswidth = 4,
  1372. .noc_ops = &qcom_qnoc4_ops,
  1373. .num_links = 1,
  1374. .links = { MASTER_PCIE_ANOC_CFG },
  1375. };
  1376. static struct qcom_icc_node qns_snoc_cfg = {
  1377. .name = "qns_snoc_cfg",
  1378. .id = SLAVE_SNOC_CFG,
  1379. .channels = 1,
  1380. .buswidth = 4,
  1381. .noc_ops = &qcom_qnoc4_ops,
  1382. .num_links = 1,
  1383. .links = { MASTER_SNOC_CFG },
  1384. };
  1385. static struct qcom_icc_node qxs_imem = {
  1386. .name = "qxs_imem",
  1387. .id = SLAVE_IMEM,
  1388. .channels = 1,
  1389. .buswidth = 8,
  1390. .noc_ops = &qcom_qnoc4_ops,
  1391. .num_links = 0,
  1392. };
  1393. static struct qcom_icc_node srvc_cnoc = {
  1394. .name = "srvc_cnoc",
  1395. .id = SLAVE_SERVICE_CNOC,
  1396. .channels = 1,
  1397. .buswidth = 4,
  1398. .noc_ops = &qcom_qnoc4_ops,
  1399. .num_links = 0,
  1400. };
  1401. static struct qcom_icc_node xs_qdss_stm = {
  1402. .name = "xs_qdss_stm",
  1403. .id = SLAVE_QDSS_STM,
  1404. .channels = 1,
  1405. .buswidth = 4,
  1406. .noc_ops = &qcom_qnoc4_ops,
  1407. .num_links = 0,
  1408. };
  1409. static struct qcom_icc_node xs_sys_tcu_cfg = {
  1410. .name = "xs_sys_tcu_cfg",
  1411. .id = SLAVE_TCU,
  1412. .channels = 1,
  1413. .buswidth = 8,
  1414. .noc_ops = &qcom_qnoc4_ops,
  1415. .num_links = 0,
  1416. };
  1417. static struct qcom_icc_node qns_gem_noc_cnoc = {
  1418. .name = "qns_gem_noc_cnoc",
  1419. .id = SLAVE_GEM_NOC_CNOC,
  1420. .channels = 1,
  1421. .buswidth = 16,
  1422. .noc_ops = &qcom_qnoc4_ops,
  1423. .num_links = 1,
  1424. .links = { MASTER_GEM_NOC_CNOC },
  1425. };
  1426. static struct qcom_icc_node qns_llcc = {
  1427. .name = "qns_llcc",
  1428. .id = SLAVE_LLCC,
  1429. .channels = 4,
  1430. .buswidth = 16,
  1431. .noc_ops = &qcom_qnoc4_ops,
  1432. .num_links = 1,
  1433. .links = { MASTER_LLCC },
  1434. };
  1435. static struct qcom_icc_node qhs_lpass_core = {
  1436. .name = "qhs_lpass_core",
  1437. .id = SLAVE_LPASS_CORE_CFG,
  1438. .channels = 1,
  1439. .buswidth = 4,
  1440. .noc_ops = &qcom_qnoc4_ops,
  1441. .num_links = 0,
  1442. };
  1443. static struct qcom_icc_node qhs_lpass_lpi = {
  1444. .name = "qhs_lpass_lpi",
  1445. .id = SLAVE_LPASS_LPI_CFG,
  1446. .channels = 1,
  1447. .buswidth = 4,
  1448. .noc_ops = &qcom_qnoc4_ops,
  1449. .num_links = 0,
  1450. };
  1451. static struct qcom_icc_node qhs_lpass_mpu = {
  1452. .name = "qhs_lpass_mpu",
  1453. .id = SLAVE_LPASS_MPU_CFG,
  1454. .channels = 1,
  1455. .buswidth = 4,
  1456. .noc_ops = &qcom_qnoc4_ops,
  1457. .num_links = 0,
  1458. };
  1459. static struct qcom_icc_node qhs_lpass_top = {
  1460. .name = "qhs_lpass_top",
  1461. .id = SLAVE_LPASS_TOP_CFG,
  1462. .channels = 1,
  1463. .buswidth = 4,
  1464. .noc_ops = &qcom_qnoc4_ops,
  1465. .num_links = 0,
  1466. };
  1467. static struct qcom_icc_node qns_sysnoc = {
  1468. .name = "qns_sysnoc",
  1469. .id = SLAVE_LPASS_SNOC,
  1470. .channels = 1,
  1471. .buswidth = 16,
  1472. .noc_ops = &qcom_qnoc4_ops,
  1473. .num_links = 1,
  1474. .links = { MASTER_LPASS_ANOC },
  1475. };
  1476. static struct qcom_icc_node srvc_niu_aml_noc = {
  1477. .name = "srvc_niu_aml_noc",
  1478. .id = SLAVE_SERVICES_LPASS_AML_NOC,
  1479. .channels = 1,
  1480. .buswidth = 4,
  1481. .noc_ops = &qcom_qnoc4_ops,
  1482. .num_links = 0,
  1483. };
  1484. static struct qcom_icc_node srvc_niu_lpass_agnoc = {
  1485. .name = "srvc_niu_lpass_agnoc",
  1486. .id = SLAVE_SERVICE_LPASS_AG_NOC,
  1487. .channels = 1,
  1488. .buswidth = 4,
  1489. .noc_ops = &qcom_qnoc4_ops,
  1490. .num_links = 0,
  1491. };
  1492. static struct qcom_icc_node ebi = {
  1493. .name = "ebi",
  1494. .id = SLAVE_EBI1,
  1495. .channels = 4,
  1496. .buswidth = 4,
  1497. .noc_ops = &qcom_qnoc4_ops,
  1498. .num_links = 0,
  1499. };
  1500. static struct qcom_icc_node qns_mem_noc_hf = {
  1501. .name = "qns_mem_noc_hf",
  1502. .id = SLAVE_MNOC_HF_MEM_NOC,
  1503. .channels = 2,
  1504. .buswidth = 32,
  1505. .noc_ops = &qcom_qnoc4_ops,
  1506. .num_links = 1,
  1507. .links = { MASTER_MNOC_HF_MEM_NOC },
  1508. };
  1509. static struct qcom_icc_node qns_mem_noc_sf = {
  1510. .name = "qns_mem_noc_sf",
  1511. .id = SLAVE_MNOC_SF_MEM_NOC,
  1512. .channels = 2,
  1513. .buswidth = 32,
  1514. .noc_ops = &qcom_qnoc4_ops,
  1515. .num_links = 1,
  1516. .links = { MASTER_MNOC_SF_MEM_NOC },
  1517. };
  1518. static struct qcom_icc_node srvc_mnoc = {
  1519. .name = "srvc_mnoc",
  1520. .id = SLAVE_SERVICE_MNOC,
  1521. .channels = 1,
  1522. .buswidth = 4,
  1523. .noc_ops = &qcom_qnoc4_ops,
  1524. .num_links = 0,
  1525. };
  1526. static struct qcom_icc_node qns_nsp_gemnoc = {
  1527. .name = "qns_nsp_gemnoc",
  1528. .id = SLAVE_CDSP_MEM_NOC,
  1529. .channels = 2,
  1530. .buswidth = 32,
  1531. .noc_ops = &qcom_qnoc4_ops,
  1532. .num_links = 1,
  1533. .links = { MASTER_COMPUTE_NOC },
  1534. };
  1535. static struct qcom_icc_node service_nsp_noc = {
  1536. .name = "service_nsp_noc",
  1537. .id = SLAVE_SERVICE_NSP_NOC,
  1538. .channels = 1,
  1539. .buswidth = 4,
  1540. .noc_ops = &qcom_qnoc4_ops,
  1541. .num_links = 0,
  1542. };
  1543. static struct qcom_icc_node qns_pcie_mem_noc = {
  1544. .name = "qns_pcie_mem_noc",
  1545. .id = SLAVE_ANOC_PCIE_GEM_NOC,
  1546. .channels = 1,
  1547. .buswidth = 16,
  1548. .noc_ops = &qcom_qnoc4_ops,
  1549. .num_links = 1,
  1550. .links = { MASTER_ANOC_PCIE_GEM_NOC },
  1551. };
  1552. static struct qcom_icc_node srvc_pcie_aggre_noc = {
  1553. .name = "srvc_pcie_aggre_noc",
  1554. .id = SLAVE_SERVICE_PCIE_ANOC,
  1555. .channels = 1,
  1556. .buswidth = 4,
  1557. .noc_ops = &qcom_qnoc4_ops,
  1558. .num_links = 0,
  1559. };
  1560. static struct qcom_icc_node qns_gemnoc_gc = {
  1561. .name = "qns_gemnoc_gc",
  1562. .id = SLAVE_SNOC_GEM_NOC_GC,
  1563. .channels = 1,
  1564. .buswidth = 8,
  1565. .noc_ops = &qcom_qnoc4_ops,
  1566. .num_links = 1,
  1567. .links = { MASTER_SNOC_GC_MEM_NOC },
  1568. };
  1569. static struct qcom_icc_node qns_gemnoc_sf = {
  1570. .name = "qns_gemnoc_sf",
  1571. .id = SLAVE_SNOC_GEM_NOC_SF,
  1572. .channels = 1,
  1573. .buswidth = 16,
  1574. .noc_ops = &qcom_qnoc4_ops,
  1575. .num_links = 1,
  1576. .links = { MASTER_SNOC_SF_MEM_NOC },
  1577. };
  1578. static struct qcom_icc_node srvc_snoc = {
  1579. .name = "srvc_snoc",
  1580. .id = SLAVE_SERVICE_SNOC,
  1581. .channels = 1,
  1582. .buswidth = 4,
  1583. .noc_ops = &qcom_qnoc4_ops,
  1584. .num_links = 0,
  1585. };
  1586. static struct qcom_icc_node qns_llcc_disp = {
  1587. .name = "qns_llcc_disp",
  1588. .id = SLAVE_LLCC_DISP,
  1589. .channels = 4,
  1590. .buswidth = 16,
  1591. .noc_ops = &qcom_qnoc4_ops,
  1592. .num_links = 1,
  1593. .links = { MASTER_LLCC_DISP },
  1594. };
  1595. static struct qcom_icc_node ebi_disp = {
  1596. .name = "ebi_disp",
  1597. .id = SLAVE_EBI1_DISP,
  1598. .channels = 4,
  1599. .buswidth = 4,
  1600. .noc_ops = &qcom_qnoc4_ops,
  1601. .num_links = 0,
  1602. };
  1603. static struct qcom_icc_node qns_mem_noc_hf_disp = {
  1604. .name = "qns_mem_noc_hf_disp",
  1605. .id = SLAVE_MNOC_HF_MEM_NOC_DISP,
  1606. .channels = 2,
  1607. .buswidth = 32,
  1608. .noc_ops = &qcom_qnoc4_ops,
  1609. .num_links = 1,
  1610. .links = { MASTER_MNOC_HF_MEM_NOC_DISP },
  1611. };
  1612. static struct qcom_icc_node qns_llcc_disp2 = {
  1613. .name = "qns_llcc_disp2",
  1614. .id = SLAVE_LLCC_DISP2,
  1615. .channels = 4,
  1616. .buswidth = 16,
  1617. .noc_ops = &qcom_qnoc4_ops,
  1618. .num_links = 1,
  1619. .links = { MASTER_LLCC_DISP2 },
  1620. };
  1621. static struct qcom_icc_node ebi_disp2 = {
  1622. .name = "ebi_disp2",
  1623. .id = SLAVE_EBI1_DISP2,
  1624. .channels = 4,
  1625. .buswidth = 4,
  1626. .noc_ops = &qcom_qnoc4_ops,
  1627. .num_links = 0,
  1628. };
  1629. static struct qcom_icc_node qns_mem_noc_hf_disp2 = {
  1630. .name = "qns_mem_noc_hf_disp2",
  1631. .id = SLAVE_MNOC_HF_MEM_NOC_DISP2,
  1632. .channels = 2,
  1633. .buswidth = 32,
  1634. .noc_ops = &qcom_qnoc4_ops,
  1635. .num_links = 1,
  1636. .links = { MASTER_MNOC_HF_MEM_NOC_DISP2 },
  1637. };
  1638. static struct qcom_icc_node master_ddr_rt = {
  1639. .name = "master_ddr_rt",
  1640. .id = MASTER_DDR_RT,
  1641. .channels = 4,
  1642. .buswidth = 4,
  1643. .noc_ops = &qcom_qnoc4_ops,
  1644. .num_links = 1,
  1645. .links = { SLAVE_DDR_RT },
  1646. };
  1647. static struct qcom_icc_node slv_ddr_rt = {
  1648. .name = "slv_ddr_rt",
  1649. .id = SLAVE_DDR_RT,
  1650. .channels = 4,
  1651. .buswidth = 4,
  1652. .noc_ops = &qcom_qnoc4_ops,
  1653. .num_links = 0,
  1654. };
  1655. static struct qcom_icc_bcm bcm_acv = {
  1656. .name = "ACV",
  1657. .voter_idx = 0,
  1658. .enable_mask = 0x8,
  1659. .perf_mode_mask = 0x2,
  1660. .num_nodes = 1,
  1661. .nodes = { &ebi },
  1662. };
  1663. static struct qcom_icc_bcm bcm_ce0 = {
  1664. .name = "CE0",
  1665. .voter_idx = 0,
  1666. .num_nodes = 1,
  1667. .nodes = { &qxm_crypto },
  1668. };
  1669. static struct qcom_icc_bcm bcm_cn0 = {
  1670. .name = "CN0",
  1671. .voter_idx = 0,
  1672. .enable_mask = 0x1,
  1673. .keepalive = true,
  1674. .num_nodes = 47,
  1675. .nodes = { &qnm_gemnoc_cnoc, &xm_qdss_dap,
  1676. &qhs_ahb2phy0, &qhs_ahb2phy1,
  1677. &qhs_aoss, &qhs_camera_cfg,
  1678. &qhs_clk_ctl, &qhs_compute_cfg,
  1679. &qhs_cpr_cx, &qhs_cpr_mmcx,
  1680. &qhs_cpr_mxa, &qhs_cpr_mxc,
  1681. &qhs_crypto0_cfg, &qhs_cx_rdpm,
  1682. &qhs_display_0_cfg, &qhs_display_1_cfg,
  1683. &qhs_gpuss_cfg, &qhs_imem_cfg,
  1684. &qhs_ipa, &qhs_ipc_router,
  1685. &qhs_lpass_cfg, &qhs_mx_rdpm,
  1686. &qhs_pdm, &qhs_prng,
  1687. &qhs_qdss_cfg, &qhs_qup0,
  1688. &qhs_qup1, &qhs_sdc2,
  1689. &qhs_spss_cfg, &qhs_tcsr,
  1690. &qhs_tlmm, &qhs_tme_cfg,
  1691. &qhs_ufs_mem_cfg, &qhs_usb3_0,
  1692. &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
  1693. &qns_a1_noc_cfg, &qns_a2_noc_cfg,
  1694. &qns_cnoc_a2noc, &qns_ddrss_cfg,
  1695. &qns_mnoc_cfg, &qns_pcie_anoc_cfg,
  1696. &qns_snoc_cfg, &qxs_imem,
  1697. &srvc_cnoc, &xs_qdss_stm,
  1698. &xs_sys_tcu_cfg },
  1699. };
  1700. static struct qcom_icc_bcm bcm_co0 = {
  1701. .name = "CO0",
  1702. .voter_idx = 0,
  1703. .enable_mask = 0x1,
  1704. .num_nodes = 2,
  1705. .nodes = { &qxm_nsp, &qns_nsp_gemnoc },
  1706. };
  1707. static struct qcom_icc_bcm bcm_mc0 = {
  1708. .name = "MC0",
  1709. .voter_idx = 0,
  1710. .keepalive = true,
  1711. .num_nodes = 1,
  1712. .nodes = { &ebi },
  1713. };
  1714. static struct qcom_icc_bcm bcm_mc4 = {
  1715. .name = "MC4",
  1716. .voter_idx = 0,
  1717. .num_nodes = 1,
  1718. .nodes = { &slv_ddr_rt },
  1719. };
  1720. static struct qcom_icc_bcm bcm_mm0 = {
  1721. .name = "MM0",
  1722. .voter_idx = 0,
  1723. .keepalive_early = true,
  1724. .num_nodes = 3,
  1725. .nodes = { &qnm_mdp0, &qnm_mdp1,
  1726. &qns_mem_noc_hf },
  1727. };
  1728. static struct qcom_icc_bcm bcm_mm1 = {
  1729. .name = "MM1",
  1730. .voter_idx = 0,
  1731. .enable_mask = 0x1,
  1732. .num_nodes = 10,
  1733. .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp,
  1734. &qnm_camnoc_sf, &qnm_mnoc_cfg,
  1735. &qnm_vapss_hcp, &qnm_video,
  1736. &qnm_video_cv_cpu, &qnm_video_cvp,
  1737. &qnm_video_v_cpu, &qns_mem_noc_sf },
  1738. };
  1739. static struct qcom_icc_bcm bcm_qup0 = {
  1740. .name = "QUP0",
  1741. .voter_idx = 0,
  1742. .keepalive_early = true,
  1743. .vote_scale = 1,
  1744. .num_nodes = 1,
  1745. .nodes = { &qup0_core_slave },
  1746. };
  1747. static struct qcom_icc_bcm bcm_qup1 = {
  1748. .name = "QUP1",
  1749. .voter_idx = 0,
  1750. .keepalive_early = true,
  1751. .vote_scale = 1,
  1752. .num_nodes = 1,
  1753. .nodes = { &qup1_core_slave },
  1754. };
  1755. static struct qcom_icc_bcm bcm_sh0 = {
  1756. .name = "SH0",
  1757. .voter_idx = 0,
  1758. .keepalive = true,
  1759. .num_nodes = 1,
  1760. .nodes = { &qns_llcc },
  1761. };
  1762. static struct qcom_icc_bcm bcm_sh1 = {
  1763. .name = "SH1",
  1764. .voter_idx = 0,
  1765. .enable_mask = 0x1,
  1766. .num_nodes = 6,
  1767. .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
  1768. &qnm_nsp_gemnoc, &qnm_pcie,
  1769. &qnm_snoc_gc, &qns_gem_noc_cnoc },
  1770. };
  1771. static struct qcom_icc_bcm bcm_sn0 = {
  1772. .name = "SN0",
  1773. .voter_idx = 0,
  1774. .keepalive = true,
  1775. .num_nodes = 1,
  1776. .nodes = { &qns_gemnoc_sf },
  1777. };
  1778. static struct qcom_icc_bcm bcm_sn1 = {
  1779. .name = "SN1",
  1780. .voter_idx = 0,
  1781. .enable_mask = 0x1,
  1782. .num_nodes = 3,
  1783. .nodes = { &qhm_gic, &xm_gic,
  1784. &qns_gemnoc_gc },
  1785. };
  1786. static struct qcom_icc_bcm bcm_sn2 = {
  1787. .name = "SN2",
  1788. .voter_idx = 0,
  1789. .num_nodes = 1,
  1790. .nodes = { &qnm_aggre1_noc },
  1791. };
  1792. static struct qcom_icc_bcm bcm_sn3 = {
  1793. .name = "SN3",
  1794. .voter_idx = 0,
  1795. .num_nodes = 1,
  1796. .nodes = { &qnm_aggre2_noc },
  1797. };
  1798. static struct qcom_icc_bcm bcm_sn4 = {
  1799. .name = "SN4",
  1800. .voter_idx = 0,
  1801. .num_nodes = 2,
  1802. .nodes = { &qxm_lpass_dsp, &qnm_lpass_noc },
  1803. };
  1804. static struct qcom_icc_bcm bcm_sn7 = {
  1805. .name = "SN7",
  1806. .voter_idx = 0,
  1807. .num_nodes = 1,
  1808. .nodes = { &qns_pcie_mem_noc },
  1809. };
  1810. static struct qcom_icc_bcm bcm_acv_disp = {
  1811. .name = "ACV",
  1812. .voter_idx = 1,
  1813. .enable_mask = 0x1,
  1814. .perf_mode_mask = 0x2,
  1815. .num_nodes = 1,
  1816. .nodes = { &ebi_disp },
  1817. };
  1818. static struct qcom_icc_bcm bcm_mc0_disp = {
  1819. .name = "MC0",
  1820. .voter_idx = 1,
  1821. .num_nodes = 1,
  1822. .nodes = { &ebi_disp },
  1823. };
  1824. static struct qcom_icc_bcm bcm_mm0_disp = {
  1825. .name = "MM0",
  1826. .voter_idx = 1,
  1827. .num_nodes = 2,
  1828. .nodes = { &qnm_mdp0_disp, &qns_mem_noc_hf_disp },
  1829. };
  1830. static struct qcom_icc_bcm bcm_sh0_disp = {
  1831. .name = "SH0",
  1832. .voter_idx = 1,
  1833. .num_nodes = 1,
  1834. .nodes = { &qns_llcc_disp },
  1835. };
  1836. static struct qcom_icc_bcm bcm_sh1_disp = {
  1837. .name = "SH1",
  1838. .voter_idx = 1,
  1839. .enable_mask = 0x1,
  1840. .num_nodes = 1,
  1841. .nodes = { &qnm_pcie_disp },
  1842. };
  1843. static struct qcom_icc_bcm bcm_acv_disp2 = {
  1844. .name = "ACV",
  1845. .voter_idx = 2,
  1846. .enable_mask = 0x1,
  1847. .perf_mode_mask = 0x2,
  1848. .num_nodes = 1,
  1849. .nodes = { &ebi_disp2 },
  1850. };
  1851. static struct qcom_icc_bcm bcm_mc0_disp2 = {
  1852. .name = "MC0",
  1853. .voter_idx = 2,
  1854. .num_nodes = 1,
  1855. .nodes = { &ebi_disp2 },
  1856. };
  1857. static struct qcom_icc_bcm bcm_mm0_disp2 = {
  1858. .name = "MM0",
  1859. .voter_idx = 2,
  1860. .num_nodes = 2,
  1861. .nodes = { &qnm_mdp1_disp2, &qns_mem_noc_hf_disp2 },
  1862. };
  1863. static struct qcom_icc_bcm bcm_sh0_disp2 = {
  1864. .name = "SH0",
  1865. .voter_idx = 2,
  1866. .num_nodes = 1,
  1867. .nodes = { &qns_llcc_disp2 },
  1868. };
  1869. static struct qcom_icc_bcm bcm_sh1_disp2 = {
  1870. .name = "SH1",
  1871. .voter_idx = 2,
  1872. .enable_mask = 0x1,
  1873. .num_nodes = 1,
  1874. .nodes = { &qnm_pcie_disp2 },
  1875. };
  1876. static struct qcom_icc_bcm *aggre1_noc_bcms[] = {
  1877. };
  1878. static struct qcom_icc_node *aggre1_noc_nodes[] = {
  1879. [MASTER_QUP_1] = &qhm_qup1,
  1880. [MASTER_A1NOC_CFG] = &qnm_a1noc_cfg,
  1881. [MASTER_UFS_MEM] = &xm_ufs_mem,
  1882. [MASTER_USB3_0] = &xm_usb3_0,
  1883. [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
  1884. [SLAVE_SERVICE_A1NOC] = &srvc_aggre1_noc,
  1885. };
  1886. static char *aggre1_noc_voters[] = {
  1887. "hlos",
  1888. };
  1889. static struct qcom_icc_desc anorak_aggre1_noc = {
  1890. .config = &icc_regmap_config,
  1891. .nodes = aggre1_noc_nodes,
  1892. .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
  1893. .bcms = aggre1_noc_bcms,
  1894. .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
  1895. .voters = aggre1_noc_voters,
  1896. .num_voters = ARRAY_SIZE(aggre1_noc_voters),
  1897. };
  1898. static struct qcom_icc_bcm *aggre2_noc_bcms[] = {
  1899. &bcm_ce0,
  1900. };
  1901. static struct qcom_icc_node *aggre2_noc_nodes[] = {
  1902. [MASTER_QDSS_BAM] = &qhm_qdss_bam,
  1903. [MASTER_QUP_0] = &qhm_qup0,
  1904. [MASTER_A2NOC_CFG] = &qnm_a2noc_cfg,
  1905. [MASTER_CNOC_A2NOC] = &qnm_cnoc_datapath,
  1906. [MASTER_CRYPTO] = &qxm_crypto,
  1907. [MASTER_IPA] = &qxm_ipa,
  1908. [MASTER_SP] = &qxm_sp,
  1909. [MASTER_QDSS_ETR] = &xm_qdss_etr_0,
  1910. [MASTER_QDSS_ETR_1] = &xm_qdss_etr_1,
  1911. [MASTER_SDCC_2] = &xm_sdc2,
  1912. [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
  1913. [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
  1914. };
  1915. static char *aggre2_noc_voters[] = {
  1916. "hlos",
  1917. };
  1918. static struct qcom_icc_desc anorak_aggre2_noc = {
  1919. .config = &icc_regmap_config,
  1920. .nodes = aggre2_noc_nodes,
  1921. .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
  1922. .bcms = aggre2_noc_bcms,
  1923. .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
  1924. .voters = aggre2_noc_voters,
  1925. .num_voters = ARRAY_SIZE(aggre2_noc_voters),
  1926. };
  1927. static struct qcom_icc_bcm *clk_virt_bcms[] = {
  1928. &bcm_qup0,
  1929. &bcm_qup1,
  1930. };
  1931. static struct qcom_icc_node *clk_virt_nodes[] = {
  1932. [MASTER_QUP_CORE_0] = &qup0_core_master,
  1933. [MASTER_QUP_CORE_1] = &qup1_core_master,
  1934. [SLAVE_QUP_CORE_0] = &qup0_core_slave,
  1935. [SLAVE_QUP_CORE_1] = &qup1_core_slave,
  1936. };
  1937. static char *clk_virt_voters[] = {
  1938. "hlos",
  1939. };
  1940. static struct qcom_icc_desc anorak_clk_virt = {
  1941. .config = &icc_regmap_config,
  1942. .nodes = clk_virt_nodes,
  1943. .num_nodes = ARRAY_SIZE(clk_virt_nodes),
  1944. .bcms = clk_virt_bcms,
  1945. .num_bcms = ARRAY_SIZE(clk_virt_bcms),
  1946. .voters = clk_virt_voters,
  1947. .num_voters = ARRAY_SIZE(clk_virt_voters),
  1948. };
  1949. static struct qcom_icc_bcm *config_noc_bcms[] = {
  1950. &bcm_cn0,
  1951. };
  1952. static struct qcom_icc_node *config_noc_nodes[] = {
  1953. [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
  1954. [MASTER_QDSS_DAP] = &xm_qdss_dap,
  1955. [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
  1956. [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
  1957. [SLAVE_AOSS] = &qhs_aoss,
  1958. [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
  1959. [SLAVE_CLK_CTL] = &qhs_clk_ctl,
  1960. [SLAVE_CDSP_CFG] = &qhs_compute_cfg,
  1961. [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
  1962. [SLAVE_RBCPR_MMCX_CFG] = &qhs_cpr_mmcx,
  1963. [SLAVE_RBCPR_MXA_CFG] = &qhs_cpr_mxa,
  1964. [SLAVE_RBCPR_MXC_CFG] = &qhs_cpr_mxc,
  1965. [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
  1966. [SLAVE_CX_RDPM] = &qhs_cx_rdpm,
  1967. [SLAVE_DISPLAY_CFG] = &qhs_display_0_cfg,
  1968. [SLAVE_DISPLAY1_CFG] = &qhs_display_1_cfg,
  1969. [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
  1970. [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
  1971. [SLAVE_IPA_CFG] = &qhs_ipa,
  1972. [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
  1973. [SLAVE_LPASS] = &qhs_lpass_cfg,
  1974. [SLAVE_MX_RDPM] = &qhs_mx_rdpm,
  1975. [SLAVE_PDM] = &qhs_pdm,
  1976. [SLAVE_PRNG] = &qhs_prng,
  1977. [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
  1978. [SLAVE_QUP_0] = &qhs_qup0,
  1979. [SLAVE_QUP_1] = &qhs_qup1,
  1980. [SLAVE_SDCC_2] = &qhs_sdc2,
  1981. [SLAVE_SPSS_CFG] = &qhs_spss_cfg,
  1982. [SLAVE_TCSR] = &qhs_tcsr,
  1983. [SLAVE_TLMM] = &qhs_tlmm,
  1984. [SLAVE_TME_CFG] = &qhs_tme_cfg,
  1985. [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
  1986. [SLAVE_USB3_0] = &qhs_usb3_0,
  1987. [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
  1988. [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
  1989. [SLAVE_A1NOC_CFG] = &qns_a1_noc_cfg,
  1990. [SLAVE_A2NOC_CFG] = &qns_a2_noc_cfg,
  1991. [SLAVE_CNOC_A2NOC] = &qns_cnoc_a2noc,
  1992. [SLAVE_DDRSS_CFG] = &qns_ddrss_cfg,
  1993. [SLAVE_CNOC_MNOC_CFG] = &qns_mnoc_cfg,
  1994. [SLAVE_PCIE_ANOC_CFG] = &qns_pcie_anoc_cfg,
  1995. [SLAVE_SNOC_CFG] = &qns_snoc_cfg,
  1996. [SLAVE_IMEM] = &qxs_imem,
  1997. [SLAVE_SERVICE_CNOC] = &srvc_cnoc,
  1998. [SLAVE_QDSS_STM] = &xs_qdss_stm,
  1999. [SLAVE_TCU] = &xs_sys_tcu_cfg,
  2000. };
  2001. static char *config_noc_voters[] = {
  2002. "hlos",
  2003. };
  2004. static struct qcom_icc_desc anorak_config_noc = {
  2005. .config = &icc_regmap_config,
  2006. .nodes = config_noc_nodes,
  2007. .num_nodes = ARRAY_SIZE(config_noc_nodes),
  2008. .bcms = config_noc_bcms,
  2009. .num_bcms = ARRAY_SIZE(config_noc_bcms),
  2010. .voters = config_noc_voters,
  2011. .num_voters = ARRAY_SIZE(config_noc_voters),
  2012. };
  2013. static struct qcom_icc_bcm *gem_noc_bcms[] = {
  2014. &bcm_sh0,
  2015. &bcm_sh1,
  2016. &bcm_sh0_disp,
  2017. &bcm_sh1_disp,
  2018. &bcm_sh0_disp2,
  2019. &bcm_sh1_disp2,
  2020. };
  2021. static struct qcom_icc_node *gem_noc_nodes[] = {
  2022. [MASTER_GPU_TCU] = &alm_gpu_tcu,
  2023. [MASTER_SYS_TCU] = &alm_sys_tcu,
  2024. [MASTER_APPSS_PROC] = &chm_apps,
  2025. [MASTER_GFX3D] = &qnm_gpu,
  2026. [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
  2027. [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
  2028. [MASTER_COMPUTE_NOC] = &qnm_nsp_gemnoc,
  2029. [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
  2030. [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
  2031. [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
  2032. [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
  2033. [SLAVE_LLCC] = &qns_llcc,
  2034. [MASTER_MNOC_HF_MEM_NOC_DISP] = &qnm_mnoc_hf_disp,
  2035. [MASTER_ANOC_PCIE_GEM_NOC_DISP] = &qnm_pcie_disp,
  2036. [SLAVE_LLCC_DISP] = &qns_llcc_disp,
  2037. [MASTER_MNOC_HF_MEM_NOC_DISP2] = &qnm_mnoc_hf_disp2,
  2038. [MASTER_ANOC_PCIE_GEM_NOC_DISP2] = &qnm_pcie_disp2,
  2039. [SLAVE_LLCC_DISP2] = &qns_llcc_disp2,
  2040. };
  2041. static char *gem_noc_voters[] = {
  2042. "hlos",
  2043. "disp0",
  2044. "disp1"
  2045. };
  2046. static struct qcom_icc_desc anorak_gem_noc = {
  2047. .config = &icc_regmap_config,
  2048. .nodes = gem_noc_nodes,
  2049. .num_nodes = ARRAY_SIZE(gem_noc_nodes),
  2050. .bcms = gem_noc_bcms,
  2051. .num_bcms = ARRAY_SIZE(gem_noc_bcms),
  2052. .voters = gem_noc_voters,
  2053. .num_voters = ARRAY_SIZE(gem_noc_voters),
  2054. };
  2055. static struct qcom_icc_bcm *lpass_ag_noc_bcms[] = {
  2056. &bcm_sn4,
  2057. };
  2058. static struct qcom_icc_node *lpass_ag_noc_nodes[] = {
  2059. [MASTER_CNOC_LPASS_AG_NOC] = &qhm_config_noc,
  2060. [MASTER_LPASS_PROC] = &qxm_lpass_dsp,
  2061. [SLAVE_LPASS_CORE_CFG] = &qhs_lpass_core,
  2062. [SLAVE_LPASS_LPI_CFG] = &qhs_lpass_lpi,
  2063. [SLAVE_LPASS_MPU_CFG] = &qhs_lpass_mpu,
  2064. [SLAVE_LPASS_TOP_CFG] = &qhs_lpass_top,
  2065. [SLAVE_LPASS_SNOC] = &qns_sysnoc,
  2066. [SLAVE_SERVICES_LPASS_AML_NOC] = &srvc_niu_aml_noc,
  2067. [SLAVE_SERVICE_LPASS_AG_NOC] = &srvc_niu_lpass_agnoc,
  2068. };
  2069. static char *lpass_ag_noc_voters[] = {
  2070. "hlos",
  2071. };
  2072. static struct qcom_icc_desc anorak_lpass_ag_noc = {
  2073. .config = &icc_regmap_config,
  2074. .nodes = lpass_ag_noc_nodes,
  2075. .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
  2076. .bcms = lpass_ag_noc_bcms,
  2077. .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms),
  2078. .voters = lpass_ag_noc_voters,
  2079. .num_voters = ARRAY_SIZE(lpass_ag_noc_voters),
  2080. };
  2081. static struct qcom_icc_bcm *mc_virt_bcms[] = {
  2082. &bcm_acv,
  2083. &bcm_mc0,
  2084. &bcm_mc4,
  2085. &bcm_acv_disp,
  2086. &bcm_mc0_disp,
  2087. &bcm_acv_disp2,
  2088. &bcm_mc0_disp2,
  2089. };
  2090. static struct qcom_icc_node *mc_virt_nodes[] = {
  2091. [MASTER_LLCC] = &llcc_mc,
  2092. [SLAVE_EBI1] = &ebi,
  2093. [MASTER_LLCC_DISP] = &llcc_mc_disp,
  2094. [SLAVE_EBI1_DISP] = &ebi_disp,
  2095. [MASTER_DDR_RT] = &master_ddr_rt,
  2096. [SLAVE_DDR_RT] = &slv_ddr_rt,
  2097. [MASTER_LLCC_DISP2] = &llcc_mc_disp2,
  2098. [SLAVE_EBI1_DISP2] = &ebi_disp2,
  2099. };
  2100. static char *mc_virt_voters[] = {
  2101. "hlos",
  2102. "disp0",
  2103. "disp1"
  2104. };
  2105. static struct qcom_icc_desc anorak_mc_virt = {
  2106. .config = &icc_regmap_config,
  2107. .nodes = mc_virt_nodes,
  2108. .num_nodes = ARRAY_SIZE(mc_virt_nodes),
  2109. .bcms = mc_virt_bcms,
  2110. .num_bcms = ARRAY_SIZE(mc_virt_bcms),
  2111. .voters = mc_virt_voters,
  2112. .num_voters = ARRAY_SIZE(mc_virt_voters),
  2113. };
  2114. static struct qcom_icc_bcm *mmss_noc_bcms[] = {
  2115. &bcm_mm0,
  2116. &bcm_mm1,
  2117. &bcm_mm0_disp,
  2118. &bcm_mm0_disp2,
  2119. };
  2120. static struct qcom_icc_node *mmss_noc_nodes[] = {
  2121. [MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
  2122. [MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
  2123. [MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
  2124. [MASTER_MDP0] = &qnm_mdp0,
  2125. [MASTER_MDP1] = &qnm_mdp1,
  2126. [MASTER_CNOC_MNOC_CFG] = &qnm_mnoc_cfg,
  2127. [MASTER_CDSP_HCP] = &qnm_vapss_hcp,
  2128. [MASTER_VIDEO] = &qnm_video,
  2129. [MASTER_VIDEO_CV_PROC] = &qnm_video_cv_cpu,
  2130. [MASTER_VIDEO_PROC] = &qnm_video_cvp,
  2131. [MASTER_VIDEO_V_PROC] = &qnm_video_v_cpu,
  2132. [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
  2133. [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
  2134. [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
  2135. [MASTER_MDP0_DISP] = &qnm_mdp0_disp,
  2136. [SLAVE_MNOC_HF_MEM_NOC_DISP] = &qns_mem_noc_hf_disp,
  2137. [MASTER_MDP1_DISP2] = &qnm_mdp1_disp2,
  2138. [SLAVE_MNOC_HF_MEM_NOC_DISP2] = &qns_mem_noc_hf_disp2,
  2139. };
  2140. static char *mmss_noc_voters[] = {
  2141. "hlos",
  2142. "disp0",
  2143. "disp1"
  2144. };
  2145. static struct qcom_icc_desc anorak_mmss_noc = {
  2146. .config = &icc_regmap_config,
  2147. .nodes = mmss_noc_nodes,
  2148. .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
  2149. .bcms = mmss_noc_bcms,
  2150. .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
  2151. .voters = mmss_noc_voters,
  2152. .num_voters = ARRAY_SIZE(mmss_noc_voters),
  2153. };
  2154. static struct qcom_icc_bcm *nsp_noc_bcms[] = {
  2155. &bcm_co0,
  2156. };
  2157. static struct qcom_icc_node *nsp_noc_nodes[] = {
  2158. [MASTER_CDSP_NOC_CFG] = &qhm_nsp_noc_config,
  2159. [MASTER_CDSP_PROC] = &qxm_nsp,
  2160. [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
  2161. [SLAVE_SERVICE_NSP_NOC] = &service_nsp_noc,
  2162. };
  2163. static char *nsp_noc_voters[] = {
  2164. "hlos",
  2165. };
  2166. static struct qcom_icc_desc anorak_nsp_noc = {
  2167. .config = &icc_regmap_config,
  2168. .nodes = nsp_noc_nodes,
  2169. .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
  2170. .bcms = nsp_noc_bcms,
  2171. .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
  2172. .voters = nsp_noc_voters,
  2173. .num_voters = ARRAY_SIZE(nsp_noc_voters),
  2174. };
  2175. static struct qcom_icc_bcm *pcie_anoc_bcms[] = {
  2176. &bcm_sn7,
  2177. };
  2178. static struct qcom_icc_node *pcie_anoc_nodes[] = {
  2179. [MASTER_PCIE_ANOC_CFG] = &qnm_pcie_anoc_cfg,
  2180. [MASTER_PCIE_0] = &xm_pcie3_0,
  2181. [MASTER_PCIE_1] = &xm_pcie3_1,
  2182. [MASTER_PCIE_4] = &xm_pcie4_0,
  2183. [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
  2184. [SLAVE_SERVICE_PCIE_ANOC] = &srvc_pcie_aggre_noc,
  2185. };
  2186. static char *pcie_anoc_voters[] = {
  2187. "hlos",
  2188. };
  2189. static struct qcom_icc_desc anorak_pcie_anoc = {
  2190. .config = &icc_regmap_config,
  2191. .nodes = pcie_anoc_nodes,
  2192. .num_nodes = ARRAY_SIZE(pcie_anoc_nodes),
  2193. .bcms = pcie_anoc_bcms,
  2194. .num_bcms = ARRAY_SIZE(pcie_anoc_bcms),
  2195. .voters = pcie_anoc_voters,
  2196. .num_voters = ARRAY_SIZE(pcie_anoc_voters),
  2197. };
  2198. static struct qcom_icc_bcm *system_noc_bcms[] = {
  2199. &bcm_sn0,
  2200. &bcm_sn1,
  2201. &bcm_sn2,
  2202. &bcm_sn3,
  2203. &bcm_sn4,
  2204. };
  2205. static struct qcom_icc_node *system_noc_nodes[] = {
  2206. [MASTER_GIC_AHB] = &qhm_gic,
  2207. [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
  2208. [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
  2209. [MASTER_LPASS_ANOC] = &qnm_lpass_noc,
  2210. [MASTER_SNOC_CFG] = &qnm_snoc_cfg,
  2211. [MASTER_GIC] = &xm_gic,
  2212. [SLAVE_SNOC_GEM_NOC_GC] = &qns_gemnoc_gc,
  2213. [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
  2214. [SLAVE_SERVICE_SNOC] = &srvc_snoc,
  2215. };
  2216. static char *system_noc_voters[] = {
  2217. "hlos",
  2218. };
  2219. static struct qcom_icc_desc anorak_system_noc = {
  2220. .config = &icc_regmap_config,
  2221. .nodes = system_noc_nodes,
  2222. .num_nodes = ARRAY_SIZE(system_noc_nodes),
  2223. .bcms = system_noc_bcms,
  2224. .num_bcms = ARRAY_SIZE(system_noc_bcms),
  2225. .voters = system_noc_voters,
  2226. .num_voters = ARRAY_SIZE(system_noc_voters),
  2227. };
  2228. static int qnoc_probe(struct platform_device *pdev)
  2229. {
  2230. int ret;
  2231. ret = qcom_icc_rpmh_probe(pdev);
  2232. if (ret)
  2233. dev_err(&pdev->dev, "failed to register ICC provider\n");
  2234. else
  2235. dev_info(&pdev->dev, "Registered ANORAK ICC\n");
  2236. return ret;
  2237. }
  2238. static const struct of_device_id qnoc_of_match[] = {
  2239. { .compatible = "qcom,anorak-aggre1_noc", .data = &anorak_aggre1_noc },
  2240. { .compatible = "qcom,anorak-aggre2_noc", .data = &anorak_aggre2_noc },
  2241. { .compatible = "qcom,anorak-clk_virt", .data = &anorak_clk_virt },
  2242. { .compatible = "qcom,anorak-config_noc", .data = &anorak_config_noc },
  2243. { .compatible = "qcom,anorak-gem_noc", .data = &anorak_gem_noc },
  2244. { .compatible = "qcom,anorak-lpass_ag_noc", .data = &anorak_lpass_ag_noc },
  2245. { .compatible = "qcom,anorak-mc_virt", .data = &anorak_mc_virt },
  2246. { .compatible = "qcom,anorak-mmss_noc", .data = &anorak_mmss_noc },
  2247. { .compatible = "qcom,anorak-nsp_noc", .data = &anorak_nsp_noc },
  2248. { .compatible = "qcom,anorak-pcie_anoc", .data = &anorak_pcie_anoc },
  2249. { .compatible = "qcom,anorak-system_noc", .data = &anorak_system_noc },
  2250. { }
  2251. };
  2252. MODULE_DEVICE_TABLE(of, qnoc_of_match);
  2253. static struct platform_driver qnoc_driver = {
  2254. .probe = qnoc_probe,
  2255. .remove = qcom_icc_rpmh_remove,
  2256. .driver = {
  2257. .name = "qnoc-anorak",
  2258. .of_match_table = qnoc_of_match,
  2259. .sync_state = qcom_icc_rpmh_sync_state,
  2260. },
  2261. };
  2262. static int __init qnoc_driver_init(void)
  2263. {
  2264. return platform_driver_register(&qnoc_driver);
  2265. }
  2266. core_initcall(qnoc_driver_init);
  2267. MODULE_DESCRIPTION("Anorak NoC driver");
  2268. MODULE_LICENSE("GPL");