mips: mtmips: add SPL support
[oweals/u-boot.git] / arch / mips / mach-mtmips / Kconfig
1 menu "MediaTek MIPS platforms"
2         depends on ARCH_MTMIPS
3
4 config SYS_MALLOC_F_LEN
5         default 0x1000
6
7 config SYS_SOC
8         default "mt7628" if SOC_MT7628
9
10 config SYS_DCACHE_SIZE
11         default 32768
12
13 config SYS_DCACHE_LINE_SIZE
14         default 32
15
16 config SYS_ICACHE_SIZE
17         default 65536
18
19 config SYS_ICACHE_LINE_SIZE
20         default 32
21
22 config SYS_TEXT_BASE
23         default 0x9c000000 if !SPL
24         default 0x80200000 if SPL
25
26 config SPL_TEXT_BASE
27         default 0x9c000000
28
29 config SPL_PAYLOAD
30         default "u-boot-lzma.img" if SPL_LZMA
31
32 config BUILD_TARGET
33         default "u-boot-with-spl.bin" if SPL
34
35 choice
36         prompt "MediaTek MIPS SoC select"
37
38 config SOC_MT7628
39         bool "MT7628"
40         select MIPS_L1_CACHE_SHIFT_5
41         select MIPS_INIT_STACK_IN_SRAM
42         select MIPS_SRAM_INIT
43         select SYS_MIPS_CACHE_INIT_RAM_LOAD
44         select PINCTRL_MT7628
45         select MTK_SERIAL
46         select SYSRESET_RESETCTL
47         select SPL_SEPARATE_BSS if SPL
48         select SPL_INIT_STACK_WITHOUT_MALLOC_F if SPL
49         select SPL_LOADER_SUPPORT if SPL
50         select SPL_OF_CONTROL if SPL_DM
51         select SPL_SIMPLE_BUS if SPL_DM
52         select SPL_DM_SERIAL if SPL_DM
53         select SPL_CLK if SPL_DM && SPL_SERIAL_SUPPORT
54         select SPL_SYSRESET if SPL_DM
55         select SPL_OF_LIBFDT if SPL_OF_CONTROL
56         help
57           This supports MediaTek MT7628/MT7688.
58
59 endchoice
60
61 choice
62         prompt "Board select"
63
64 config BOARD_GARDENA_SMART_GATEWAY_MT7688
65         bool "GARDENA smart Gateway"
66         depends on SOC_MT7628
67         select BOARD_LATE_INIT
68         select SUPPORTS_BOOT_RAM
69         help
70           GARDENA smart Gateway boards have a MT7688 SoC with 128 MiB of RAM
71           and 8 MiB of flash (SPI NOR) and additional SPI NAND storage.
72
73 config BOARD_LINKIT_SMART_7688
74         bool "LinkIt Smart 7688"
75         depends on SOC_MT7628
76         select SUPPORTS_BOOT_RAM
77         help
78           Seeed LinkIt Smart 7688 boards have a MT7688 SoC with 128 MiB of RAM
79           and 32 MiB of flash (SPI).
80           Between its different peripherals there's an integrated switch with 4
81           ethernet ports, 1 USB port, 1 UART, GPIO buttons and LEDs, and
82           a MT7688 (PCIe).
83
84 endchoice
85
86 choice
87         prompt "Boot mode"
88
89 config BOOT_RAM
90         bool "RAM boot"
91         depends on SUPPORTS_BOOT_RAM
92         help
93           This builds an image that is linked to a RAM address. It can be used
94           for booting from CFE via TFTP using an ELF image, but it can also be
95           booted from RAM by other bootloaders using a BIN image.
96
97 config BOOT_ROM
98         bool "ROM boot"
99         depends on SUPPORTS_BOOT_RAM
100         help
101           This builds an image that is linked to a ROM address. It can be
102           used as main bootloader image which is programmed onto the onboard
103           flash storage (SPI NOR).
104
105 endchoice
106
107 config SUPPORTS_BOOT_RAM
108         bool
109
110 config SPL_UART2_SPIS_PINMUX
111         bool "Use alternative pinmux for UART2 in SPL stage"
112         depends on SPL_SERIAL_SUPPORT
113         default n
114         help
115           Select this if the UART2 of your board is connected to GPIO 16/17
116           (shared with SPIS) rather than the usual GPIO 20/21.
117
118 source "board/gardena/smart-gateway-mt7688/Kconfig"
119 source "board/seeed/linkit-smart-7688/Kconfig"
120
121 endmenu