xref: /openbmc/linux/arch/arm/mach-omap2/prm33xx.h (revision 3aa36fdd)
1ddd04b98SVaibhav Hiremath /*
2ddd04b98SVaibhav Hiremath  * AM33XX PRM instance offset macros
3ddd04b98SVaibhav Hiremath  *
43aa36fddSAlexander A. Klimov  * Copyright (C) 2011-2012 Texas Instruments Incorporated - https://www.ti.com/
5ddd04b98SVaibhav Hiremath  *
6ddd04b98SVaibhav Hiremath  * This program is free software; you can redistribute it and/or
7ddd04b98SVaibhav Hiremath  * modify it under the terms of the GNU General Public License as
8ddd04b98SVaibhav Hiremath  * published by the Free Software Foundation version 2.
9ddd04b98SVaibhav Hiremath  *
10ddd04b98SVaibhav Hiremath  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11ddd04b98SVaibhav Hiremath  * kind, whether express or implied; without even the implied warranty
12ddd04b98SVaibhav Hiremath  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13ddd04b98SVaibhav Hiremath  * GNU General Public License for more details.
14ddd04b98SVaibhav Hiremath  */
15ddd04b98SVaibhav Hiremath 
16ddd04b98SVaibhav Hiremath #ifndef __ARCH_ARM_MACH_OMAP2_PRM33XX_H
17ddd04b98SVaibhav Hiremath #define __ARCH_ARM_MACH_OMAP2_PRM33XX_H
18ddd04b98SVaibhav Hiremath 
19ddd04b98SVaibhav Hiremath #include "prcm-common.h"
20ddd04b98SVaibhav Hiremath #include "prm.h"
21ddd04b98SVaibhav Hiremath 
22ddd04b98SVaibhav Hiremath #define AM33XX_PRM_BASE               0x44E00000
23ddd04b98SVaibhav Hiremath 
24ddd04b98SVaibhav Hiremath #define AM33XX_PRM_REGADDR(inst, reg)                         \
25ddd04b98SVaibhav Hiremath 	AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRM_BASE + (inst) + (reg))
26ddd04b98SVaibhav Hiremath 
27ddd04b98SVaibhav Hiremath 
28ddd04b98SVaibhav Hiremath /* PRM instances */
29ddd04b98SVaibhav Hiremath #define AM33XX_PRM_OCP_SOCKET_MOD	0x0B00
30ddd04b98SVaibhav Hiremath #define AM33XX_PRM_PER_MOD		0x0C00
31ddd04b98SVaibhav Hiremath #define AM33XX_PRM_WKUP_MOD		0x0D00
32ddd04b98SVaibhav Hiremath #define AM33XX_PRM_MPU_MOD		0x0E00
33ddd04b98SVaibhav Hiremath #define AM33XX_PRM_DEVICE_MOD		0x0F00
34ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RTC_MOD		0x1000
35ddd04b98SVaibhav Hiremath #define AM33XX_PRM_GFX_MOD		0x1100
36ddd04b98SVaibhav Hiremath #define AM33XX_PRM_CEFUSE_MOD		0x1200
37ddd04b98SVaibhav Hiremath 
38ddd04b98SVaibhav Hiremath /* PRM */
39ddd04b98SVaibhav Hiremath 
40ddd04b98SVaibhav Hiremath /* PRM.OCP_SOCKET_PRM register offsets */
41ddd04b98SVaibhav Hiremath #define AM33XX_REVISION_PRM_OFFSET		0x0000
42ddd04b98SVaibhav Hiremath #define AM33XX_REVISION_PRM			AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0000)
43ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQSTATUS_MPU_OFFSET		0x0004
44ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQSTATUS_MPU		AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0004)
45ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQENABLE_MPU_OFFSET		0x0008
46ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQENABLE_MPU		AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0008)
47ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQSTATUS_M3_OFFSET		0x000c
48ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQSTATUS_M3			AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x000c)
49ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQENABLE_M3_OFFSET		0x0010
50ddd04b98SVaibhav Hiremath #define AM33XX_PRM_IRQENABLE_M3			AM33XX_PRM_REGADDR(AM33XX_PRM_OCP_SOCKET_MOD, 0x0010)
51ddd04b98SVaibhav Hiremath 
52ddd04b98SVaibhav Hiremath /* PRM.PER_PRM register offsets */
53ddd04b98SVaibhav Hiremath #define AM33XX_RM_PER_RSTCTRL_OFFSET		0x0000
54ddd04b98SVaibhav Hiremath #define AM33XX_RM_PER_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0000)
55ddd04b98SVaibhav Hiremath #define AM33XX_PM_PER_PWRSTST_OFFSET		0x0008
56ddd04b98SVaibhav Hiremath #define AM33XX_PM_PER_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x0008)
57ddd04b98SVaibhav Hiremath #define AM33XX_PM_PER_PWRSTCTRL_OFFSET		0x000c
58ddd04b98SVaibhav Hiremath #define AM33XX_PM_PER_PWRSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_PER_MOD, 0x000c)
59ddd04b98SVaibhav Hiremath 
60ddd04b98SVaibhav Hiremath /* PRM.WKUP_PRM register offsets */
61ddd04b98SVaibhav Hiremath #define AM33XX_RM_WKUP_RSTCTRL_OFFSET		0x0000
62ddd04b98SVaibhav Hiremath #define AM33XX_RM_WKUP_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x0000)
63ddd04b98SVaibhav Hiremath #define AM33XX_PM_WKUP_PWRSTCTRL_OFFSET		0x0004
64ddd04b98SVaibhav Hiremath #define AM33XX_PM_WKUP_PWRSTCTRL		AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x0004)
65ddd04b98SVaibhav Hiremath #define AM33XX_PM_WKUP_PWRSTST_OFFSET		0x0008
66ddd04b98SVaibhav Hiremath #define AM33XX_PM_WKUP_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x0008)
67ddd04b98SVaibhav Hiremath #define AM33XX_RM_WKUP_RSTST_OFFSET		0x000c
68ddd04b98SVaibhav Hiremath #define AM33XX_RM_WKUP_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_WKUP_MOD, 0x000c)
69ddd04b98SVaibhav Hiremath 
70ddd04b98SVaibhav Hiremath /* PRM.MPU_PRM register offsets */
71ddd04b98SVaibhav Hiremath #define AM33XX_PM_MPU_PWRSTCTRL_OFFSET		0x0000
72ddd04b98SVaibhav Hiremath #define AM33XX_PM_MPU_PWRSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_MPU_MOD, 0x0000)
73ddd04b98SVaibhav Hiremath #define AM33XX_PM_MPU_PWRSTST_OFFSET		0x0004
74ddd04b98SVaibhav Hiremath #define AM33XX_PM_MPU_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_MPU_MOD, 0x0004)
75ddd04b98SVaibhav Hiremath #define AM33XX_RM_MPU_RSTST_OFFSET		0x0008
76ddd04b98SVaibhav Hiremath #define AM33XX_RM_MPU_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_MPU_MOD, 0x0008)
77ddd04b98SVaibhav Hiremath 
78ddd04b98SVaibhav Hiremath /* PRM.DEVICE_PRM register offsets */
79ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RSTCTRL_OFFSET		0x0000
80ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0000)
81ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RSTTIME_OFFSET		0x0004
82ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RSTTIME			AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0004)
83ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RSTST_OFFSET			0x0008
84ddd04b98SVaibhav Hiremath #define AM33XX_PRM_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0008)
85ddd04b98SVaibhav Hiremath #define AM33XX_PRM_SRAM_COUNT_OFFSET		0x000c
86ddd04b98SVaibhav Hiremath #define AM33XX_PRM_SRAM_COUNT			AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x000c)
87ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_CORE_SETUP_OFFSET	0x0010
88ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_CORE_SETUP		AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0010)
89ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_CORE_CTRL_OFFSET	0x0014
90ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_CORE_CTRL		AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0014)
91ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_MPU_SETUP_OFFSET	0x0018
92ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_MPU_SETUP		AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x0018)
93ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_MPU_CTRL_OFFSET	0x001c
94ddd04b98SVaibhav Hiremath #define AM33XX_PRM_LDO_SRAM_MPU_CTRL		AM33XX_PRM_REGADDR(AM33XX_PRM_DEVICE_MOD, 0x001c)
95ddd04b98SVaibhav Hiremath 
96ddd04b98SVaibhav Hiremath /* PRM.RTC_PRM register offsets */
97ddd04b98SVaibhav Hiremath #define AM33XX_PM_RTC_PWRSTCTRL_OFFSET		0x0000
98ddd04b98SVaibhav Hiremath #define AM33XX_PM_RTC_PWRSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_RTC_MOD, 0x0000)
99ddd04b98SVaibhav Hiremath #define AM33XX_PM_RTC_PWRSTST_OFFSET		0x0004
100ddd04b98SVaibhav Hiremath #define AM33XX_PM_RTC_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_RTC_MOD, 0x0004)
101ddd04b98SVaibhav Hiremath 
102ddd04b98SVaibhav Hiremath /* PRM.GFX_PRM register offsets */
103ddd04b98SVaibhav Hiremath #define AM33XX_PM_GFX_PWRSTCTRL_OFFSET		0x0000
104ddd04b98SVaibhav Hiremath #define AM33XX_PM_GFX_PWRSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0000)
105ddd04b98SVaibhav Hiremath #define AM33XX_RM_GFX_RSTCTRL_OFFSET		0x0004
106ddd04b98SVaibhav Hiremath #define AM33XX_RM_GFX_RSTCTRL			AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0004)
107ddd04b98SVaibhav Hiremath #define AM33XX_PM_GFX_PWRSTST_OFFSET		0x0010
108ddd04b98SVaibhav Hiremath #define AM33XX_PM_GFX_PWRSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0010)
109ddd04b98SVaibhav Hiremath #define AM33XX_RM_GFX_RSTST_OFFSET		0x0014
110ddd04b98SVaibhav Hiremath #define AM33XX_RM_GFX_RSTST			AM33XX_PRM_REGADDR(AM33XX_PRM_GFX_MOD, 0x0014)
111ddd04b98SVaibhav Hiremath 
112ddd04b98SVaibhav Hiremath /* PRM.CEFUSE_PRM register offsets */
113ddd04b98SVaibhav Hiremath #define AM33XX_PM_CEFUSE_PWRSTCTRL_OFFSET	0x0000
114ddd04b98SVaibhav Hiremath #define AM33XX_PM_CEFUSE_PWRSTCTRL		AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0000)
115ddd04b98SVaibhav Hiremath #define AM33XX_PM_CEFUSE_PWRSTST_OFFSET		0x0004
116ddd04b98SVaibhav Hiremath #define AM33XX_PM_CEFUSE_PWRSTST		AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0004)
117ddd04b98SVaibhav Hiremath 
1181a7cb4d9SVaibhav Bedia #ifndef __ASSEMBLER__
119ab7b2ffcSTero Kristo int am33xx_prm_init(const struct omap_prcm_init_data *data);
120d9bbe84fSTero Kristo 
1211a7cb4d9SVaibhav Bedia #endif /* ASSEMBLER */
122ddd04b98SVaibhav Hiremath #endif
123