kaanapali.c 41 KB

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