xref: /linux/arch/arm/mach-davinci/psc.h (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
13acf731cSArnd Bergmann /*
23acf731cSArnd Bergmann  *  DaVinci Power & Sleep Controller (PSC) defines
33acf731cSArnd Bergmann  *
43acf731cSArnd Bergmann  *  Copyright (C) 2006 Texas Instruments.
53acf731cSArnd Bergmann  *
63acf731cSArnd Bergmann  *  This program is free software; you can redistribute  it and/or modify it
73acf731cSArnd Bergmann  *  under  the terms of  the GNU General  Public License as published by the
83acf731cSArnd Bergmann  *  Free Software Foundation;  either version 2 of the  License, or (at your
93acf731cSArnd Bergmann  *  option) any later version.
103acf731cSArnd Bergmann  *
113acf731cSArnd Bergmann  *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
123acf731cSArnd Bergmann  *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
133acf731cSArnd Bergmann  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
143acf731cSArnd Bergmann  *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
153acf731cSArnd Bergmann  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
163acf731cSArnd Bergmann  *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
173acf731cSArnd Bergmann  *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
183acf731cSArnd Bergmann  *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
193acf731cSArnd Bergmann  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
203acf731cSArnd Bergmann  *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
213acf731cSArnd Bergmann  *
223acf731cSArnd Bergmann  *  You should have received a copy of the  GNU General Public License along
233acf731cSArnd Bergmann  *  with this program; if not, write  to the Free Software Foundation, Inc.,
243acf731cSArnd Bergmann  *  675 Mass Ave, Cambridge, MA 02139, USA.
253acf731cSArnd Bergmann  *
263acf731cSArnd Bergmann  */
273acf731cSArnd Bergmann #ifndef __ASM_ARCH_PSC_H
283acf731cSArnd Bergmann #define __ASM_ARCH_PSC_H
293acf731cSArnd Bergmann 
303acf731cSArnd Bergmann /* Power and Sleep Controller (PSC) Domains */
313acf731cSArnd Bergmann #define DAVINCI_GPSC_ARMDOMAIN		0
323acf731cSArnd Bergmann #define DAVINCI_GPSC_DSPDOMAIN		1
333acf731cSArnd Bergmann 
343acf731cSArnd Bergmann #define DAVINCI_LPSC_VPSSMSTR		0
353acf731cSArnd Bergmann #define DAVINCI_LPSC_VPSSSLV		1
363acf731cSArnd Bergmann #define DAVINCI_LPSC_TPCC		2
373acf731cSArnd Bergmann #define DAVINCI_LPSC_TPTC0		3
383acf731cSArnd Bergmann #define DAVINCI_LPSC_TPTC1		4
393acf731cSArnd Bergmann #define DAVINCI_LPSC_EMAC		5
403acf731cSArnd Bergmann #define DAVINCI_LPSC_EMAC_WRAPPER	6
413acf731cSArnd Bergmann #define DAVINCI_LPSC_USB		9
423acf731cSArnd Bergmann #define DAVINCI_LPSC_ATA		10
433acf731cSArnd Bergmann #define DAVINCI_LPSC_VLYNQ		11
443acf731cSArnd Bergmann #define DAVINCI_LPSC_UHPI		12
453acf731cSArnd Bergmann #define DAVINCI_LPSC_DDR_EMIF		13
463acf731cSArnd Bergmann #define DAVINCI_LPSC_AEMIF		14
473acf731cSArnd Bergmann #define DAVINCI_LPSC_MMC_SD		15
483acf731cSArnd Bergmann #define DAVINCI_LPSC_McBSP		17
493acf731cSArnd Bergmann #define DAVINCI_LPSC_I2C		18
503acf731cSArnd Bergmann #define DAVINCI_LPSC_UART0		19
513acf731cSArnd Bergmann #define DAVINCI_LPSC_UART1		20
523acf731cSArnd Bergmann #define DAVINCI_LPSC_UART2		21
533acf731cSArnd Bergmann #define DAVINCI_LPSC_SPI		22
543acf731cSArnd Bergmann #define DAVINCI_LPSC_PWM0		23
553acf731cSArnd Bergmann #define DAVINCI_LPSC_PWM1		24
563acf731cSArnd Bergmann #define DAVINCI_LPSC_PWM2		25
573acf731cSArnd Bergmann #define DAVINCI_LPSC_GPIO		26
583acf731cSArnd Bergmann #define DAVINCI_LPSC_TIMER0		27
593acf731cSArnd Bergmann #define DAVINCI_LPSC_TIMER1		28
603acf731cSArnd Bergmann #define DAVINCI_LPSC_TIMER2		29
613acf731cSArnd Bergmann #define DAVINCI_LPSC_SYSTEM_SUBSYS	30
623acf731cSArnd Bergmann #define DAVINCI_LPSC_ARM		31
633acf731cSArnd Bergmann #define DAVINCI_LPSC_SCR2		32
643acf731cSArnd Bergmann #define DAVINCI_LPSC_SCR3		33
653acf731cSArnd Bergmann #define DAVINCI_LPSC_SCR4		34
663acf731cSArnd Bergmann #define DAVINCI_LPSC_CROSSBAR		35
673acf731cSArnd Bergmann #define DAVINCI_LPSC_CFG27		36
683acf731cSArnd Bergmann #define DAVINCI_LPSC_CFG3		37
693acf731cSArnd Bergmann #define DAVINCI_LPSC_CFG5		38
703acf731cSArnd Bergmann #define DAVINCI_LPSC_GEM		39
713acf731cSArnd Bergmann #define DAVINCI_LPSC_IMCOP		40
723acf731cSArnd Bergmann 
733acf731cSArnd Bergmann /* PSC0 defines */
743acf731cSArnd Bergmann #define DA8XX_LPSC0_TPCC		0
753acf731cSArnd Bergmann #define DA8XX_LPSC0_TPTC0		1
763acf731cSArnd Bergmann #define DA8XX_LPSC0_TPTC1		2
773acf731cSArnd Bergmann #define DA8XX_LPSC0_EMIF25		3
783acf731cSArnd Bergmann #define DA8XX_LPSC0_SPI0		4
793acf731cSArnd Bergmann #define DA8XX_LPSC0_MMC_SD		5
803acf731cSArnd Bergmann #define DA8XX_LPSC0_AINTC		6
813acf731cSArnd Bergmann #define DA8XX_LPSC0_ARM_RAM_ROM		7
823acf731cSArnd Bergmann #define DA8XX_LPSC0_SECU_MGR		8
833acf731cSArnd Bergmann #define DA8XX_LPSC0_UART0		9
843acf731cSArnd Bergmann #define DA8XX_LPSC0_SCR0_SS		10
853acf731cSArnd Bergmann #define DA8XX_LPSC0_SCR1_SS		11
863acf731cSArnd Bergmann #define DA8XX_LPSC0_SCR2_SS		12
873acf731cSArnd Bergmann #define DA8XX_LPSC0_PRUSS		13
883acf731cSArnd Bergmann #define DA8XX_LPSC0_ARM			14
893acf731cSArnd Bergmann #define DA8XX_LPSC0_GEM			15
903acf731cSArnd Bergmann 
913acf731cSArnd Bergmann /* PSC1 defines */
923acf731cSArnd Bergmann #define DA850_LPSC1_TPCC1		0
933acf731cSArnd Bergmann #define DA8XX_LPSC1_USB20		1
943acf731cSArnd Bergmann #define DA8XX_LPSC1_USB11		2
953acf731cSArnd Bergmann #define DA8XX_LPSC1_GPIO		3
963acf731cSArnd Bergmann #define DA8XX_LPSC1_UHPI		4
973acf731cSArnd Bergmann #define DA8XX_LPSC1_CPGMAC		5
983acf731cSArnd Bergmann #define DA8XX_LPSC1_EMIF3C		6
993acf731cSArnd Bergmann #define DA8XX_LPSC1_McASP0		7
1003acf731cSArnd Bergmann #define DA830_LPSC1_McASP1		8
1013acf731cSArnd Bergmann #define DA850_LPSC1_SATA		8
1023acf731cSArnd Bergmann #define DA830_LPSC1_McASP2		9
1033acf731cSArnd Bergmann #define DA850_LPSC1_VPIF		9
1043acf731cSArnd Bergmann #define DA8XX_LPSC1_SPI1		10
1053acf731cSArnd Bergmann #define DA8XX_LPSC1_I2C			11
1063acf731cSArnd Bergmann #define DA8XX_LPSC1_UART1		12
1073acf731cSArnd Bergmann #define DA8XX_LPSC1_UART2		13
108*ca5c098fSPetr Kulhavy #define DA850_LPSC1_McBSP0		14
109*ca5c098fSPetr Kulhavy #define DA850_LPSC1_McBSP1		15
1103acf731cSArnd Bergmann #define DA8XX_LPSC1_LCDC		16
1113acf731cSArnd Bergmann #define DA8XX_LPSC1_PWM			17
1123acf731cSArnd Bergmann #define DA850_LPSC1_MMC_SD1		18
1133acf731cSArnd Bergmann #define DA8XX_LPSC1_ECAP		20
1143acf731cSArnd Bergmann #define DA830_LPSC1_EQEP		21
1153acf731cSArnd Bergmann #define DA850_LPSC1_TPTC2		21
1163acf731cSArnd Bergmann #define DA8XX_LPSC1_SCR_P0_SS		24
1173acf731cSArnd Bergmann #define DA8XX_LPSC1_SCR_P1_SS		25
1183acf731cSArnd Bergmann #define DA8XX_LPSC1_CR_P3_SS		26
1193acf731cSArnd Bergmann #define DA8XX_LPSC1_L3_CBA_RAM		31
1203acf731cSArnd Bergmann 
1213acf731cSArnd Bergmann /* PSC register offsets */
1223acf731cSArnd Bergmann #define EPCPR		0x070
1233acf731cSArnd Bergmann #define PTCMD		0x120
1243acf731cSArnd Bergmann #define PTSTAT		0x128
1253acf731cSArnd Bergmann #define PDSTAT		0x200
1263acf731cSArnd Bergmann #define PDCTL		0x300
1273acf731cSArnd Bergmann #define MDSTAT		0x800
1283acf731cSArnd Bergmann #define MDCTL		0xA00
1293acf731cSArnd Bergmann 
1303acf731cSArnd Bergmann /* PSC module states */
1313acf731cSArnd Bergmann #define PSC_STATE_SWRSTDISABLE	0
1323acf731cSArnd Bergmann #define PSC_STATE_SYNCRST	1
1333acf731cSArnd Bergmann #define PSC_STATE_DISABLE	2
1343acf731cSArnd Bergmann #define PSC_STATE_ENABLE	3
1353acf731cSArnd Bergmann 
1363acf731cSArnd Bergmann #define MDSTAT_STATE_MASK	0x3f
1373acf731cSArnd Bergmann #define PDSTAT_STATE_MASK	0x1f
1383acf731cSArnd Bergmann #define MDCTL_LRST		BIT(8)
1393acf731cSArnd Bergmann #define MDCTL_FORCE		BIT(31)
1403acf731cSArnd Bergmann #define PDCTL_NEXT		BIT(0)
1413acf731cSArnd Bergmann #define PDCTL_EPCGOOD		BIT(8)
1423acf731cSArnd Bergmann 
1433acf731cSArnd Bergmann #endif /* __ASM_ARCH_PSC_H */
144