msm-clocks-hwio-8952.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. /*
  2. * Copyright (c) 2014-2016, 2018, 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_8952_HWIO_H
  14. #define __MSM_CLOCKS_8952_HWIO_H
  15. #define GPLL0_MODE 0x21000
  16. #define GPLL0_STATUS 0x2101C
  17. #define GPLL6_STATUS 0x3701C
  18. #define GPLL3_MODE 0x22000
  19. #define GPLL4_MODE 0x24000
  20. #define GPLL4_STATUS 0x24024
  21. #define GX_DOMAIN_MISC 0x5B00C
  22. #define SYS_MM_NOC_AXI_CBCR 0x3D008
  23. #define BIMC_GFX_CBCR 0x59034
  24. #define MSS_CFG_AHB_CBCR 0x49000
  25. #define MSS_Q6_BIMC_AXI_CBCR 0x49004
  26. #define USB_HS_BCR 0x41000
  27. #define USB_HS_SYSTEM_CBCR 0x41004
  28. #define USB_HS_AHB_CBCR 0x41008
  29. #define USB_HS_PHY_CFG_AHB_CBCR 0x41030
  30. #define USB_HS_SYSTEM_CMD_RCGR 0x41010
  31. #define USB2A_PHY_SLEEP_CBCR 0x4102C
  32. #define USB_FS_SYSTEM_CBCR 0x3F004
  33. #define USB_FS_AHB_CBCR 0x3F008
  34. #define USB_FS_IC_CBCR 0x3F030
  35. #define USB_FS_SYSTEM_CMD_RCGR 0x3F010
  36. #define USB_FS_IC_CMD_RCGR 0x3F034
  37. #define USB2_HS_PHY_ONLY_BCR 0x41034
  38. #define QUSB2_PHY_BCR 0x4103C
  39. #define SDCC1_APPS_CMD_RCGR 0x42004
  40. #define SDCC1_APPS_CBCR 0x42018
  41. #define SDCC1_AHB_CBCR 0x4201C
  42. #define SDCC1_ICE_CORE_CMD_RCGR 0x5D000
  43. #define SDCC1_ICE_CORE_CBCR 0x5D014
  44. #define SDCC2_APPS_CMD_RCGR 0x43004
  45. #define SDCC2_APPS_CBCR 0x43018
  46. #define SDCC2_AHB_CBCR 0x4301C
  47. #define BLSP1_AHB_CBCR 0x01008
  48. #define BLSP1_QUP1_SPI_APPS_CBCR 0x02004
  49. #define BLSP1_QUP1_I2C_APPS_CBCR 0x02008
  50. #define BLSP1_QUP1_I2C_APPS_CMD_RCGR 0x0200C
  51. #define BLSP1_QUP2_I2C_APPS_CMD_RCGR 0x03000
  52. #define BLSP1_QUP3_I2C_APPS_CMD_RCGR 0x04000
  53. #define BLSP1_QUP4_I2C_APPS_CMD_RCGR 0x05000
  54. #define BLSP1_QUP1_SPI_APPS_CMD_RCGR 0x02024
  55. #define BLSP1_UART1_APPS_CBCR 0x0203C
  56. #define BLSP1_UART1_APPS_CMD_RCGR 0x02044
  57. #define BLSP1_QUP2_SPI_APPS_CBCR 0x0300C
  58. #define BLSP1_QUP2_I2C_APPS_CBCR 0x03010
  59. #define BLSP1_QUP2_SPI_APPS_CMD_RCGR 0x03014
  60. #define BLSP1_UART2_APPS_CBCR 0x0302C
  61. #define BLSP1_UART2_APPS_CMD_RCGR 0x03034
  62. #define BLSP1_QUP3_SPI_APPS_CBCR 0x0401C
  63. #define BLSP1_QUP3_I2C_APPS_CBCR 0x04020
  64. #define BLSP1_QUP3_SPI_APPS_CMD_RCGR 0x04024
  65. #define BLSP1_QUP4_SPI_APPS_CBCR 0x0501C
  66. #define BLSP1_QUP4_I2C_APPS_CBCR 0x05020
  67. #define BLSP1_QUP4_SPI_APPS_CMD_RCGR 0x05024
  68. #define BLSP2_AHB_CBCR 0x0B008
  69. #define BLSP2_QUP1_SPI_APPS_CBCR 0x0C004
  70. #define BLSP2_QUP1_I2C_APPS_CBCR 0x0C008
  71. #define BLSP2_QUP1_I2C_APPS_CMD_RCGR 0x0C00C
  72. #define BLSP2_QUP2_I2C_APPS_CMD_RCGR 0x0D000
  73. #define BLSP2_QUP3_I2C_APPS_CMD_RCGR 0x0F000
  74. #define BLSP2_QUP4_I2C_APPS_CMD_RCGR 0x18000
  75. #define BLSP2_QUP1_SPI_APPS_CMD_RCGR 0x0C024
  76. #define BLSP2_UART1_APPS_CBCR 0x0C03C
  77. #define BLSP2_UART1_APPS_CMD_RCGR 0x0C044
  78. #define BLSP2_QUP2_SPI_APPS_CBCR 0x0D00C
  79. #define BLSP2_QUP2_I2C_APPS_CBCR 0x0D010
  80. #define BLSP2_QUP2_SPI_APPS_CMD_RCGR 0x0D014
  81. #define BLSP2_UART2_APPS_CBCR 0x0D02C
  82. #define BLSP2_UART2_APPS_CMD_RCGR 0x0D034
  83. #define BLSP2_QUP3_SPI_APPS_CBCR 0x0F01C
  84. #define BLSP2_QUP3_I2C_APPS_CBCR 0x0F020
  85. #define BLSP2_QUP3_SPI_APPS_CMD_RCGR 0x0F024
  86. #define BLSP2_QUP4_SPI_APPS_CBCR 0x1801C
  87. #define BLSP2_QUP4_I2C_APPS_CBCR 0x18020
  88. #define BLSP2_QUP4_SPI_APPS_CMD_RCGR 0x18024
  89. #define PDM_AHB_CBCR 0x44004
  90. #define PDM2_CBCR 0x4400C
  91. #define PDM2_CMD_RCGR 0x44010
  92. #define PRNG_AHB_CBCR 0x13004
  93. #define BOOT_ROM_AHB_CBCR 0x1300C
  94. #define CRYPTO_CMD_RCGR 0x16004
  95. #define CRYPTO_CBCR 0x1601C
  96. #define CRYPTO_AXI_CBCR 0x16020
  97. #define CRYPTO_AHB_CBCR 0x16024
  98. #define GCC_XO_DIV4_CBCR 0x30034
  99. #define APSS_AHB_CMD_RCGR 0x46000
  100. #define GCC_PLLTEST_PAD_CFG 0x7400C
  101. #define GFX_TBU_CBCR 0x12010
  102. #define VENUS_TBU_CBCR 0x12014
  103. #define APSS_TCU_CBCR 0x12018
  104. #define MDP_TBU_CBCR 0x1201C
  105. #define GFX_TCU_CBCR 0x12020
  106. #define JPEG_TBU_CBCR 0x12034
  107. #define SMMU_CFG_CBCR 0x12038
  108. #define QDSS_DAP_CBCR 0x29084
  109. #define VFE_TBU_CBCR 0x1203C
  110. #define VFE1_TBU_CBCR 0x12090
  111. #define CPP_TBU_CBCR 0x12040
  112. #define APCS_GPLL_ENA_VOTE 0x45000
  113. #define APCS_CLOCK_BRANCH_ENA_VOTE 0x45004
  114. #define APCS_SMMU_CLOCK_BRANCH_ENA_VOTE 0x4500C
  115. #define GCC_DEBUG_CLK_CTL 0x74000
  116. #define CLOCK_FRQ_MEASURE_CTL 0x74004
  117. #define CLOCK_FRQ_MEASURE_STATUS 0x74008
  118. #define GP1_CBCR 0x08000
  119. #define GP1_CMD_RCGR 0x08004
  120. #define GP1_CFG_RCGR 0x08008
  121. #define GP2_CBCR 0x09000
  122. #define GP2_CMD_RCGR 0x09004
  123. #define GP3_CBCR 0x0A000
  124. #define GP3_CMD_RCGR 0x0A004
  125. #define VCODEC0_CMD_RCGR 0x4C000
  126. #define VENUS0_VCODEC0_CBCR 0x4C01C
  127. #define VENUS0_CORE0_VCODEC0_CBCR 0x4C02C
  128. #define VENUS0_CORE1_VCODEC0_CBCR 0x4C034
  129. #define VENUS0_AHB_CBCR 0x4C020
  130. #define VENUS0_AXI_CBCR 0x4C024
  131. #define PCLK0_CMD_RCGR 0x4D000
  132. #define MDP_CMD_RCGR 0x4D014
  133. #define VSYNC_CMD_RCGR 0x4D02C
  134. #define BYTE0_CMD_RCGR 0x4D044
  135. #define ESC0_CMD_RCGR 0x4D05C
  136. #define MDSS_AHB_CBCR 0x4D07C
  137. #define MDSS_AXI_CBCR 0x4D080
  138. #define MDSS_PCLK0_CBCR 0x4D084
  139. #define MDSS_MDP_CBCR 0x4D088
  140. #define MDSS_VSYNC_CBCR 0x4D090
  141. #define MDSS_BYTE0_CBCR 0x4D094
  142. #define MDSS_ESC0_CBCR 0x4D098
  143. #define CSI0PHYTIMER_CMD_RCGR 0x4E000
  144. #define CAMSS_CSI0PHYTIMER_CBCR 0x4E01C
  145. #define CSI0_CMD_RCGR 0x4E020
  146. #define CAMSS_CSI0_CBCR 0x4E03C
  147. #define CAMSS_CSI0_AHB_CBCR 0x4E040
  148. #define CAMSS_CSI0PHY_CBCR 0x4E048
  149. #define CAMSS_CSI0RDI_CBCR 0x4E050
  150. #define CAMSS_CSI0PIX_CBCR 0x4E058
  151. #define CSI1PHYTIMER_CMD_RCGR 0x4F000
  152. #define CSI1_CMD_RCGR 0x4F020
  153. #define CAMSS_CSI1_CBCR 0x4F03C
  154. #define CAMSS_CSI1PHYTIMER_CBCR 0x4F01C
  155. #define CAMSS_CSI1_AHB_CBCR 0x4F040
  156. #define CAMSS_CSI1PHY_CBCR 0x4F048
  157. #define CAMSS_CSI1RDI_CBCR 0x4F050
  158. #define CAMSS_CSI1PIX_CBCR 0x4F058
  159. #define CSI2_CMD_RCGR 0x3C020
  160. #define CAMSS_CSI2_CBCR 0x3C03C
  161. #define CAMSS_CSI2_AHB_CBCR 0x3C040
  162. #define CAMSS_CSI2PHY_CBCR 0x3C048
  163. #define CAMSS_CSI2RDI_CBCR 0x3C050
  164. #define CAMSS_CSI2PIX_CBCR 0x3C058
  165. #define CAMSS_ISPIF_AHB_CBCR 0x50004
  166. #define CCI_CMD_RCGR 0x51000
  167. #define CAMSS_CCI_CBCR 0x51018
  168. #define CAMSS_CCI_AHB_CBCR 0x5101C
  169. #define MCLK0_CMD_RCGR 0x52000
  170. #define CAMSS_MCLK0_CBCR 0x52018
  171. #define MCLK1_CMD_RCGR 0x53000
  172. #define CAMSS_MCLK1_CBCR 0x53018
  173. #define MCLK2_CMD_RCGR 0x5C000
  174. #define CAMSS_MCLK2_CBCR 0x5C018
  175. #define MM_GP0_CMD_RCGR 0x54000
  176. #define CAMSS_GP0_CBCR 0x54018
  177. #define MM_GP1_CMD_RCGR 0x55000
  178. #define CAMSS_GP1_CBCR 0x55018
  179. #define CAMSS_TOP_AHB_CBCR 0x5A014
  180. #define CAMSS_AHB_CBCR 0x56004
  181. #define CAMSS_MICRO_AHB_CBCR 0x5600C
  182. #define CAMSS_MICRO_BCR 0x56008
  183. #define JPEG0_CMD_RCGR 0x57000
  184. #define CAMSS_JPEG0_CBCR 0x57020
  185. #define CAMSS_JPEG_AHB_CBCR 0x57024
  186. #define CAMSS_JPEG_AXI_CBCR 0x57028
  187. #define VFE0_CMD_RCGR 0x58000
  188. #define CPP_CMD_RCGR 0x58018
  189. #define CAMSS_VFE0_CBCR 0x58038
  190. #define CAMSS_CPP_CBCR 0x5803C
  191. #define CAMSS_CPP_AHB_CBCR 0x58040
  192. #define CAMSS_VFE_AHB_CBCR 0x58044
  193. #define CAMSS_VFE_AXI_CBCR 0x58048
  194. #define CAMSS_CSI_VFE0_CBCR 0x58050
  195. #define VFE1_CMD_RCGR 0x58054
  196. #define CAMSS_VFE1_CBCR 0x5805C
  197. #define CAMSS_VFE1_AHB_CBCR 0x58060
  198. #define CAMSS_CPP_AXI_CBCR 0x58064
  199. #define CAMSS_VFE1_AXI_CBCR 0x58068
  200. #define CAMSS_CSI_VFE1_CBCR 0x58074
  201. #define GFX3D_CMD_RCGR 0x59000
  202. #define OXILI_GFX3D_CBCR 0x59020
  203. #define OXILI_GMEM_CBCR 0x59024
  204. #define OXILI_AHB_CBCR 0x59028
  205. #define OXILI_TIMER_CBCR 0x59040
  206. #define OXILI_AON_CBCR 0x5904C
  207. #define CAMSS_TOP_AHB_CMD_RCGR 0x5A000
  208. #define BIMC_GPU_CBCR 0x59030
  209. #define GTCU_AHB_CBCR 0x12044
  210. #define IPA_TBU_CBCR 0x120A0
  211. #define SYSTEM_MM_NOC_CMD_RCGR 0x3D000
  212. #define USB_FS_BCR 0x3F000
  213. #define APCS_CLOCK_SLEEP_ENA_VOTE 0x45008
  214. #define BYTE1_CMD_RCGR 0x4D0B0
  215. #define ESC1_CMD_RCGR 0x4D0A8
  216. #define PCLK1_CMD_RCGR 0x4D0B8
  217. #define MDSS_BYTE1_CBCR 0x4D0A0
  218. #define MDSS_ESC1_CBCR 0x4D09C
  219. #define MDSS_PCLK1_CBCR 0x4D0A4
  220. #define DCC_CBCR 0x77004
  221. #define RPM_MISC_CLK_TYPE 0x306b6c63
  222. #define RPM_BUS_CLK_TYPE 0x316b6c63
  223. #define RPM_MEM_CLK_TYPE 0x326b6c63
  224. #define RPM_IPA_CLK_TYPE 0x617069
  225. #define RPM_SMD_KEY_ENABLE 0x62616E45
  226. #define CXO_CLK_SRC_ID 0x0
  227. #define QDSS_CLK_ID 0x1
  228. #define PNOC_CLK_ID 0x0
  229. #define SNOC_CLK_ID 0x1
  230. #define SYSMMNOC_CLK_ID 0x2
  231. #define BIMC_CLK_ID 0x0
  232. #define BIMC_GPU_CLK_ID 0x2
  233. #define IPA_CLK_ID 0x0
  234. #define BUS_SCALING 0x2
  235. /* XO clock */
  236. #define BB_CLK1_ID 0x1
  237. #define BB_CLK2_ID 0x2
  238. #define RF_CLK2_ID 0x5
  239. #define LN_BB_CLK_ID 0x8
  240. #define DIV_CLK1_ID 0xb
  241. #define DIV_CLK2_ID 0xc
  242. #define APCS_CCI_PLL_MODE 0x00000
  243. #define APCS_CCI_PLL_L_VAL 0x00004
  244. #define APCS_CCI_PLL_M_VAL 0x00008
  245. #define APCS_CCI_PLL_N_VAL 0x0000C
  246. #define APCS_CCI_PLL_USER_CTL 0x00010
  247. #define APCS_CCI_PLL_CONFIG_CTL 0x00014
  248. #define APCS_CCI_PLL_STATUS 0x0001C
  249. #define APCS_C0_PLL_MODE 0x00000
  250. #define APCS_C0_PLL_L_VAL 0x00004
  251. #define APCS_C0_PLL_M_VAL 0x00008
  252. #define APCS_C0_PLL_N_VAL 0x0000C
  253. #define APCS_C0_PLL_USER_CTL 0x00010
  254. #define APCS_C0_PLL_CONFIG_CTL 0x00014
  255. #define APCS_C0_PLL_STATUS 0x0001C
  256. #define APCS_C1_PLL_MODE 0x00000
  257. #define APCS_C1_PLL_L_VAL 0x00004
  258. #define APCS_C1_PLL_M_VAL 0x00008
  259. #define APCS_C1_PLL_N_VAL 0x0000C
  260. #define APCS_C1_PLL_USER_CTL 0x00010
  261. #define APCS_C1_PLL_CONFIG_CTL 0x00014
  262. #define APCS_C1_PLL_STATUS 0x0001C
  263. #define CLKFLAG_WAKEUP_CYCLES 0x0
  264. #define CLKFLAG_SLEEP_CYCLES 0x0
  265. /* Mux source select values */
  266. #define xo_source_val 0
  267. #define xo_a_source_val 0
  268. #define gpll0_source_val 1
  269. #define gpll3_source_val 2
  270. #define gpll0_out_main_source_val 1 /* sdcc1_ice_core */
  271. /* cci_clk_src and usb_fs_system_clk_src */
  272. #define gpll0_out_aux_source_val 2
  273. #define gpll4_source_val 2 /* sdcc1_apss_clk_src */
  274. #define gpll4_out_source_val 3 /* sdcc1_apss_clk_src */
  275. #define gpll6_source_val 2 /* mclk0_2_clk_src */
  276. #define gpll6_aux_source_val 3 /* gfx3d_clk_src */
  277. #define gpll6_out_main_source_val 1 /* usb_fs_ic_clk_src */
  278. #define dsi0_phypll_source_val 1
  279. #define dsi0_0phypll_source_val 1 /* byte0_clk & pclk0_clk */
  280. #define dsi0_1phypll_source_val 3 /* byte1_clk & pclk1_clk */
  281. #define dsi1_0phypll_source_val 3 /* byte0_clk & pclk0_clk */
  282. #define dsi1_1phypll_source_val 1 /* byte1_clk & pclk1_clk */
  283. #define F(f, s, div, m, n) \
  284. { \
  285. .freq_hz = (f), \
  286. .src_clk = &s##_clk_src.c, \
  287. .m_val = (m), \
  288. .n_val = ~((n)-(m)) * !!(n), \
  289. .d_val = ~(n),\
  290. .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \
  291. | BVAL(10, 8, s##_source_val), \
  292. }
  293. #define F_SLEW(f, s_f, s, div, m, n) \
  294. { \
  295. .freq_hz = (f), \
  296. .src_freq = (s_f), \
  297. .src_clk = &s##_clk_src.c, \
  298. .m_val = (m), \
  299. .n_val = ~((n)-(m)) * !!(n), \
  300. .d_val = ~(n),\
  301. .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \
  302. | BVAL(10, 8, s##_source_val), \
  303. }
  304. #define F_APCS_PLL(f, l, m, n, pre_div, post_div, vco) \
  305. { \
  306. .freq_hz = (f), \
  307. .l_val = (l), \
  308. .m_val = (m), \
  309. .n_val = (n), \
  310. .pre_div_val = BVAL(12, 12, (pre_div)), \
  311. .post_div_val = BVAL(9, 8, (post_div)), \
  312. .vco_val = BVAL(29, 28, (vco)), \
  313. }
  314. #define VDD_DIG_FMAX_MAP1(l1, f1) \
  315. .vdd_class = &vdd_dig, \
  316. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  317. [VDD_DIG_##l1] = (f1), \
  318. }, \
  319. .num_fmax = VDD_DIG_NUM
  320. #define VDD_DIG_FMAX_MAP2(l1, f1, l2, f2) \
  321. .vdd_class = &vdd_dig, \
  322. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  323. [VDD_DIG_##l1] = (f1), \
  324. [VDD_DIG_##l2] = (f2), \
  325. }, \
  326. .num_fmax = VDD_DIG_NUM
  327. # define OVERRIDE_FMAX1(clkname, l1, f1) \
  328. clkname##_clk_src.c.fmax[VDD_DIG_##l1] = (f1)
  329. # define OVERRIDE_FMAX2(clkname, l1, f1, l2, f2) \
  330. clkname##_clk_src.c.fmax[VDD_DIG_##l1] = (f1); \
  331. clkname##_clk_src.c.fmax[VDD_DIG_##l2] = (f2)
  332. #define VDD_DIG_FMAX_MAP3(l1, f1, l2, f2, l3, f3) \
  333. .vdd_class = &vdd_dig, \
  334. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  335. [VDD_DIG_##l1] = (f1), \
  336. [VDD_DIG_##l2] = (f2), \
  337. [VDD_DIG_##l3] = (f3), \
  338. }, \
  339. .num_fmax = VDD_DIG_NUM
  340. # define OVERRIDE_FMAX3(clkname, l1, f1, l2, f2, l3, f3) \
  341. clkname##_clk_src.c.fmax[VDD_DIG_##l1] = (f1);\
  342. clkname##_clk_src.c.fmax[VDD_DIG_##l2] = (f2);\
  343. clkname##_clk_src.c.fmax[VDD_DIG_##l3] = (f3)
  344. # define OVERRIDE_FMAX4(clkname, l1, f1, l2, f2, l3, f3, l4, f4) \
  345. clkname##_clk_src.c.fmax[VDD_DIG_##l1] = (f1);\
  346. clkname##_clk_src.c.fmax[VDD_DIG_##l2] = (f2);\
  347. clkname##_clk_src.c.fmax[VDD_DIG_##l3] = (f3);\
  348. clkname##_clk_src.c.fmax[VDD_DIG_##l4] = (f4)
  349. #define VDD_DIG_FMAX_MAP5(l1, f1, l2, f2, l3, f3, l4, f4, l5, f5) \
  350. .vdd_class = &vdd_dig, \
  351. .fmax = (unsigned long[VDD_DIG_NUM]) { \
  352. [VDD_DIG_##l1] = (f1),\
  353. [VDD_DIG_##l2] = (f2),\
  354. [VDD_DIG_##l3] = (f3),\
  355. [VDD_DIG_##l4] = (f4),\
  356. [VDD_DIG_##l5] = (f5),\
  357. },\
  358. .num_fmax = VDD_DIG_NUM
  359. #define OVERRIDE_FMAX5(clkname, l1, f1, l2, f2, l3, f3, l4, f4, l5, f5) \
  360. clkname##_clk_src.c.fmax[VDD_DIG_##l1] = (f1);\
  361. clkname##_clk_src.c.fmax[VDD_DIG_##l2] = (f2);\
  362. clkname##_clk_src.c.fmax[VDD_DIG_##l3] = (f3);\
  363. clkname##_clk_src.c.fmax[VDD_DIG_##l4] = (f4);\
  364. clkname##_clk_src.c.fmax[VDD_DIG_##l5] = (f5)
  365. #define OVERRIDE_FMAX6(clkname, \
  366. l1, f1, l2, f2, l3, f3, l4, f4, l5, f5, l6, f6) \
  367. clkname##_clk_src.c.fmax[VDD_DIG_##l1] = (f1);\
  368. clkname##_clk_src.c.fmax[VDD_DIG_##l2] = (f2);\
  369. clkname##_clk_src.c.fmax[VDD_DIG_##l3] = (f3);\
  370. clkname##_clk_src.c.fmax[VDD_DIG_##l4] = (f4);\
  371. clkname##_clk_src.c.fmax[VDD_DIG_##l5] = (f5);\
  372. clkname##_clk_src.c.fmax[VDD_DIG_##l6] = (f6)
  373. #define OVERRIDE_FTABLE(clkname, ftable, name) \
  374. clkname##_clk_src.freq_tbl = ftable##_##name
  375. enum vdd_dig_levels {
  376. VDD_DIG_NONE,
  377. VDD_DIG_LOWER,
  378. VDD_DIG_LOW,
  379. VDD_DIG_NOMINAL,
  380. VDD_DIG_NOM_PLUS,
  381. VDD_DIG_HIGH,
  382. VDD_DIG_SUPER_TUR,
  383. VDD_DIG_NUM
  384. };
  385. enum vdd_dig_levels_8917 {
  386. VDD_DIG_NONE_8917,
  387. VDD_DIG_LOWER_8917,
  388. VDD_DIG_LOW_8917,
  389. VDD_DIG_NOMINAL_8917,
  390. VDD_DIG_NOM_PLUS_8917,
  391. VDD_DIG_HIGH_8917,
  392. VDD_DIG_NUM_8917
  393. };
  394. enum vdd_hf_pll_levels_8917 {
  395. VDD_HF_PLL_OFF_8917,
  396. VDD_HF_PLL_SVS_8917,
  397. VDD_HF_PLL_NOM_8917,
  398. VDD_HF_PLL_TUR_8917,
  399. VDD_HF_PLL_NUM_8917,
  400. };
  401. enum vdd_sr2_pll_levels_439 {
  402. VDD_SR2_PLL_OFF_439,
  403. VDD_SR2_PLL_SVS_439,
  404. VDD_SR2_PLL_NOM_439,
  405. VDD_SR2_PLL_TUR_439,
  406. VDD_SR2_PLL_NUM_439,
  407. };
  408. enum vdd_dig_levels_439 {
  409. VDD_DIG_NONE_439,
  410. VDD_DIG_LOWER_439,
  411. VDD_DIG_LOW_439,
  412. VDD_DIG_NOMINAL_439,
  413. VDD_DIG_NOM_PLUS_439,
  414. VDD_DIG_HIGH_439,
  415. VDD_DIG_NUM_439
  416. };
  417. enum vdd_hf_pll_levels_439 {
  418. VDD_HF_PLL_OFF_439,
  419. VDD_HF_PLL_SVS_439,
  420. VDD_HF_PLL_NOM_439,
  421. VDD_HF_PLL_TUR_439,
  422. VDD_HF_PLL_NUM_439,
  423. };
  424. static int vdd_corner[] = {
  425. RPM_REGULATOR_LEVEL_NONE, /* VDD_DIG_NONE */
  426. RPM_REGULATOR_LEVEL_SVS, /* VDD_DIG_SVS */
  427. RPM_REGULATOR_LEVEL_SVS_PLUS, /* VDD_DIG_SVS_PLUS */
  428. RPM_REGULATOR_LEVEL_NOM, /* VDD_DIG_NOM */
  429. RPM_REGULATOR_LEVEL_NOM_PLUS, /* VDD_DIG_NOM_PLUS */
  430. RPM_REGULATOR_LEVEL_TURBO, /* VDD_DIG_TURBO */
  431. RPM_REGULATOR_LEVEL_BINNING, /* VDD_DIG_SUPER_TUR */
  432. };
  433. #endif