psc.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * File : psc.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Development Team
  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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2010-11-13 weety first version
  23. */
  24. #ifndef __DM36X_PSC_H
  25. #define __DM36X_PSC_H
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /* PSC register offsets */
  30. #define EPCPR 0x070
  31. #define PTCMD 0x120
  32. #define PTSTAT 0x128
  33. #define PDSTAT 0x200
  34. #define PDCTL1 0x304
  35. #define MDSTAT(n) (0x800 + (n) * 4)
  36. #define MDCTL(n) (0xA00 + (n) * 4)
  37. /* Power and Sleep Controller (PSC) Domains */
  38. #define DAVINCI_GPSC_ARMDOMAIN 0
  39. #define DAVINCI_GPSC_DSPDOMAIN 1
  40. #define DAVINCI_DM365_LPSC_TPCC 0
  41. #define DAVINCI_DM365_LPSC_TPTC0 1
  42. #define DAVINCI_DM365_LPSC_TPTC1 2
  43. #define DAVINCI_DM365_LPSC_TPTC2 3
  44. #define DAVINCI_DM365_LPSC_TPTC3 4
  45. #define DAVINCI_DM365_LPSC_TIMER3 5
  46. #define DAVINCI_DM365_LPSC_SPI1 6
  47. #define DAVINCI_DM365_LPSC_MMC_SD1 7
  48. #define DAVINCI_DM365_LPSC_McBSP 8
  49. #define DAVINCI_DM365_LPSC_USB 9
  50. #define DAVINCI_DM365_LPSC_PWM3 10
  51. #define DAVINCI_DM365_LPSC_SPI2 11
  52. #define DAVINCI_DM365_LPSC_RTO 12
  53. #define DAVINCI_DM365_LPSC_DDR_EMIF 13
  54. #define DAVINCI_DM365_LPSC_AEMIF 14
  55. #define DAVINCI_DM365_LPSC_MMC_SD 15
  56. #define DAVINCI_DM365_LPSC_MMC_SD0 15
  57. #define DAVINCI_DM365_LPSC_MEMSTICK 16
  58. #define DAVINCI_DM365_LPSC_TIMER4 17
  59. #define DAVINCI_DM365_LPSC_I2C 18
  60. #define DAVINCI_DM365_LPSC_UART0 19
  61. #define DAVINCI_DM365_LPSC_UART1 20
  62. #define DAVINCI_DM365_LPSC_UHPI 21
  63. #define DAVINCI_DM365_LPSC_SPI0 22
  64. #define DAVINCI_DM365_LPSC_PWM0 23
  65. #define DAVINCI_DM365_LPSC_PWM1 24
  66. #define DAVINCI_DM365_LPSC_PWM2 25
  67. #define DAVINCI_DM365_LPSC_GPIO 26
  68. #define DAVINCI_DM365_LPSC_TIMER0 27
  69. #define DAVINCI_DM365_LPSC_TIMER1 28
  70. #define DAVINCI_DM365_LPSC_TIMER2 29
  71. #define DAVINCI_DM365_LPSC_SYSTEM_SUBSYS 30
  72. #define DAVINCI_DM365_LPSC_ARM 31
  73. #define DAVINCI_DM365_LPSC_SCR0 33
  74. #define DAVINCI_DM365_LPSC_SCR1 34
  75. #define DAVINCI_DM365_LPSC_EMU 35
  76. #define DAVINCI_DM365_LPSC_CHIPDFT 36
  77. #define DAVINCI_DM365_LPSC_PBIST 37
  78. #define DAVINCI_DM365_LPSC_SPI3 38
  79. #define DAVINCI_DM365_LPSC_SPI4 39
  80. #define DAVINCI_DM365_LPSC_CPGMAC 40
  81. #define DAVINCI_DM365_LPSC_RTC 41
  82. #define DAVINCI_DM365_LPSC_KEYSCAN 42
  83. #define DAVINCI_DM365_LPSC_ADCIF 43
  84. #define DAVINCI_DM365_LPSC_VOICE_CODEC 44
  85. #define DAVINCI_DM365_LPSC_DAC_CLKRES 45
  86. #define DAVINCI_DM365_LPSC_DAC_CLK 46
  87. #define DAVINCI_DM365_LPSC_VPSSMSTR 47
  88. #define DAVINCI_DM365_LPSC_IMCOP 50
  89. #define DAVINCI_DM365_LPSC_KALEIDO 51
  90. #define PSC_ENABLE 3
  91. #define PSC_DISABLE 2
  92. #define PSC_SYNCRESET 1
  93. #define PSC_RESET 0
  94. void psc_change_state(int id, int state);
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif