milos.c 43 KB

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