162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Hardware definitions for TI OMAP processors and boards 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * NOTE: Please put device driver specific defines into a separate header 562306a36Sopenharmony_ci * file for each driver. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Copyright (C) 2001 RidgeRun, Inc. 862306a36Sopenharmony_ci * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com> 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com> 1162306a36Sopenharmony_ci * and Dirk Behme <dirk.behme@de.bosch.com> 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 1462306a36Sopenharmony_ci * under the terms of the GNU General Public License as published by the 1562306a36Sopenharmony_ci * Free Software Foundation; either version 2 of the License, or (at your 1662306a36Sopenharmony_ci * option) any later version. 1762306a36Sopenharmony_ci * 1862306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 1962306a36Sopenharmony_ci * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2062306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 2162306a36Sopenharmony_ci * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2262306a36Sopenharmony_ci * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2362306a36Sopenharmony_ci * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2462306a36Sopenharmony_ci * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 2562306a36Sopenharmony_ci * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2662306a36Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2762306a36Sopenharmony_ci * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2862306a36Sopenharmony_ci * 2962306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License along 3062306a36Sopenharmony_ci * with this program; if not, write to the Free Software Foundation, Inc., 3162306a36Sopenharmony_ci * 675 Mass Ave, Cambridge, MA 02139, USA. 3262306a36Sopenharmony_ci */ 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#ifndef __ASM_ARCH_OMAP_HARDWARE_H 3562306a36Sopenharmony_ci#define __ASM_ARCH_OMAP_HARDWARE_H 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#include <linux/sizes.h> 3862306a36Sopenharmony_ci#include <linux/soc/ti/omap1-io.h> 3962306a36Sopenharmony_ci#ifndef __ASSEMBLER__ 4062306a36Sopenharmony_ci#include <asm/types.h> 4162306a36Sopenharmony_ci#include <linux/soc/ti/omap1-soc.h> 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#include "tc.h" 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci/* Almost all documentation for chip and board memory maps assumes 4662306a36Sopenharmony_ci * BM is clear. Most devel boards have a switch to control booting 4762306a36Sopenharmony_ci * from NOR flash (using external chipselect 3) rather than mask ROM, 4862306a36Sopenharmony_ci * which uses BM to interchange the physical CS0 and CS3 addresses. 4962306a36Sopenharmony_ci */ 5062306a36Sopenharmony_cistatic inline u32 omap_cs0m_phys(void) 5162306a36Sopenharmony_ci{ 5262306a36Sopenharmony_ci return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) 5362306a36Sopenharmony_ci ? OMAP_CS3_PHYS : 0; 5462306a36Sopenharmony_ci} 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cistatic inline u32 omap_cs3_phys(void) 5762306a36Sopenharmony_ci{ 5862306a36Sopenharmony_ci return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) 5962306a36Sopenharmony_ci ? 0 : OMAP_CS3_PHYS; 6062306a36Sopenharmony_ci} 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#endif /* ifndef __ASSEMBLER__ */ 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define OMAP1_IO_OFFSET 0x00f00000 /* Virtual IO = 0xff0b0000 */ 6562306a36Sopenharmony_ci#define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#include "serial.h" 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci/* 7062306a36Sopenharmony_ci * --------------------------------------------------------------------------- 7162306a36Sopenharmony_ci * Common definitions for all OMAP processors 7262306a36Sopenharmony_ci * NOTE: Put all processor or board specific parts to the special header 7362306a36Sopenharmony_ci * files. 7462306a36Sopenharmony_ci * --------------------------------------------------------------------------- 7562306a36Sopenharmony_ci */ 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci/* 7862306a36Sopenharmony_ci * ---------------------------------------------------------------------------- 7962306a36Sopenharmony_ci * Timers 8062306a36Sopenharmony_ci * ---------------------------------------------------------------------------- 8162306a36Sopenharmony_ci */ 8262306a36Sopenharmony_ci#define OMAP_MPU_TIMER1_BASE (0xfffec500) 8362306a36Sopenharmony_ci#define OMAP_MPU_TIMER2_BASE (0xfffec600) 8462306a36Sopenharmony_ci#define OMAP_MPU_TIMER3_BASE (0xfffec700) 8562306a36Sopenharmony_ci#define MPU_TIMER_FREE (1 << 6) 8662306a36Sopenharmony_ci#define MPU_TIMER_CLOCK_ENABLE (1 << 5) 8762306a36Sopenharmony_ci#define MPU_TIMER_AR (1 << 1) 8862306a36Sopenharmony_ci#define MPU_TIMER_ST (1 << 0) 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci/* 9162306a36Sopenharmony_ci * --------------------------------------------------------------------------- 9262306a36Sopenharmony_ci * Watchdog timer 9362306a36Sopenharmony_ci * --------------------------------------------------------------------------- 9462306a36Sopenharmony_ci */ 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci/* Watchdog timer within the OMAP3.2 gigacell */ 9762306a36Sopenharmony_ci#define OMAP_MPU_WATCHDOG_BASE (0xfffec800) 9862306a36Sopenharmony_ci#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0) 9962306a36Sopenharmony_ci#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4) 10062306a36Sopenharmony_ci#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4) 10162306a36Sopenharmony_ci#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8) 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci/* 10462306a36Sopenharmony_ci * --------------------------------------------------------------------------- 10562306a36Sopenharmony_ci * Interrupts 10662306a36Sopenharmony_ci * --------------------------------------------------------------------------- 10762306a36Sopenharmony_ci */ 10862306a36Sopenharmony_ci#ifdef CONFIG_ARCH_OMAP1 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ci/* 11162306a36Sopenharmony_ci * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c 11262306a36Sopenharmony_ci * or something similar.. -- PFM. 11362306a36Sopenharmony_ci */ 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci#define OMAP_IH1_BASE 0xfffecb00 11662306a36Sopenharmony_ci#define OMAP_IH2_BASE 0xfffe0000 11762306a36Sopenharmony_ci#define OMAP_IH2_0_BASE (0xfffe0000) 11862306a36Sopenharmony_ci#define OMAP_IH2_1_BASE (0xfffe0100) 11962306a36Sopenharmony_ci#define OMAP_IH2_2_BASE (0xfffe0200) 12062306a36Sopenharmony_ci#define OMAP_IH2_3_BASE (0xfffe0300) 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ci#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00) 12362306a36Sopenharmony_ci#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04) 12462306a36Sopenharmony_ci#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10) 12562306a36Sopenharmony_ci#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14) 12662306a36Sopenharmony_ci#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18) 12762306a36Sopenharmony_ci#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c) 12862306a36Sopenharmony_ci#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c) 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00) 13162306a36Sopenharmony_ci#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04) 13262306a36Sopenharmony_ci#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10) 13362306a36Sopenharmony_ci#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14) 13462306a36Sopenharmony_ci#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18) 13562306a36Sopenharmony_ci#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c) 13662306a36Sopenharmony_ci#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c) 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ci#define OMAP_IH2_0_ITR (OMAP_IH2_0_BASE + 0x00) 13962306a36Sopenharmony_ci#define OMAP_IH2_0_MIR (OMAP_IH2_0_BASE + 0x04) 14062306a36Sopenharmony_ci#define OMAP_IH2_0_SIR_IRQ (OMAP_IH2_0_BASE + 0x10) 14162306a36Sopenharmony_ci#define OMAP_IH2_0_SIR_FIQ (OMAP_IH2_0_BASE + 0x14) 14262306a36Sopenharmony_ci#define OMAP_IH2_0_CONTROL (OMAP_IH2_0_BASE + 0x18) 14362306a36Sopenharmony_ci#define OMAP_IH2_0_ILR0 (OMAP_IH2_0_BASE + 0x1c) 14462306a36Sopenharmony_ci#define OMAP_IH2_0_ISR (OMAP_IH2_0_BASE + 0x9c) 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_ci#define OMAP_IH2_1_ITR (OMAP_IH2_1_BASE + 0x00) 14762306a36Sopenharmony_ci#define OMAP_IH2_1_MIR (OMAP_IH2_1_BASE + 0x04) 14862306a36Sopenharmony_ci#define OMAP_IH2_1_SIR_IRQ (OMAP_IH2_1_BASE + 0x10) 14962306a36Sopenharmony_ci#define OMAP_IH2_1_SIR_FIQ (OMAP_IH2_1_BASE + 0x14) 15062306a36Sopenharmony_ci#define OMAP_IH2_1_CONTROL (OMAP_IH2_1_BASE + 0x18) 15162306a36Sopenharmony_ci#define OMAP_IH2_1_ILR1 (OMAP_IH2_1_BASE + 0x1c) 15262306a36Sopenharmony_ci#define OMAP_IH2_1_ISR (OMAP_IH2_1_BASE + 0x9c) 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci#define OMAP_IH2_2_ITR (OMAP_IH2_2_BASE + 0x00) 15562306a36Sopenharmony_ci#define OMAP_IH2_2_MIR (OMAP_IH2_2_BASE + 0x04) 15662306a36Sopenharmony_ci#define OMAP_IH2_2_SIR_IRQ (OMAP_IH2_2_BASE + 0x10) 15762306a36Sopenharmony_ci#define OMAP_IH2_2_SIR_FIQ (OMAP_IH2_2_BASE + 0x14) 15862306a36Sopenharmony_ci#define OMAP_IH2_2_CONTROL (OMAP_IH2_2_BASE + 0x18) 15962306a36Sopenharmony_ci#define OMAP_IH2_2_ILR2 (OMAP_IH2_2_BASE + 0x1c) 16062306a36Sopenharmony_ci#define OMAP_IH2_2_ISR (OMAP_IH2_2_BASE + 0x9c) 16162306a36Sopenharmony_ci 16262306a36Sopenharmony_ci#define OMAP_IH2_3_ITR (OMAP_IH2_3_BASE + 0x00) 16362306a36Sopenharmony_ci#define OMAP_IH2_3_MIR (OMAP_IH2_3_BASE + 0x04) 16462306a36Sopenharmony_ci#define OMAP_IH2_3_SIR_IRQ (OMAP_IH2_3_BASE + 0x10) 16562306a36Sopenharmony_ci#define OMAP_IH2_3_SIR_FIQ (OMAP_IH2_3_BASE + 0x14) 16662306a36Sopenharmony_ci#define OMAP_IH2_3_CONTROL (OMAP_IH2_3_BASE + 0x18) 16762306a36Sopenharmony_ci#define OMAP_IH2_3_ILR3 (OMAP_IH2_3_BASE + 0x1c) 16862306a36Sopenharmony_ci#define OMAP_IH2_3_ISR (OMAP_IH2_3_BASE + 0x9c) 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ci#define IRQ_ITR_REG_OFFSET 0x00 17162306a36Sopenharmony_ci#define IRQ_MIR_REG_OFFSET 0x04 17262306a36Sopenharmony_ci#define IRQ_SIR_IRQ_REG_OFFSET 0x10 17362306a36Sopenharmony_ci#define IRQ_SIR_FIQ_REG_OFFSET 0x14 17462306a36Sopenharmony_ci#define IRQ_CONTROL_REG_OFFSET 0x18 17562306a36Sopenharmony_ci#define IRQ_ISR_REG_OFFSET 0x9c 17662306a36Sopenharmony_ci#define IRQ_ILR0_REG_OFFSET 0x1c 17762306a36Sopenharmony_ci#define IRQ_GMR_REG_OFFSET 0xa0 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#endif 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci/* Timer32K for 1610 and 1710*/ 18262306a36Sopenharmony_ci#define OMAP_TIMER32K_BASE 0xFFFBC400 18362306a36Sopenharmony_ci 18462306a36Sopenharmony_ci/* 18562306a36Sopenharmony_ci * --------------------------------------------------------------------------- 18662306a36Sopenharmony_ci * TIPB bus interface 18762306a36Sopenharmony_ci * --------------------------------------------------------------------------- 18862306a36Sopenharmony_ci */ 18962306a36Sopenharmony_ci#define TIPB_PUBLIC_CNTL_BASE 0xfffed300 19062306a36Sopenharmony_ci#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8) 19162306a36Sopenharmony_ci#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00 19262306a36Sopenharmony_ci#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8) 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ci/* 19562306a36Sopenharmony_ci * ---------------------------------------------------------------------------- 19662306a36Sopenharmony_ci * MPUI interface 19762306a36Sopenharmony_ci * ---------------------------------------------------------------------------- 19862306a36Sopenharmony_ci */ 19962306a36Sopenharmony_ci#define MPUI_BASE (0xfffec900) 20062306a36Sopenharmony_ci#define MPUI_CTRL (MPUI_BASE + 0x0) 20162306a36Sopenharmony_ci#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4) 20262306a36Sopenharmony_ci#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8) 20362306a36Sopenharmony_ci#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc) 20462306a36Sopenharmony_ci#define MPUI_STATUS_REG (MPUI_BASE + 0x10) 20562306a36Sopenharmony_ci#define MPUI_DSP_STATUS (MPUI_BASE + 0x14) 20662306a36Sopenharmony_ci#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18) 20762306a36Sopenharmony_ci#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c) 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci/* 21062306a36Sopenharmony_ci * ---------------------------------------------------------------------------- 21162306a36Sopenharmony_ci * LED Pulse Generator 21262306a36Sopenharmony_ci * ---------------------------------------------------------------------------- 21362306a36Sopenharmony_ci */ 21462306a36Sopenharmony_ci#define OMAP_LPG1_BASE 0xfffbd000 21562306a36Sopenharmony_ci#define OMAP_LPG2_BASE 0xfffbd800 21662306a36Sopenharmony_ci#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00) 21762306a36Sopenharmony_ci#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04) 21862306a36Sopenharmony_ci#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00) 21962306a36Sopenharmony_ci#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04) 22062306a36Sopenharmony_ci 22162306a36Sopenharmony_ci/* 22262306a36Sopenharmony_ci * --------------------------------------------------------------------------- 22362306a36Sopenharmony_ci * DSP 22462306a36Sopenharmony_ci * --------------------------------------------------------------------------- 22562306a36Sopenharmony_ci */ 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_ci#define OMAP1_DSP_BASE 0xE0000000 22862306a36Sopenharmony_ci#define OMAP1_DSP_SIZE 0x28000 22962306a36Sopenharmony_ci#define OMAP1_DSP_START 0xE0000000 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_ci#define OMAP1_DSPREG_BASE 0xE1000000 23262306a36Sopenharmony_ci#define OMAP1_DSPREG_SIZE SZ_128K 23362306a36Sopenharmony_ci#define OMAP1_DSPREG_START 0xE1000000 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci#endif /* __ASM_ARCH_OMAP_HARDWARE_H */ 236