1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2508a58faSSricharan /* 3508a58faSSricharan * (C) Copyright 2006-2010 4508a58faSSricharan * Texas Instruments, <www.ti.com> 5508a58faSSricharan * 6508a58faSSricharan * Aneesh V <aneesh@ti.com> 7508a58faSSricharan */ 8508a58faSSricharan 9508a58faSSricharan #ifndef _CPU_H 10508a58faSSricharan #define _CPU_H 11508a58faSSricharan 12508a58faSSricharan #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) 13508a58faSSricharan #include <asm/types.h> 14508a58faSSricharan #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ 15508a58faSSricharan 16cd324a6dSpekon gupta #include <asm/arch/hardware.h> 17cd324a6dSpekon gupta 18508a58faSSricharan #ifndef __KERNEL_STRICT_NAMES 19508a58faSSricharan #ifndef __ASSEMBLY__ 20d7ebbe9dSLukasz Majewski #include <asm/ti-common/omap_wdt.h> 21d7ebbe9dSLukasz Majewski 22508a58faSSricharan struct gptimer { 23508a58faSSricharan u32 tidr; /* 0x00 r */ 24508a58faSSricharan u8 res1[0xc]; 25508a58faSSricharan u32 tiocp_cfg; /* 0x10 rw */ 26508a58faSSricharan u8 res2[0x10]; 27508a58faSSricharan u32 tisr_raw; /* 0x24 r */ 28508a58faSSricharan u32 tisr; /* 0x28 rw */ 29508a58faSSricharan u32 tier; /* 0x2c rw */ 30508a58faSSricharan u32 ticr; /* 0x30 rw */ 31508a58faSSricharan u32 twer; /* 0x34 rw */ 32508a58faSSricharan u32 tclr; /* 0x38 rw */ 33508a58faSSricharan u32 tcrr; /* 0x3c rw */ 34508a58faSSricharan u32 tldr; /* 0x40 rw */ 35508a58faSSricharan u32 ttgr; /* 0x44 rw */ 36508a58faSSricharan u32 twpc; /* 0x48 r */ 37508a58faSSricharan u32 tmar; /* 0x4c rw */ 38508a58faSSricharan u32 tcar1; /* 0x50 r */ 39508a58faSSricharan u32 tcicr; /* 0x54 rw */ 40508a58faSSricharan u32 tcar2; /* 0x58 r */ 41508a58faSSricharan }; 42508a58faSSricharan #endif /* __ASSEMBLY__ */ 43508a58faSSricharan #endif /* __KERNEL_STRICT_NAMES */ 44508a58faSSricharan 45508a58faSSricharan /* enable sys_clk NO-prescale /1 */ 46508a58faSSricharan #define GPT_EN ((0x0 << 2) | (0x1 << 1) | (0x1 << 0)) 47508a58faSSricharan 48737af819SLukasz Majewski #define WDT_BASE (OMAP54XX_L4_WKUP_BASE + 0x14000) 49508a58faSSricharan /* Watchdog */ 50508a58faSSricharan #ifndef __KERNEL_STRICT_NAMES 51508a58faSSricharan #ifndef __ASSEMBLY__ 52508a58faSSricharan struct watchdog { 53508a58faSSricharan u8 res1[0x34]; 54508a58faSSricharan u32 wwps; /* 0x34 r */ 55508a58faSSricharan u8 res2[0x10]; 56508a58faSSricharan u32 wspr; /* 0x48 rw */ 57508a58faSSricharan }; 58508a58faSSricharan #endif /* __ASSEMBLY__ */ 59508a58faSSricharan #endif /* __KERNEL_STRICT_NAMES */ 60508a58faSSricharan 61508a58faSSricharan #define WD_UNLOCK1 0xAAAA 62508a58faSSricharan #define WD_UNLOCK2 0x5555 63508a58faSSricharan 64508a58faSSricharan #define TCLR_ST (0x1 << 0) 65508a58faSSricharan #define TCLR_AR (0x1 << 1) 66508a58faSSricharan #define TCLR_PRE (0x1 << 5) 67508a58faSSricharan 68508a58faSSricharan /* I2C base */ 69508a58faSSricharan #define I2C_BASE1 (OMAP54XX_L4_PER_BASE + 0x70000) 70508a58faSSricharan #define I2C_BASE2 (OMAP54XX_L4_PER_BASE + 0x72000) 71508a58faSSricharan #define I2C_BASE3 (OMAP54XX_L4_PER_BASE + 0x60000) 72aebe7ff2SLubomir Popov #define I2C_BASE4 (OMAP54XX_L4_PER_BASE + 0x7A000) 73aebe7ff2SLubomir Popov #define I2C_BASE5 (OMAP54XX_L4_PER_BASE + 0x7C000) 74508a58faSSricharan 75508a58faSSricharan /* MUSB base */ 76508a58faSSricharan #define MUSB_BASE (OMAP54XX_L4_CORE_BASE + 0xAB000) 77508a58faSSricharan 78508a58faSSricharan /* OMAP4 GPIO registers */ 79508a58faSSricharan #define OMAP_GPIO_REVISION 0x0000 80508a58faSSricharan #define OMAP_GPIO_SYSCONFIG 0x0010 81508a58faSSricharan #define OMAP_GPIO_SYSSTATUS 0x0114 82508a58faSSricharan #define OMAP_GPIO_IRQSTATUS1 0x0118 83508a58faSSricharan #define OMAP_GPIO_IRQSTATUS2 0x0128 84508a58faSSricharan #define OMAP_GPIO_IRQENABLE2 0x012c 85508a58faSSricharan #define OMAP_GPIO_IRQENABLE1 0x011c 86508a58faSSricharan #define OMAP_GPIO_WAKE_EN 0x0120 87508a58faSSricharan #define OMAP_GPIO_CTRL 0x0130 88508a58faSSricharan #define OMAP_GPIO_OE 0x0134 89508a58faSSricharan #define OMAP_GPIO_DATAIN 0x0138 90508a58faSSricharan #define OMAP_GPIO_DATAOUT 0x013c 91508a58faSSricharan #define OMAP_GPIO_LEVELDETECT0 0x0140 92508a58faSSricharan #define OMAP_GPIO_LEVELDETECT1 0x0144 93508a58faSSricharan #define OMAP_GPIO_RISINGDETECT 0x0148 94508a58faSSricharan #define OMAP_GPIO_FALLINGDETECT 0x014c 95508a58faSSricharan #define OMAP_GPIO_DEBOUNCE_EN 0x0150 96508a58faSSricharan #define OMAP_GPIO_DEBOUNCE_VAL 0x0154 97508a58faSSricharan #define OMAP_GPIO_CLEARIRQENABLE1 0x0160 98508a58faSSricharan #define OMAP_GPIO_SETIRQENABLE1 0x0164 99508a58faSSricharan #define OMAP_GPIO_CLEARWKUENA 0x0180 100508a58faSSricharan #define OMAP_GPIO_SETWKUENA 0x0184 101508a58faSSricharan #define OMAP_GPIO_CLEARDATAOUT 0x0190 102508a58faSSricharan #define OMAP_GPIO_SETDATAOUT 0x0194 103508a58faSSricharan 104d417d1dbSSRICHARAN R /* 105d417d1dbSSRICHARAN R * PRCM 106d417d1dbSSRICHARAN R */ 107d417d1dbSSRICHARAN R 108d417d1dbSSRICHARAN R /* PRM */ 109d417d1dbSSRICHARAN R #define PRM_BASE 0x4AE06000 110d417d1dbSSRICHARAN R #define PRM_DEVICE_BASE (PRM_BASE + 0x1B00) 111d417d1dbSSRICHARAN R 112d417d1dbSSRICHARAN R #define PRM_RSTCTRL PRM_DEVICE_BASE 113d417d1dbSSRICHARAN R #define PRM_RSTCTRL_RESET 0x01 11470239507SLokesh Vutla #define PRM_RSTST (PRM_DEVICE_BASE + 0x4) 11570239507SLokesh Vutla #define PRM_RSTST_WARM_RESET_MASK 0x7FEA 116d417d1dbSSRICHARAN R 117b1e26e3bSMugunthan V N /* DRA7XX CPSW Config space */ 118b1e26e3bSMugunthan V N #define CPSW_BASE 0x48484000 119b1e26e3bSMugunthan V N #define CPSW_MDIO_BASE 0x48485000 120b1e26e3bSMugunthan V N 12170c5b7b3SMugunthan V N /* gmii_sel register defines */ 12270c5b7b3SMugunthan V N #define GMII1_SEL_MII 0x0 12370c5b7b3SMugunthan V N #define GMII1_SEL_RMII 0x1 12470c5b7b3SMugunthan V N #define GMII1_SEL_RGMII 0x2 12570c5b7b3SMugunthan V N #define GMII2_SEL_MII (GMII1_SEL_MII << 4) 12670c5b7b3SMugunthan V N #define GMII2_SEL_RMII (GMII1_SEL_RMII << 4) 12770c5b7b3SMugunthan V N #define GMII2_SEL_RGMII (GMII1_SEL_RGMII << 4) 12870c5b7b3SMugunthan V N 12970c5b7b3SMugunthan V N #define MII_MODE_ENABLE (GMII1_SEL_MII | GMII2_SEL_MII) 13070c5b7b3SMugunthan V N #define RMII_MODE_ENABLE (GMII1_SEL_RMII | GMII2_SEL_RMII) 13170c5b7b3SMugunthan V N #define RGMII_MODE_ENABLE (GMII1_SEL_RGMII | GMII2_SEL_RGMII) 13270c5b7b3SMugunthan V N 133508a58faSSricharan #endif /* _CPU_H */ 134