pistachio-clk.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. * Copyright (C) 2014 Google, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. */
  8. #ifndef _DT_BINDINGS_CLOCK_PISTACHIO_H
  9. #define _DT_BINDINGS_CLOCK_PISTACHIO_H
  10. /* PLLs */
  11. #define CLK_MIPS_PLL 0
  12. #define CLK_AUDIO_PLL 1
  13. #define CLK_RPU_V_PLL 2
  14. #define CLK_RPU_L_PLL 3
  15. #define CLK_SYS_PLL 4
  16. #define CLK_WIFI_PLL 5
  17. #define CLK_BT_PLL 6
  18. /* Fixed-factor clocks */
  19. #define CLK_WIFI_DIV4 16
  20. #define CLK_WIFI_DIV8 17
  21. /* Gate clocks */
  22. #define CLK_MIPS 32
  23. #define CLK_AUDIO_IN 33
  24. #define CLK_AUDIO 34
  25. #define CLK_I2S 35
  26. #define CLK_SPDIF 36
  27. #define CLK_AUDIO_DAC 37
  28. #define CLK_RPU_V 38
  29. #define CLK_RPU_L 39
  30. #define CLK_RPU_SLEEP 40
  31. #define CLK_WIFI_PLL_GATE 41
  32. #define CLK_RPU_CORE 42
  33. #define CLK_WIFI_ADC 43
  34. #define CLK_WIFI_DAC 44
  35. #define CLK_USB_PHY 45
  36. #define CLK_ENET_IN 46
  37. #define CLK_ENET 47
  38. #define CLK_UART0 48
  39. #define CLK_UART1 49
  40. #define CLK_PERIPH_SYS 50
  41. #define CLK_SPI0 51
  42. #define CLK_SPI1 52
  43. #define CLK_EVENT_TIMER 53
  44. #define CLK_AUX_ADC_INTERNAL 54
  45. #define CLK_AUX_ADC 55
  46. #define CLK_SD_HOST 56
  47. #define CLK_BT 57
  48. #define CLK_BT_DIV4 58
  49. #define CLK_BT_DIV8 59
  50. #define CLK_BT_1MHZ 60
  51. /* Divider clocks */
  52. #define CLK_MIPS_INTERNAL_DIV 64
  53. #define CLK_MIPS_DIV 65
  54. #define CLK_AUDIO_DIV 66
  55. #define CLK_I2S_DIV 67
  56. #define CLK_SPDIF_DIV 68
  57. #define CLK_AUDIO_DAC_DIV 69
  58. #define CLK_RPU_V_DIV 70
  59. #define CLK_RPU_L_DIV 71
  60. #define CLK_RPU_SLEEP_DIV 72
  61. #define CLK_RPU_CORE_DIV 73
  62. #define CLK_USB_PHY_DIV 74
  63. #define CLK_ENET_DIV 75
  64. #define CLK_UART0_INTERNAL_DIV 76
  65. #define CLK_UART0_DIV 77
  66. #define CLK_UART1_INTERNAL_DIV 78
  67. #define CLK_UART1_DIV 79
  68. #define CLK_SYS_INTERNAL_DIV 80
  69. #define CLK_SPI0_INTERNAL_DIV 81
  70. #define CLK_SPI0_DIV 82
  71. #define CLK_SPI1_INTERNAL_DIV 83
  72. #define CLK_SPI1_DIV 84
  73. #define CLK_EVENT_TIMER_INTERNAL_DIV 85
  74. #define CLK_EVENT_TIMER_DIV 86
  75. #define CLK_AUX_ADC_INTERNAL_DIV 87
  76. #define CLK_AUX_ADC_DIV 88
  77. #define CLK_SD_HOST_DIV 89
  78. #define CLK_BT_DIV 90
  79. #define CLK_BT_DIV4_DIV 91
  80. #define CLK_BT_DIV8_DIV 92
  81. #define CLK_BT_1MHZ_INTERNAL_DIV 93
  82. #define CLK_BT_1MHZ_DIV 94
  83. /* Mux clocks */
  84. #define CLK_AUDIO_REF_MUX 96
  85. #define CLK_MIPS_PLL_MUX 97
  86. #define CLK_AUDIO_PLL_MUX 98
  87. #define CLK_AUDIO_MUX 99
  88. #define CLK_RPU_V_PLL_MUX 100
  89. #define CLK_RPU_L_PLL_MUX 101
  90. #define CLK_RPU_L_MUX 102
  91. #define CLK_WIFI_PLL_MUX 103
  92. #define CLK_WIFI_DIV4_MUX 104
  93. #define CLK_WIFI_DIV8_MUX 105
  94. #define CLK_RPU_CORE_MUX 106
  95. #define CLK_SYS_PLL_MUX 107
  96. #define CLK_ENET_MUX 108
  97. #define CLK_EVENT_TIMER_MUX 109
  98. #define CLK_SD_HOST_MUX 110
  99. #define CLK_BT_PLL_MUX 111
  100. #define CLK_DEBUG_MUX 112
  101. #define CLK_NR_CLKS 113
  102. /* Peripheral gate clocks */
  103. #define PERIPH_CLK_SYS 0
  104. #define PERIPH_CLK_SYS_BUS 1
  105. #define PERIPH_CLK_DDR 2
  106. #define PERIPH_CLK_ROM 3
  107. #define PERIPH_CLK_COUNTER_FAST 4
  108. #define PERIPH_CLK_COUNTER_SLOW 5
  109. #define PERIPH_CLK_IR 6
  110. #define PERIPH_CLK_WD 7
  111. #define PERIPH_CLK_PDM 8
  112. #define PERIPH_CLK_PWM 9
  113. #define PERIPH_CLK_I2C0 10
  114. #define PERIPH_CLK_I2C1 11
  115. #define PERIPH_CLK_I2C2 12
  116. #define PERIPH_CLK_I2C3 13
  117. /* Peripheral divider clocks */
  118. #define PERIPH_CLK_ROM_DIV 32
  119. #define PERIPH_CLK_COUNTER_FAST_DIV 33
  120. #define PERIPH_CLK_COUNTER_SLOW_PRE_DIV 34
  121. #define PERIPH_CLK_COUNTER_SLOW_DIV 35
  122. #define PERIPH_CLK_IR_PRE_DIV 36
  123. #define PERIPH_CLK_IR_DIV 37
  124. #define PERIPH_CLK_WD_PRE_DIV 38
  125. #define PERIPH_CLK_WD_DIV 39
  126. #define PERIPH_CLK_PDM_PRE_DIV 40
  127. #define PERIPH_CLK_PDM_DIV 41
  128. #define PERIPH_CLK_PWM_PRE_DIV 42
  129. #define PERIPH_CLK_PWM_DIV 43
  130. #define PERIPH_CLK_I2C0_PRE_DIV 44
  131. #define PERIPH_CLK_I2C0_DIV 45
  132. #define PERIPH_CLK_I2C1_PRE_DIV 46
  133. #define PERIPH_CLK_I2C1_DIV 47
  134. #define PERIPH_CLK_I2C2_PRE_DIV 48
  135. #define PERIPH_CLK_I2C2_DIV 49
  136. #define PERIPH_CLK_I2C3_PRE_DIV 50
  137. #define PERIPH_CLK_I2C3_DIV 51
  138. #define PERIPH_CLK_NR_CLKS 52
  139. /* System gate clocks */
  140. #define SYS_CLK_I2C0 0
  141. #define SYS_CLK_I2C1 1
  142. #define SYS_CLK_I2C2 2
  143. #define SYS_CLK_I2C3 3
  144. #define SYS_CLK_I2S_IN 4
  145. #define SYS_CLK_PAUD_OUT 5
  146. #define SYS_CLK_SPDIF_OUT 6
  147. #define SYS_CLK_SPI0_MASTER 7
  148. #define SYS_CLK_SPI0_SLAVE 8
  149. #define SYS_CLK_PWM 9
  150. #define SYS_CLK_UART0 10
  151. #define SYS_CLK_UART1 11
  152. #define SYS_CLK_SPI1 12
  153. #define SYS_CLK_MDC 13
  154. #define SYS_CLK_SD_HOST 14
  155. #define SYS_CLK_ENET 15
  156. #define SYS_CLK_IR 16
  157. #define SYS_CLK_WD 17
  158. #define SYS_CLK_TIMER 18
  159. #define SYS_CLK_I2S_OUT 24
  160. #define SYS_CLK_SPDIF_IN 25
  161. #define SYS_CLK_EVENT_TIMER 26
  162. #define SYS_CLK_HASH 27
  163. #define SYS_CLK_NR_CLKS 28
  164. /* Gates for external input clocks */
  165. #define EXT_CLK_AUDIO_IN 0
  166. #define EXT_CLK_ENET_IN 1
  167. #define EXT_CLK_NR_CLKS 2
  168. #endif /* _DT_BINDINGS_CLOCK_PISTACHIO_H */