mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
7a4b6964b5
This patch adds SPL support for mtmips platform. The lowlevel architecture is split into SPL and the rest parts are built into a memory loadable u-boot image. Optional SPL_DM and OF_CONTROL are also supported. The increment of size is very small (< 10 KiB) if SPL_DM and OF_CONTROL are not enabled and the memory bootable u-boot (u-boot.img) is generated automatically so there is not need to add a separate config for it. A lzma compressed payload (u-boot-lzma.img) is also generated and it will be combined with u-boot-spl.bin to form the unified ROM bootable binary u-boot-mtmips.bin. A spl loader is added to support uncompress the payload. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
121 lines
2.8 KiB
Text
121 lines
2.8 KiB
Text
menu "MediaTek MIPS platforms"
|
|
depends on ARCH_MTMIPS
|
|
|
|
config SYS_MALLOC_F_LEN
|
|
default 0x1000
|
|
|
|
config SYS_SOC
|
|
default "mt7628" if SOC_MT7628
|
|
|
|
config SYS_DCACHE_SIZE
|
|
default 32768
|
|
|
|
config SYS_DCACHE_LINE_SIZE
|
|
default 32
|
|
|
|
config SYS_ICACHE_SIZE
|
|
default 65536
|
|
|
|
config SYS_ICACHE_LINE_SIZE
|
|
default 32
|
|
|
|
config SYS_TEXT_BASE
|
|
default 0x9c000000 if !SPL
|
|
default 0x80200000 if SPL
|
|
|
|
config SPL_TEXT_BASE
|
|
default 0x9c000000
|
|
|
|
config SPL_PAYLOAD
|
|
default "u-boot-lzma.img" if SPL_LZMA
|
|
|
|
config BUILD_TARGET
|
|
default "u-boot-with-spl.bin" if SPL
|
|
|
|
choice
|
|
prompt "MediaTek MIPS SoC select"
|
|
|
|
config SOC_MT7628
|
|
bool "MT7628"
|
|
select MIPS_L1_CACHE_SHIFT_5
|
|
select MIPS_INIT_STACK_IN_SRAM
|
|
select MIPS_SRAM_INIT
|
|
select SYS_MIPS_CACHE_INIT_RAM_LOAD
|
|
select PINCTRL_MT7628
|
|
select MTK_SERIAL
|
|
select SYSRESET_RESETCTL
|
|
select SPL_SEPARATE_BSS if SPL
|
|
select SPL_INIT_STACK_WITHOUT_MALLOC_F if SPL
|
|
select SPL_LOADER_SUPPORT if SPL
|
|
select SPL_OF_CONTROL if SPL_DM
|
|
select SPL_SIMPLE_BUS if SPL_DM
|
|
select SPL_DM_SERIAL if SPL_DM
|
|
select SPL_CLK if SPL_DM && SPL_SERIAL_SUPPORT
|
|
select SPL_SYSRESET if SPL_DM
|
|
select SPL_OF_LIBFDT if SPL_OF_CONTROL
|
|
help
|
|
This supports MediaTek MT7628/MT7688.
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Board select"
|
|
|
|
config BOARD_GARDENA_SMART_GATEWAY_MT7688
|
|
bool "GARDENA smart Gateway"
|
|
depends on SOC_MT7628
|
|
select BOARD_LATE_INIT
|
|
select SUPPORTS_BOOT_RAM
|
|
help
|
|
GARDENA smart Gateway boards have a MT7688 SoC with 128 MiB of RAM
|
|
and 8 MiB of flash (SPI NOR) and additional SPI NAND storage.
|
|
|
|
config BOARD_LINKIT_SMART_7688
|
|
bool "LinkIt Smart 7688"
|
|
depends on SOC_MT7628
|
|
select SUPPORTS_BOOT_RAM
|
|
help
|
|
Seeed LinkIt Smart 7688 boards have a MT7688 SoC with 128 MiB of RAM
|
|
and 32 MiB of flash (SPI).
|
|
Between its different peripherals there's an integrated switch with 4
|
|
ethernet ports, 1 USB port, 1 UART, GPIO buttons and LEDs, and
|
|
a MT7688 (PCIe).
|
|
|
|
endchoice
|
|
|
|
choice
|
|
prompt "Boot mode"
|
|
|
|
config BOOT_RAM
|
|
bool "RAM boot"
|
|
depends on SUPPORTS_BOOT_RAM
|
|
help
|
|
This builds an image that is linked to a RAM address. It can be used
|
|
for booting from CFE via TFTP using an ELF image, but it can also be
|
|
booted from RAM by other bootloaders using a BIN image.
|
|
|
|
config BOOT_ROM
|
|
bool "ROM boot"
|
|
depends on SUPPORTS_BOOT_RAM
|
|
help
|
|
This builds an image that is linked to a ROM address. It can be
|
|
used as main bootloader image which is programmed onto the onboard
|
|
flash storage (SPI NOR).
|
|
|
|
endchoice
|
|
|
|
config SUPPORTS_BOOT_RAM
|
|
bool
|
|
|
|
config SPL_UART2_SPIS_PINMUX
|
|
bool "Use alternative pinmux for UART2 in SPL stage"
|
|
depends on SPL_SERIAL_SUPPORT
|
|
default n
|
|
help
|
|
Select this if the UART2 of your board is connected to GPIO 16/17
|
|
(shared with SPIS) rather than the usual GPIO 20/21.
|
|
|
|
source "board/gardena/smart-gateway-mt7688/Kconfig"
|
|
source "board/seeed/linkit-smart-7688/Kconfig"
|
|
|
|
endmenu
|