blob: 87a8a5438078b600f3352420b4aade84d9888eb0 [file] [log] [blame]
wdenkec4c5442004-02-09 23:12:24 +00001/*
2 * (C) Copyright 2003, Li-Pro.Net <www.li-pro.net>
3 * Stephan Linz <linz@li-pro.net>
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#ifndef __CONFIG_DK1S10_MTX_LDK_20_H
25#define __CONFIG_DK1S10_MTX_LDK_20_H
26
27/*
28 * NIOS CPU configuration. (PART OF configs/DK1S10.h)
29 *
30 * Here we must define CPU dependencies. Any unsupported option have to
31 * be defined with zero, example CPU without data cache / OCI:
32 *
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020033 * #define CONFIG_SYS_NIOS_CPU_ICACHE 4096
34 * #define CONFIG_SYS_NIOS_CPU_DCACHE 0
35 * #define CONFIG_SYS_NIOS_CPU_OCI_BASE 0
36 * #define CONFIG_SYS_NIOS_CPU_OCI_SIZE 0
wdenkec4c5442004-02-09 23:12:24 +000037 */
38
39/* CPU core */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020040#define CONFIG_SYS_NIOS_CPU_CLK 75000000 /* NIOS CPU clock */
41#define CONFIG_SYS_NIOS_CPU_ICACHE (0) /* instruction cache */
42#define CONFIG_SYS_NIOS_CPU_DCACHE (0) /* data cache */
43#define CONFIG_SYS_NIOS_CPU_REG_NUMS 512 /* number of register */
44#define CONFIG_SYS_NIOS_CPU_MUL 0 /* 16x16 MUL: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000045 /* yes(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020046#define CONFIG_SYS_NIOS_CPU_MSTEP 1 /* 16x16 MSTEP: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000047 /* yes(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020048#define CONFIG_SYS_NIOS_CPU_STACK 0x02000000 /* stack top addr */
49#define CONFIG_SYS_NIOS_CPU_VEC_BASE 0x01000000 /* IRQ vectors addr */
50#define CONFIG_SYS_NIOS_CPU_VEC_SIZE 256 /* size */
51#define CONFIG_SYS_NIOS_CPU_VEC_NUMS 64 /* numbers */
52#define CONFIG_SYS_NIOS_CPU_RST_VECT 0x00000000 /* RESET vector addr */
53#define CONFIG_SYS_NIOS_CPU_DBG_CORE 0 /* CPU debug: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000054 /* yes(1) */
55
56/* The offset address in flash to check for the Nios signature "Ni".
57 * (see GM_FlashExec in germs_monitor.s) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020058#define CONFIG_SYS_NIOS_CPU_EXES_OFFS 0x0C
wdenkec4c5442004-02-09 23:12:24 +000059
60/* on-chip extensions */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020061#undef CONFIG_SYS_NIOS_CPU_RAM_BASE /* on chip RAM addr */
62#undef CONFIG_SYS_NIOS_CPU_RAM_SIZE /* 64 KB size */
wdenkec4c5442004-02-09 23:12:24 +000063
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020064#define CONFIG_SYS_NIOS_CPU_ROM_BASE 0x00000000 /* on chip ROM addr */
65#define CONFIG_SYS_NIOS_CPU_ROM_SIZE (2 * 1024) /* 2 KB size */
wdenkec4c5442004-02-09 23:12:24 +000066
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020067#undef CONFIG_SYS_NIOS_CPU_OCI_BASE /* OCI core addr */
68#undef CONFIG_SYS_NIOS_CPU_OCI_SIZE /* size */
wdenkec4c5442004-02-09 23:12:24 +000069
70/* timer */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020071#define CONFIG_SYS_NIOS_CPU_TIMER_NUMS 1 /* number of timer */
wdenkec4c5442004-02-09 23:12:24 +000072
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020073#define CONFIG_SYS_NIOS_CPU_TIMER0 0x00000840 /* TIMER0 addr */
74#define CONFIG_SYS_NIOS_CPU_TIMER0_IRQ 16 /* IRQ */
75#define CONFIG_SYS_NIOS_CPU_TIMER0_PER 1000 /* periode usec */
76#define CONFIG_SYS_NIOS_CPU_TIMER0_AR 0 /* always run: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000077 /* yes(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020078#define CONFIG_SYS_NIOS_CPU_TIMER0_FP 0 /* fixed per: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000079 /* yes(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020080#define CONFIG_SYS_NIOS_CPU_TIMER0_SS 1 /* snaphot: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000081 /* yes(1) */
82
83/* serial i/o */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020084#define CONFIG_SYS_NIOS_CPU_UART_NUMS 2 /* number of uarts */
wdenkec4c5442004-02-09 23:12:24 +000085
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020086#define CONFIG_SYS_NIOS_CPU_UART0 0x00000800 /* UART0 addr */
87#define CONFIG_SYS_NIOS_CPU_UART0_IRQ 17 /* IRQ */
88#define CONFIG_SYS_NIOS_CPU_UART0_BR 115200 /* baudrate var(0) */
89#define CONFIG_SYS_NIOS_CPU_UART0_DB 8 /* data bit */
90#define CONFIG_SYS_NIOS_CPU_UART0_SB 2 /* stop bit */
91#define CONFIG_SYS_NIOS_CPU_UART0_PA 0 /* parity none(0) */
wdenkec4c5442004-02-09 23:12:24 +000092 /* odd(1) */
93 /* even(2) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020094#define CONFIG_SYS_NIOS_CPU_UART0_HS 0 /* handshake: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000095 /* crts(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020096#define CONFIG_SYS_NIOS_CPU_UART0_EOP 0 /* eop reg: no(0) */
wdenkec4c5442004-02-09 23:12:24 +000097 /* yes(1) */
98
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020099#define CONFIG_SYS_NIOS_CPU_UART1 0x000008a0 /* UART1 addr */
100#define CONFIG_SYS_NIOS_CPU_UART1_IRQ 18 /* IRQ */
101#define CONFIG_SYS_NIOS_CPU_UART1_BR 115200 /* baudrate var(0) */
102#define CONFIG_SYS_NIOS_CPU_UART1_DB 8 /* data bit */
103#define CONFIG_SYS_NIOS_CPU_UART1_SB 1 /* stop bit */
104#define CONFIG_SYS_NIOS_CPU_UART1_PA 0 /* parity none(0) */
wdenkec4c5442004-02-09 23:12:24 +0000105 /* odd(1) */
106 /* even(2) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200107#define CONFIG_SYS_NIOS_CPU_UART1_HS 0 /* handshake: no(0) */
wdenkec4c5442004-02-09 23:12:24 +0000108 /* crts(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200109#define CONFIG_SYS_NIOS_CPU_UART1_EOP 0 /* eop reg: no(0) */
wdenkec4c5442004-02-09 23:12:24 +0000110 /* yes(1) */
111
112/* parallel i/o */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200113#define CONFIG_SYS_NIOS_CPU_PIO_NUMS 2 /* number of parports */
wdenkec4c5442004-02-09 23:12:24 +0000114
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200115#define CONFIG_SYS_NIOS_CPU_PIO0 0x00000860 /* PIO0 addr */
116#undef CONFIG_SYS_NIOS_CPU_PIO0_IRQ /* w/o IRQ */
117#define CONFIG_SYS_NIOS_CPU_PIO0_BITS 1 /* number of bits */
118#define CONFIG_SYS_NIOS_CPU_PIO0_TYPE 1 /* io type: tris(0) */
wdenkec4c5442004-02-09 23:12:24 +0000119 /* out(1) */
120 /* in(2) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200121#define CONFIG_SYS_NIOS_CPU_PIO0_CAP 0 /* capture: no(0) */
wdenkec4c5442004-02-09 23:12:24 +0000122 /* yes(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200123#define CONFIG_SYS_NIOS_CPU_PIO0_EDGE 0 /* edge type: none(0) */
wdenkec4c5442004-02-09 23:12:24 +0000124 /* fall(1) */
125 /* rise(2) */
126 /* any(3) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200127#define CONFIG_SYS_NIOS_CPU_PIO0_ITYPE 0 /* IRQ type: none(0) */
wdenkec4c5442004-02-09 23:12:24 +0000128 /* level(1)*/
129 /* edge(2) */
130
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200131#define CONFIG_SYS_NIOS_CPU_PIO1 0x00000870 /* PIO1 addr */
132#undef CONFIG_SYS_NIOS_CPU_PIO1_IRQ /* w/o IRQ */
133#define CONFIG_SYS_NIOS_CPU_PIO1_BITS 4 /* number of bits */
134#define CONFIG_SYS_NIOS_CPU_PIO1_TYPE 2 /* io type: tris(0) */
wdenkec4c5442004-02-09 23:12:24 +0000135 /* out(1) */
136 /* in(2) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200137#define CONFIG_SYS_NIOS_CPU_PIO1_CAP 0 /* capture: no(0) */
wdenkec4c5442004-02-09 23:12:24 +0000138 /* yes(1) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200139#define CONFIG_SYS_NIOS_CPU_PIO1_EDGE 0 /* edge type: none(0) */
wdenkec4c5442004-02-09 23:12:24 +0000140 /* fall(1) */
141 /* rise(2) */
142 /* any(3) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200143#define CONFIG_SYS_NIOS_CPU_PIO1_ITYPE 0 /* IRQ type: none(0) */
wdenkec4c5442004-02-09 23:12:24 +0000144 /* level(1)*/
145 /* edge(2) */
146
147/* IDE i/f */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200148#define CONFIG_SYS_NIOS_CPU_IDE_NUMS 1 /* number of IDE contr. */
149#define CONFIG_SYS_NIOS_CPU_IDE0 0x00000900 /* IDE0 addr */
150#define CONFIG_SYS_NIOS_CPU_IDE0_IRQ 25 /* IRQ */
wdenkec4c5442004-02-09 23:12:24 +0000151
152/* memory accessibility */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200153#undef CONFIG_SYS_NIOS_CPU_SRAM_BASE /* board SRAM addr */
154#undef CONFIG_SYS_NIOS_CPU_SRAM_SIZE /* 1 MB size */
wdenkec4c5442004-02-09 23:12:24 +0000155
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200156#define CONFIG_SYS_NIOS_CPU_SDRAM_BASE 0x01000000 /* board SDRAM addr */
157#define CONFIG_SYS_NIOS_CPU_SDRAM_SIZE (16*1024*1024) /* 16 MB size */
wdenkec4c5442004-02-09 23:12:24 +0000158
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200159#define CONFIG_SYS_NIOS_CPU_FLASH_BASE 0x00800000 /* board Flash addr */
160#define CONFIG_SYS_NIOS_CPU_FLASH_SIZE (8*1024*1024) /* 8 MB size */
wdenkec4c5442004-02-09 23:12:24 +0000161
162/* LAN */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200163#define CONFIG_SYS_NIOS_CPU_LAN_NUMS 1 /* number of LAN i/f */
wdenkec4c5442004-02-09 23:12:24 +0000164
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200165#define CONFIG_SYS_NIOS_CPU_LAN0_BASE 0x00010000 /* LAN0 addr */
166#define CONFIG_SYS_NIOS_CPU_LAN0_OFFS 0x0300 /* offset */
167#define CONFIG_SYS_NIOS_CPU_LAN0_IRQ 20 /* IRQ */
168#define CONFIG_SYS_NIOS_CPU_LAN0_BUSW 32 /* buswidth*/
169#define CONFIG_SYS_NIOS_CPU_LAN0_TYPE 0 /* smc91111(0) */
wdenkec4c5442004-02-09 23:12:24 +0000170 /* cs8900(1) */
171 /* ex: openmac(2) */
172 /* ex: alteramac(3) */
173
174/* symbolic redefinition (undef, if not present) */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200175#define CONFIG_SYS_NIOS_CPU_TICK_TIMER 0 /* TIMER0: tick (needed)*/
176#undef CONFIG_SYS_NIOS_CPU_USER_TIMER /* TIMERx: users choice */
wdenkec4c5442004-02-09 23:12:24 +0000177
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200178#define CONFIG_SYS_NIOS_CPU_CFPOWER_PIO 0 /* PIO0: CF power/sw. */
179#define CONFIG_SYS_NIOS_CPU_BUTTON_PIO 1 /* PIO1: buttons */
180#undef CONFIG_SYS_NIOS_CPU_LCD_PIO /* PIOx: ASCII LCD */
181#undef CONFIG_SYS_NIOS_CPU_LED_PIO /* PIOx: LED bar */
182#undef CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO /* PIOx: 7-seg. display */
183#undef CONFIG_SYS_NIOS_CPU_RECONF_PIO /* PIOx: reconf pin */
184#undef CONFIG_SYS_NIOS_CPU_CFPRESENT_PIO /* PIOx: CF present IRQ */
185#undef CONFIG_SYS_NIOS_CPU_CFATASEL_PIO /* PIOx: CF ATA select */
wdenkec4c5442004-02-09 23:12:24 +0000186
187#endif /* __CONFIG_DK1S10_MTX_LDK_20_H */