power.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /*
  2. * Copyright (C) 2011 Samsung Electronics
  3. * Heungjun Kim <riverful.kim@samsung.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __ASM_ARM_ARCH_POWER_H_
  24. #define __ASM_ARM_ARCH_POWER_H_
  25. #ifndef __ASSEMBLY__
  26. struct exynos4_power {
  27. unsigned int om_stat;
  28. unsigned char res1[0x8];
  29. unsigned int rtc_clko_sel;
  30. unsigned int gnss_rtc_out_ctrl;
  31. unsigned char res2[0x1ec];
  32. unsigned int system_power_down_ctrl;
  33. unsigned char res3[0x1];
  34. unsigned int system_power_down_option;
  35. unsigned char res4[0x1f4];
  36. unsigned int swreset;
  37. unsigned int rst_stat;
  38. unsigned char res5[0x1f8];
  39. unsigned int wakeup_stat;
  40. unsigned int eint_wakeup_mask;
  41. unsigned int wakeup_mask;
  42. unsigned char res6[0xf4];
  43. unsigned int hdmi_phy_control;
  44. unsigned int usbdevice_phy_control;
  45. unsigned int usbhost_phy_control;
  46. unsigned int dac_phy_control;
  47. unsigned int mipi_phy0_control;
  48. unsigned int mipi_phy1_control;
  49. unsigned int adc_phy_control;
  50. unsigned int pcie_phy_control;
  51. unsigned int sata_phy_control;
  52. unsigned char res7[0xdc];
  53. unsigned int inform0;
  54. unsigned int inform1;
  55. unsigned int inform2;
  56. unsigned int inform3;
  57. unsigned int inform4;
  58. unsigned int inform5;
  59. unsigned int inform6;
  60. unsigned int inform7;
  61. unsigned char res8[0x1e0];
  62. unsigned int pmu_debug;
  63. unsigned char res9[0x5fc];
  64. unsigned int arm_core0_sys_pwr_reg;
  65. unsigned char res10[0xc];
  66. unsigned int arm_core1_sys_pwr_reg;
  67. unsigned char res11[0x6c];
  68. unsigned int arm_common_sys_pwr_reg;
  69. unsigned char res12[0x3c];
  70. unsigned int arm_cpu_l2_0_sys_pwr_reg;
  71. unsigned int arm_cpu_l2_1_sys_pwr_reg;
  72. unsigned char res13[0x38];
  73. unsigned int cmu_aclkstop_sys_pwr_reg;
  74. unsigned int cmu_sclkstop_sys_pwr_reg;
  75. unsigned char res14[0x4];
  76. unsigned int cmu_reset_sys_pwr_reg;
  77. unsigned char res15[0x10];
  78. unsigned int apll_sysclk_sys_pwr_reg;
  79. unsigned int mpll_sysclk_sys_pwr_reg;
  80. unsigned int vpll_sysclk_sys_pwr_reg;
  81. unsigned int epll_sysclk_sys_pwr_reg;
  82. unsigned char res16[0x8];
  83. unsigned int cmu_clkstop_gps_alive_sys_pwr_reg;
  84. unsigned int cmu_reset_gps_alive_sys_pwr_reg;
  85. unsigned int cmu_clkstop_cam_sys_pwr_reg;
  86. unsigned int cmu_clkstop_tv_sys_pwr_reg;
  87. unsigned int cmu_clkstop_mfc_sys_pwr_reg;
  88. unsigned int cmu_clkstop_g3d_sys_pwr_reg;
  89. unsigned int cmu_clkstop_lcd0_sys_pwr_reg;
  90. unsigned int cmu_clkstop_lcd1_sys_pwr_reg;
  91. unsigned int cmu_clkstop_maudio_sys_pwr_reg;
  92. unsigned int cmu_clkstop_gps_sys_pwr_reg;
  93. unsigned int cmu_reset_cam_sys_pwr_reg;
  94. unsigned int cmu_reset_tv_sys_pwr_reg;
  95. unsigned int cmu_reset_mfc_sys_pwr_reg;
  96. unsigned int cmu_reset_g3d_sys_pwr_reg;
  97. unsigned int cmu_reset_lcd0_sys_pwr_reg;
  98. unsigned int cmu_reset_lcd1_sys_pwr_reg;
  99. unsigned int cmu_reset_maudio_sys_pwr_reg;
  100. unsigned int cmu_reset_gps_sys_pwr_reg;
  101. unsigned int top_bus_sys_pwr_reg;
  102. unsigned int top_retention_sys_pwr_reg;
  103. unsigned int top_pwr_sys_pwr_reg;
  104. unsigned char res17[0x1c];
  105. unsigned int logic_reset_sys_pwr_reg;
  106. unsigned char res18[0x14];
  107. unsigned int onenandxl_mem_sys_pwr_reg;
  108. unsigned int modemif_mem_sys_pwr_reg;
  109. unsigned char res19[0x4];
  110. unsigned int usbdevice_mem_sys_pwr_reg;
  111. unsigned int sdmmc_mem_sys_pwr_reg;
  112. unsigned int cssys_mem_sys_pwr_reg;
  113. unsigned int secss_mem_sys_pwr_reg;
  114. unsigned char res20[0x4];
  115. unsigned int pcie_mem_sys_pwr_reg;
  116. unsigned int sata_mem_sys_pwr_reg;
  117. unsigned char res21[0x18];
  118. unsigned int pad_retention_dram_sys_pwr_reg;
  119. unsigned int pad_retention_maudio_sys_pwr_reg;
  120. unsigned char res22[0x18];
  121. unsigned int pad_retention_gpio_sys_pwr_reg;
  122. unsigned int pad_retention_uart_sys_pwr_reg;
  123. unsigned int pad_retention_mmca_sys_pwr_reg;
  124. unsigned int pad_retention_mmcb_sys_pwr_reg;
  125. unsigned int pad_retention_ebia_sys_pwr_reg;
  126. unsigned int pad_retention_ebib_sys_pwr_reg;
  127. unsigned char res23[0x8];
  128. unsigned int pad_isolation_sys_pwr_reg;
  129. unsigned char res24[0x1c];
  130. unsigned int pad_alv_sel_sys_pwr_reg;
  131. unsigned char res25[0x1c];
  132. unsigned int xusbxti_sys_pwr_reg;
  133. unsigned int xxti_sys_pwr_reg;
  134. unsigned char res26[0x38];
  135. unsigned int ext_regulator_sys_pwr_reg;
  136. unsigned char res27[0x3c];
  137. unsigned int gpio_mode_sys_pwr_reg;
  138. unsigned char res28[0x3c];
  139. unsigned int gpio_mode_maudio_sys_pwr_reg;
  140. unsigned char res29[0x3c];
  141. unsigned int cam_sys_pwr_reg;
  142. unsigned int tv_sys_pwr_reg;
  143. unsigned int mfc_sys_pwr_reg;
  144. unsigned int g3d_sys_pwr_reg;
  145. unsigned int lcd0_sys_pwr_reg;
  146. unsigned int lcd1_sys_pwr_reg;
  147. unsigned int maudio_sys_pwr_reg;
  148. unsigned int gps_sys_pwr_reg;
  149. unsigned int gps_alive_sys_pwr_reg;
  150. unsigned char res30[0xc5c];
  151. unsigned int arm_core0_configuration;
  152. unsigned int arm_core0_status;
  153. unsigned int arm_core0_option;
  154. unsigned char res31[0x74];
  155. unsigned int arm_core1_configuration;
  156. unsigned int arm_core1_status;
  157. unsigned int arm_core1_option;
  158. unsigned char res32[0x37c];
  159. unsigned int arm_common_option;
  160. unsigned char res33[0x1f4];
  161. unsigned int arm_cpu_l2_0_configuration;
  162. unsigned int arm_cpu_l2_0_status;
  163. unsigned char res34[0x18];
  164. unsigned int arm_cpu_l2_1_configuration;
  165. unsigned int arm_cpu_l2_1_status;
  166. unsigned char res35[0xa00];
  167. unsigned int pad_retention_maudio_option;
  168. unsigned char res36[0xdc];
  169. unsigned int pad_retention_gpio_option;
  170. unsigned char res37[0x1c];
  171. unsigned int pad_retention_uart_option;
  172. unsigned char res38[0x1c];
  173. unsigned int pad_retention_mmca_option;
  174. unsigned char res39[0x1c];
  175. unsigned int pad_retention_mmcb_option;
  176. unsigned char res40[0x1c];
  177. unsigned int pad_retention_ebia_option;
  178. unsigned char res41[0x1c];
  179. unsigned int pad_retention_ebib_option;
  180. unsigned char res42[0x160];
  181. unsigned int ps_hold_control;
  182. unsigned char res43[0xf0];
  183. unsigned int xusbxti_configuration;
  184. unsigned int xusbxti_status;
  185. unsigned char res44[0x14];
  186. unsigned int xusbxti_duration;
  187. unsigned int xxti_configuration;
  188. unsigned int xxti_status;
  189. unsigned char res45[0x14];
  190. unsigned int xxti_duration;
  191. unsigned char res46[0x1dc];
  192. unsigned int ext_regulator_duration;
  193. unsigned char res47[0x5e0];
  194. unsigned int cam_configuration;
  195. unsigned int cam_status;
  196. unsigned int cam_option;
  197. unsigned char res48[0x14];
  198. unsigned int tv_configuration;
  199. unsigned int tv_status;
  200. unsigned int tv_option;
  201. unsigned char res49[0x14];
  202. unsigned int mfc_configuration;
  203. unsigned int mfc_status;
  204. unsigned int mfc_option;
  205. unsigned char res50[0x14];
  206. unsigned int g3d_configuration;
  207. unsigned int g3d_status;
  208. unsigned int g3d_option;
  209. unsigned char res51[0x14];
  210. unsigned int lcd0_configuration;
  211. unsigned int lcd0_status;
  212. unsigned int lcd0_option;
  213. unsigned char res52[0x14];
  214. unsigned int lcd1_configuration;
  215. unsigned int lcd1_status;
  216. unsigned int lcd1_option;
  217. unsigned char res53[0x34];
  218. unsigned int gps_configuration;
  219. unsigned int gps_status;
  220. unsigned int gps_option;
  221. unsigned char res54[0x14];
  222. unsigned int gps_alive_configuration;
  223. unsigned int gps_alive_status;
  224. unsigned int gps_alive_option;
  225. };
  226. #endif /* __ASSEMBLY__ */
  227. void set_mipi_phy_ctrl(unsigned int dev_index, unsigned int enable);
  228. #define EXYNOS_MIPI_PHY_ENABLE (1 << 0)
  229. #define EXYNOS_MIPI_PHY_SRESETN (1 << 1)
  230. #define EXYNOS_MIPI_PHY_MRESETN (1 << 2)
  231. #endif