1
2
3
4
5
6
7
8
9
10#ifndef __CONFIG_QI_LB60_H
11#define __CONFIG_QI_LB60_H
12
13#define CONFIG_MIPS32
14#define CONFIG_JZSOC
15#define CONFIG_JZ4740
16#define CONFIG_NAND_JZ4740
17
18#define CONFIG_SYS_CPU_SPEED 336000000
19#define CONFIG_SYS_EXTAL 12000000
20#define CONFIG_SYS_HZ (CONFIG_SYS_EXTAL / 256)
21#define CONFIG_SYS_MIPS_TIMER_FREQ CONFIG_SYS_CPU_SPEED
22
23#define CONFIG_SYS_UART_BASE JZ4740_UART0_BASE
24#define CONFIG_BAUDRATE 57600
25
26#define CONFIG_SKIP_LOWLEVEL_INIT
27#define CONFIG_BOARD_EARLY_INIT_F
28#define CONFIG_SYS_NO_FLASH
29#define CONFIG_SYS_FLASH_BASE 0
30#define CONFIG_ENV_OVERWRITE
31
32#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAUL)
33#define CONFIG_BOOTDELAY 0
34#define CONFIG_BOOTARGS "mem=32M console=tty0 console=ttyS0,57600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait"
35#define CONFIG_BOOTCOMMAND "nand read 0x80600000 0x400000 0x200000;bootm"
36
37
38
39
40#define CONFIG_CMD_BOOTD
41#define CONFIG_CMD_CONSOLE
42#define CONFIG_CMD_ECHO
43
44#define CONFIG_CMD_LOADB
45#define CONFIG_CMD_LOADS
46#define CONFIG_CMD_MEMORY
47#define CONFIG_CMD_MISC
48#define CONFIG_CMD_RUN
49#define CONFIG_CMD_SAVEENV
50#define CONFIG_CMD_SETGETDCR
51#define CONFIG_CMD_SOURCE
52#define CONFIG_CMD_NAND
53
54
55
56
57#define CONFIG_LOADS_ECHO 1
58
59
60
61
62#define CONFIG_SYS_MAXARGS 16
63#define CONFIG_SYS_LONGHELP
64#define CONFIG_SYS_PROMPT "NanoNote# "
65#define CONFIG_SYS_CBSIZE 256
66#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
67
68#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)
69#define CONFIG_SYS_BOOTPARAMS_LEN (128 * 1024)
70
71#define CONFIG_SYS_SDRAM_BASE 0x80000000
72#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
73#define CONFIG_SYS_LOAD_ADDR 0x80600000
74#define CONFIG_SYS_MEMTEST_START 0x80100000
75#define CONFIG_SYS_MEMTEST_END 0x80800000
76
77
78
79
80#define CONFIG_ENV_IS_IN_NAND
81
82#define CONFIG_SYS_NAND_5_ADDR_CYCLE
83
84
85
86
87
88
89#define NANONOTE_NAND_SIZE 2
90
91#define CONFIG_SYS_NAND_PAGE_SIZE (2048 * NANONOTE_NAND_SIZE)
92#define CONFIG_SYS_NAND_BLOCK_SIZE (256 * NANONOTE_NAND_SIZE << 10)
93
94#define CONFIG_SYS_NAND_BADBLOCK_PAGE 127
95#define CONFIG_SYS_NAND_PAGE_COUNT 128
96#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
97
98#define CONFIG_SYS_NAND_ECC_POS (6 * NANONOTE_NAND_SIZE)
99#define CONFIG_SYS_NAND_ECCSIZE 512
100#define CONFIG_SYS_NAND_ECCBYTES 9
101#define CONFIG_SYS_NAND_ECCPOS \
102 {12, 13, 14, 15, 16, 17, 18, 19,\
103 20, 21, 22, 23, 24, 25, 26, 27, \
104 28, 29, 30, 31, 32, 33, 34, 35, \
105 36, 37, 38, 39, 40, 41, 42, 43, \
106 44, 45, 46, 47, 48, 49, 50, 51, \
107 52, 53, 54, 55, 56, 57, 58, 59, \
108 60, 61, 62, 63, 64, 65, 66, 67, \
109 68, 69, 70, 71, 72, 73, 74, 75, \
110 76, 77, 78, 79, 80, 81, 82, 83}
111
112#define CONFIG_SYS_NAND_OOBSIZE 128
113#define CONFIG_SYS_NAND_BASE 0xB8000000
114#define CONFIG_SYS_ONENAND_BASE CONFIG_SYS_NAND_BASE
115#define CONFIG_SYS_MAX_NAND_DEVICE 1
116#define CONFIG_SYS_NAND_SELECT_DEVICE 1
117#define CONFIG_NAND_SPL_TEXT_BASE 0x80000000
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134#define CONFIG_SYS_NAND_U_BOOT_DST 0x80100000
135#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
136
137
138
139
140
141#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10)
142#define CONFIG_SYS_NAND_U_BOOT_SIZE (512 << 10)
143
144#define CONFIG_ENV_SIZE (4 << 10)
145#define CONFIG_ENV_OFFSET \
146 (CONFIG_SYS_NAND_BLOCK_SIZE + CONFIG_SYS_NAND_U_BOOT_SIZE)
147#define CONFIG_ENV_OFFSET_REDUND \
148 (CONFIG_ENV_OFFSET + CONFIG_SYS_NAND_BLOCK_SIZE)
149
150#define CONFIG_SYS_TEXT_BASE 0x80100000
151#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
152
153
154
155
156#define CONFIG_NR_DRAM_BANKS 1
157
158
159
160
161#define CONFIG_SYS_DCACHE_SIZE 16384
162#define CONFIG_SYS_ICACHE_SIZE 16384
163#define CONFIG_SYS_CACHELINE_SIZE 32
164
165
166
167
168#define GPIO_LCD_CS (2 * 32 + 21)
169#define GPIO_AMP_EN (3 * 32 + 4)
170
171#define GPIO_SDPW_EN (3 * 32 + 2)
172#define GPIO_SD_DETECT (3 * 32 + 0)
173
174#define GPIO_BUZZ_PWM (3 * 32 + 27)
175#define GPIO_USB_DETECT (3 * 32 + 28)
176
177#define GPIO_AUDIO_POP (1 * 32 + 29)
178#define GPIO_COB_TEST (1 * 32 + 30)
179
180#define GPIO_KEYOUT_BASE (2 * 32 + 10)
181#define GPIO_KEYIN_BASE (3 * 32 + 18)
182#define GPIO_KEYIN_8 (3 * 32 + 26)
183
184#define GPIO_SD_CD_N GPIO_SD_DETECT
185#define GPIO_SD_VCC_EN_N GPIO_SDPW_EN
186
187#define SPEN GPIO_LCD_CS
188#define SPDA (2 * 32 + 22)
189#define SPCK (2 * 32 + 23)
190
191
192#define SDRAM_BW16 1
193#define SDRAM_BANK4 1
194#define SDRAM_ROW 13
195#define SDRAM_COL 9
196#define SDRAM_CASL 2
197
198
199#define SDRAM_TRAS 45
200#define SDRAM_RCD 20
201#define SDRAM_TPC 20
202#define SDRAM_TRWL 7
203#define SDRAM_TREF 15625
204
205#endif
206