iq80321reg.h revision 135669
1193323Sed/*	$NetBSD: iq80321reg.h,v 1.4 2003/05/14 19:46:39 thorpej Exp $	*/
2193323Sed
3193323Sed/*
4193323Sed * Copyright (c) 2002 Wasabi Systems, Inc.
5193323Sed * All rights reserved.
6193323Sed *
7193323Sed * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8193323Sed *
9193323Sed * Redistribution and use in source and binary forms, with or without
10193323Sed * modification, are permitted provided that the following conditions
11193323Sed * are met:
12193323Sed * 1. Redistributions of source code must retain the above copyright
13193323Sed *    notice, this list of conditions and the following disclaimer.
14193323Sed * 2. Redistributions in binary form must reproduce the above copyright
15193323Sed *    notice, this list of conditions and the following disclaimer in the
16193323Sed *    documentation and/or other materials provided with the distribution.
17193323Sed * 3. All advertising materials mentioning features or use of this software
18249423Sdim *    must display the following acknowledgement:
19198090Srdivacky *	This product includes software developed for the NetBSD Project by
20249423Sdim *	Wasabi Systems, Inc.
21249423Sdim * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22193323Sed *    or promote products derived from this software without specific prior
23193323Sed *    written permission.
24193323Sed *
25193323Sed * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26193323Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27193323Sed * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28193323Sed * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
29193323Sed * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30193323Sed * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31193323Sed * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32193323Sed * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33207618Srdivacky * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34207618Srdivacky * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35193323Sed * POSSIBILITY OF SUCH DAMAGE.
36193323Sed *
37193323Sed * $FreeBSD: head/sys/arm/xscale/i80321/iq80321reg.h 135669 2004-09-23 22:45:36Z cognet $
38193323Sed *
39193323Sed */
40193323Sed
41193323Sed#ifndef _IQ80321REG_H_
42193323Sed#define	_IQ80321REG_H_
43193323Sed
44193323Sed/*
45207618Srdivacky * Memory map and register definitions for the Intel IQ80321
46207618Srdivacky * Evaluation Board.
47193323Sed */
48193323Sed
49193323Sed/*
50193323Sed * The memory map of the IQ80321 looks like so:
51193323Sed *
52207618Srdivacky *           ------------------------------
53193323Sed *		Intel 80321 IOP Reserved
54193323Sed * FFFF E900 ------------------------------
55207618Srdivacky *		Peripheral Memory Mapped
56193323Sed *		    Registers
57193323Sed * FFFF E000 ------------------------------
58193323Sed *		On-board devices
59193323Sed * FE80 0000 ------------------------------
60193323Sed *		SDRAM
61193323Sed * A000 0000 ------------------------------
62193323Sed *		Reserved
63193323Sed * 9100 0000 ------------------------------
64207618Srdivacky * 		Flash
65207618Srdivacky * 9080 0000 ------------------------------
66193323Sed *		Reserved
67193323Sed * 9002 0000 ------------------------------
68193323Sed *		ATU Outbound Transaction
69207618Srdivacky *		    Windows
70207618Srdivacky * 8000 0000 ------------------------------
71207618Srdivacky *		ATU Outbound Direct
72207618Srdivacky *		    Addressing Windows
73193323Sed * 0000 1000 ------------------------------
74193323Sed *		Initialization Boot Code
75193323Sed *		    from Flash
76193323Sed * 0000 0000 ------------------------------
77193323Sed */
78193323Sed
79193323Sed/*
80193323Sed * We allocate a page table for VA 0xfe400000 (4MB) and map the
81193323Sed * PCI I/O space (64K) and i80321 memory-mapped registers (4K) there.
82193323Sed */
83193323Sed#define	IQ80321_IOPXS_VBASE	0xfe400000UL
84193323Sed#define	IQ80321_IOW_VBASE	IQ80321_IOPXS_VBASE
85193323Sed#define	IQ80321_80321_VBASE	(IQ80321_IOW_VBASE +			\
86193323Sed				 VERDE_OUT_XLATE_IO_WIN_SIZE)
87198090Srdivacky
88193323Sed/*
89193323Sed * The IQ80321 on-board devices are mapped VA==PA during bootstrap.
90193323Sed * Conveniently, the size of the on-board register space is 1 section
91193323Sed * mapping.
92193323Sed */
93193323Sed#define	IQ80321_OBIO_BASE	0xfe800000UL
94193323Sed#define	IQ80321_OBIO_SIZE	0x00100000UL	/* 1MB */
95193323Sed
96193323Sed#define	IQ80321_UART1		0xfe800000UL	/* TI 16550 */
97193323Sed
98198090Srdivacky#define	IQ80321_7SEG_MSB	0xfe840000UL
99193323Sed#define	IQ80321_7SEG_LSB	0xfe850000UL
100207618Srdivacky
101193323Sed#define	IQ80321_ROT_SWITCH	0xfe8d0000UL
102193323Sed
103193323Sed#define	IQ80321_BATTERY_STAT	0xfe8f0000UL
104193323Sed#define	BATTERY_STAT_PRES	(1U << 0)
105193323Sed#define	BATTERY_STAT_CHRG	(1U << 1)
106193323Sed#define	BATTERY_STAT_DISCHRG	(1U << 2)
107198090Srdivacky
108193323Sed#endif /* _IQ80321REG_H_ */
109193323Sed