blob: 30fb9bff748f8b25e43ef12fa072980fdfad3c22 [file] [log] [blame]
Masahiro Yamadad3ae6782014-07-30 14:08:14 +09001menu "MIPS architecture"
2 depends on MIPS
3
4config SYS_ARCH
Masahiro Yamadad3ae6782014-07-30 14:08:14 +09005 default "mips"
6
Daniel Schwierzeck99e7af22014-10-26 14:14:07 +01007config SYS_CPU
Paul Burton32464372016-05-16 10:52:11 +01008 default "mips32" if CPU_MIPS32
9 default "mips64" if CPU_MIPS64
Daniel Schwierzeck99e7af22014-10-26 14:14:07 +010010
Masahiro Yamadad3ae6782014-07-30 14:08:14 +090011choice
12 prompt "Target select"
Joe Hershbergerf0699602015-05-12 14:46:23 -050013 optional
Masahiro Yamadad3ae6782014-07-30 14:08:14 +090014
15config TARGET_QEMU_MIPS
16 bool "Support qemu-mips"
Michal Simek84f3dec2018-07-23 15:55:13 +020017 select ROM_EXCEPTION_VECTORS
Daniel Schwierzecka4c242b2014-10-26 14:14:07 +010018 select SUPPORTS_BIG_ENDIAN
Daniel Schwierzeck256034d2014-10-26 14:14:07 +010019 select SUPPORTS_CPU_MIPS32_R1
20 select SUPPORTS_CPU_MIPS32_R2
Daniel Schwierzeck94384d12014-10-26 14:14:07 +010021 select SUPPORTS_CPU_MIPS64_R1
22 select SUPPORTS_CPU_MIPS64_R2
Michal Simek84f3dec2018-07-23 15:55:13 +020023 select SUPPORTS_LITTLE_ENDIAN
Masahiro Yamadad3ae6782014-07-30 14:08:14 +090024
25config TARGET_MALTA
26 bool "Support malta"
Paul Burtona31a3df2016-05-17 07:43:28 +010027 select DM
28 select DM_SERIAL
Paul Burton8d6600b2016-01-29 13:54:52 +000029 select DYNAMIC_IO_PORT_BASE
Paul Burton59a4c8b2016-09-21 11:18:56 +010030 select MIPS_CM
Daniel Schwierzeck2cc9a772018-09-07 19:18:44 +020031 select MIPS_INSERT_BOOT_CONFIG
Michal Simek84f3dec2018-07-23 15:55:13 +020032 select MIPS_L1_CACHE_SHIFT_6
Paul Burton59a4c8b2016-09-21 11:18:56 +010033 select MIPS_L2_CACHE
Paul Burtona31a3df2016-05-17 07:43:28 +010034 select OF_CONTROL
35 select OF_ISA_BUS
Michal Simek84f3dec2018-07-23 15:55:13 +020036 select ROM_EXCEPTION_VECTORS
Daniel Schwierzecka4c242b2014-10-26 14:14:07 +010037 select SUPPORTS_BIG_ENDIAN
Daniel Schwierzeck256034d2014-10-26 14:14:07 +010038 select SUPPORTS_CPU_MIPS32_R1
39 select SUPPORTS_CPU_MIPS32_R2
Paul Burton1c10e0d2016-05-16 10:52:14 +010040 select SUPPORTS_CPU_MIPS32_R6
Paul Burton825cfbd2016-05-26 14:49:36 +010041 select SUPPORTS_CPU_MIPS64_R1
42 select SUPPORTS_CPU_MIPS64_R2
43 select SUPPORTS_CPU_MIPS64_R6
Michal Simek84f3dec2018-07-23 15:55:13 +020044 select SUPPORTS_LITTLE_ENDIAN
Daniel Schwierzeck7dca6862015-01-18 22:00:18 +010045 select SWAP_IO_SPACE
Michal Simek2e7c8192018-07-23 15:55:14 +020046 imply CMD_DM
Masahiro Yamadad3ae6782014-07-30 14:08:14 +090047
48config TARGET_VCT
49 bool "Support vct"
Michal Simek84f3dec2018-07-23 15:55:13 +020050 select ROM_EXCEPTION_VECTORS
Daniel Schwierzecka4c242b2014-10-26 14:14:07 +010051 select SUPPORTS_BIG_ENDIAN
Daniel Schwierzeck256034d2014-10-26 14:14:07 +010052 select SUPPORTS_CPU_MIPS32_R1
53 select SUPPORTS_CPU_MIPS32_R2
Paul Burton6832bdc2015-01-29 01:28:02 +000054 select SYS_MIPS_CACHE_INIT_RAM_LOAD
Masahiro Yamadad3ae6782014-07-30 14:08:14 +090055
Wills Wang833a1a82016-03-16 16:59:52 +080056config ARCH_ATH79
57 bool "Support QCA/Atheros ath79"
Wills Wang833a1a82016-03-16 16:59:52 +080058 select DM
Michal Simek84f3dec2018-07-23 15:55:13 +020059 select OF_CONTROL
Michal Simek2e7c8192018-07-23 15:55:14 +020060 imply CMD_DM
Wills Wang833a1a82016-03-16 16:59:52 +080061
Álvaro Fernández Rojas98a97a82017-04-25 00:39:20 +020062config ARCH_BMIPS
63 bool "Support BMIPS SoCs"
Álvaro Fernández Rojas98a97a82017-04-25 00:39:20 +020064 select CLK
65 select CPU
Michal Simek84f3dec2018-07-23 15:55:13 +020066 select DM
67 select OF_CONTROL
Álvaro Fernández Rojas98a97a82017-04-25 00:39:20 +020068 select RAM
69 select SYSRESET
Michal Simek2e7c8192018-07-23 15:55:14 +020070 imply CMD_DM
Álvaro Fernández Rojas98a97a82017-04-25 00:39:20 +020071
Purna Chandra Mandal825b3212016-01-28 15:30:10 +053072config MACH_PIC32
73 bool "Support Microchip PIC32"
Purna Chandra Mandal825b3212016-01-28 15:30:10 +053074 select DM
Michal Simek84f3dec2018-07-23 15:55:13 +020075 select OF_CONTROL
Michal Simek2e7c8192018-07-23 15:55:14 +020076 imply CMD_DM
Purna Chandra Mandal825b3212016-01-28 15:30:10 +053077
Paul Burtonf5de32a2016-09-08 07:47:39 +010078config TARGET_BOSTON
79 bool "Support Boston"
80 select DM
81 select DM_SERIAL
Paul Burtonf5de32a2016-09-08 07:47:39 +010082 select MIPS_CM
83 select MIPS_L1_CACHE_SHIFT_6
84 select MIPS_L2_CACHE
Paul Burtona315bcd2017-04-30 21:22:42 +020085 select OF_BOARD_SETUP
Michal Simek84f3dec2018-07-23 15:55:13 +020086 select OF_CONTROL
87 select ROM_EXCEPTION_VECTORS
Paul Burtonf5de32a2016-09-08 07:47:39 +010088 select SUPPORTS_BIG_ENDIAN
Paul Burtonf5de32a2016-09-08 07:47:39 +010089 select SUPPORTS_CPU_MIPS32_R1
90 select SUPPORTS_CPU_MIPS32_R2
91 select SUPPORTS_CPU_MIPS32_R6
92 select SUPPORTS_CPU_MIPS64_R1
93 select SUPPORTS_CPU_MIPS64_R2
94 select SUPPORTS_CPU_MIPS64_R6
Michal Simek84f3dec2018-07-23 15:55:13 +020095 select SUPPORTS_LITTLE_ENDIAN
Michal Simek2e7c8192018-07-23 15:55:14 +020096 imply CMD_DM
Paul Burtonf5de32a2016-09-08 07:47:39 +010097
Zubair Lutfullah Kakakhel1d153b32016-07-29 15:11:20 +010098config TARGET_XILFPGA
99 bool "Support Imagination Xilfpga"
Zubair Lutfullah Kakakhel1d153b32016-07-29 15:11:20 +0100100 select DM
Zubair Lutfullah Kakakhel1d153b32016-07-29 15:11:20 +0100101 select DM_ETH
Michal Simek84f3dec2018-07-23 15:55:13 +0200102 select DM_GPIO
103 select DM_SERIAL
Zubair Lutfullah Kakakhel1d153b32016-07-29 15:11:20 +0100104 select MIPS_L1_CACHE_SHIFT_4
Michal Simek84f3dec2018-07-23 15:55:13 +0200105 select OF_CONTROL
Daniel Schwierzeck754cd052016-02-14 18:52:57 +0100106 select ROM_EXCEPTION_VECTORS
Michal Simek84f3dec2018-07-23 15:55:13 +0200107 select SUPPORTS_CPU_MIPS32_R1
108 select SUPPORTS_CPU_MIPS32_R2
109 select SUPPORTS_LITTLE_ENDIAN
Michal Simek2e7c8192018-07-23 15:55:14 +0200110 imply CMD_DM
Zubair Lutfullah Kakakhel1d153b32016-07-29 15:11:20 +0100111 help
112 This supports IMGTEC MIPSfpga platform
113
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900114endchoice
115
Paul Burtonf5de32a2016-09-08 07:47:39 +0100116source "board/imgtec/boston/Kconfig"
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900117source "board/imgtec/malta/Kconfig"
Zubair Lutfullah Kakakhel1d153b32016-07-29 15:11:20 +0100118source "board/imgtec/xilfpga/Kconfig"
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900119source "board/micronas/vct/Kconfig"
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900120source "board/qemu-mips/Kconfig"
Wills Wang833a1a82016-03-16 16:59:52 +0800121source "arch/mips/mach-ath79/Kconfig"
Álvaro Fernández Rojas98a97a82017-04-25 00:39:20 +0200122source "arch/mips/mach-bmips/Kconfig"
Purna Chandra Mandal825b3212016-01-28 15:30:10 +0530123source "arch/mips/mach-pic32/Kconfig"
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900124
Daniel Schwierzecka4c242b2014-10-26 14:14:07 +0100125if MIPS
126
127choice
128 prompt "Endianness selection"
129 help
130 Some MIPS boards can be configured for either little or big endian
131 byte order. These modes require different U-Boot images. In general there
132 is one preferred byteorder for a particular system but some systems are
133 just as commonly used in the one or the other endianness.
134
135config SYS_BIG_ENDIAN
136 bool "Big endian"
137 depends on SUPPORTS_BIG_ENDIAN
138
139config SYS_LITTLE_ENDIAN
140 bool "Little endian"
141 depends on SUPPORTS_LITTLE_ENDIAN
142
143endchoice
144
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100145choice
146 prompt "CPU selection"
147 default CPU_MIPS32_R2
148
149config CPU_MIPS32_R1
150 bool "MIPS32 Release 1"
151 depends on SUPPORTS_CPU_MIPS32_R1
152 select 32BIT
153 help
Paul Burton55e29dd2016-05-16 10:52:12 +0100154 Choose this option to build an U-Boot for release 1 through 5 of the
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100155 MIPS32 architecture.
156
157config CPU_MIPS32_R2
158 bool "MIPS32 Release 2"
159 depends on SUPPORTS_CPU_MIPS32_R2
160 select 32BIT
161 help
Paul Burton55e29dd2016-05-16 10:52:12 +0100162 Choose this option to build an U-Boot for release 2 through 5 of the
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100163 MIPS32 architecture.
164
Paul Burton55e29dd2016-05-16 10:52:12 +0100165config CPU_MIPS32_R6
166 bool "MIPS32 Release 6"
167 depends on SUPPORTS_CPU_MIPS32_R6
168 select 32BIT
169 help
170 Choose this option to build an U-Boot for release 6 or later of the
171 MIPS32 architecture.
172
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100173config CPU_MIPS64_R1
174 bool "MIPS64 Release 1"
175 depends on SUPPORTS_CPU_MIPS64_R1
176 select 64BIT
177 help
Paul Burton55e29dd2016-05-16 10:52:12 +0100178 Choose this option to build a kernel for release 1 through 5 of the
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100179 MIPS64 architecture.
180
181config CPU_MIPS64_R2
182 bool "MIPS64 Release 2"
183 depends on SUPPORTS_CPU_MIPS64_R2
184 select 64BIT
185 help
Paul Burton55e29dd2016-05-16 10:52:12 +0100186 Choose this option to build a kernel for release 2 through 5 of the
187 MIPS64 architecture.
188
189config CPU_MIPS64_R6
190 bool "MIPS64 Release 6"
191 depends on SUPPORTS_CPU_MIPS64_R6
192 select 64BIT
193 help
194 Choose this option to build a kernel for release 6 or later of the
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100195 MIPS64 architecture.
196
197endchoice
198
Daniel Schwierzeck754cd052016-02-14 18:52:57 +0100199menu "General setup"
200
201config ROM_EXCEPTION_VECTORS
202 bool "Build U-Boot image with exception vectors"
203 help
204 Enable this to include exception vectors in the U-Boot image. This is
205 required if the U-Boot entry point is equal to the address of the
206 CPU reset exception vector (e.g. U-Boot as ROM loader in Qemu,
207 U-Boot booted from parallel NOR flash).
208 Disable this, if the U-Boot image is booted from DRAM (e.g. by SPL).
209 In that case the image size will be reduced by 0x500 bytes.
210
Paul Burton3d6864a2017-05-12 13:26:11 +0200211config MIPS_CM_BASE
212 hex "MIPS CM GCR Base Address"
213 depends on MIPS_CM
Paul Burtona6ac9652017-04-30 21:22:41 +0200214 default 0x16100000 if TARGET_BOSTON
Paul Burton3d6864a2017-05-12 13:26:11 +0200215 default 0x1fbf8000
216 help
217 The physical base address at which to map the MIPS Coherence Manager
218 Global Configuration Registers (GCRs). This should be set such that
219 the GCRs occupy a region of the physical address space which is
220 otherwise unused, or at minimum that software doesn't need to access.
221
Daniel Schwierzecke3b432d2018-09-07 19:02:05 +0200222config MIPS_CACHE_INDEX_BASE
223 hex "Index base address for cache initialisation"
224 default 0x80000000 if CPU_MIPS32
225 default 0xffffffff80000000 if CPU_MIPS64
226 help
227 This is the base address for a memory block, which is used for
228 initialising the cache lines. This is also the base address of a memory
229 block which is used for loading and filling cache lines when
230 SYS_MIPS_CACHE_INIT_RAM_LOAD is selected.
231 Normally this is CKSEG0. If the MIPS system needs to move this block
232 to some SRAM or ScratchPad RAM, adapt this option accordingly.
233
Daniel Schwierzeck754cd052016-02-14 18:52:57 +0100234endmenu
235
Daniel Schwierzeckf9749fa2015-01-14 21:44:13 +0100236menu "OS boot interface"
237
238config MIPS_BOOT_CMDLINE_LEGACY
239 bool "Hand over legacy command line to Linux kernel"
240 default y
241 help
242 Enable this option if you want U-Boot to hand over the Yamon-style
243 command line to the kernel. All bootargs will be prepared as argc/argv
244 compatible list. The argument count (argc) is stored in register $a0.
245 The address of the argument list (argv) is stored in register $a1.
246
Daniel Schwierzeckc07dc602015-01-14 21:44:13 +0100247config MIPS_BOOT_ENV_LEGACY
248 bool "Hand over legacy environment to Linux kernel"
249 default y
250 help
251 Enable this option if you want U-Boot to hand over the Yamon-style
252 environment to the kernel. Information like memory size, initrd
253 address and size will be prepared as zero-terminated key/value list.
Robert P. J. Day8c60f922016-05-04 04:47:31 -0400254 The address of the environment is stored in register $a2.
Daniel Schwierzeckc07dc602015-01-14 21:44:13 +0100255
Daniel Schwierzeck8d7ff4d2015-01-14 21:44:13 +0100256config MIPS_BOOT_FDT
Daniel Schwierzeckd1b29d22015-02-22 16:58:30 +0100257 bool "Hand over a flattened device tree to Linux kernel"
Daniel Schwierzeck8d7ff4d2015-01-14 21:44:13 +0100258 default n
259 help
260 Enable this option if you want U-Boot to hand over a flattened
Daniel Schwierzeckd1b29d22015-02-22 16:58:30 +0100261 device tree to the kernel. According to UHI register $a0 will be set
262 to -2 and the FDT address is stored in $a1.
Daniel Schwierzeck8d7ff4d2015-01-14 21:44:13 +0100263
Daniel Schwierzeckf9749fa2015-01-14 21:44:13 +0100264endmenu
265
Daniel Schwierzecka4c242b2014-10-26 14:14:07 +0100266config SUPPORTS_BIG_ENDIAN
267 bool
268
269config SUPPORTS_LITTLE_ENDIAN
270 bool
271
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100272config SUPPORTS_CPU_MIPS32_R1
273 bool
274
275config SUPPORTS_CPU_MIPS32_R2
276 bool
277
Paul Burton55e29dd2016-05-16 10:52:12 +0100278config SUPPORTS_CPU_MIPS32_R6
279 bool
280
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100281config SUPPORTS_CPU_MIPS64_R1
282 bool
283
284config SUPPORTS_CPU_MIPS64_R2
285 bool
286
Paul Burton55e29dd2016-05-16 10:52:12 +0100287config SUPPORTS_CPU_MIPS64_R6
288 bool
289
Daniel Schwierzeckdfbad0f2015-01-18 21:59:35 +0100290config CPU_MIPS32
291 bool
Paul Burton55e29dd2016-05-16 10:52:12 +0100292 default y if CPU_MIPS32_R1 || CPU_MIPS32_R2 || CPU_MIPS32_R6
Daniel Schwierzeckdfbad0f2015-01-18 21:59:35 +0100293
294config CPU_MIPS64
295 bool
Paul Burton55e29dd2016-05-16 10:52:12 +0100296 default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 || CPU_MIPS64_R6
Daniel Schwierzeckdfbad0f2015-01-18 21:59:35 +0100297
Daniel Schwierzeckaadd3322015-12-26 19:55:37 +0100298config MIPS_TUNE_4KC
299 bool
300
301config MIPS_TUNE_14KC
302 bool
303
304config MIPS_TUNE_24KC
305 bool
306
Daniel Schwierzeckc7661d52016-05-27 15:39:39 +0200307config MIPS_TUNE_34KC
308 bool
309
Marek Vasuta9c6e8b2016-05-06 20:10:33 +0200310config MIPS_TUNE_74KC
311 bool
312
Daniel Schwierzeck256034d2014-10-26 14:14:07 +0100313config 32BIT
314 bool
315
316config 64BIT
317 bool
318
Daniel Schwierzeck7dca6862015-01-18 22:00:18 +0100319config SWAP_IO_SPACE
320 bool
321
Paul Burton6832bdc2015-01-29 01:28:02 +0000322config SYS_MIPS_CACHE_INIT_RAM_LOAD
323 bool
324
Daniel Schwierzeck41dc35e2016-06-04 16:13:21 +0200325config MIPS_INIT_STACK_IN_SRAM
326 bool
327 default n
328 help
329 Select this if the initial stack frame could be setup in SRAM.
330 Normally the initial stack frame is set up in DRAM which is often
331 only available after lowlevel_init. With this option the initial
332 stack frame and the early C environment is set up before
333 lowlevel_init. Thus lowlevel_init does not need to be implemented
334 in assembler.
335
Paul Burton5e511422016-05-27 14:28:04 +0100336config SYS_DCACHE_SIZE
337 int
338 default 0
339 help
340 The total size of the L1 Dcache, if known at compile time.
341
Paul Burton62f13522016-05-27 14:28:05 +0100342config SYS_DCACHE_LINE_SIZE
Paul Burton79e49fd2016-06-09 13:09:52 +0100343 int
Paul Burton62f13522016-05-27 14:28:05 +0100344 default 0
345 help
346 The size of L1 Dcache lines, if known at compile time.
347
Paul Burton5e511422016-05-27 14:28:04 +0100348config SYS_ICACHE_SIZE
349 int
350 default 0
351 help
352 The total size of the L1 ICache, if known at compile time.
353
Paul Burton62f13522016-05-27 14:28:05 +0100354config SYS_ICACHE_LINE_SIZE
Paul Burton5e511422016-05-27 14:28:04 +0100355 int
356 default 0
357 help
Paul Burton62f13522016-05-27 14:28:05 +0100358 The size of L1 Icache lines, if known at compile time.
Paul Burton5e511422016-05-27 14:28:04 +0100359
360config SYS_CACHE_SIZE_AUTO
361 def_bool y if SYS_DCACHE_SIZE = 0 && SYS_ICACHE_SIZE = 0 && \
Paul Burton62f13522016-05-27 14:28:05 +0100362 SYS_DCACHE_LINE_SIZE = 0 && SYS_ICACHE_LINE_SIZE = 0
Paul Burton5e511422016-05-27 14:28:04 +0100363 help
364 Select this (or let it be auto-selected by not defining any cache
365 sizes) in order to allow U-Boot to automatically detect the sizes
366 of caches at runtime. This has a small cost in code size & runtime
367 so if you know the cache configuration for your system at compile
368 time it would be beneficial to configure it.
369
Daniel Schwierzeck02ca55e2016-01-09 17:32:50 +0100370config MIPS_L1_CACHE_SHIFT_4
371 bool
372
373config MIPS_L1_CACHE_SHIFT_5
374 bool
375
376config MIPS_L1_CACHE_SHIFT_6
377 bool
378
379config MIPS_L1_CACHE_SHIFT_7
380 bool
381
382config MIPS_L1_CACHE_SHIFT
383 int
384 default "7" if MIPS_L1_CACHE_SHIFT_7
385 default "6" if MIPS_L1_CACHE_SHIFT_6
386 default "5" if MIPS_L1_CACHE_SHIFT_5
387 default "4" if MIPS_L1_CACHE_SHIFT_4
388 default "5"
389
Paul Burton81560782016-09-21 11:18:54 +0100390config MIPS_L2_CACHE
391 bool
392 help
393 Select this if your system includes an L2 cache and you want U-Boot
394 to initialise & maintain it.
395
Paul Burton8d6600b2016-01-29 13:54:52 +0000396config DYNAMIC_IO_PORT_BASE
397 bool
398
Paul Burton79ac1742016-09-21 11:18:53 +0100399config MIPS_CM
400 bool
401 help
402 Select this if your system contains a MIPS Coherence Manager and you
403 wish U-Boot to configure it or make use of it to retrieve system
404 information such as cache configuration.
405
Daniel Schwierzeck2cc9a772018-09-07 19:18:44 +0200406config MIPS_INSERT_BOOT_CONFIG
407 bool
408 default n
409 help
410 Enable this to insert some board-specific boot configuration in
411 the U-Boot binary at offset 0x10.
412
413config MIPS_BOOT_CONFIG_WORD0
414 hex
415 depends on MIPS_INSERT_BOOT_CONFIG
416 default 0x420 if TARGET_MALTA
417 default 0x0
418 help
419 Value which is inserted as boot config word 0.
420
421config MIPS_BOOT_CONFIG_WORD1
422 hex
423 depends on MIPS_INSERT_BOOT_CONFIG
424 default 0x0
425 help
426 Value which is inserted as boot config word 1.
427
Daniel Schwierzecka4c242b2014-10-26 14:14:07 +0100428endif
429
Masahiro Yamadad3ae6782014-07-30 14:08:14 +0900430endmenu