if TARGET_MT7629

config SYS_BOARD
	default "mt7629"

config SYS_CONFIG_NAME
	default "mt7629"

config MTK_SPL_PAD_SIZE
	hex
	default 0x10000

config MTK_BROM_HEADER_INFO
	string
	default "media=nor" if BOOT_FROM_SNOR
	default "media=snand;nandinfo=2k+64" if BOOT_FROM_SNAND_2K_64
	default "media=snand;nandinfo=2k+128" if BOOT_FROM_SNAND_2K_128
	default "media=snand;nandinfo=4k+128" if BOOT_FROM_SNAND_4K_128
	default "media=snand;nandinfo=4k+256" if BOOT_FROM_SNAND_4K_256

choice
	prompt "Boot device"
	default BOOT_FROM_SNOR

config BOOT_FROM_SNOR
	bool "SPI-NOR"

config BOOT_FROM_SNAND_2K_64
	bool "SPI-NAND (2K+64)"
	select MT7629_BOOT_FROM_SNAND

config BOOT_FROM_SNAND_2K_128
	bool "SPI-NAND (2K+128)"
	select MT7629_BOOT_FROM_SNAND

config BOOT_FROM_SNAND_4K_128
	bool "SPI-NAND (4K+128)"
	select MT7629_BOOT_FROM_SNAND

config BOOT_FROM_SNAND_4K_256
	bool "SPI-NAND (4K+256)"
	select MT7629_BOOT_FROM_SNAND

endchoice

config MT7629_BOOT_FROM_SNAND
	bool
	default n

if MT7629_BOOT_FROM_SNAND

config ENABLE_NAND_NMBM
	bool "Enable NAND bad block mapping management"
	default n
	select MTD_DEVICE
	select NMBM
	select NMBM_MTD
	help
	  Select this if you want to use bad block management to handle
	  bad blocks marked druing factory production, and to handle new
	  bad blocks during use.
	  Enabling this option will create a MTD translation layer on
	  the original MTD of the NAND device.

config NMBM_MAX_RATIO
	int "Default ratio for reserved block for management (N/16)"
	range 1 8
	default 1
	depends on ENABLE_NAND_NMBM
	help
	  This option determines how many blocks at the high adress of NAND
	  can be used for NMBM. For a large size NAND, 1/16 of total blocks
	  are still too large for NMBM. For this situation please set
	  CONFIG_NMBM_MAX_BLOCKS to a proper value to limit the maximum
	  reserved blocks.

config NMBM_MAX_BLOCKS
	int "Maximum blocks allowed for reserved block for management"
	range 32 2147483647
	default 256
	depends on ENABLE_NAND_NMBM
	help
	  This option is applied after NMBM_MAX_RATIO to ensure maximum
	  blocks reserved block for NMBM will not exceed the value set by
	  this option.

endif

source "board/mediatek/common/Kconfig"

choice
	prompt "Device type for bootmenu"
	default MT7629_BOOTMENU_SNAND
	depends on MEDIATEK_BOOTMENU

config MT7629_BOOTMENU_SNOR
	bool "SPI-NOR"
	depends on !MT7629_BOOT_FROM_SNAND

config MT7629_BOOTMENU_SNOR_SB
	bool "SPI-NOR (with ATF)"
	depends on !MT7629_BOOT_FROM_SNAND

config MT7629_BOOTMENU_SNAND
	bool "SPI-NAND"
	depends on MT7629_BOOT_FROM_SNAND

config MT7629_BOOTMENU_SNAND_SB
	bool "SPI-NAND (with ATF)"
	depends on MT7629_BOOT_FROM_SNAND

endchoice

endif
