Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  *  DaVinci Power & Sleep Controller (PSC) defines
0003  *
0004  *  Copyright (C) 2006 Texas Instruments.
0005  *
0006  *  This program is free software; you can redistribute  it and/or modify it
0007  *  under  the terms of  the GNU General  Public License as published by the
0008  *  Free Software Foundation;  either version 2 of the  License, or (at your
0009  *  option) any later version.
0010  *
0011  *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
0012  *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
0013  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
0014  *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
0015  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
0016  *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
0017  *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
0018  *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
0019  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
0020  *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0021  *
0022  *  You should have received a copy of the  GNU General Public License along
0023  *  with this program; if not, write  to the Free Software Foundation, Inc.,
0024  *  675 Mass Ave, Cambridge, MA 02139, USA.
0025  *
0026  */
0027 #ifndef __ASM_ARCH_PSC_H
0028 #define __ASM_ARCH_PSC_H
0029 
0030 /* Power and Sleep Controller (PSC) Domains */
0031 #define DAVINCI_GPSC_ARMDOMAIN      0
0032 #define DAVINCI_GPSC_DSPDOMAIN      1
0033 
0034 #define DAVINCI_LPSC_VPSSMSTR       0
0035 #define DAVINCI_LPSC_VPSSSLV        1
0036 #define DAVINCI_LPSC_TPCC       2
0037 #define DAVINCI_LPSC_TPTC0      3
0038 #define DAVINCI_LPSC_TPTC1      4
0039 #define DAVINCI_LPSC_EMAC       5
0040 #define DAVINCI_LPSC_EMAC_WRAPPER   6
0041 #define DAVINCI_LPSC_USB        9
0042 #define DAVINCI_LPSC_ATA        10
0043 #define DAVINCI_LPSC_VLYNQ      11
0044 #define DAVINCI_LPSC_UHPI       12
0045 #define DAVINCI_LPSC_DDR_EMIF       13
0046 #define DAVINCI_LPSC_AEMIF      14
0047 #define DAVINCI_LPSC_MMC_SD     15
0048 #define DAVINCI_LPSC_McBSP      17
0049 #define DAVINCI_LPSC_I2C        18
0050 #define DAVINCI_LPSC_UART0      19
0051 #define DAVINCI_LPSC_UART1      20
0052 #define DAVINCI_LPSC_UART2      21
0053 #define DAVINCI_LPSC_SPI        22
0054 #define DAVINCI_LPSC_PWM0       23
0055 #define DAVINCI_LPSC_PWM1       24
0056 #define DAVINCI_LPSC_PWM2       25
0057 #define DAVINCI_LPSC_GPIO       26
0058 #define DAVINCI_LPSC_TIMER0     27
0059 #define DAVINCI_LPSC_TIMER1     28
0060 #define DAVINCI_LPSC_TIMER2     29
0061 #define DAVINCI_LPSC_SYSTEM_SUBSYS  30
0062 #define DAVINCI_LPSC_ARM        31
0063 #define DAVINCI_LPSC_SCR2       32
0064 #define DAVINCI_LPSC_SCR3       33
0065 #define DAVINCI_LPSC_SCR4       34
0066 #define DAVINCI_LPSC_CROSSBAR       35
0067 #define DAVINCI_LPSC_CFG27      36
0068 #define DAVINCI_LPSC_CFG3       37
0069 #define DAVINCI_LPSC_CFG5       38
0070 #define DAVINCI_LPSC_GEM        39
0071 #define DAVINCI_LPSC_IMCOP      40
0072 
0073 #define DM355_LPSC_TIMER3       5
0074 #define DM355_LPSC_SPI1         6
0075 #define DM355_LPSC_MMC_SD1      7
0076 #define DM355_LPSC_McBSP1       8
0077 #define DM355_LPSC_PWM3         10
0078 #define DM355_LPSC_SPI2         11
0079 #define DM355_LPSC_RTO          12
0080 #define DM355_LPSC_VPSS_DAC     41
0081 
0082 /* DM365 */
0083 #define DM365_LPSC_TIMER3   5
0084 #define DM365_LPSC_SPI1     6
0085 #define DM365_LPSC_MMC_SD1  7
0086 #define DM365_LPSC_McBSP1   8
0087 #define DM365_LPSC_PWM3     10
0088 #define DM365_LPSC_SPI2     11
0089 #define DM365_LPSC_RTO      12
0090 #define DM365_LPSC_TIMER4   17
0091 #define DM365_LPSC_SPI0     22
0092 #define DM365_LPSC_SPI3     38
0093 #define DM365_LPSC_SPI4     39
0094 #define DM365_LPSC_EMAC     40
0095 #define DM365_LPSC_VOICE_CODEC  44
0096 #define DM365_LPSC_DAC_CLK  46
0097 #define DM365_LPSC_VPSSMSTR 47
0098 #define DM365_LPSC_MJCP     50
0099 
0100 /*
0101  * LPSC Assignments
0102  */
0103 #define DM646X_LPSC_ARM     0
0104 #define DM646X_LPSC_C64X_CPU    1
0105 #define DM646X_LPSC_HDVICP0 2
0106 #define DM646X_LPSC_HDVICP1 3
0107 #define DM646X_LPSC_TPCC    4
0108 #define DM646X_LPSC_TPTC0   5
0109 #define DM646X_LPSC_TPTC1   6
0110 #define DM646X_LPSC_TPTC2   7
0111 #define DM646X_LPSC_TPTC3   8
0112 #define DM646X_LPSC_PCI     13
0113 #define DM646X_LPSC_EMAC    14
0114 #define DM646X_LPSC_VDCE    15
0115 #define DM646X_LPSC_VPSSMSTR    16
0116 #define DM646X_LPSC_VPSSSLV 17
0117 #define DM646X_LPSC_TSIF0   18
0118 #define DM646X_LPSC_TSIF1   19
0119 #define DM646X_LPSC_DDR_EMIF    20
0120 #define DM646X_LPSC_AEMIF   21
0121 #define DM646X_LPSC_McASP0  22
0122 #define DM646X_LPSC_McASP1  23
0123 #define DM646X_LPSC_CRGEN0  24
0124 #define DM646X_LPSC_CRGEN1  25
0125 #define DM646X_LPSC_UART0   26
0126 #define DM646X_LPSC_UART1   27
0127 #define DM646X_LPSC_UART2   28
0128 #define DM646X_LPSC_PWM0    29
0129 #define DM646X_LPSC_PWM1    30
0130 #define DM646X_LPSC_I2C     31
0131 #define DM646X_LPSC_SPI     32
0132 #define DM646X_LPSC_GPIO    33
0133 #define DM646X_LPSC_TIMER0  34
0134 #define DM646X_LPSC_TIMER1  35
0135 #define DM646X_LPSC_ARM_INTC    45
0136 
0137 /* PSC0 defines */
0138 #define DA8XX_LPSC0_TPCC        0
0139 #define DA8XX_LPSC0_TPTC0       1
0140 #define DA8XX_LPSC0_TPTC1       2
0141 #define DA8XX_LPSC0_EMIF25      3
0142 #define DA8XX_LPSC0_SPI0        4
0143 #define DA8XX_LPSC0_MMC_SD      5
0144 #define DA8XX_LPSC0_AINTC       6
0145 #define DA8XX_LPSC0_ARM_RAM_ROM     7
0146 #define DA8XX_LPSC0_SECU_MGR        8
0147 #define DA8XX_LPSC0_UART0       9
0148 #define DA8XX_LPSC0_SCR0_SS     10
0149 #define DA8XX_LPSC0_SCR1_SS     11
0150 #define DA8XX_LPSC0_SCR2_SS     12
0151 #define DA8XX_LPSC0_PRUSS       13
0152 #define DA8XX_LPSC0_ARM         14
0153 #define DA8XX_LPSC0_GEM         15
0154 
0155 /* PSC1 defines */
0156 #define DA850_LPSC1_TPCC1       0
0157 #define DA8XX_LPSC1_USB20       1
0158 #define DA8XX_LPSC1_USB11       2
0159 #define DA8XX_LPSC1_GPIO        3
0160 #define DA8XX_LPSC1_UHPI        4
0161 #define DA8XX_LPSC1_CPGMAC      5
0162 #define DA8XX_LPSC1_EMIF3C      6
0163 #define DA8XX_LPSC1_McASP0      7
0164 #define DA830_LPSC1_McASP1      8
0165 #define DA850_LPSC1_SATA        8
0166 #define DA830_LPSC1_McASP2      9
0167 #define DA850_LPSC1_VPIF        9
0168 #define DA8XX_LPSC1_SPI1        10
0169 #define DA8XX_LPSC1_I2C         11
0170 #define DA8XX_LPSC1_UART1       12
0171 #define DA8XX_LPSC1_UART2       13
0172 #define DA850_LPSC1_McBSP0      14
0173 #define DA850_LPSC1_McBSP1      15
0174 #define DA8XX_LPSC1_LCDC        16
0175 #define DA8XX_LPSC1_PWM         17
0176 #define DA850_LPSC1_MMC_SD1     18
0177 #define DA8XX_LPSC1_ECAP        20
0178 #define DA830_LPSC1_EQEP        21
0179 #define DA850_LPSC1_TPTC2       21
0180 #define DA8XX_LPSC1_SCR_P0_SS       24
0181 #define DA8XX_LPSC1_SCR_P1_SS       25
0182 #define DA8XX_LPSC1_CR_P3_SS        26
0183 #define DA8XX_LPSC1_L3_CBA_RAM      31
0184 
0185 /* PSC register offsets */
0186 #define EPCPR       0x070
0187 #define PTCMD       0x120
0188 #define PTSTAT      0x128
0189 #define PDSTAT      0x200
0190 #define PDCTL       0x300
0191 #define MDSTAT      0x800
0192 #define MDCTL       0xA00
0193 
0194 /* PSC module states */
0195 #define PSC_STATE_SWRSTDISABLE  0
0196 #define PSC_STATE_SYNCRST   1
0197 #define PSC_STATE_DISABLE   2
0198 #define PSC_STATE_ENABLE    3
0199 
0200 #define MDSTAT_STATE_MASK   0x3f
0201 #define PDSTAT_STATE_MASK   0x1f
0202 #define MDCTL_LRST      BIT(8)
0203 #define MDCTL_FORCE     BIT(31)
0204 #define PDCTL_NEXT      BIT(0)
0205 #define PDCTL_EPCGOOD       BIT(8)
0206 
0207 #endif /* __ASM_ARCH_PSC_H */