msm8939.c 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2020 Linaro Ltd
  4. * Author: Jun Nie <[email protected]>
  5. * With reference of msm8916 interconnect driver of Georgi Djakov.
  6. */
  7. #include <linux/clk.h>
  8. #include <linux/device.h>
  9. #include <linux/interconnect-provider.h>
  10. #include <linux/io.h>
  11. #include <linux/module.h>
  12. #include <linux/platform_device.h>
  13. #include <linux/regmap.h>
  14. #include <linux/of_device.h>
  15. #include <dt-bindings/interconnect/qcom,msm8939.h>
  16. #include "smd-rpm.h"
  17. #include "icc-rpm.h"
  18. enum {
  19. MSM8939_BIMC_SNOC_MAS = 1,
  20. MSM8939_BIMC_SNOC_SLV,
  21. MSM8939_MASTER_AMPSS_M0,
  22. MSM8939_MASTER_LPASS,
  23. MSM8939_MASTER_BLSP_1,
  24. MSM8939_MASTER_DEHR,
  25. MSM8939_MASTER_GRAPHICS_3D,
  26. MSM8939_MASTER_JPEG,
  27. MSM8939_MASTER_MDP_PORT0,
  28. MSM8939_MASTER_MDP_PORT1,
  29. MSM8939_MASTER_CPP,
  30. MSM8939_MASTER_CRYPTO_CORE0,
  31. MSM8939_MASTER_SDCC_1,
  32. MSM8939_MASTER_SDCC_2,
  33. MSM8939_MASTER_QDSS_BAM,
  34. MSM8939_MASTER_QDSS_ETR,
  35. MSM8939_MASTER_SNOC_CFG,
  36. MSM8939_MASTER_SPDM,
  37. MSM8939_MASTER_TCU0,
  38. MSM8939_MASTER_USB_HS1,
  39. MSM8939_MASTER_USB_HS2,
  40. MSM8939_MASTER_VFE,
  41. MSM8939_MASTER_VIDEO_P0,
  42. MSM8939_SNOC_MM_INT_0,
  43. MSM8939_SNOC_MM_INT_1,
  44. MSM8939_SNOC_MM_INT_2,
  45. MSM8939_PNOC_INT_0,
  46. MSM8939_PNOC_INT_1,
  47. MSM8939_PNOC_MAS_0,
  48. MSM8939_PNOC_MAS_1,
  49. MSM8939_PNOC_SLV_0,
  50. MSM8939_PNOC_SLV_1,
  51. MSM8939_PNOC_SLV_2,
  52. MSM8939_PNOC_SLV_3,
  53. MSM8939_PNOC_SLV_4,
  54. MSM8939_PNOC_SLV_8,
  55. MSM8939_PNOC_SLV_9,
  56. MSM8939_PNOC_SNOC_MAS,
  57. MSM8939_PNOC_SNOC_SLV,
  58. MSM8939_SNOC_QDSS_INT,
  59. MSM8939_SLAVE_AMPSS_L2,
  60. MSM8939_SLAVE_APSS,
  61. MSM8939_SLAVE_LPASS,
  62. MSM8939_SLAVE_BIMC_CFG,
  63. MSM8939_SLAVE_BLSP_1,
  64. MSM8939_SLAVE_BOOT_ROM,
  65. MSM8939_SLAVE_CAMERA_CFG,
  66. MSM8939_SLAVE_CATS_128,
  67. MSM8939_SLAVE_OCMEM_64,
  68. MSM8939_SLAVE_CLK_CTL,
  69. MSM8939_SLAVE_CRYPTO_0_CFG,
  70. MSM8939_SLAVE_DEHR_CFG,
  71. MSM8939_SLAVE_DISPLAY_CFG,
  72. MSM8939_SLAVE_EBI_CH0,
  73. MSM8939_SLAVE_GRAPHICS_3D_CFG,
  74. MSM8939_SLAVE_IMEM_CFG,
  75. MSM8939_SLAVE_IMEM,
  76. MSM8939_SLAVE_MPM,
  77. MSM8939_SLAVE_MSG_RAM,
  78. MSM8939_SLAVE_MSS,
  79. MSM8939_SLAVE_PDM,
  80. MSM8939_SLAVE_PMIC_ARB,
  81. MSM8939_SLAVE_PNOC_CFG,
  82. MSM8939_SLAVE_PRNG,
  83. MSM8939_SLAVE_QDSS_CFG,
  84. MSM8939_SLAVE_QDSS_STM,
  85. MSM8939_SLAVE_RBCPR_CFG,
  86. MSM8939_SLAVE_SDCC_1,
  87. MSM8939_SLAVE_SDCC_2,
  88. MSM8939_SLAVE_SECURITY,
  89. MSM8939_SLAVE_SNOC_CFG,
  90. MSM8939_SLAVE_SPDM,
  91. MSM8939_SLAVE_SRVC_SNOC,
  92. MSM8939_SLAVE_TCSR,
  93. MSM8939_SLAVE_TLMM,
  94. MSM8939_SLAVE_USB_HS1,
  95. MSM8939_SLAVE_USB_HS2,
  96. MSM8939_SLAVE_VENUS_CFG,
  97. MSM8939_SNOC_BIMC_0_MAS,
  98. MSM8939_SNOC_BIMC_0_SLV,
  99. MSM8939_SNOC_BIMC_1_MAS,
  100. MSM8939_SNOC_BIMC_1_SLV,
  101. MSM8939_SNOC_BIMC_2_MAS,
  102. MSM8939_SNOC_BIMC_2_SLV,
  103. MSM8939_SNOC_INT_0,
  104. MSM8939_SNOC_INT_1,
  105. MSM8939_SNOC_INT_BIMC,
  106. MSM8939_SNOC_PNOC_MAS,
  107. MSM8939_SNOC_PNOC_SLV,
  108. };
  109. static const u16 bimc_snoc_mas_links[] = {
  110. MSM8939_BIMC_SNOC_SLV
  111. };
  112. static struct qcom_icc_node bimc_snoc_mas = {
  113. .name = "bimc_snoc_mas",
  114. .id = MSM8939_BIMC_SNOC_MAS,
  115. .buswidth = 8,
  116. .mas_rpm_id = -1,
  117. .slv_rpm_id = -1,
  118. .qos.ap_owned = true,
  119. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  120. .num_links = ARRAY_SIZE(bimc_snoc_mas_links),
  121. .links = bimc_snoc_mas_links,
  122. };
  123. static const u16 bimc_snoc_slv_links[] = {
  124. MSM8939_SNOC_INT_0,
  125. MSM8939_SNOC_INT_1
  126. };
  127. static struct qcom_icc_node bimc_snoc_slv = {
  128. .name = "bimc_snoc_slv",
  129. .id = MSM8939_BIMC_SNOC_SLV,
  130. .buswidth = 16,
  131. .mas_rpm_id = -1,
  132. .slv_rpm_id = 2,
  133. .num_links = ARRAY_SIZE(bimc_snoc_slv_links),
  134. .links = bimc_snoc_slv_links,
  135. };
  136. static const u16 mas_apss_links[] = {
  137. MSM8939_SLAVE_EBI_CH0,
  138. MSM8939_BIMC_SNOC_MAS,
  139. MSM8939_SLAVE_AMPSS_L2
  140. };
  141. static struct qcom_icc_node mas_apss = {
  142. .name = "mas_apss",
  143. .id = MSM8939_MASTER_AMPSS_M0,
  144. .buswidth = 16,
  145. .mas_rpm_id = -1,
  146. .slv_rpm_id = -1,
  147. .qos.ap_owned = true,
  148. .qos.qos_mode = NOC_QOS_MODE_FIXED,
  149. .qos.areq_prio = 0,
  150. .qos.prio_level = 0,
  151. .qos.qos_port = 0,
  152. .num_links = ARRAY_SIZE(mas_apss_links),
  153. .links = mas_apss_links,
  154. };
  155. static const u16 mas_audio_links[] = {
  156. MSM8939_PNOC_MAS_0
  157. };
  158. static struct qcom_icc_node mas_audio = {
  159. .name = "mas_audio",
  160. .id = MSM8939_MASTER_LPASS,
  161. .buswidth = 4,
  162. .mas_rpm_id = -1,
  163. .slv_rpm_id = -1,
  164. .num_links = ARRAY_SIZE(mas_audio_links),
  165. .links = mas_audio_links,
  166. };
  167. static const u16 mas_blsp_1_links[] = {
  168. MSM8939_PNOC_MAS_1
  169. };
  170. static struct qcom_icc_node mas_blsp_1 = {
  171. .name = "mas_blsp_1",
  172. .id = MSM8939_MASTER_BLSP_1,
  173. .buswidth = 4,
  174. .mas_rpm_id = -1,
  175. .slv_rpm_id = -1,
  176. .num_links = ARRAY_SIZE(mas_blsp_1_links),
  177. .links = mas_blsp_1_links,
  178. };
  179. static const u16 mas_dehr_links[] = {
  180. MSM8939_PNOC_MAS_0
  181. };
  182. static struct qcom_icc_node mas_dehr = {
  183. .name = "mas_dehr",
  184. .id = MSM8939_MASTER_DEHR,
  185. .buswidth = 4,
  186. .mas_rpm_id = -1,
  187. .slv_rpm_id = -1,
  188. .num_links = ARRAY_SIZE(mas_dehr_links),
  189. .links = mas_dehr_links,
  190. };
  191. static const u16 mas_gfx_links[] = {
  192. MSM8939_SLAVE_EBI_CH0,
  193. MSM8939_BIMC_SNOC_MAS,
  194. MSM8939_SLAVE_AMPSS_L2
  195. };
  196. static struct qcom_icc_node mas_gfx = {
  197. .name = "mas_gfx",
  198. .id = MSM8939_MASTER_GRAPHICS_3D,
  199. .buswidth = 16,
  200. .mas_rpm_id = -1,
  201. .slv_rpm_id = -1,
  202. .qos.ap_owned = true,
  203. .qos.qos_mode = NOC_QOS_MODE_FIXED,
  204. .qos.areq_prio = 0,
  205. .qos.prio_level = 0,
  206. .qos.qos_port = 2,
  207. .num_links = ARRAY_SIZE(mas_gfx_links),
  208. .links = mas_gfx_links,
  209. };
  210. static const u16 mas_jpeg_links[] = {
  211. MSM8939_SNOC_MM_INT_0,
  212. MSM8939_SNOC_MM_INT_2
  213. };
  214. static struct qcom_icc_node mas_jpeg = {
  215. .name = "mas_jpeg",
  216. .id = MSM8939_MASTER_JPEG,
  217. .buswidth = 16,
  218. .mas_rpm_id = -1,
  219. .slv_rpm_id = -1,
  220. .qos.ap_owned = true,
  221. .qos.qos_mode = NOC_QOS_MODE_BYPASS,
  222. .qos.areq_prio = 0,
  223. .qos.prio_level = 0,
  224. .qos.qos_port = 6,
  225. .num_links = ARRAY_SIZE(mas_jpeg_links),
  226. .links = mas_jpeg_links,
  227. };
  228. static const u16 mas_mdp0_links[] = {
  229. MSM8939_SNOC_MM_INT_1,
  230. MSM8939_SNOC_MM_INT_2
  231. };
  232. static struct qcom_icc_node mas_mdp0 = {
  233. .name = "mas_mdp0",
  234. .id = MSM8939_MASTER_MDP_PORT0,
  235. .buswidth = 16,
  236. .mas_rpm_id = -1,
  237. .slv_rpm_id = -1,
  238. .qos.ap_owned = true,
  239. .qos.qos_mode = NOC_QOS_MODE_BYPASS,
  240. .qos.areq_prio = 0,
  241. .qos.prio_level = 0,
  242. .qos.qos_port = 7,
  243. .num_links = ARRAY_SIZE(mas_mdp0_links),
  244. .links = mas_mdp0_links,
  245. };
  246. static const u16 mas_mdp1_links[] = {
  247. MSM8939_SNOC_MM_INT_0,
  248. MSM8939_SNOC_MM_INT_2
  249. };
  250. static struct qcom_icc_node mas_mdp1 = {
  251. .name = "mas_mdp1",
  252. .id = MSM8939_MASTER_MDP_PORT1,
  253. .buswidth = 16,
  254. .mas_rpm_id = -1,
  255. .slv_rpm_id = -1,
  256. .qos.ap_owned = true,
  257. .qos.qos_mode = NOC_QOS_MODE_BYPASS,
  258. .qos.areq_prio = 0,
  259. .qos.prio_level = 0,
  260. .qos.qos_port = 13,
  261. .num_links = ARRAY_SIZE(mas_mdp1_links),
  262. .links = mas_mdp1_links,
  263. };
  264. static const u16 mas_cpp_links[] = {
  265. MSM8939_SNOC_MM_INT_0,
  266. MSM8939_SNOC_MM_INT_2
  267. };
  268. static struct qcom_icc_node mas_cpp = {
  269. .name = "mas_cpp",
  270. .id = MSM8939_MASTER_CPP,
  271. .buswidth = 16,
  272. .mas_rpm_id = -1,
  273. .slv_rpm_id = -1,
  274. .qos.ap_owned = true,
  275. .qos.qos_mode = NOC_QOS_MODE_BYPASS,
  276. .qos.areq_prio = 0,
  277. .qos.prio_level = 0,
  278. .qos.qos_port = 12,
  279. .num_links = ARRAY_SIZE(mas_cpp_links),
  280. .links = mas_cpp_links,
  281. };
  282. static const u16 mas_pcnoc_crypto_0_links[] = {
  283. MSM8939_PNOC_INT_1
  284. };
  285. static struct qcom_icc_node mas_pcnoc_crypto_0 = {
  286. .name = "mas_pcnoc_crypto_0",
  287. .id = MSM8939_MASTER_CRYPTO_CORE0,
  288. .buswidth = 8,
  289. .mas_rpm_id = -1,
  290. .slv_rpm_id = -1,
  291. .num_links = ARRAY_SIZE(mas_pcnoc_crypto_0_links),
  292. .links = mas_pcnoc_crypto_0_links,
  293. };
  294. static const u16 mas_pcnoc_sdcc_1_links[] = {
  295. MSM8939_PNOC_INT_1
  296. };
  297. static struct qcom_icc_node mas_pcnoc_sdcc_1 = {
  298. .name = "mas_pcnoc_sdcc_1",
  299. .id = MSM8939_MASTER_SDCC_1,
  300. .buswidth = 8,
  301. .mas_rpm_id = -1,
  302. .slv_rpm_id = -1,
  303. .num_links = ARRAY_SIZE(mas_pcnoc_sdcc_1_links),
  304. .links = mas_pcnoc_sdcc_1_links,
  305. };
  306. static const u16 mas_pcnoc_sdcc_2_links[] = {
  307. MSM8939_PNOC_INT_1
  308. };
  309. static struct qcom_icc_node mas_pcnoc_sdcc_2 = {
  310. .name = "mas_pcnoc_sdcc_2",
  311. .id = MSM8939_MASTER_SDCC_2,
  312. .buswidth = 8,
  313. .mas_rpm_id = -1,
  314. .slv_rpm_id = -1,
  315. .num_links = ARRAY_SIZE(mas_pcnoc_sdcc_2_links),
  316. .links = mas_pcnoc_sdcc_2_links,
  317. };
  318. static const u16 mas_qdss_bam_links[] = {
  319. MSM8939_SNOC_QDSS_INT
  320. };
  321. static struct qcom_icc_node mas_qdss_bam = {
  322. .name = "mas_qdss_bam",
  323. .id = MSM8939_MASTER_QDSS_BAM,
  324. .buswidth = 8,
  325. .mas_rpm_id = -1,
  326. .slv_rpm_id = -1,
  327. .qos.ap_owned = true,
  328. .qos.qos_mode = NOC_QOS_MODE_FIXED,
  329. .qos.areq_prio = 1,
  330. .qos.prio_level = 1,
  331. .qos.qos_port = 11,
  332. .num_links = ARRAY_SIZE(mas_qdss_bam_links),
  333. .links = mas_qdss_bam_links,
  334. };
  335. static const u16 mas_qdss_etr_links[] = {
  336. MSM8939_SNOC_QDSS_INT
  337. };
  338. static struct qcom_icc_node mas_qdss_etr = {
  339. .name = "mas_qdss_etr",
  340. .id = MSM8939_MASTER_QDSS_ETR,
  341. .buswidth = 8,
  342. .mas_rpm_id = -1,
  343. .slv_rpm_id = -1,
  344. .qos.ap_owned = true,
  345. .qos.qos_mode = NOC_QOS_MODE_FIXED,
  346. .qos.areq_prio = 1,
  347. .qos.prio_level = 1,
  348. .qos.qos_port = 10,
  349. .num_links = ARRAY_SIZE(mas_qdss_etr_links),
  350. .links = mas_qdss_etr_links,
  351. };
  352. static const u16 mas_snoc_cfg_links[] = {
  353. MSM8939_SLAVE_SRVC_SNOC
  354. };
  355. static struct qcom_icc_node mas_snoc_cfg = {
  356. .name = "mas_snoc_cfg",
  357. .id = MSM8939_MASTER_SNOC_CFG,
  358. .buswidth = 4,
  359. .mas_rpm_id = -1,
  360. .slv_rpm_id = -1,
  361. .num_links = ARRAY_SIZE(mas_snoc_cfg_links),
  362. .links = mas_snoc_cfg_links,
  363. };
  364. static const u16 mas_spdm_links[] = {
  365. MSM8939_PNOC_MAS_0
  366. };
  367. static struct qcom_icc_node mas_spdm = {
  368. .name = "mas_spdm",
  369. .id = MSM8939_MASTER_SPDM,
  370. .buswidth = 4,
  371. .mas_rpm_id = -1,
  372. .slv_rpm_id = -1,
  373. .num_links = ARRAY_SIZE(mas_spdm_links),
  374. .links = mas_spdm_links,
  375. };
  376. static const u16 mas_tcu0_links[] = {
  377. MSM8939_SLAVE_EBI_CH0,
  378. MSM8939_BIMC_SNOC_MAS,
  379. MSM8939_SLAVE_AMPSS_L2
  380. };
  381. static struct qcom_icc_node mas_tcu0 = {
  382. .name = "mas_tcu0",
  383. .id = MSM8939_MASTER_TCU0,
  384. .buswidth = 16,
  385. .mas_rpm_id = -1,
  386. .slv_rpm_id = -1,
  387. .qos.ap_owned = true,
  388. .qos.qos_mode = NOC_QOS_MODE_FIXED,
  389. .qos.areq_prio = 2,
  390. .qos.prio_level = 2,
  391. .qos.qos_port = 6,
  392. .num_links = ARRAY_SIZE(mas_tcu0_links),
  393. .links = mas_tcu0_links,
  394. };
  395. static const u16 mas_usb_hs1_links[] = {
  396. MSM8939_PNOC_MAS_1
  397. };
  398. static struct qcom_icc_node mas_usb_hs1 = {
  399. .name = "mas_usb_hs1",
  400. .id = MSM8939_MASTER_USB_HS1,
  401. .buswidth = 4,
  402. .mas_rpm_id = -1,
  403. .slv_rpm_id = -1,
  404. .num_links = ARRAY_SIZE(mas_usb_hs1_links),
  405. .links = mas_usb_hs1_links,
  406. };
  407. static const u16 mas_usb_hs2_links[] = {
  408. MSM8939_PNOC_MAS_1
  409. };
  410. static struct qcom_icc_node mas_usb_hs2 = {
  411. .name = "mas_usb_hs2",
  412. .id = MSM8939_MASTER_USB_HS2,
  413. .buswidth = 4,
  414. .mas_rpm_id = -1,
  415. .slv_rpm_id = -1,
  416. .num_links = ARRAY_SIZE(mas_usb_hs2_links),
  417. .links = mas_usb_hs2_links,
  418. };
  419. static const u16 mas_vfe_links[] = {
  420. MSM8939_SNOC_MM_INT_1,
  421. MSM8939_SNOC_MM_INT_2
  422. };
  423. static struct qcom_icc_node mas_vfe = {
  424. .name = "mas_vfe",
  425. .id = MSM8939_MASTER_VFE,
  426. .buswidth = 16,
  427. .mas_rpm_id = -1,
  428. .slv_rpm_id = -1,
  429. .qos.ap_owned = true,
  430. .qos.qos_mode = NOC_QOS_MODE_BYPASS,
  431. .qos.areq_prio = 0,
  432. .qos.prio_level = 0,
  433. .qos.qos_port = 9,
  434. .num_links = ARRAY_SIZE(mas_vfe_links),
  435. .links = mas_vfe_links,
  436. };
  437. static const u16 mas_video_links[] = {
  438. MSM8939_SNOC_MM_INT_0,
  439. MSM8939_SNOC_MM_INT_2
  440. };
  441. static struct qcom_icc_node mas_video = {
  442. .name = "mas_video",
  443. .id = MSM8939_MASTER_VIDEO_P0,
  444. .buswidth = 16,
  445. .mas_rpm_id = -1,
  446. .slv_rpm_id = -1,
  447. .qos.ap_owned = true,
  448. .qos.qos_mode = NOC_QOS_MODE_BYPASS,
  449. .qos.areq_prio = 0,
  450. .qos.prio_level = 0,
  451. .qos.qos_port = 8,
  452. .num_links = ARRAY_SIZE(mas_video_links),
  453. .links = mas_video_links,
  454. };
  455. static const u16 mm_int_0_links[] = {
  456. MSM8939_SNOC_BIMC_2_MAS
  457. };
  458. static struct qcom_icc_node mm_int_0 = {
  459. .name = "mm_int_0",
  460. .id = MSM8939_SNOC_MM_INT_0,
  461. .buswidth = 16,
  462. .mas_rpm_id = -1,
  463. .slv_rpm_id = -1,
  464. .qos.ap_owned = true,
  465. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  466. .num_links = ARRAY_SIZE(mm_int_0_links),
  467. .links = mm_int_0_links,
  468. };
  469. static const u16 mm_int_1_links[] = {
  470. MSM8939_SNOC_BIMC_1_MAS
  471. };
  472. static struct qcom_icc_node mm_int_1 = {
  473. .name = "mm_int_1",
  474. .id = MSM8939_SNOC_MM_INT_1,
  475. .buswidth = 16,
  476. .mas_rpm_id = -1,
  477. .slv_rpm_id = -1,
  478. .qos.ap_owned = true,
  479. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  480. .num_links = ARRAY_SIZE(mm_int_1_links),
  481. .links = mm_int_1_links,
  482. };
  483. static const u16 mm_int_2_links[] = {
  484. MSM8939_SNOC_INT_0
  485. };
  486. static struct qcom_icc_node mm_int_2 = {
  487. .name = "mm_int_2",
  488. .id = MSM8939_SNOC_MM_INT_2,
  489. .buswidth = 16,
  490. .mas_rpm_id = -1,
  491. .slv_rpm_id = -1,
  492. .qos.ap_owned = true,
  493. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  494. .num_links = ARRAY_SIZE(mm_int_2_links),
  495. .links = mm_int_2_links,
  496. };
  497. static const u16 pcnoc_int_0_links[] = {
  498. MSM8939_PNOC_SNOC_MAS,
  499. MSM8939_PNOC_SLV_0,
  500. MSM8939_PNOC_SLV_1,
  501. MSM8939_PNOC_SLV_2,
  502. MSM8939_PNOC_SLV_3,
  503. MSM8939_PNOC_SLV_4,
  504. MSM8939_PNOC_SLV_8,
  505. MSM8939_PNOC_SLV_9
  506. };
  507. static struct qcom_icc_node pcnoc_int_0 = {
  508. .name = "pcnoc_int_0",
  509. .id = MSM8939_PNOC_INT_0,
  510. .buswidth = 8,
  511. .mas_rpm_id = -1,
  512. .slv_rpm_id = -1,
  513. .num_links = ARRAY_SIZE(pcnoc_int_0_links),
  514. .links = pcnoc_int_0_links,
  515. };
  516. static const u16 pcnoc_int_1_links[] = {
  517. MSM8939_PNOC_SNOC_MAS
  518. };
  519. static struct qcom_icc_node pcnoc_int_1 = {
  520. .name = "pcnoc_int_1",
  521. .id = MSM8939_PNOC_INT_1,
  522. .buswidth = 8,
  523. .mas_rpm_id = -1,
  524. .slv_rpm_id = -1,
  525. .num_links = ARRAY_SIZE(pcnoc_int_1_links),
  526. .links = pcnoc_int_1_links,
  527. };
  528. static const u16 pcnoc_m_0_links[] = {
  529. MSM8939_PNOC_INT_0
  530. };
  531. static struct qcom_icc_node pcnoc_m_0 = {
  532. .name = "pcnoc_m_0",
  533. .id = MSM8939_PNOC_MAS_0,
  534. .buswidth = 8,
  535. .mas_rpm_id = -1,
  536. .slv_rpm_id = -1,
  537. .num_links = ARRAY_SIZE(pcnoc_m_0_links),
  538. .links = pcnoc_m_0_links,
  539. };
  540. static const u16 pcnoc_m_1_links[] = {
  541. MSM8939_PNOC_SNOC_MAS
  542. };
  543. static struct qcom_icc_node pcnoc_m_1 = {
  544. .name = "pcnoc_m_1",
  545. .id = MSM8939_PNOC_MAS_1,
  546. .buswidth = 8,
  547. .mas_rpm_id = -1,
  548. .slv_rpm_id = -1,
  549. .num_links = ARRAY_SIZE(pcnoc_m_1_links),
  550. .links = pcnoc_m_1_links,
  551. };
  552. static const u16 pcnoc_s_0_links[] = {
  553. MSM8939_SLAVE_CLK_CTL,
  554. MSM8939_SLAVE_TLMM,
  555. MSM8939_SLAVE_TCSR,
  556. MSM8939_SLAVE_SECURITY,
  557. MSM8939_SLAVE_MSS
  558. };
  559. static struct qcom_icc_node pcnoc_s_0 = {
  560. .name = "pcnoc_s_0",
  561. .id = MSM8939_PNOC_SLV_0,
  562. .buswidth = 4,
  563. .mas_rpm_id = -1,
  564. .slv_rpm_id = -1,
  565. .num_links = ARRAY_SIZE(pcnoc_s_0_links),
  566. .links = pcnoc_s_0_links,
  567. };
  568. static const u16 pcnoc_s_1_links[] = {
  569. MSM8939_SLAVE_IMEM_CFG,
  570. MSM8939_SLAVE_CRYPTO_0_CFG,
  571. MSM8939_SLAVE_MSG_RAM,
  572. MSM8939_SLAVE_PDM,
  573. MSM8939_SLAVE_PRNG
  574. };
  575. static struct qcom_icc_node pcnoc_s_1 = {
  576. .name = "pcnoc_s_1",
  577. .id = MSM8939_PNOC_SLV_1,
  578. .buswidth = 4,
  579. .mas_rpm_id = -1,
  580. .slv_rpm_id = -1,
  581. .num_links = ARRAY_SIZE(pcnoc_s_1_links),
  582. .links = pcnoc_s_1_links,
  583. };
  584. static const u16 pcnoc_s_2_links[] = {
  585. MSM8939_SLAVE_SPDM,
  586. MSM8939_SLAVE_BOOT_ROM,
  587. MSM8939_SLAVE_BIMC_CFG,
  588. MSM8939_SLAVE_PNOC_CFG,
  589. MSM8939_SLAVE_PMIC_ARB
  590. };
  591. static struct qcom_icc_node pcnoc_s_2 = {
  592. .name = "pcnoc_s_2",
  593. .id = MSM8939_PNOC_SLV_2,
  594. .buswidth = 4,
  595. .mas_rpm_id = -1,
  596. .slv_rpm_id = -1,
  597. .num_links = ARRAY_SIZE(pcnoc_s_2_links),
  598. .links = pcnoc_s_2_links,
  599. };
  600. static const u16 pcnoc_s_3_links[] = {
  601. MSM8939_SLAVE_MPM,
  602. MSM8939_SLAVE_SNOC_CFG,
  603. MSM8939_SLAVE_RBCPR_CFG,
  604. MSM8939_SLAVE_QDSS_CFG,
  605. MSM8939_SLAVE_DEHR_CFG
  606. };
  607. static struct qcom_icc_node pcnoc_s_3 = {
  608. .name = "pcnoc_s_3",
  609. .id = MSM8939_PNOC_SLV_3,
  610. .buswidth = 4,
  611. .mas_rpm_id = -1,
  612. .slv_rpm_id = -1,
  613. .num_links = ARRAY_SIZE(pcnoc_s_3_links),
  614. .links = pcnoc_s_3_links,
  615. };
  616. static const u16 pcnoc_s_4_links[] = {
  617. MSM8939_SLAVE_VENUS_CFG,
  618. MSM8939_SLAVE_CAMERA_CFG,
  619. MSM8939_SLAVE_DISPLAY_CFG
  620. };
  621. static struct qcom_icc_node pcnoc_s_4 = {
  622. .name = "pcnoc_s_4",
  623. .id = MSM8939_PNOC_SLV_4,
  624. .buswidth = 4,
  625. .mas_rpm_id = -1,
  626. .slv_rpm_id = -1,
  627. .num_links = ARRAY_SIZE(pcnoc_s_4_links),
  628. .links = pcnoc_s_4_links,
  629. };
  630. static const u16 pcnoc_s_8_links[] = {
  631. MSM8939_SLAVE_USB_HS1,
  632. MSM8939_SLAVE_SDCC_1,
  633. MSM8939_SLAVE_BLSP_1
  634. };
  635. static struct qcom_icc_node pcnoc_s_8 = {
  636. .name = "pcnoc_s_8",
  637. .id = MSM8939_PNOC_SLV_8,
  638. .buswidth = 4,
  639. .mas_rpm_id = -1,
  640. .slv_rpm_id = -1,
  641. .num_links = ARRAY_SIZE(pcnoc_s_8_links),
  642. .links = pcnoc_s_8_links,
  643. };
  644. static const u16 pcnoc_s_9_links[] = {
  645. MSM8939_SLAVE_SDCC_2,
  646. MSM8939_SLAVE_LPASS,
  647. MSM8939_SLAVE_USB_HS2
  648. };
  649. static struct qcom_icc_node pcnoc_s_9 = {
  650. .name = "pcnoc_s_9",
  651. .id = MSM8939_PNOC_SLV_9,
  652. .buswidth = 4,
  653. .mas_rpm_id = -1,
  654. .slv_rpm_id = -1,
  655. .num_links = ARRAY_SIZE(pcnoc_s_9_links),
  656. .links = pcnoc_s_9_links,
  657. };
  658. static const u16 pcnoc_snoc_mas_links[] = {
  659. MSM8939_PNOC_SNOC_SLV
  660. };
  661. static struct qcom_icc_node pcnoc_snoc_mas = {
  662. .name = "pcnoc_snoc_mas",
  663. .id = MSM8939_PNOC_SNOC_MAS,
  664. .buswidth = 8,
  665. .mas_rpm_id = 29,
  666. .slv_rpm_id = -1,
  667. .num_links = ARRAY_SIZE(pcnoc_snoc_mas_links),
  668. .links = pcnoc_snoc_mas_links,
  669. };
  670. static const u16 pcnoc_snoc_slv_links[] = {
  671. MSM8939_SNOC_INT_0,
  672. MSM8939_SNOC_INT_BIMC,
  673. MSM8939_SNOC_INT_1
  674. };
  675. static struct qcom_icc_node pcnoc_snoc_slv = {
  676. .name = "pcnoc_snoc_slv",
  677. .id = MSM8939_PNOC_SNOC_SLV,
  678. .buswidth = 8,
  679. .mas_rpm_id = -1,
  680. .slv_rpm_id = 45,
  681. .num_links = ARRAY_SIZE(pcnoc_snoc_slv_links),
  682. .links = pcnoc_snoc_slv_links,
  683. };
  684. static const u16 qdss_int_links[] = {
  685. MSM8939_SNOC_INT_0,
  686. MSM8939_SNOC_INT_BIMC
  687. };
  688. static struct qcom_icc_node qdss_int = {
  689. .name = "qdss_int",
  690. .id = MSM8939_SNOC_QDSS_INT,
  691. .buswidth = 8,
  692. .mas_rpm_id = -1,
  693. .slv_rpm_id = -1,
  694. .qos.ap_owned = true,
  695. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  696. .num_links = ARRAY_SIZE(qdss_int_links),
  697. .links = qdss_int_links,
  698. };
  699. static struct qcom_icc_node slv_apps_l2 = {
  700. .name = "slv_apps_l2",
  701. .id = MSM8939_SLAVE_AMPSS_L2,
  702. .buswidth = 16,
  703. .mas_rpm_id = -1,
  704. .slv_rpm_id = -1,
  705. };
  706. static struct qcom_icc_node slv_apss = {
  707. .name = "slv_apss",
  708. .id = MSM8939_SLAVE_APSS,
  709. .buswidth = 4,
  710. .mas_rpm_id = -1,
  711. .slv_rpm_id = -1,
  712. };
  713. static struct qcom_icc_node slv_audio = {
  714. .name = "slv_audio",
  715. .id = MSM8939_SLAVE_LPASS,
  716. .buswidth = 4,
  717. .mas_rpm_id = -1,
  718. .slv_rpm_id = -1,
  719. };
  720. static struct qcom_icc_node slv_bimc_cfg = {
  721. .name = "slv_bimc_cfg",
  722. .id = MSM8939_SLAVE_BIMC_CFG,
  723. .buswidth = 4,
  724. .mas_rpm_id = -1,
  725. .slv_rpm_id = -1,
  726. };
  727. static struct qcom_icc_node slv_blsp_1 = {
  728. .name = "slv_blsp_1",
  729. .id = MSM8939_SLAVE_BLSP_1,
  730. .buswidth = 4,
  731. .mas_rpm_id = -1,
  732. .slv_rpm_id = -1,
  733. };
  734. static struct qcom_icc_node slv_boot_rom = {
  735. .name = "slv_boot_rom",
  736. .id = MSM8939_SLAVE_BOOT_ROM,
  737. .buswidth = 4,
  738. .mas_rpm_id = -1,
  739. .slv_rpm_id = -1,
  740. };
  741. static struct qcom_icc_node slv_camera_cfg = {
  742. .name = "slv_camera_cfg",
  743. .id = MSM8939_SLAVE_CAMERA_CFG,
  744. .buswidth = 4,
  745. .mas_rpm_id = -1,
  746. .slv_rpm_id = -1,
  747. };
  748. static struct qcom_icc_node slv_cats_0 = {
  749. .name = "slv_cats_0",
  750. .id = MSM8939_SLAVE_CATS_128,
  751. .buswidth = 16,
  752. .mas_rpm_id = -1,
  753. .slv_rpm_id = -1,
  754. };
  755. static struct qcom_icc_node slv_cats_1 = {
  756. .name = "slv_cats_1",
  757. .id = MSM8939_SLAVE_OCMEM_64,
  758. .buswidth = 8,
  759. .mas_rpm_id = -1,
  760. .slv_rpm_id = -1,
  761. };
  762. static struct qcom_icc_node slv_clk_ctl = {
  763. .name = "slv_clk_ctl",
  764. .id = MSM8939_SLAVE_CLK_CTL,
  765. .buswidth = 4,
  766. .mas_rpm_id = -1,
  767. .slv_rpm_id = -1,
  768. };
  769. static struct qcom_icc_node slv_crypto_0_cfg = {
  770. .name = "slv_crypto_0_cfg",
  771. .id = MSM8939_SLAVE_CRYPTO_0_CFG,
  772. .buswidth = 4,
  773. .mas_rpm_id = -1,
  774. .slv_rpm_id = -1,
  775. };
  776. static struct qcom_icc_node slv_dehr_cfg = {
  777. .name = "slv_dehr_cfg",
  778. .id = MSM8939_SLAVE_DEHR_CFG,
  779. .buswidth = 4,
  780. .mas_rpm_id = -1,
  781. .slv_rpm_id = -1,
  782. };
  783. static struct qcom_icc_node slv_display_cfg = {
  784. .name = "slv_display_cfg",
  785. .id = MSM8939_SLAVE_DISPLAY_CFG,
  786. .buswidth = 4,
  787. .mas_rpm_id = -1,
  788. .slv_rpm_id = -1,
  789. };
  790. static struct qcom_icc_node slv_ebi_ch0 = {
  791. .name = "slv_ebi_ch0",
  792. .id = MSM8939_SLAVE_EBI_CH0,
  793. .buswidth = 16,
  794. .mas_rpm_id = -1,
  795. .slv_rpm_id = 0,
  796. };
  797. static struct qcom_icc_node slv_gfx_cfg = {
  798. .name = "slv_gfx_cfg",
  799. .id = MSM8939_SLAVE_GRAPHICS_3D_CFG,
  800. .buswidth = 4,
  801. .mas_rpm_id = -1,
  802. .slv_rpm_id = -1,
  803. };
  804. static struct qcom_icc_node slv_imem_cfg = {
  805. .name = "slv_imem_cfg",
  806. .id = MSM8939_SLAVE_IMEM_CFG,
  807. .buswidth = 4,
  808. .mas_rpm_id = -1,
  809. .slv_rpm_id = -1,
  810. };
  811. static struct qcom_icc_node slv_imem = {
  812. .name = "slv_imem",
  813. .id = MSM8939_SLAVE_IMEM,
  814. .buswidth = 8,
  815. .mas_rpm_id = -1,
  816. .slv_rpm_id = 26,
  817. };
  818. static struct qcom_icc_node slv_mpm = {
  819. .name = "slv_mpm",
  820. .id = MSM8939_SLAVE_MPM,
  821. .buswidth = 4,
  822. .mas_rpm_id = -1,
  823. .slv_rpm_id = -1,
  824. };
  825. static struct qcom_icc_node slv_msg_ram = {
  826. .name = "slv_msg_ram",
  827. .id = MSM8939_SLAVE_MSG_RAM,
  828. .buswidth = 4,
  829. .mas_rpm_id = -1,
  830. .slv_rpm_id = -1,
  831. };
  832. static struct qcom_icc_node slv_mss = {
  833. .name = "slv_mss",
  834. .id = MSM8939_SLAVE_MSS,
  835. .buswidth = 4,
  836. .mas_rpm_id = -1,
  837. .slv_rpm_id = -1,
  838. };
  839. static struct qcom_icc_node slv_pdm = {
  840. .name = "slv_pdm",
  841. .id = MSM8939_SLAVE_PDM,
  842. .buswidth = 4,
  843. .mas_rpm_id = -1,
  844. .slv_rpm_id = -1,
  845. };
  846. static struct qcom_icc_node slv_pmic_arb = {
  847. .name = "slv_pmic_arb",
  848. .id = MSM8939_SLAVE_PMIC_ARB,
  849. .buswidth = 4,
  850. .mas_rpm_id = -1,
  851. .slv_rpm_id = -1,
  852. };
  853. static struct qcom_icc_node slv_pcnoc_cfg = {
  854. .name = "slv_pcnoc_cfg",
  855. .id = MSM8939_SLAVE_PNOC_CFG,
  856. .buswidth = 4,
  857. .mas_rpm_id = -1,
  858. .slv_rpm_id = -1,
  859. };
  860. static struct qcom_icc_node slv_prng = {
  861. .name = "slv_prng",
  862. .id = MSM8939_SLAVE_PRNG,
  863. .buswidth = 4,
  864. .mas_rpm_id = -1,
  865. .slv_rpm_id = -1,
  866. };
  867. static struct qcom_icc_node slv_qdss_cfg = {
  868. .name = "slv_qdss_cfg",
  869. .id = MSM8939_SLAVE_QDSS_CFG,
  870. .buswidth = 4,
  871. .mas_rpm_id = -1,
  872. .slv_rpm_id = -1,
  873. };
  874. static struct qcom_icc_node slv_qdss_stm = {
  875. .name = "slv_qdss_stm",
  876. .id = MSM8939_SLAVE_QDSS_STM,
  877. .buswidth = 4,
  878. .mas_rpm_id = -1,
  879. .slv_rpm_id = 30,
  880. };
  881. static struct qcom_icc_node slv_rbcpr_cfg = {
  882. .name = "slv_rbcpr_cfg",
  883. .id = MSM8939_SLAVE_RBCPR_CFG,
  884. .buswidth = 4,
  885. .mas_rpm_id = -1,
  886. .slv_rpm_id = -1,
  887. };
  888. static struct qcom_icc_node slv_sdcc_1 = {
  889. .name = "slv_sdcc_1",
  890. .id = MSM8939_SLAVE_SDCC_1,
  891. .buswidth = 4,
  892. .mas_rpm_id = -1,
  893. .slv_rpm_id = -1,
  894. };
  895. static struct qcom_icc_node slv_sdcc_2 = {
  896. .name = "slv_sdcc_2",
  897. .id = MSM8939_SLAVE_SDCC_2,
  898. .buswidth = 4,
  899. .mas_rpm_id = -1,
  900. .slv_rpm_id = -1,
  901. };
  902. static struct qcom_icc_node slv_security = {
  903. .name = "slv_security",
  904. .id = MSM8939_SLAVE_SECURITY,
  905. .buswidth = 4,
  906. .mas_rpm_id = -1,
  907. .slv_rpm_id = -1,
  908. };
  909. static struct qcom_icc_node slv_snoc_cfg = {
  910. .name = "slv_snoc_cfg",
  911. .id = MSM8939_SLAVE_SNOC_CFG,
  912. .buswidth = 4,
  913. .mas_rpm_id = -1,
  914. .slv_rpm_id = -1,
  915. };
  916. static struct qcom_icc_node slv_spdm = {
  917. .name = "slv_spdm",
  918. .id = MSM8939_SLAVE_SPDM,
  919. .buswidth = 4,
  920. .mas_rpm_id = -1,
  921. .slv_rpm_id = -1,
  922. };
  923. static struct qcom_icc_node slv_srvc_snoc = {
  924. .name = "slv_srvc_snoc",
  925. .id = MSM8939_SLAVE_SRVC_SNOC,
  926. .buswidth = 8,
  927. .mas_rpm_id = -1,
  928. .slv_rpm_id = -1,
  929. };
  930. static struct qcom_icc_node slv_tcsr = {
  931. .name = "slv_tcsr",
  932. .id = MSM8939_SLAVE_TCSR,
  933. .buswidth = 4,
  934. .mas_rpm_id = -1,
  935. .slv_rpm_id = -1,
  936. };
  937. static struct qcom_icc_node slv_tlmm = {
  938. .name = "slv_tlmm",
  939. .id = MSM8939_SLAVE_TLMM,
  940. .buswidth = 4,
  941. .mas_rpm_id = -1,
  942. .slv_rpm_id = -1,
  943. };
  944. static struct qcom_icc_node slv_usb_hs1 = {
  945. .name = "slv_usb_hs1",
  946. .id = MSM8939_SLAVE_USB_HS1,
  947. .buswidth = 4,
  948. .mas_rpm_id = -1,
  949. .slv_rpm_id = -1,
  950. };
  951. static struct qcom_icc_node slv_usb_hs2 = {
  952. .name = "slv_usb_hs2",
  953. .id = MSM8939_SLAVE_USB_HS2,
  954. .buswidth = 4,
  955. .mas_rpm_id = -1,
  956. .slv_rpm_id = -1,
  957. };
  958. static struct qcom_icc_node slv_venus_cfg = {
  959. .name = "slv_venus_cfg",
  960. .id = MSM8939_SLAVE_VENUS_CFG,
  961. .buswidth = 4,
  962. .mas_rpm_id = -1,
  963. .slv_rpm_id = -1,
  964. };
  965. static const u16 snoc_bimc_0_mas_links[] = {
  966. MSM8939_SNOC_BIMC_0_SLV
  967. };
  968. static struct qcom_icc_node snoc_bimc_0_mas = {
  969. .name = "snoc_bimc_0_mas",
  970. .id = MSM8939_SNOC_BIMC_0_MAS,
  971. .buswidth = 16,
  972. .mas_rpm_id = -1,
  973. .slv_rpm_id = -1,
  974. .qos.ap_owned = true,
  975. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  976. .num_links = ARRAY_SIZE(snoc_bimc_0_mas_links),
  977. .links = snoc_bimc_0_mas_links,
  978. };
  979. static const u16 snoc_bimc_0_slv_links[] = {
  980. MSM8939_SLAVE_EBI_CH0
  981. };
  982. static struct qcom_icc_node snoc_bimc_0_slv = {
  983. .name = "snoc_bimc_0_slv",
  984. .id = MSM8939_SNOC_BIMC_0_SLV,
  985. .buswidth = 16,
  986. .mas_rpm_id = -1,
  987. .slv_rpm_id = -1,
  988. .qos.ap_owned = true,
  989. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  990. .num_links = ARRAY_SIZE(snoc_bimc_0_slv_links),
  991. .links = snoc_bimc_0_slv_links,
  992. };
  993. static const u16 snoc_bimc_1_mas_links[] = {
  994. MSM8939_SNOC_BIMC_1_SLV
  995. };
  996. static struct qcom_icc_node snoc_bimc_1_mas = {
  997. .name = "snoc_bimc_1_mas",
  998. .id = MSM8939_SNOC_BIMC_1_MAS,
  999. .buswidth = 16,
  1000. .mas_rpm_id = 76,
  1001. .slv_rpm_id = -1,
  1002. .num_links = ARRAY_SIZE(snoc_bimc_1_mas_links),
  1003. .links = snoc_bimc_1_mas_links,
  1004. };
  1005. static const u16 snoc_bimc_1_slv_links[] = {
  1006. MSM8939_SLAVE_EBI_CH0
  1007. };
  1008. static struct qcom_icc_node snoc_bimc_1_slv = {
  1009. .name = "snoc_bimc_1_slv",
  1010. .id = MSM8939_SNOC_BIMC_1_SLV,
  1011. .buswidth = 16,
  1012. .mas_rpm_id = -1,
  1013. .slv_rpm_id = 104,
  1014. .num_links = ARRAY_SIZE(snoc_bimc_1_slv_links),
  1015. .links = snoc_bimc_1_slv_links,
  1016. };
  1017. static const u16 snoc_bimc_2_mas_links[] = {
  1018. MSM8939_SNOC_BIMC_2_SLV
  1019. };
  1020. static struct qcom_icc_node snoc_bimc_2_mas = {
  1021. .name = "snoc_bimc_2_mas",
  1022. .id = MSM8939_SNOC_BIMC_2_MAS,
  1023. .buswidth = 16,
  1024. .mas_rpm_id = -1,
  1025. .slv_rpm_id = -1,
  1026. .qos.ap_owned = true,
  1027. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  1028. .num_links = ARRAY_SIZE(snoc_bimc_2_mas_links),
  1029. .links = snoc_bimc_2_mas_links,
  1030. };
  1031. static const u16 snoc_bimc_2_slv_links[] = {
  1032. MSM8939_SLAVE_EBI_CH0
  1033. };
  1034. static struct qcom_icc_node snoc_bimc_2_slv = {
  1035. .name = "snoc_bimc_2_slv",
  1036. .id = MSM8939_SNOC_BIMC_2_SLV,
  1037. .buswidth = 16,
  1038. .mas_rpm_id = -1,
  1039. .slv_rpm_id = -1,
  1040. .qos.ap_owned = true,
  1041. .qos.qos_mode = NOC_QOS_MODE_INVALID,
  1042. .num_links = ARRAY_SIZE(snoc_bimc_2_slv_links),
  1043. .links = snoc_bimc_2_slv_links,
  1044. };
  1045. static const u16 snoc_int_0_links[] = {
  1046. MSM8939_SLAVE_QDSS_STM,
  1047. MSM8939_SLAVE_IMEM,
  1048. MSM8939_SNOC_PNOC_MAS
  1049. };
  1050. static struct qcom_icc_node snoc_int_0 = {
  1051. .name = "snoc_int_0",
  1052. .id = MSM8939_SNOC_INT_0,
  1053. .buswidth = 8,
  1054. .mas_rpm_id = 99,
  1055. .slv_rpm_id = 130,
  1056. .num_links = ARRAY_SIZE(snoc_int_0_links),
  1057. .links = snoc_int_0_links,
  1058. };
  1059. static const u16 snoc_int_1_links[] = {
  1060. MSM8939_SLAVE_APSS,
  1061. MSM8939_SLAVE_CATS_128,
  1062. MSM8939_SLAVE_OCMEM_64
  1063. };
  1064. static struct qcom_icc_node snoc_int_1 = {
  1065. .name = "snoc_int_1",
  1066. .id = MSM8939_SNOC_INT_1,
  1067. .buswidth = 8,
  1068. .mas_rpm_id = -1,
  1069. .slv_rpm_id = -1,
  1070. .num_links = ARRAY_SIZE(snoc_int_1_links),
  1071. .links = snoc_int_1_links,
  1072. };
  1073. static const u16 snoc_int_bimc_links[] = {
  1074. MSM8939_SNOC_BIMC_1_MAS
  1075. };
  1076. static struct qcom_icc_node snoc_int_bimc = {
  1077. .name = "snoc_int_bimc",
  1078. .id = MSM8939_SNOC_INT_BIMC,
  1079. .buswidth = 8,
  1080. .mas_rpm_id = 101,
  1081. .slv_rpm_id = 132,
  1082. .num_links = ARRAY_SIZE(snoc_int_bimc_links),
  1083. .links = snoc_int_bimc_links,
  1084. };
  1085. static const u16 snoc_pcnoc_mas_links[] = {
  1086. MSM8939_SNOC_PNOC_SLV
  1087. };
  1088. static struct qcom_icc_node snoc_pcnoc_mas = {
  1089. .name = "snoc_pcnoc_mas",
  1090. .id = MSM8939_SNOC_PNOC_MAS,
  1091. .buswidth = 8,
  1092. .mas_rpm_id = -1,
  1093. .slv_rpm_id = -1,
  1094. .num_links = ARRAY_SIZE(snoc_pcnoc_mas_links),
  1095. .links = snoc_pcnoc_mas_links,
  1096. };
  1097. static const u16 snoc_pcnoc_slv_links[] = {
  1098. MSM8939_PNOC_INT_0
  1099. };
  1100. static struct qcom_icc_node snoc_pcnoc_slv = {
  1101. .name = "snoc_pcnoc_slv",
  1102. .id = MSM8939_SNOC_PNOC_SLV,
  1103. .buswidth = 8,
  1104. .mas_rpm_id = -1,
  1105. .slv_rpm_id = -1,
  1106. .num_links = ARRAY_SIZE(snoc_pcnoc_slv_links),
  1107. .links = snoc_pcnoc_slv_links,
  1108. };
  1109. static struct qcom_icc_node * const msm8939_snoc_nodes[] = {
  1110. [BIMC_SNOC_SLV] = &bimc_snoc_slv,
  1111. [MASTER_QDSS_BAM] = &mas_qdss_bam,
  1112. [MASTER_QDSS_ETR] = &mas_qdss_etr,
  1113. [MASTER_SNOC_CFG] = &mas_snoc_cfg,
  1114. [PCNOC_SNOC_SLV] = &pcnoc_snoc_slv,
  1115. [SLAVE_APSS] = &slv_apss,
  1116. [SLAVE_CATS_128] = &slv_cats_0,
  1117. [SLAVE_OCMEM_64] = &slv_cats_1,
  1118. [SLAVE_IMEM] = &slv_imem,
  1119. [SLAVE_QDSS_STM] = &slv_qdss_stm,
  1120. [SLAVE_SRVC_SNOC] = &slv_srvc_snoc,
  1121. [SNOC_BIMC_0_MAS] = &snoc_bimc_0_mas,
  1122. [SNOC_BIMC_1_MAS] = &snoc_bimc_1_mas,
  1123. [SNOC_BIMC_2_MAS] = &snoc_bimc_2_mas,
  1124. [SNOC_INT_0] = &snoc_int_0,
  1125. [SNOC_INT_1] = &snoc_int_1,
  1126. [SNOC_INT_BIMC] = &snoc_int_bimc,
  1127. [SNOC_PCNOC_MAS] = &snoc_pcnoc_mas,
  1128. [SNOC_QDSS_INT] = &qdss_int,
  1129. };
  1130. static const struct regmap_config msm8939_snoc_regmap_config = {
  1131. .reg_bits = 32,
  1132. .reg_stride = 4,
  1133. .val_bits = 32,
  1134. .max_register = 0x14080,
  1135. .fast_io = true,
  1136. };
  1137. static const struct qcom_icc_desc msm8939_snoc = {
  1138. .type = QCOM_ICC_NOC,
  1139. .nodes = msm8939_snoc_nodes,
  1140. .num_nodes = ARRAY_SIZE(msm8939_snoc_nodes),
  1141. .regmap_cfg = &msm8939_snoc_regmap_config,
  1142. .qos_offset = 0x7000,
  1143. };
  1144. static struct qcom_icc_node * const msm8939_snoc_mm_nodes[] = {
  1145. [MASTER_VIDEO_P0] = &mas_video,
  1146. [MASTER_JPEG] = &mas_jpeg,
  1147. [MASTER_VFE] = &mas_vfe,
  1148. [MASTER_MDP_PORT0] = &mas_mdp0,
  1149. [MASTER_MDP_PORT1] = &mas_mdp1,
  1150. [MASTER_CPP] = &mas_cpp,
  1151. [SNOC_MM_INT_0] = &mm_int_0,
  1152. [SNOC_MM_INT_1] = &mm_int_1,
  1153. [SNOC_MM_INT_2] = &mm_int_2,
  1154. };
  1155. static const struct qcom_icc_desc msm8939_snoc_mm = {
  1156. .type = QCOM_ICC_NOC,
  1157. .nodes = msm8939_snoc_mm_nodes,
  1158. .num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes),
  1159. .regmap_cfg = &msm8939_snoc_regmap_config,
  1160. .qos_offset = 0x7000,
  1161. };
  1162. static struct qcom_icc_node * const msm8939_bimc_nodes[] = {
  1163. [BIMC_SNOC_MAS] = &bimc_snoc_mas,
  1164. [MASTER_AMPSS_M0] = &mas_apss,
  1165. [MASTER_GRAPHICS_3D] = &mas_gfx,
  1166. [MASTER_TCU0] = &mas_tcu0,
  1167. [SLAVE_AMPSS_L2] = &slv_apps_l2,
  1168. [SLAVE_EBI_CH0] = &slv_ebi_ch0,
  1169. [SNOC_BIMC_0_SLV] = &snoc_bimc_0_slv,
  1170. [SNOC_BIMC_1_SLV] = &snoc_bimc_1_slv,
  1171. [SNOC_BIMC_2_SLV] = &snoc_bimc_2_slv,
  1172. };
  1173. static const struct regmap_config msm8939_bimc_regmap_config = {
  1174. .reg_bits = 32,
  1175. .reg_stride = 4,
  1176. .val_bits = 32,
  1177. .max_register = 0x62000,
  1178. .fast_io = true,
  1179. };
  1180. static const struct qcom_icc_desc msm8939_bimc = {
  1181. .type = QCOM_ICC_BIMC,
  1182. .nodes = msm8939_bimc_nodes,
  1183. .num_nodes = ARRAY_SIZE(msm8939_bimc_nodes),
  1184. .regmap_cfg = &msm8939_bimc_regmap_config,
  1185. .qos_offset = 0x8000,
  1186. };
  1187. static struct qcom_icc_node * const msm8939_pcnoc_nodes[] = {
  1188. [MASTER_BLSP_1] = &mas_blsp_1,
  1189. [MASTER_DEHR] = &mas_dehr,
  1190. [MASTER_LPASS] = &mas_audio,
  1191. [MASTER_CRYPTO_CORE0] = &mas_pcnoc_crypto_0,
  1192. [MASTER_SDCC_1] = &mas_pcnoc_sdcc_1,
  1193. [MASTER_SDCC_2] = &mas_pcnoc_sdcc_2,
  1194. [MASTER_SPDM] = &mas_spdm,
  1195. [MASTER_USB_HS1] = &mas_usb_hs1,
  1196. [MASTER_USB_HS2] = &mas_usb_hs2,
  1197. [PCNOC_INT_0] = &pcnoc_int_0,
  1198. [PCNOC_INT_1] = &pcnoc_int_1,
  1199. [PCNOC_MAS_0] = &pcnoc_m_0,
  1200. [PCNOC_MAS_1] = &pcnoc_m_1,
  1201. [PCNOC_SLV_0] = &pcnoc_s_0,
  1202. [PCNOC_SLV_1] = &pcnoc_s_1,
  1203. [PCNOC_SLV_2] = &pcnoc_s_2,
  1204. [PCNOC_SLV_3] = &pcnoc_s_3,
  1205. [PCNOC_SLV_4] = &pcnoc_s_4,
  1206. [PCNOC_SLV_8] = &pcnoc_s_8,
  1207. [PCNOC_SLV_9] = &pcnoc_s_9,
  1208. [PCNOC_SNOC_MAS] = &pcnoc_snoc_mas,
  1209. [SLAVE_BIMC_CFG] = &slv_bimc_cfg,
  1210. [SLAVE_BLSP_1] = &slv_blsp_1,
  1211. [SLAVE_BOOT_ROM] = &slv_boot_rom,
  1212. [SLAVE_CAMERA_CFG] = &slv_camera_cfg,
  1213. [SLAVE_CLK_CTL] = &slv_clk_ctl,
  1214. [SLAVE_CRYPTO_0_CFG] = &slv_crypto_0_cfg,
  1215. [SLAVE_DEHR_CFG] = &slv_dehr_cfg,
  1216. [SLAVE_DISPLAY_CFG] = &slv_display_cfg,
  1217. [SLAVE_GRAPHICS_3D_CFG] = &slv_gfx_cfg,
  1218. [SLAVE_IMEM_CFG] = &slv_imem_cfg,
  1219. [SLAVE_LPASS] = &slv_audio,
  1220. [SLAVE_MPM] = &slv_mpm,
  1221. [SLAVE_MSG_RAM] = &slv_msg_ram,
  1222. [SLAVE_MSS] = &slv_mss,
  1223. [SLAVE_PDM] = &slv_pdm,
  1224. [SLAVE_PMIC_ARB] = &slv_pmic_arb,
  1225. [SLAVE_PCNOC_CFG] = &slv_pcnoc_cfg,
  1226. [SLAVE_PRNG] = &slv_prng,
  1227. [SLAVE_QDSS_CFG] = &slv_qdss_cfg,
  1228. [SLAVE_RBCPR_CFG] = &slv_rbcpr_cfg,
  1229. [SLAVE_SDCC_1] = &slv_sdcc_1,
  1230. [SLAVE_SDCC_2] = &slv_sdcc_2,
  1231. [SLAVE_SECURITY] = &slv_security,
  1232. [SLAVE_SNOC_CFG] = &slv_snoc_cfg,
  1233. [SLAVE_SPDM] = &slv_spdm,
  1234. [SLAVE_TCSR] = &slv_tcsr,
  1235. [SLAVE_TLMM] = &slv_tlmm,
  1236. [SLAVE_USB_HS1] = &slv_usb_hs1,
  1237. [SLAVE_USB_HS2] = &slv_usb_hs2,
  1238. [SLAVE_VENUS_CFG] = &slv_venus_cfg,
  1239. [SNOC_PCNOC_SLV] = &snoc_pcnoc_slv,
  1240. };
  1241. static const struct regmap_config msm8939_pcnoc_regmap_config = {
  1242. .reg_bits = 32,
  1243. .reg_stride = 4,
  1244. .val_bits = 32,
  1245. .max_register = 0x11000,
  1246. .fast_io = true,
  1247. };
  1248. static const struct qcom_icc_desc msm8939_pcnoc = {
  1249. .type = QCOM_ICC_NOC,
  1250. .nodes = msm8939_pcnoc_nodes,
  1251. .num_nodes = ARRAY_SIZE(msm8939_pcnoc_nodes),
  1252. .regmap_cfg = &msm8939_pcnoc_regmap_config,
  1253. .qos_offset = 0x7000,
  1254. };
  1255. static const struct of_device_id msm8939_noc_of_match[] = {
  1256. { .compatible = "qcom,msm8939-bimc", .data = &msm8939_bimc },
  1257. { .compatible = "qcom,msm8939-pcnoc", .data = &msm8939_pcnoc },
  1258. { .compatible = "qcom,msm8939-snoc", .data = &msm8939_snoc },
  1259. { .compatible = "qcom,msm8939-snoc-mm", .data = &msm8939_snoc_mm },
  1260. { }
  1261. };
  1262. MODULE_DEVICE_TABLE(of, msm8939_noc_of_match);
  1263. static struct platform_driver msm8939_noc_driver = {
  1264. .probe = qnoc_probe,
  1265. .remove = qnoc_remove,
  1266. .driver = {
  1267. .name = "qnoc-msm8939",
  1268. .of_match_table = msm8939_noc_of_match,
  1269. .sync_state = icc_sync_state,
  1270. },
  1271. };
  1272. module_platform_driver(msm8939_noc_driver);
  1273. MODULE_AUTHOR("Jun Nie <[email protected]>");
  1274. MODULE_DESCRIPTION("Qualcomm MSM8939 NoC driver");
  1275. MODULE_LICENSE("GPL v2");