hi6220-clock.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. /*
  2. * Copyright (c) 2015 Hisilicon Limited.
  3. *
  4. * Author: Bintian Wang <bintian.wang@huawei.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __DT_BINDINGS_CLOCK_HI6220_H
  11. #define __DT_BINDINGS_CLOCK_HI6220_H
  12. /* clk in Hi6220 AO (always on) controller */
  13. #define HI6220_NONE_CLOCK 0
  14. /* fixed rate clocks */
  15. #define HI6220_REF32K 1
  16. #define HI6220_CLK_TCXO 2
  17. #define HI6220_MMC1_PAD 3
  18. #define HI6220_MMC2_PAD 4
  19. #define HI6220_MMC0_PAD 5
  20. #define HI6220_PLL_BBP 6
  21. #define HI6220_PLL_GPU 7
  22. #define HI6220_PLL1_DDR 8
  23. #define HI6220_PLL_SYS 9
  24. #define HI6220_PLL_SYS_MEDIA 10
  25. #define HI6220_DDR_SRC 11
  26. #define HI6220_PLL_MEDIA 12
  27. #define HI6220_PLL_DDR 13
  28. /* fixed factor clocks */
  29. #define HI6220_300M 14
  30. #define HI6220_150M 15
  31. #define HI6220_PICOPHY_SRC 16
  32. #define HI6220_MMC0_SRC_SEL 17
  33. #define HI6220_MMC1_SRC_SEL 18
  34. #define HI6220_MMC2_SRC_SEL 19
  35. #define HI6220_VPU_CODEC 20
  36. #define HI6220_MMC0_SMP 21
  37. #define HI6220_MMC1_SMP 22
  38. #define HI6220_MMC2_SMP 23
  39. /* gate clocks */
  40. #define HI6220_WDT0_PCLK 24
  41. #define HI6220_WDT1_PCLK 25
  42. #define HI6220_WDT2_PCLK 26
  43. #define HI6220_TIMER0_PCLK 27
  44. #define HI6220_TIMER1_PCLK 28
  45. #define HI6220_TIMER2_PCLK 29
  46. #define HI6220_TIMER3_PCLK 30
  47. #define HI6220_TIMER4_PCLK 31
  48. #define HI6220_TIMER5_PCLK 32
  49. #define HI6220_TIMER6_PCLK 33
  50. #define HI6220_TIMER7_PCLK 34
  51. #define HI6220_TIMER8_PCLK 35
  52. #define HI6220_UART0_PCLK 36
  53. #define HI6220_RTC0_PCLK 37
  54. #define HI6220_RTC1_PCLK 38
  55. #define HI6220_AO_NR_CLKS 39
  56. /* clk in Hi6220 systrl */
  57. /* gate clock */
  58. #define HI6220_MMC0_CLK 1
  59. #define HI6220_MMC0_CIUCLK 2
  60. #define HI6220_MMC1_CLK 3
  61. #define HI6220_MMC1_CIUCLK 4
  62. #define HI6220_MMC2_CLK 5
  63. #define HI6220_MMC2_CIUCLK 6
  64. #define HI6220_USBOTG_HCLK 7
  65. #define HI6220_CLK_PICOPHY 8
  66. #define HI6220_HIFI 9
  67. #define HI6220_DACODEC_PCLK 10
  68. #define HI6220_EDMAC_ACLK 11
  69. #define HI6220_CS_ATB 12
  70. #define HI6220_I2C0_CLK 13
  71. #define HI6220_I2C1_CLK 14
  72. #define HI6220_I2C2_CLK 15
  73. #define HI6220_I2C3_CLK 16
  74. #define HI6220_UART1_PCLK 17
  75. #define HI6220_UART2_PCLK 18
  76. #define HI6220_UART3_PCLK 19
  77. #define HI6220_UART4_PCLK 20
  78. #define HI6220_SPI_CLK 21
  79. #define HI6220_TSENSOR_CLK 22
  80. #define HI6220_MMU_CLK 23
  81. #define HI6220_HIFI_SEL 24
  82. #define HI6220_MMC0_SYSPLL 25
  83. #define HI6220_MMC1_SYSPLL 26
  84. #define HI6220_MMC2_SYSPLL 27
  85. #define HI6220_MMC0_SEL 28
  86. #define HI6220_MMC1_SEL 29
  87. #define HI6220_BBPPLL_SEL 30
  88. #define HI6220_MEDIA_PLL_SRC 31
  89. #define HI6220_MMC2_SEL 32
  90. #define HI6220_CS_ATB_SYSPLL 33
  91. /* mux clocks */
  92. #define HI6220_MMC0_SRC 34
  93. #define HI6220_MMC0_SMP_IN 35
  94. #define HI6220_MMC1_SRC 36
  95. #define HI6220_MMC1_SMP_IN 37
  96. #define HI6220_MMC2_SRC 38
  97. #define HI6220_MMC2_SMP_IN 39
  98. #define HI6220_HIFI_SRC 40
  99. #define HI6220_UART1_SRC 41
  100. #define HI6220_UART2_SRC 42
  101. #define HI6220_UART3_SRC 43
  102. #define HI6220_UART4_SRC 44
  103. #define HI6220_MMC0_MUX0 45
  104. #define HI6220_MMC1_MUX0 46
  105. #define HI6220_MMC2_MUX0 47
  106. #define HI6220_MMC0_MUX1 48
  107. #define HI6220_MMC1_MUX1 49
  108. #define HI6220_MMC2_MUX1 50
  109. /* divider clocks */
  110. #define HI6220_CLK_BUS 51
  111. #define HI6220_MMC0_DIV 52
  112. #define HI6220_MMC1_DIV 53
  113. #define HI6220_MMC2_DIV 54
  114. #define HI6220_HIFI_DIV 55
  115. #define HI6220_BBPPLL0_DIV 56
  116. #define HI6220_CS_DAPB 57
  117. #define HI6220_CS_ATB_DIV 58
  118. /* gate clock */
  119. #define HI6220_DAPB_CLK 59
  120. #define HI6220_SYS_NR_CLKS 60
  121. /* clk in Hi6220 media controller */
  122. /* gate clocks */
  123. #define HI6220_DSI_PCLK 1
  124. #define HI6220_G3D_PCLK 2
  125. #define HI6220_ACLK_CODEC_VPU 3
  126. #define HI6220_ISP_SCLK 4
  127. #define HI6220_ADE_CORE 5
  128. #define HI6220_MED_MMU 6
  129. #define HI6220_CFG_CSI4PHY 7
  130. #define HI6220_CFG_CSI2PHY 8
  131. #define HI6220_ISP_SCLK_GATE 9
  132. #define HI6220_ISP_SCLK_GATE1 10
  133. #define HI6220_ADE_CORE_GATE 11
  134. #define HI6220_CODEC_VPU_GATE 12
  135. #define HI6220_MED_SYSPLL 13
  136. /* mux clocks */
  137. #define HI6220_1440_1200 14
  138. #define HI6220_1000_1200 15
  139. #define HI6220_1000_1440 16
  140. /* divider clocks */
  141. #define HI6220_CODEC_JPEG 17
  142. #define HI6220_ISP_SCLK_SRC 18
  143. #define HI6220_ISP_SCLK1 19
  144. #define HI6220_ADE_CORE_SRC 20
  145. #define HI6220_ADE_PIX_SRC 21
  146. #define HI6220_G3D_CLK 22
  147. #define HI6220_CODEC_VPU_SRC 23
  148. #define HI6220_MEDIA_NR_CLKS 24
  149. /* clk in Hi6220 power controller */
  150. /* gate clocks */
  151. #define HI6220_PLL_GPU_GATE 1
  152. #define HI6220_PLL1_DDR_GATE 2
  153. #define HI6220_PLL_DDR_GATE 3
  154. #define HI6220_PLL_MEDIA_GATE 4
  155. #define HI6220_PLL0_BBP_GATE 5
  156. /* divider clocks */
  157. #define HI6220_DDRC_SRC 6
  158. #define HI6220_DDRC_AXI1 7
  159. #define HI6220_POWER_NR_CLKS 8
  160. /* clk in Hi6220 acpu sctrl */
  161. #define HI6220_ACPU_SFT_AT_S 0
  162. #endif