msm-clocks-hwio-8953.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. /*
  2. * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __MSM_CLOCKS_8953_HWIO_H
  14. #define __MSM_CLOCKS_8953_HWIO_H
  15. #define GPLL0_MODE 0x21000
  16. #define GPLL0_L_VAL 0x21004
  17. #define GPLL0_ALPHA_VAL 0x21008
  18. #define GPLL0_ALPHA_VAL_U 0x2100C
  19. #define GPLL0_USER_CTL 0x21010
  20. #define GPLL0_USER_CTL_U 0x21014
  21. #define GPLL0_CONFIG_CTL 0x21018
  22. #define GPLL0_TEST_CTL 0x2101C
  23. #define GPLL0_TEST_CTL_U 0x21020
  24. #define GPLL0_FREQ_CTL 0x21028
  25. #define GPLL0_CLK_CGC_EN 0x2102C
  26. #define GPLL0_SSC_CTL 0x21030
  27. #define GPLL2_MODE 0x4A000
  28. #define GPLL2_L_VAL 0x4A004
  29. #define GPLL2_ALPHA_VAL 0x4A008
  30. #define GPLL2_ALPHA_VAL_U 0x4A00C
  31. #define GPLL2_USER_CTL 0x4A010
  32. #define GPLL2_USER_CTL_U 0x4A014
  33. #define GPLL2_CONFIG_CTL 0x4A018
  34. #define GPLL2_TEST_CTL 0x4A01C
  35. #define GPLL2_TEST_CTL_U 0x4A020
  36. #define GPLL2_FREQ_CTL 0x4A028
  37. #define GPLL2_CLK_CGC_EN 0x4A02C
  38. #define GPLL2_SSC_CTL 0x4A030
  39. #define GPLL3_MODE 0x22000
  40. #define GPLL3_L_VAL 0x22004
  41. #define GPLL3_ALPHA_VAL 0x22008
  42. #define GPLL3_ALPHA_VAL_U 0x2200C
  43. #define GPLL3_USER_CTL 0x22010
  44. #define GPLL3_USER_CTL_U 0x22014
  45. #define GPLL3_CONFIG_CTL 0x22018
  46. #define GPLL3_TEST_CTL 0x2201C
  47. #define GPLL3_TEST_CTL_U 0x22020
  48. #define GPLL3_FREQ_CTL 0x22028
  49. #define GPLL3_CLK_CGC_EN 0x2202C
  50. #define GPLL3_SSC_CTL 0x22030
  51. #define GPLL4_MODE 0x24000
  52. #define GPLL4_L_VAL 0x24004
  53. #define GPLL4_ALPHA_VAL 0x24008
  54. #define GPLL4_ALPHA_VAL_U 0x2400C
  55. #define GPLL4_USER_CTL 0x24010
  56. #define GPLL4_USER_CTL_U 0x24014
  57. #define GPLL4_CONFIG_CTL 0x24018
  58. #define GPLL4_TEST_CTL 0x2401C
  59. #define GPLL4_TEST_CTL_U 0x24020
  60. #define GPLL4_FREQ_CTL 0x24028
  61. #define GPLL4_CLK_CGC_EN 0x2402C
  62. #define GPLL4_SSC_CTL 0x24030
  63. #define GPLL5_MODE 0x25000
  64. #define GPLL5_L_VAL 0x25004
  65. #define GPLL5_ALPHA_VAL 0x25008
  66. #define GPLL5_ALPHA_VAL_U 0x2500C
  67. #define GPLL5_USER_CTL 0x25010
  68. #define GPLL5_CONFIG_CTL 0x25018
  69. #define GPLL5_TEST_CTL 0x2501C
  70. #define GPLL5_CLK_CGC_EN 0x2502C
  71. #define QDSS_DAP_CBCR 0x29084
  72. #define GPLL6_MODE 0x37000
  73. #define GPLL6_L_VAL 0x37004
  74. #define GPLL6_ALPHA_VAL 0x37008
  75. #define GPLL6_ALPHA_VAL_U 0x3700C
  76. #define GPLL6_USER_CTL 0x37010
  77. #define GPLL6_CONFIG_CTL 0x37018
  78. #define GPLL6_TEST_CTL 0x3701C
  79. #define GPLL6_STATUS 0x37024
  80. #define GPLL6_CLK_CGC_EN 0x3702C
  81. #define DCC_CBCR 0x77004
  82. #define BIMC_GFX_CBCR 0x59034
  83. #define OXILI_AON_CBCR 0x59044
  84. #define MSS_CFG_AHB_CBCR 0x49000
  85. #define MSS_Q6_BIMC_AXI_CBCR 0x49004
  86. #define GCC_SLEEP_CMD_RCGR 0x30000
  87. #define QUSB2_PHY_BCR 0x4103C
  88. #define USB_30_BCR 0x3F070
  89. #define PCNOC_USB3_AXI_CBCR 0x3F038
  90. #define USB_30_MISC 0x3F074
  91. #define USB30_MASTER_CBCR 0x3F000
  92. #define USB30_SLEEP_CBCR 0x3F004
  93. #define USB30_MOCK_UTMI_CBCR 0x3F008
  94. #define USB30_MASTER_CMD_RCGR 0x3F00C
  95. #define USB30_MASTER_CFG_RCGR 0x3F010
  96. #define USB30_MASTER_M 0x3F014
  97. #define USB30_MASTER_N 0x3F018
  98. #define USB30_MASTER_D 0x3F01C
  99. #define USB30_MOCK_UTMI_CMD_RCGR 0x3F020
  100. #define USB30_MOCK_UTMI_CFG_RCGR 0x3F024
  101. #define USB30_MOCK_UTMI_M 0x3F028
  102. #define USB30_MOCK_UTMI_N 0x3F02C
  103. #define USB30_MOCK_UTMI_D 0x3F030
  104. #define USB_PHY_CFG_AHB_CBCR 0x3F080
  105. #define USB3_PHY_BCR 0x3F034
  106. #define USB3PHY_PHY_BCR 0x3F03C
  107. #define USB3_PIPE_CBCR 0x3F040
  108. #define USB3_PHY_PIPE_MISC 0x3F048
  109. #define USB3_AUX_CBCR 0x3F044
  110. #define USB3_AUX_CMD_RCGR 0x3F05C
  111. #define USB3_AUX_CFG_RCGR 0x3F060
  112. #define USB3_AUX_M 0x3F064
  113. #define USB3_AUX_N 0x3F068
  114. #define USB3_AUX_D 0x3F06C
  115. #define SDCC1_APPS_CMD_RCGR 0x42004
  116. #define SDCC1_APPS_CFG_RCGR 0x42008
  117. #define SDCC1_APPS_M 0x4200C
  118. #define SDCC1_APPS_N 0x42010
  119. #define SDCC1_APPS_D 0x42014
  120. #define SDCC1_APPS_CBCR 0x42018
  121. #define SDCC1_AHB_CBCR 0x4201C
  122. #define SDCC1_MISC 0x42020
  123. #define SDCC2_APPS_CMD_RCGR 0x43004
  124. #define SDCC2_APPS_CFG_RCGR 0x43008
  125. #define SDCC2_APPS_M 0x4300C
  126. #define SDCC2_APPS_N 0x43010
  127. #define SDCC2_APPS_D 0x43014
  128. #define SDCC2_APPS_CBCR 0x43018
  129. #define SDCC2_AHB_CBCR 0x4301C
  130. #define SDCC1_ICE_CORE_CMD_RCGR 0x5D000
  131. #define SDCC1_ICE_CORE_CFG_RCGR 0x5D004
  132. #define SDCC1_ICE_CORE_M 0x5D008
  133. #define SDCC1_ICE_CORE_N 0x5D00C
  134. #define SDCC1_ICE_CORE_D 0x5D010
  135. #define SDCC1_ICE_CORE_CBCR 0x5D014
  136. #define BLSP1_AHB_CBCR 0x01008
  137. #define BLSP1_QUP1_SPI_APPS_CBCR 0x02004
  138. #define BLSP1_QUP1_I2C_APPS_CBCR 0x02008
  139. #define BLSP1_QUP1_I2C_APPS_CMD_RCGR 0x0200C
  140. #define BLSP1_QUP1_I2C_APPS_CFG_RCGR 0x02010
  141. #define BLSP1_QUP2_I2C_APPS_CMD_RCGR 0x03000
  142. #define BLSP1_QUP2_I2C_APPS_CFG_RCGR 0x03004
  143. #define BLSP1_QUP3_I2C_APPS_CMD_RCGR 0x04000
  144. #define BLSP1_QUP3_I2C_APPS_CFG_RCGR 0x04004
  145. #define BLSP1_QUP4_I2C_APPS_CMD_RCGR 0x05000
  146. #define BLSP1_QUP4_I2C_APPS_CFG_RCGR 0x05004
  147. #define BLSP1_QUP1_SPI_APPS_CMD_RCGR 0x02024
  148. #define BLSP1_QUP1_SPI_APPS_CFG_RCGR 0x02028
  149. #define BLSP1_QUP1_SPI_APPS_M 0x0202C
  150. #define BLSP1_QUP1_SPI_APPS_N 0x02030
  151. #define BLSP1_QUP1_SPI_APPS_D 0x02034
  152. #define BLSP1_UART1_APPS_CBCR 0x0203C
  153. #define BLSP1_UART1_SIM_CBCR 0x02040
  154. #define BLSP1_UART1_APPS_CMD_RCGR 0x02044
  155. #define BLSP1_UART1_APPS_CFG_RCGR 0x02048
  156. #define BLSP1_UART1_APPS_M 0x0204C
  157. #define BLSP1_UART1_APPS_N 0x02050
  158. #define BLSP1_UART1_APPS_D 0x02054
  159. #define BLSP1_QUP2_SPI_APPS_CBCR 0x0300C
  160. #define BLSP1_QUP2_I2C_APPS_CBCR 0x03010
  161. #define BLSP1_QUP2_SPI_APPS_CMD_RCGR 0x03014
  162. #define BLSP1_QUP2_SPI_APPS_CFG_RCGR 0x03018
  163. #define BLSP1_QUP2_SPI_APPS_M 0x0301C
  164. #define BLSP1_QUP2_SPI_APPS_N 0x03020
  165. #define BLSP1_QUP2_SPI_APPS_D 0x03024
  166. #define BLSP1_UART2_APPS_CBCR 0x0302C
  167. #define BLSP1_UART2_SIM_CBCR 0x03030
  168. #define BLSP1_UART2_APPS_CMD_RCGR 0x03034
  169. #define BLSP1_UART2_APPS_CFG_RCGR 0x03038
  170. #define BLSP1_UART2_APPS_M 0x0303C
  171. #define BLSP1_UART2_APPS_N 0x03040
  172. #define BLSP1_UART2_APPS_D 0x03044
  173. #define BLSP1_QUP3_SPI_APPS_CBCR 0x0401C
  174. #define BLSP1_QUP3_I2C_APPS_CBCR 0x04020
  175. #define BLSP1_QUP3_SPI_APPS_CMD_RCGR 0x04024
  176. #define BLSP1_QUP3_SPI_APPS_CFG_RCGR 0x04028
  177. #define BLSP1_QUP3_SPI_APPS_M 0x0402C
  178. #define BLSP1_QUP3_SPI_APPS_N 0x04030
  179. #define BLSP1_QUP3_SPI_APPS_D 0x04034
  180. #define BLSP1_QUP4_SPI_APPS_CBCR 0x0501C
  181. #define BLSP1_QUP4_I2C_APPS_CBCR 0x05020
  182. #define BLSP1_QUP4_SPI_APPS_CMD_RCGR 0x05024
  183. #define BLSP1_QUP4_SPI_APPS_CFG_RCGR 0x05028
  184. #define BLSP1_QUP4_SPI_APPS_M 0x0502C
  185. #define BLSP1_QUP4_SPI_APPS_N 0x05030
  186. #define BLSP1_QUP4_SPI_APPS_D 0x05034
  187. #define BLSP2_AHB_CBCR 0x0B008
  188. #define BLSP2_QUP1_SPI_APPS_CBCR 0x0C004
  189. #define BLSP2_QUP1_I2C_APPS_CBCR 0x0C008
  190. #define BLSP2_QUP1_I2C_APPS_CMD_RCGR 0x0C00C
  191. #define BLSP2_QUP1_I2C_APPS_CFG_RCGR 0x0C010
  192. #define BLSP2_QUP2_I2C_APPS_CMD_RCGR 0x0D000
  193. #define BLSP2_QUP2_I2C_APPS_CFG_RCGR 0x0D004
  194. #define BLSP2_QUP3_I2C_APPS_CMD_RCGR 0x0F000
  195. #define BLSP2_QUP3_I2C_APPS_CFG_RCGR 0x0F004
  196. #define BLSP2_QUP4_I2C_APPS_CMD_RCGR 0x18000
  197. #define BLSP2_QUP4_I2C_APPS_CFG_RCGR 0x18004
  198. #define BLSP2_QUP1_SPI_APPS_CMD_RCGR 0x0C024
  199. #define BLSP2_QUP1_SPI_APPS_CFG_RCGR 0x0C028
  200. #define BLSP2_QUP1_SPI_APPS_M 0x0C02C
  201. #define BLSP2_QUP1_SPI_APPS_N 0x0C030
  202. #define BLSP2_QUP1_SPI_APPS_D 0x0C034
  203. #define BLSP2_UART1_APPS_CBCR 0x0C03C
  204. #define BLSP2_UART1_SIM_CBCR 0x0C040
  205. #define BLSP2_UART1_APPS_CMD_RCGR 0x0C044
  206. #define BLSP2_UART1_APPS_CFG_RCGR 0x0C048
  207. #define BLSP2_UART1_APPS_M 0x0C04C
  208. #define BLSP2_UART1_APPS_N 0x0C050
  209. #define BLSP2_UART1_APPS_D 0x0C054
  210. #define BLSP2_QUP2_SPI_APPS_CBCR 0x0D00C
  211. #define BLSP2_QUP2_I2C_APPS_CBCR 0x0D010
  212. #define BLSP2_QUP2_SPI_APPS_CMD_RCGR 0x0D014
  213. #define BLSP2_QUP2_SPI_APPS_CFG_RCGR 0x0D018
  214. #define BLSP2_QUP2_SPI_APPS_M 0x0D01C
  215. #define BLSP2_QUP2_SPI_APPS_N 0x0D020
  216. #define BLSP2_QUP2_SPI_APPS_D 0x0D024
  217. #define BLSP2_UART2_APPS_CBCR 0x0D02C
  218. #define BLSP2_UART2_SIM_CBCR 0x0D030
  219. #define BLSP2_UART2_APPS_CMD_RCGR 0x0D034
  220. #define BLSP2_UART2_APPS_CFG_RCGR 0x0D038
  221. #define BLSP2_UART2_APPS_M 0x0D03C
  222. #define BLSP2_UART2_APPS_N 0x0D040
  223. #define BLSP2_UART2_APPS_D 0x0D044
  224. #define BLSP2_QUP3_SPI_APPS_CBCR 0x0F01C
  225. #define BLSP2_QUP3_I2C_APPS_CBCR 0x0F020
  226. #define BLSP2_QUP3_SPI_APPS_CMD_RCGR 0x0F024
  227. #define BLSP2_QUP3_SPI_APPS_CFG_RCGR 0x0F028
  228. #define BLSP2_QUP3_SPI_APPS_M 0x0F02C
  229. #define BLSP2_QUP3_SPI_APPS_N 0x0F030
  230. #define BLSP2_QUP3_SPI_APPS_D 0x0F034
  231. #define BLSP2_QUP4_SPI_APPS_CBCR 0x1801C
  232. #define BLSP2_QUP4_I2C_APPS_CBCR 0x18020
  233. #define BLSP2_QUP4_SPI_APPS_CMD_RCGR 0x18024
  234. #define BLSP2_QUP4_SPI_APPS_CFG_RCGR 0x18028
  235. #define BLSP2_QUP4_SPI_APPS_M 0x1802C
  236. #define BLSP2_QUP4_SPI_APPS_N 0x18030
  237. #define BLSP2_QUP4_SPI_APPS_D 0x18034
  238. #define BLSP_UART_SIM_CMD_RCGR 0x0100C
  239. #define BLSP_UART_SIM_CFG_RCGR 0x01010
  240. #define PRNG_XPU_CFG_AHB_CBCR 0x17008
  241. #define PDM_AHB_CBCR 0x44004
  242. #define PDM_XO4_CBCR 0x44008
  243. #define PDM2_CBCR 0x4400C
  244. #define PDM2_CMD_RCGR 0x44010
  245. #define PDM2_CFG_RCGR 0x44014
  246. #define PRNG_AHB_CBCR 0x13004
  247. #define BOOT_ROM_AHB_CBCR 0x1300C
  248. #define CRYPTO_CMD_RCGR 0x16004
  249. #define CRYPTO_CFG_RCGR 0x16008
  250. #define CRYPTO_CBCR 0x1601C
  251. #define CRYPTO_AXI_CBCR 0x16020
  252. #define CRYPTO_AHB_CBCR 0x16024
  253. #define GCC_XO_DIV4_CBCR 0x30034
  254. #define APSS_TCU_CMD_RCGR 0x38000
  255. #define APSS_TCU_CFG_RCGR 0x38004
  256. #define APSS_AXI_CMD_RCGR 0x38048
  257. #define APSS_AXI_CFG_RCGR 0x3804C
  258. #define APSS_AHB_CMD_RCGR 0x46000
  259. #define APSS_AHB_CFG_RCGR 0x46004
  260. #define APSS_AHB_MISC 0x46018
  261. #define APSS_AHB_CBCR 0x4601C
  262. #define APSS_AXI_CBCR 0x46020
  263. #define VENUS_TBU_CBCR 0x12014
  264. #define APSS_TCU_ASYNC_CBCR 0x12018
  265. #define MDP_TBU_CBCR 0x1201C
  266. #define JPEG_TBU_CBCR 0x12034
  267. #define SMMU_CFG_CBCR 0x12038
  268. #define VFE_TBU_CBCR 0x1203C
  269. #define VFE1_TBU_CBCR 0x12090
  270. #define CPP_TBU_CBCR 0x12040
  271. #define RBCPR_GFX_CBCR 0x3A004
  272. #define RBCPR_GFX_CMD_RCGR 0x3A00C
  273. #define RBCPR_GFX_CFG_RCGR 0x3A010
  274. #define APCS_GPLL_ENA_VOTE 0x45000
  275. #define APCS_CLOCK_BRANCH_ENA_VOTE 0x45004
  276. #define APCS_SMMU_CLOCK_BRANCH_ENA_VOTE 0x4500C
  277. #define APCS_CLOCK_SLEEP_ENA_VOTE 0x45008
  278. #define APCS_SMMU_CLOCK_SLEEP_ENA_VOTE 0x45010
  279. #define GCC_DEBUG_CLK_CTL 0x74000
  280. #define CLOCK_FRQ_MEASURE_CTL 0x74004
  281. #define CLOCK_FRQ_MEASURE_STATUS 0x74008
  282. #define PLLTEST_PAD_CFG 0x7400C
  283. #define GP1_CBCR 0x08000
  284. #define GP1_CMD_RCGR 0x08004
  285. #define GP1_CFG_RCGR 0x08008
  286. #define GP1_M 0x0800C
  287. #define GP1_N 0x08010
  288. #define GP1_D 0x08014
  289. #define GP2_CBCR 0x09000
  290. #define GP2_CMD_RCGR 0x09004
  291. #define GP2_CFG_RCGR 0x09008
  292. #define GP2_M 0x0900C
  293. #define GP2_N 0x09010
  294. #define GP2_D 0x09014
  295. #define GP3_CBCR 0x0A000
  296. #define GP3_CMD_RCGR 0x0A004
  297. #define GP3_CFG_RCGR 0x0A008
  298. #define GP3_M 0x0A00C
  299. #define GP3_N 0x0A010
  300. #define GP3_D 0x0A014
  301. #define APSS_MISC 0x60000
  302. #define VCODEC0_CMD_RCGR 0x4C000
  303. #define VCODEC0_CFG_RCGR 0x4C004
  304. #define VCODEC0_M 0x4C008
  305. #define VCODEC0_N 0x4C00C
  306. #define VCODEC0_D 0x4C010
  307. #define VENUS0_VCODEC0_CBCR 0x4C01C
  308. #define VENUS0_CORE0_VCODEC0_CBCR 0x4C02C
  309. #define VENUS0_AHB_CBCR 0x4C020
  310. #define VENUS0_AXI_CBCR 0x4C024
  311. #define PCLK0_CMD_RCGR 0x4D000
  312. #define PCLK0_CFG_RCGR 0x4D004
  313. #define PCLK0_M 0x4D008
  314. #define PCLK0_N 0x4D00C
  315. #define PCLK0_D 0x4D010
  316. #define PCLK1_CMD_RCGR 0x4D0B8
  317. #define PCLK1_CFG_RCGR 0x4D0BC
  318. #define PCLK1_M 0x4D0C0
  319. #define PCLK1_N 0x4D0C4
  320. #define PCLK1_D 0x4D0C8
  321. #define MDP_CMD_RCGR 0x4D014
  322. #define MDP_CFG_RCGR 0x4D018
  323. #define VSYNC_CMD_RCGR 0x4D02C
  324. #define VSYNC_CFG_RCGR 0x4D030
  325. #define BYTE0_CMD_RCGR 0x4D044
  326. #define BYTE0_CFG_RCGR 0x4D048
  327. #define BYTE1_CMD_RCGR 0x4D0B0
  328. #define BYTE1_CFG_RCGR 0x4D0B4
  329. #define ESC0_CMD_RCGR 0x4D05C
  330. #define ESC0_CFG_RCGR 0x4D060
  331. #define ESC1_CMD_RCGR 0x4D0A8
  332. #define ESC1_CFG_RCGR 0x4D0AC
  333. #define MDSS_AHB_CBCR 0x4D07C
  334. #define MDSS_AXI_CBCR 0x4D080
  335. #define MDSS_PCLK0_CBCR 0x4D084
  336. #define MDSS_PCLK1_CBCR 0x4D0A4
  337. #define MDSS_MDP_CBCR 0x4D088
  338. #define MDSS_VSYNC_CBCR 0x4D090
  339. #define MDSS_BYTE0_CBCR 0x4D094
  340. #define MDSS_BYTE1_CBCR 0x4D0A0
  341. #define MDSS_ESC0_CBCR 0x4D098
  342. #define MDSS_ESC1_CBCR 0x4D09C
  343. #define CSI0PHYTIMER_CMD_RCGR 0x4E000
  344. #define CSI0PHYTIMER_CFG_RCGR 0x4E004
  345. #define CAMSS_CSI0PHYTIMER_CBCR 0x4E01C
  346. #define CSI0P_CMD_RCGR 0x58084
  347. #define CSI0P_CFG_RCGR 0x58088
  348. #define CAMSS_CSI0_CSIPHY_3P_CBCR 0x58090
  349. #define CSI1P_CMD_RCGR 0x58094
  350. #define CSI1P_CFG_RCGR 0x58098
  351. #define CAMSS_CSI1_CSIPHY_3P_CBCR 0x580A0
  352. #define CSI2P_CMD_RCGR 0x580A4
  353. #define CSI2P_CFG_RCGR 0x580A8
  354. #define CAMSS_CSI2_CSIPHY_3P_CBCR 0x580B0
  355. #define CSI1PHYTIMER_CMD_RCGR 0x4F000
  356. #define CSI1PHYTIMER_CFG_RCGR 0x4F004
  357. #define CAMSS_CSI1PHYTIMER_CBCR 0x4F01C
  358. #define CSI0_CMD_RCGR 0x4E020
  359. #define CSI2PHYTIMER_CMD_RCGR 0x4F05C
  360. #define CSI2PHYTIMER_CFG_RCGR 0x4F060
  361. #define CAMSS_CSI2PHYTIMER_CBCR 0x4F068
  362. #define CSI0_CFG_RCGR 0x4E024
  363. #define CAMSS_CSI0_CBCR 0x4E03C
  364. #define CAMSS_CSI0_AHB_CBCR 0x4E040
  365. #define CAMSS_CSI0PHY_CBCR 0x4E048
  366. #define CAMSS_CSI0RDI_CBCR 0x4E050
  367. #define CAMSS_CSI0PIX_CBCR 0x4E058
  368. #define CSI1_CMD_RCGR 0x4F020
  369. #define CSI1_CFG_RCGR 0x4F024
  370. #define CAMSS_CSI1_CBCR 0x4F03C
  371. #define CAMSS_CSI1_AHB_CBCR 0x4F040
  372. #define CAMSS_CSI1PHY_CBCR 0x4F048
  373. #define CAMSS_CSI1RDI_CBCR 0x4F050
  374. #define CAMSS_CSI1PIX_CBCR 0x4F058
  375. #define CSI2_CMD_RCGR 0x3C020
  376. #define CSI2_CFG_RCGR 0x3C024
  377. #define CAMSS_CSI2_CBCR 0x3C03C
  378. #define CAMSS_CSI2_AHB_CBCR 0x3C040
  379. #define CAMSS_CSI2PHY_CBCR 0x3C048
  380. #define CAMSS_CSI2RDI_CBCR 0x3C050
  381. #define CAMSS_CSI2PIX_CBCR 0x3C058
  382. #define CAMSS_ISPIF_AHB_CBCR 0x50004
  383. #define CCI_CMD_RCGR 0x51000
  384. #define CCI_CFG_RCGR 0x51004
  385. #define CCI_M 0x51008
  386. #define CCI_N 0x5100C
  387. #define CCI_D 0x51010
  388. #define CAMSS_CCI_CBCR 0x51018
  389. #define CAMSS_CCI_AHB_CBCR 0x5101C
  390. #define MCLK0_CMD_RCGR 0x52000
  391. #define MCLK0_CFG_RCGR 0x52004
  392. #define MCLK0_M 0x52008
  393. #define MCLK0_N 0x5200C
  394. #define MCLK0_D 0x52010
  395. #define CAMSS_MCLK0_CBCR 0x52018
  396. #define MCLK1_CMD_RCGR 0x53000
  397. #define MCLK1_CFG_RCGR 0x53004
  398. #define MCLK1_M 0x53008
  399. #define MCLK1_N 0x5300C
  400. #define MCLK1_D 0x53010
  401. #define CAMSS_MCLK1_CBCR 0x53018
  402. #define MCLK2_CMD_RCGR 0x5C000
  403. #define MCLK2_CFG_RCGR 0x5C004
  404. #define MCLK2_M 0x5C008
  405. #define MCLK2_N 0x5C00C
  406. #define MCLK2_D 0x5C010
  407. #define CAMSS_MCLK2_CBCR 0x5C018
  408. #define MCLK3_CMD_RCGR 0x5E000
  409. #define MCLK3_CFG_RCGR 0x5E004
  410. #define MCLK3_M 0x5E008
  411. #define MCLK3_N 0x5E00C
  412. #define MCLK3_D 0x5E010
  413. #define CAMSS_MCLK3_CBCR 0x5E018
  414. #define CAMSS_GP0_CMD_RCGR 0x54000
  415. #define CAMSS_GP0_CFG_RCGR 0x54004
  416. #define CAMSS_GP0_M 0x54008
  417. #define CAMSS_GP0_N 0x5400C
  418. #define CAMSS_GP0_D 0x54010
  419. #define CAMSS_GP0_CBCR 0x54018
  420. #define CAMSS_GP1_CMD_RCGR 0x55000
  421. #define CAMSS_GP1_CFG_RCGR 0x55004
  422. #define CAMSS_GP1_M 0x55008
  423. #define CAMSS_GP1_N 0x5500C
  424. #define CAMSS_GP1_D 0x55010
  425. #define CAMSS_GP1_CBCR 0x55018
  426. #define CAMSS_TOP_AHB_CBCR 0x5A014
  427. #define CAMSS_AHB_CBCR 0x56004
  428. #define CAMSS_MICRO_BCR 0x56008
  429. #define CAMSS_MICRO_AHB_CBCR 0x5600C
  430. #define JPEG0_CMD_RCGR 0x57000
  431. #define JPEG0_CFG_RCGR 0x57004
  432. #define CAMSS_JPEG0_CBCR 0x57020
  433. #define CAMSS_JPEG_AHB_CBCR 0x57024
  434. #define CAMSS_JPEG_AXI_CBCR 0x57028
  435. #define VFE0_CMD_RCGR 0x58000
  436. #define VFE0_CFG_RCGR 0x58004
  437. #define CPP_CMD_RCGR 0x58018
  438. #define CPP_CFG_RCGR 0x5801C
  439. #define CAMSS_VFE0_CBCR 0x58038
  440. #define CAMSS_CPP_CBCR 0x5803C
  441. #define CAMSS_CPP_AHB_CBCR 0x58040
  442. #define CAMSS_VFE_AHB_CBCR 0x58044
  443. #define CAMSS_VFE_AXI_CBCR 0x58048
  444. #define CAMSS_CSI_VFE0_CBCR 0x58050
  445. #define VFE1_CMD_RCGR 0x58054
  446. #define VFE1_CFG_RCGR 0x58058
  447. #define CAMSS_VFE1_CBCR 0x5805C
  448. #define CAMSS_VFE1_AHB_CBCR 0x58060
  449. #define CAMSS_CPP_AXI_CBCR 0x58064
  450. #define CAMSS_VFE1_AXI_CBCR 0x58068
  451. #define CAMSS_CSI_VFE1_CBCR 0x58074
  452. #define GFX3D_CMD_RCGR 0x59000
  453. #define GFX3D_CFG_RCGR 0x59004
  454. #define OXILI_GFX3D_CBCR 0x59020
  455. #define OXILI_AHB_CBCR 0x59028
  456. #define BIMC_GPU_CBCR 0x59030
  457. #define OXILI_TIMER_CBCR 0x59040
  458. #define CAMSS_TOP_AHB_CMD_RCGR 0x5A000
  459. #define CAMSS_TOP_AHB_CFG_RCGR 0x5A004
  460. #define CAMSS_TOP_AHB_M 0x5A008
  461. #define CAMSS_TOP_AHB_N 0x5A00C
  462. #define CAMSS_TOP_AHB_D 0x5A010
  463. #define GX_DOMAIN_MISC 0x5B00C
  464. #define APC0_VOLTAGE_DROOP_DETECTOR_GPLL0_CBCR 0x78004
  465. #define APC0_VOLTAGE_DROOP_DETECTOR_CMD_RCGR 0x78008
  466. #define APC0_VOLTAGE_DROOP_DETECTOR_CFG_RCGR 0x7800C
  467. #define APC1_VOLTAGE_DROOP_DETECTOR_GPLL0_CBCR 0x79004
  468. #define APC1_VOLTAGE_DROOP_DETECTOR_CMD_RCGR 0x79008
  469. #define APC1_VOLTAGE_DROOP_DETECTOR_CFG_RCGR 0x7900C
  470. #define QUSB_REF_CLK_EN 0x41030
  471. #define USB_SS_REF_CLK_EN 0x3F07C
  472. /* Mux source select values */
  473. #define xo_src_val 0
  474. #define xo_a_src_val 0
  475. #define xo_pipe_src_val 1
  476. #define gpll0_src_val 1
  477. #define gpll0_main_src_val 2 /* cci_clk_src */
  478. #define gpll0_main_mock_src_val 3 /* usb30_mock_utmi_clk_src */
  479. #define gpll0_main_div2_usb3_src_val 2 /* usb30_master_clk_src
  480. * rbcpr_gfx_clk_src
  481. */
  482. #define gpll0_main_div2_src_val 4
  483. #define gpll0_main_div2_cci_src_val 3 /* cci_clk_src */
  484. #define gpll0_main_div2_mm_src_val 5 /* gfx3d_clk_src vfe0_clk_src
  485. * vfe1_clk_src cpp_clk_src
  486. * csi0_clk_src csi0p_clk_src
  487. * csi1p_clk_src csi2p_clk_src
  488. */
  489. #define gpll0_main_div2_axi_src_val 6 /* apss_axi_clk_src */
  490. #define gpll2_src_val 4 /* vfe0_clk_src vfe1_clk_src
  491. * cpp_clk_src csi0_clk_src
  492. * csi0p_clk_src csi1p_clk_src
  493. * csi2p_clk_src
  494. */
  495. #define gpll2_out_main_src_val 5 /* jpeg0_clk_src csi1_clk_src
  496. * csi2_clk_src
  497. */
  498. #define gpll2_vcodec_src_val 3 /* vcodec0_clk_src */
  499. #define gpll3_src_val 2 /* gfx3d_clk_src */
  500. #define gpll4_src_val 2 /* sdcc1_apss_clk_src v_droop */
  501. #define gpll4_aux_src_val 2 /* sdcc2_apss_clk_src */
  502. #define gpll4_out_aux_src_val 4 /* gfx3d_clk_src */
  503. #define gpll6_main_src_val 1 /* usb30_mock_utmi_clk_src */
  504. #define gpll6_src_val 2
  505. #define gpll6_main_gfx_src_val 3 /* gfx3d_clk_src */
  506. #define gpll6_main_div2_mock_src_val 2 /* usb30_mock_utmi_clk_src */
  507. #define gpll6_main_div2_src_val 5 /* mclk0_clk_src mclk1_clk_src
  508. * mclk2_clk_src mclk3_clk_src
  509. */
  510. #define gpll6_main_div2_gfx_src_val 6 /* gfx3d_clk_src */
  511. #define gpll6_aux_src_val 2 /* gp1_clk_src gp2_clk_src
  512. * gp3_clk_src camss_gp0_clk_src
  513. * camss_gp1_clk_src
  514. */
  515. #define gpll6_out_aux_src_val 3 /* mdp_clk_src cpp_clk_src */
  516. #define usb3_pipe_src_val 0
  517. #define dsi0_phypll_mm_src_val 1 /* byte0_clk & pclk0_clk */
  518. #define dsi1_phypll_mm_src_val 3 /* byte0_clk & pclk0_clk */
  519. #define dsi0_phypll_clk_mm_src_val 3 /* byte1_clk & pclk1_clk */
  520. #define dsi1_phypll_clk_mm_src_val 1 /* byte1_clk & pclk1_clk */
  521. #define F(f, s, div, m, n) \
  522. { \
  523. .freq_hz = (f), \
  524. .src_clk = &s##_clk_src.c, \
  525. .m_val = (m), \
  526. .n_val = ~((n)-(m)) * !!(n), \
  527. .d_val = ~(n),\
  528. .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \
  529. | BVAL(10, 8, s##_src_val), \
  530. }
  531. #define F_MM(f, s_f, s, div, m, n) \
  532. { \
  533. .freq_hz = (f), \
  534. .src_freq = (s_f), \
  535. .src_clk = &s##_clk_src.c, \
  536. .m_val = (m), \
  537. .n_val = ~((n)-(m)) * !!(n), \
  538. .d_val = ~(n),\
  539. .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \
  540. | BVAL(10, 8, s##_src_val), \
  541. }
  542. #define VDD_DIG_FMAX_MAP1(l1, f1) \
  543. .vdd_class = &vdd_dig, \
  544. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  545. [VDD_DIG_##l1] = (f1), \
  546. }, \
  547. .num_fmax = VDD_DIG_NUM
  548. #define VDD_DIG_FMAX_MAP2(l1, f1, l2, f2) \
  549. .vdd_class = &vdd_dig, \
  550. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  551. [VDD_DIG_##l1] = (f1), \
  552. [VDD_DIG_##l2] = (f2), \
  553. }, \
  554. .num_fmax = VDD_DIG_NUM
  555. #define VDD_DIG_FMAX_MAP3(l1, f1, l2, f2, l3, f3) \
  556. .vdd_class = &vdd_dig, \
  557. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  558. [VDD_DIG_##l1] = (f1), \
  559. [VDD_DIG_##l2] = (f2), \
  560. [VDD_DIG_##l3] = (f3), \
  561. }, \
  562. .num_fmax = VDD_DIG_NUM
  563. #define VDD_DIG_FMAX_MAP4(l1, f1, l2, f2, l3, f3, l4, f4) \
  564. .vdd_class = &vdd_dig, \
  565. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  566. [VDD_DIG_##l1] = (f1), \
  567. [VDD_DIG_##l2] = (f2), \
  568. [VDD_DIG_##l3] = (f3), \
  569. [VDD_DIG_##l4] = (f4), \
  570. }, \
  571. .num_fmax = VDD_DIG_NUM
  572. #define VDD_DIG_FMAX_MAP5(l1, f1, l2, f2, l3, f3, l4, f4, l5, f5) \
  573. .vdd_class = &vdd_dig, \
  574. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  575. [VDD_DIG_##l1] = (f1), \
  576. [VDD_DIG_##l2] = (f2), \
  577. [VDD_DIG_##l3] = (f3), \
  578. [VDD_DIG_##l4] = (f4), \
  579. [VDD_DIG_##l5] = (f5), \
  580. }, \
  581. .num_fmax = VDD_DIG_NUM
  582. #define VDD_DIG_FMAX_MAP6(l1, f1, l2, f2, l3, f3, l4, f4, l5, f5, l6, f6) \
  583. .vdd_class = &vdd_dig, \
  584. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  585. [VDD_DIG_##l1] = (f1), \
  586. [VDD_DIG_##l2] = (f2), \
  587. [VDD_DIG_##l3] = (f3), \
  588. [VDD_DIG_##l4] = (f4), \
  589. [VDD_DIG_##l5] = (f5), \
  590. [VDD_DIG_##l6] = (f6), \
  591. }, \
  592. .num_fmax = VDD_DIG_NUM
  593. #define VDD_DIG_FMAX_MAP7(l1, f1, l2, f2, l3, f3, l4, f4, l5, f5, l6, \
  594. f6, l7, f7) \
  595. .vdd_class = &vdd_dig, \
  596. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  597. [VDD_DIG_##l1] = (f1), \
  598. [VDD_DIG_##l2] = (f2), \
  599. [VDD_DIG_##l3] = (f3), \
  600. [VDD_DIG_##l4] = (f4), \
  601. [VDD_DIG_##l5] = (f5), \
  602. [VDD_DIG_##l6] = (f6), \
  603. [VDD_DIG_##l7] = (f7), \
  604. }, \
  605. .num_fmax = VDD_DIG_NUM
  606. enum vdd_dig_levels {
  607. VDD_DIG_NONE,
  608. VDD_DIG_MIN_SVS,
  609. VDD_DIG_LOW_SVS,
  610. VDD_DIG_SVS,
  611. VDD_DIG_SVS_PLUS,
  612. VDD_DIG_NOM,
  613. VDD_DIG_NOM_PLUS,
  614. VDD_DIG_HIGH,
  615. VDD_DIG_NUM
  616. };
  617. static int vdd_level[] = {
  618. RPM_REGULATOR_LEVEL_NONE, /* VDD_DIG_NONE */
  619. RPM_REGULATOR_LEVEL_MIN_SVS, /* VDD_DIG_MIN_SVS */
  620. RPM_REGULATOR_LEVEL_LOW_SVS, /* VDD_DIG_LOW_SVS*/
  621. RPM_REGULATOR_LEVEL_SVS, /* VDD_DIG_SVS */
  622. RPM_REGULATOR_LEVEL_SVS_PLUS, /* VDD_DIG_SVS_PLUS */
  623. RPM_REGULATOR_LEVEL_NOM, /* VDD_DIG_NOM */
  624. RPM_REGULATOR_LEVEL_NOM_PLUS, /* VDD_DIG_NOM_PLUS */
  625. RPM_REGULATOR_LEVEL_TURBO, /* VDD_DIG_TURBO */
  626. };
  627. static DEFINE_VDD_REGULATORS(vdd_dig, VDD_DIG_NUM, 1, vdd_level, NULL);
  628. static DEFINE_VDD_REGS_INIT(vdd_gfx, 1);
  629. #define RPM_MISC_CLK_TYPE 0x306b6c63
  630. #define RPM_BUS_CLK_TYPE 0x316b6c63
  631. #define RPM_MEM_CLK_TYPE 0x326b6c63
  632. #define RPM_IPA_CLK_TYPE 0x00617069
  633. #define RPM_SMD_KEY_ENABLE 0x62616E45
  634. #define XO_ID 0x0
  635. #define QDSS_ID 0x1
  636. #define BUS_SCALING 0x2
  637. #define PCNOC_ID 0x0
  638. #define SNOC_ID 0x1
  639. #define SYSMMNOC_ID 0x2
  640. #define BIMC_ID 0x0
  641. #define IPA_ID 0x0
  642. #define BB_CLK1_ID 0x1
  643. #define BB_CLK2_ID 0x2
  644. #define RF_CLK2_ID 0x5
  645. #define RF_CLK3_ID 0x8
  646. #define DIV_CLK1_ID 0xB
  647. #define DIV_CLK2_ID 0xC
  648. #endif