1508a58faSSricharan /* 2508a58faSSricharan * (C) Copyright 2006-2010 3508a58faSSricharan * Texas Instruments, <www.ti.com> 4508a58faSSricharan * 5508a58faSSricharan * Aneesh V <aneesh@ti.com> 6508a58faSSricharan * 7508a58faSSricharan * See file CREDITS for list of people who contributed to this 8508a58faSSricharan * project. 9508a58faSSricharan * 10508a58faSSricharan * This program is free software; you can redistribute it and/or 11508a58faSSricharan * modify it under the terms of the GNU General Public License as 12508a58faSSricharan * published by the Free Software Foundation; either version 2 of 13508a58faSSricharan * the License, or (at your option) any later version. 14508a58faSSricharan * 15508a58faSSricharan * This program is distributed in the hope that it will be useful, 16508a58faSSricharan * but WITHOUT ANY WARRANTY; without even the implied warranty of 17508a58faSSricharan * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18508a58faSSricharan * GNU General Public License for more details. 19508a58faSSricharan * 20508a58faSSricharan * You should have received a copy of the GNU General Public License 21508a58faSSricharan * along with this program; if not, write to the Free Software 22508a58faSSricharan * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23508a58faSSricharan * MA 02111-1307 USA 24508a58faSSricharan * 25508a58faSSricharan */ 26508a58faSSricharan 27508a58faSSricharan #ifndef _CPU_H 28508a58faSSricharan #define _CPU_H 29508a58faSSricharan 30508a58faSSricharan #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) 31508a58faSSricharan #include <asm/types.h> 32508a58faSSricharan #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ 33508a58faSSricharan 34508a58faSSricharan #ifndef __KERNEL_STRICT_NAMES 35508a58faSSricharan #ifndef __ASSEMBLY__ 36508a58faSSricharan struct gpmc_cs { 37508a58faSSricharan u32 config1; /* 0x00 */ 38508a58faSSricharan u32 config2; /* 0x04 */ 39508a58faSSricharan u32 config3; /* 0x08 */ 40508a58faSSricharan u32 config4; /* 0x0C */ 41508a58faSSricharan u32 config5; /* 0x10 */ 42508a58faSSricharan u32 config6; /* 0x14 */ 43508a58faSSricharan u32 config7; /* 0x18 */ 44508a58faSSricharan u32 nand_cmd; /* 0x1C */ 45508a58faSSricharan u32 nand_adr; /* 0x20 */ 46508a58faSSricharan u32 nand_dat; /* 0x24 */ 47508a58faSSricharan u8 res[8]; /* blow up to 0x30 byte */ 48508a58faSSricharan }; 49508a58faSSricharan 50508a58faSSricharan struct gpmc { 51508a58faSSricharan u8 res1[0x10]; 52508a58faSSricharan u32 sysconfig; /* 0x10 */ 53508a58faSSricharan u8 res2[0x4]; 54508a58faSSricharan u32 irqstatus; /* 0x18 */ 55508a58faSSricharan u32 irqenable; /* 0x1C */ 56508a58faSSricharan u8 res3[0x20]; 57508a58faSSricharan u32 timeout_control; /* 0x40 */ 58508a58faSSricharan u8 res4[0xC]; 59508a58faSSricharan u32 config; /* 0x50 */ 60508a58faSSricharan u32 status; /* 0x54 */ 61508a58faSSricharan u8 res5[0x8]; /* 0x58 */ 62508a58faSSricharan struct gpmc_cs cs[8]; /* 0x60, 0x90, .. */ 63508a58faSSricharan u8 res6[0x14]; /* 0x1E0 */ 64508a58faSSricharan u32 ecc_config; /* 0x1F4 */ 65508a58faSSricharan u32 ecc_control; /* 0x1F8 */ 66508a58faSSricharan u32 ecc_size_config; /* 0x1FC */ 67508a58faSSricharan u32 ecc1_result; /* 0x200 */ 68508a58faSSricharan u32 ecc2_result; /* 0x204 */ 69508a58faSSricharan u32 ecc3_result; /* 0x208 */ 70508a58faSSricharan u32 ecc4_result; /* 0x20C */ 71508a58faSSricharan u32 ecc5_result; /* 0x210 */ 72508a58faSSricharan u32 ecc6_result; /* 0x214 */ 73508a58faSSricharan u32 ecc7_result; /* 0x218 */ 74508a58faSSricharan u32 ecc8_result; /* 0x21C */ 75508a58faSSricharan u32 ecc9_result; /* 0x220 */ 76508a58faSSricharan }; 77508a58faSSricharan 78508a58faSSricharan /* Used for board specific gpmc initialization */ 79508a58faSSricharan extern struct gpmc *gpmc_cfg; 80508a58faSSricharan 81508a58faSSricharan struct gptimer { 82508a58faSSricharan u32 tidr; /* 0x00 r */ 83508a58faSSricharan u8 res1[0xc]; 84508a58faSSricharan u32 tiocp_cfg; /* 0x10 rw */ 85508a58faSSricharan u8 res2[0x10]; 86508a58faSSricharan u32 tisr_raw; /* 0x24 r */ 87508a58faSSricharan u32 tisr; /* 0x28 rw */ 88508a58faSSricharan u32 tier; /* 0x2c rw */ 89508a58faSSricharan u32 ticr; /* 0x30 rw */ 90508a58faSSricharan u32 twer; /* 0x34 rw */ 91508a58faSSricharan u32 tclr; /* 0x38 rw */ 92508a58faSSricharan u32 tcrr; /* 0x3c rw */ 93508a58faSSricharan u32 tldr; /* 0x40 rw */ 94508a58faSSricharan u32 ttgr; /* 0x44 rw */ 95508a58faSSricharan u32 twpc; /* 0x48 r */ 96508a58faSSricharan u32 tmar; /* 0x4c rw */ 97508a58faSSricharan u32 tcar1; /* 0x50 r */ 98508a58faSSricharan u32 tcicr; /* 0x54 rw */ 99508a58faSSricharan u32 tcar2; /* 0x58 r */ 100508a58faSSricharan }; 101508a58faSSricharan #endif /* __ASSEMBLY__ */ 102508a58faSSricharan #endif /* __KERNEL_STRICT_NAMES */ 103508a58faSSricharan 104508a58faSSricharan /* enable sys_clk NO-prescale /1 */ 105508a58faSSricharan #define GPT_EN ((0x0 << 2) | (0x1 << 1) | (0x1 << 0)) 106508a58faSSricharan 107508a58faSSricharan /* Watchdog */ 108508a58faSSricharan #ifndef __KERNEL_STRICT_NAMES 109508a58faSSricharan #ifndef __ASSEMBLY__ 110508a58faSSricharan struct watchdog { 111508a58faSSricharan u8 res1[0x34]; 112508a58faSSricharan u32 wwps; /* 0x34 r */ 113508a58faSSricharan u8 res2[0x10]; 114508a58faSSricharan u32 wspr; /* 0x48 rw */ 115508a58faSSricharan }; 116508a58faSSricharan #endif /* __ASSEMBLY__ */ 117508a58faSSricharan #endif /* __KERNEL_STRICT_NAMES */ 118508a58faSSricharan 119508a58faSSricharan #define WD_UNLOCK1 0xAAAA 120508a58faSSricharan #define WD_UNLOCK2 0x5555 121508a58faSSricharan 122508a58faSSricharan #define SYSCLKDIV_1 (0x1 << 6) 123508a58faSSricharan #define SYSCLKDIV_2 (0x1 << 7) 124508a58faSSricharan 125508a58faSSricharan #define CLKSEL_GPT1 (0x1 << 0) 126508a58faSSricharan 127508a58faSSricharan #define EN_GPT1 (0x1 << 0) 128508a58faSSricharan #define EN_32KSYNC (0x1 << 2) 129508a58faSSricharan 130508a58faSSricharan #define ST_WDT2 (0x1 << 5) 131508a58faSSricharan 132508a58faSSricharan #define RESETDONE (0x1 << 0) 133508a58faSSricharan 134508a58faSSricharan #define TCLR_ST (0x1 << 0) 135508a58faSSricharan #define TCLR_AR (0x1 << 1) 136508a58faSSricharan #define TCLR_PRE (0x1 << 5) 137508a58faSSricharan 138508a58faSSricharan /* GPMC BASE */ 139508a58faSSricharan #define GPMC_BASE (OMAP54XX_GPMC_BASE) 140508a58faSSricharan 141508a58faSSricharan /* I2C base */ 142508a58faSSricharan #define I2C_BASE1 (OMAP54XX_L4_PER_BASE + 0x70000) 143508a58faSSricharan #define I2C_BASE2 (OMAP54XX_L4_PER_BASE + 0x72000) 144508a58faSSricharan #define I2C_BASE3 (OMAP54XX_L4_PER_BASE + 0x60000) 145*aebe7ff2SLubomir Popov #define I2C_BASE4 (OMAP54XX_L4_PER_BASE + 0x7A000) 146*aebe7ff2SLubomir Popov #define I2C_BASE5 (OMAP54XX_L4_PER_BASE + 0x7C000) 147508a58faSSricharan 148508a58faSSricharan /* MUSB base */ 149508a58faSSricharan #define MUSB_BASE (OMAP54XX_L4_CORE_BASE + 0xAB000) 150508a58faSSricharan 151508a58faSSricharan /* OMAP4 GPIO registers */ 152508a58faSSricharan #define OMAP_GPIO_REVISION 0x0000 153508a58faSSricharan #define OMAP_GPIO_SYSCONFIG 0x0010 154508a58faSSricharan #define OMAP_GPIO_SYSSTATUS 0x0114 155508a58faSSricharan #define OMAP_GPIO_IRQSTATUS1 0x0118 156508a58faSSricharan #define OMAP_GPIO_IRQSTATUS2 0x0128 157508a58faSSricharan #define OMAP_GPIO_IRQENABLE2 0x012c 158508a58faSSricharan #define OMAP_GPIO_IRQENABLE1 0x011c 159508a58faSSricharan #define OMAP_GPIO_WAKE_EN 0x0120 160508a58faSSricharan #define OMAP_GPIO_CTRL 0x0130 161508a58faSSricharan #define OMAP_GPIO_OE 0x0134 162508a58faSSricharan #define OMAP_GPIO_DATAIN 0x0138 163508a58faSSricharan #define OMAP_GPIO_DATAOUT 0x013c 164508a58faSSricharan #define OMAP_GPIO_LEVELDETECT0 0x0140 165508a58faSSricharan #define OMAP_GPIO_LEVELDETECT1 0x0144 166508a58faSSricharan #define OMAP_GPIO_RISINGDETECT 0x0148 167508a58faSSricharan #define OMAP_GPIO_FALLINGDETECT 0x014c 168508a58faSSricharan #define OMAP_GPIO_DEBOUNCE_EN 0x0150 169508a58faSSricharan #define OMAP_GPIO_DEBOUNCE_VAL 0x0154 170508a58faSSricharan #define OMAP_GPIO_CLEARIRQENABLE1 0x0160 171508a58faSSricharan #define OMAP_GPIO_SETIRQENABLE1 0x0164 172508a58faSSricharan #define OMAP_GPIO_CLEARWKUENA 0x0180 173508a58faSSricharan #define OMAP_GPIO_SETWKUENA 0x0184 174508a58faSSricharan #define OMAP_GPIO_CLEARDATAOUT 0x0190 175508a58faSSricharan #define OMAP_GPIO_SETDATAOUT 0x0194 176508a58faSSricharan 177d417d1dbSSRICHARAN R /* 178d417d1dbSSRICHARAN R * PRCM 179d417d1dbSSRICHARAN R */ 180d417d1dbSSRICHARAN R 181d417d1dbSSRICHARAN R /* PRM */ 182d417d1dbSSRICHARAN R #define PRM_BASE 0x4AE06000 183d417d1dbSSRICHARAN R #define PRM_DEVICE_BASE (PRM_BASE + 0x1B00) 184d417d1dbSSRICHARAN R 185d417d1dbSSRICHARAN R #define PRM_RSTCTRL PRM_DEVICE_BASE 186d417d1dbSSRICHARAN R #define PRM_RSTCTRL_RESET 0x01 18770239507SLokesh Vutla #define PRM_RSTST (PRM_DEVICE_BASE + 0x4) 18870239507SLokesh Vutla #define PRM_RSTST_WARM_RESET_MASK 0x7FEA 189d417d1dbSSRICHARAN R 190508a58faSSricharan #endif /* _CPU_H */ 191