hi3660-clock.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /*
  2. * Copyright (c) 2016-2017 Linaro Ltd.
  3. * Copyright (c) 2016-2017 HiSilicon Technologies Co., Ltd.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. */
  10. #ifndef __DTS_HI3660_CLOCK_H
  11. #define __DTS_HI3660_CLOCK_H
  12. /* fixed rate clocks */
  13. #define HI3660_CLKIN_SYS 0
  14. #define HI3660_CLKIN_REF 1
  15. #define HI3660_CLK_FLL_SRC 2
  16. #define HI3660_CLK_PPLL0 3
  17. #define HI3660_CLK_PPLL1 4
  18. #define HI3660_CLK_PPLL2 5
  19. #define HI3660_CLK_PPLL3 6
  20. #define HI3660_CLK_SCPLL 7
  21. #define HI3660_PCLK 8
  22. #define HI3660_CLK_UART0_DBG 9
  23. #define HI3660_CLK_UART6 10
  24. #define HI3660_OSC32K 11
  25. #define HI3660_OSC19M 12
  26. #define HI3660_CLK_480M 13
  27. #define HI3660_CLK_INV 14
  28. /* clk in crgctrl */
  29. #define HI3660_FACTOR_UART3 15
  30. #define HI3660_CLK_FACTOR_MMC 16
  31. #define HI3660_CLK_GATE_I2C0 17
  32. #define HI3660_CLK_GATE_I2C1 18
  33. #define HI3660_CLK_GATE_I2C2 19
  34. #define HI3660_CLK_GATE_I2C6 20
  35. #define HI3660_CLK_DIV_SYSBUS 21
  36. #define HI3660_CLK_DIV_320M 22
  37. #define HI3660_CLK_DIV_A53 23
  38. #define HI3660_CLK_GATE_SPI0 24
  39. #define HI3660_CLK_GATE_SPI2 25
  40. #define HI3660_PCIEPHY_REF 26
  41. #define HI3660_CLK_ABB_USB 27
  42. #define HI3660_HCLK_GATE_SDIO0 28
  43. #define HI3660_HCLK_GATE_SD 29
  44. #define HI3660_CLK_GATE_AOMM 30
  45. #define HI3660_PCLK_GPIO0 31
  46. #define HI3660_PCLK_GPIO1 32
  47. #define HI3660_PCLK_GPIO2 33
  48. #define HI3660_PCLK_GPIO3 34
  49. #define HI3660_PCLK_GPIO4 35
  50. #define HI3660_PCLK_GPIO5 36
  51. #define HI3660_PCLK_GPIO6 37
  52. #define HI3660_PCLK_GPIO7 38
  53. #define HI3660_PCLK_GPIO8 39
  54. #define HI3660_PCLK_GPIO9 40
  55. #define HI3660_PCLK_GPIO10 41
  56. #define HI3660_PCLK_GPIO11 42
  57. #define HI3660_PCLK_GPIO12 43
  58. #define HI3660_PCLK_GPIO13 44
  59. #define HI3660_PCLK_GPIO14 45
  60. #define HI3660_PCLK_GPIO15 46
  61. #define HI3660_PCLK_GPIO16 47
  62. #define HI3660_PCLK_GPIO17 48
  63. #define HI3660_PCLK_GPIO18 49
  64. #define HI3660_PCLK_GPIO19 50
  65. #define HI3660_PCLK_GPIO20 51
  66. #define HI3660_PCLK_GPIO21 52
  67. #define HI3660_CLK_GATE_SPI3 53
  68. #define HI3660_CLK_GATE_I2C7 54
  69. #define HI3660_CLK_GATE_I2C3 55
  70. #define HI3660_CLK_GATE_SPI1 56
  71. #define HI3660_CLK_GATE_UART1 57
  72. #define HI3660_CLK_GATE_UART2 58
  73. #define HI3660_CLK_GATE_UART4 59
  74. #define HI3660_CLK_GATE_UART5 60
  75. #define HI3660_CLK_GATE_I2C4 61
  76. #define HI3660_CLK_GATE_DMAC 62
  77. #define HI3660_PCLK_GATE_DSS 63
  78. #define HI3660_ACLK_GATE_DSS 64
  79. #define HI3660_CLK_GATE_LDI1 65
  80. #define HI3660_CLK_GATE_LDI0 66
  81. #define HI3660_CLK_GATE_VIVOBUS 67
  82. #define HI3660_CLK_GATE_EDC0 68
  83. #define HI3660_CLK_GATE_TXDPHY0_CFG 69
  84. #define HI3660_CLK_GATE_TXDPHY0_REF 70
  85. #define HI3660_CLK_GATE_TXDPHY1_CFG 71
  86. #define HI3660_CLK_GATE_TXDPHY1_REF 72
  87. #define HI3660_ACLK_GATE_USB3OTG 73
  88. #define HI3660_CLK_GATE_SPI4 74
  89. #define HI3660_CLK_GATE_SD 75
  90. #define HI3660_CLK_GATE_SDIO0 76
  91. #define HI3660_CLK_GATE_UFS_SUBSYS 77
  92. #define HI3660_PCLK_GATE_DSI0 78
  93. #define HI3660_PCLK_GATE_DSI1 79
  94. #define HI3660_ACLK_GATE_PCIE 80
  95. #define HI3660_PCLK_GATE_PCIE_SYS 81
  96. #define HI3660_CLK_GATE_PCIEAUX 82
  97. #define HI3660_PCLK_GATE_PCIE_PHY 83
  98. #define HI3660_CLK_ANDGT_LDI0 84
  99. #define HI3660_CLK_ANDGT_LDI1 85
  100. #define HI3660_CLK_ANDGT_EDC0 86
  101. #define HI3660_CLK_GATE_UFSPHY_GT 87
  102. #define HI3660_CLK_ANDGT_MMC 88
  103. #define HI3660_CLK_ANDGT_SD 89
  104. #define HI3660_CLK_A53HPM_ANDGT 90
  105. #define HI3660_CLK_ANDGT_SDIO 91
  106. #define HI3660_CLK_ANDGT_UART0 92
  107. #define HI3660_CLK_ANDGT_UART1 93
  108. #define HI3660_CLK_ANDGT_UARTH 94
  109. #define HI3660_CLK_ANDGT_SPI 95
  110. #define HI3660_CLK_VIVOBUS_ANDGT 96
  111. #define HI3660_CLK_AOMM_ANDGT 97
  112. #define HI3660_CLK_320M_PLL_GT 98
  113. #define HI3660_AUTODIV_EMMC0BUS 99
  114. #define HI3660_AUTODIV_SYSBUS 100
  115. #define HI3660_CLK_GATE_UFSPHY_CFG 101
  116. #define HI3660_CLK_GATE_UFSIO_REF 102
  117. #define HI3660_CLK_MUX_SYSBUS 103
  118. #define HI3660_CLK_MUX_UART0 104
  119. #define HI3660_CLK_MUX_UART1 105
  120. #define HI3660_CLK_MUX_UARTH 106
  121. #define HI3660_CLK_MUX_SPI 107
  122. #define HI3660_CLK_MUX_I2C 108
  123. #define HI3660_CLK_MUX_MMC_PLL 109
  124. #define HI3660_CLK_MUX_LDI1 110
  125. #define HI3660_CLK_MUX_LDI0 111
  126. #define HI3660_CLK_MUX_SD_PLL 112
  127. #define HI3660_CLK_MUX_SD_SYS 113
  128. #define HI3660_CLK_MUX_EDC0 114
  129. #define HI3660_CLK_MUX_SDIO_SYS 115
  130. #define HI3660_CLK_MUX_SDIO_PLL 116
  131. #define HI3660_CLK_MUX_VIVOBUS 117
  132. #define HI3660_CLK_MUX_A53HPM 118
  133. #define HI3660_CLK_MUX_320M 119
  134. #define HI3660_CLK_MUX_IOPERI 120
  135. #define HI3660_CLK_DIV_UART0 121
  136. #define HI3660_CLK_DIV_UART1 122
  137. #define HI3660_CLK_DIV_UARTH 123
  138. #define HI3660_CLK_DIV_MMC 124
  139. #define HI3660_CLK_DIV_SD 125
  140. #define HI3660_CLK_DIV_EDC0 126
  141. #define HI3660_CLK_DIV_LDI0 127
  142. #define HI3660_CLK_DIV_SDIO 128
  143. #define HI3660_CLK_DIV_LDI1 129
  144. #define HI3660_CLK_DIV_SPI 130
  145. #define HI3660_CLK_DIV_VIVOBUS 131
  146. #define HI3660_CLK_DIV_I2C 132
  147. #define HI3660_CLK_DIV_UFSPHY 133
  148. #define HI3660_CLK_DIV_CFGBUS 134
  149. #define HI3660_CLK_DIV_MMC0BUS 135
  150. #define HI3660_CLK_DIV_MMC1BUS 136
  151. #define HI3660_CLK_DIV_UFSPERI 137
  152. #define HI3660_CLK_DIV_AOMM 138
  153. #define HI3660_CLK_DIV_IOPERI 139
  154. #define HI3660_VENC_VOLT_HOLD 140
  155. #define HI3660_PERI_VOLT_HOLD 141
  156. #define HI3660_CLK_GATE_VENC 142
  157. #define HI3660_CLK_GATE_VDEC 143
  158. #define HI3660_CLK_ANDGT_VENC 144
  159. #define HI3660_CLK_ANDGT_VDEC 145
  160. #define HI3660_CLK_MUX_VENC 146
  161. #define HI3660_CLK_MUX_VDEC 147
  162. #define HI3660_CLK_DIV_VENC 148
  163. #define HI3660_CLK_DIV_VDEC 149
  164. #define HI3660_CLK_FAC_ISP_SNCLK 150
  165. #define HI3660_CLK_GATE_ISP_SNCLK0 151
  166. #define HI3660_CLK_GATE_ISP_SNCLK1 152
  167. #define HI3660_CLK_GATE_ISP_SNCLK2 153
  168. #define HI3660_CLK_ANGT_ISP_SNCLK 154
  169. #define HI3660_CLK_MUX_ISP_SNCLK 155
  170. #define HI3660_CLK_DIV_ISP_SNCLK 156
  171. /* clk in pmuctrl */
  172. #define HI3660_GATE_ABB_192 0
  173. /* clk in pctrl */
  174. #define HI3660_GATE_UFS_TCXO_EN 0
  175. #define HI3660_GATE_USB_TCXO_EN 1
  176. /* clk in sctrl */
  177. #define HI3660_PCLK_AO_GPIO0 0
  178. #define HI3660_PCLK_AO_GPIO1 1
  179. #define HI3660_PCLK_AO_GPIO2 2
  180. #define HI3660_PCLK_AO_GPIO3 3
  181. #define HI3660_PCLK_AO_GPIO4 4
  182. #define HI3660_PCLK_AO_GPIO5 5
  183. #define HI3660_PCLK_AO_GPIO6 6
  184. #define HI3660_PCLK_GATE_MMBUF 7
  185. #define HI3660_CLK_GATE_DSS_AXI_MM 8
  186. #define HI3660_PCLK_MMBUF_ANDGT 9
  187. #define HI3660_CLK_MMBUF_PLL_ANDGT 10
  188. #define HI3660_CLK_FLL_MMBUF_ANDGT 11
  189. #define HI3660_CLK_SYS_MMBUF_ANDGT 12
  190. #define HI3660_CLK_GATE_PCIEPHY_GT 13
  191. #define HI3660_ACLK_MUX_MMBUF 14
  192. #define HI3660_CLK_SW_MMBUF 15
  193. #define HI3660_CLK_DIV_AOBUS 16
  194. #define HI3660_PCLK_DIV_MMBUF 17
  195. #define HI3660_ACLK_DIV_MMBUF 18
  196. #define HI3660_CLK_DIV_PCIEPHY 19
  197. /* clk in iomcu */
  198. #define HI3660_CLK_I2C0_IOMCU 0
  199. #define HI3660_CLK_I2C1_IOMCU 1
  200. #define HI3660_CLK_I2C2_IOMCU 2
  201. #define HI3660_CLK_I2C6_IOMCU 3
  202. #define HI3660_CLK_IOMCU_PERI0 4
  203. /* clk in stub clock */
  204. #define HI3660_CLK_STUB_CLUSTER0 0
  205. #define HI3660_CLK_STUB_CLUSTER1 1
  206. #define HI3660_CLK_STUB_GPU 2
  207. #define HI3660_CLK_STUB_DDR 3
  208. #define HI3660_CLK_STUB_NUM 4
  209. #endif /* __DTS_HI3660_CLOCK_H */