msm8939.c 31 KB

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