xref: /openbmc/u-boot/drivers/fastboot/Kconfig (revision c232d14d11e29c88f2c6149d2c152f496caa5889)
1312a10f1SAlex Kiernanmenu "Fastboot support"
2312a10f1SAlex Kiernan
3312a10f1SAlex Kiernanconfig FASTBOOT
4312a10f1SAlex Kiernan	bool
5312a10f1SAlex Kiernan	imply ANDROID_BOOT_IMAGE
6312a10f1SAlex Kiernan	imply CMD_FASTBOOT
7312a10f1SAlex Kiernan
8312a10f1SAlex Kiernanconfig USB_FUNCTION_FASTBOOT
9312a10f1SAlex Kiernan	bool "Enable USB fastboot gadget"
10312a10f1SAlex Kiernan	depends on USB_GADGET
11312a10f1SAlex Kiernan	default y if ARCH_SUNXI && USB_MUSB_GADGET
12312a10f1SAlex Kiernan	select FASTBOOT
13312a10f1SAlex Kiernan	select USB_GADGET_DOWNLOAD
14312a10f1SAlex Kiernan	help
15312a10f1SAlex Kiernan	  This enables the USB part of the fastboot gadget.
16312a10f1SAlex Kiernan
17312a10f1SAlex Kiernanif FASTBOOT
18312a10f1SAlex Kiernan
19312a10f1SAlex Kiernanconfig FASTBOOT_BUF_ADDR
20312a10f1SAlex Kiernan	hex "Define FASTBOOT buffer address"
21312a10f1SAlex Kiernan	default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
22312a10f1SAlex Kiernan	default 0x81000000 if ARCH_OMAP2PLUS
23312a10f1SAlex Kiernan	default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
24312a10f1SAlex Kiernan	default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
25312a10f1SAlex Kiernan	default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
26312a10f1SAlex Kiernan				ROCKCHIP_RK322X
27312a10f1SAlex Kiernan	default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
28312a10f1SAlex Kiernan				ROCKCHIP_RK3399
29312a10f1SAlex Kiernan	default 0x280000 if ROCKCHIP_RK3368
30312a10f1SAlex Kiernan	default 0x100000 if ARCH_ZYNQMP
31312a10f1SAlex Kiernan	help
32312a10f1SAlex Kiernan	  The fastboot protocol requires a large memory buffer for
33312a10f1SAlex Kiernan	  downloads. Define this to the starting RAM address to use for
34312a10f1SAlex Kiernan	  downloaded images.
35312a10f1SAlex Kiernan
36312a10f1SAlex Kiernanconfig FASTBOOT_BUF_SIZE
37312a10f1SAlex Kiernan	hex "Define FASTBOOT buffer size"
38312a10f1SAlex Kiernan	default 0x8000000 if ARCH_ROCKCHIP
39312a10f1SAlex Kiernan	default 0x6000000 if ARCH_ZYNQMP
40312a10f1SAlex Kiernan	default 0x2000000 if ARCH_SUNXI
41312a10f1SAlex Kiernan	default 0x7000000
42312a10f1SAlex Kiernan	help
43312a10f1SAlex Kiernan	  The fastboot protocol requires a large memory buffer for
44312a10f1SAlex Kiernan	  downloads. This buffer should be as large as possible for a
45312a10f1SAlex Kiernan	  platform. Define this to the size available RAM for fastboot.
46312a10f1SAlex Kiernan
47312a10f1SAlex Kiernanconfig FASTBOOT_USB_DEV
48312a10f1SAlex Kiernan	int "USB controller number"
49312a10f1SAlex Kiernan	depends on USB_FUNCTION_FASTBOOT
50312a10f1SAlex Kiernan	default 0
51312a10f1SAlex Kiernan	help
52312a10f1SAlex Kiernan	  Some boards have USB OTG controller other than 0. Define this
53312a10f1SAlex Kiernan	  option so it can be used in compiled environment (e.g. in
54312a10f1SAlex Kiernan	  CONFIG_BOOTCOMMAND).
55312a10f1SAlex Kiernan
56312a10f1SAlex Kiernanconfig FASTBOOT_FLASH
57312a10f1SAlex Kiernan	bool "Enable FASTBOOT FLASH command"
58312a10f1SAlex Kiernan	default y if ARCH_SUNXI
5942d8dd44SAlex Kiernan	depends on MMC || (NAND && CMD_MTDPARTS)
60*c232d14dSAlex Kiernan	select IMAGE_SPARSE
61312a10f1SAlex Kiernan	help
62312a10f1SAlex Kiernan	  The fastboot protocol includes a "flash" command for writing
63312a10f1SAlex Kiernan	  the downloaded image to a non-volatile storage device. Define
64312a10f1SAlex Kiernan	  this to enable the "fastboot flash" command.
65312a10f1SAlex Kiernan
66312a10f1SAlex Kiernanchoice
67312a10f1SAlex Kiernan	prompt "Flash provider for FASTBOOT"
68312a10f1SAlex Kiernan	depends on FASTBOOT_FLASH
69312a10f1SAlex Kiernan
70312a10f1SAlex Kiernanconfig FASTBOOT_FLASH_MMC
71312a10f1SAlex Kiernan	bool "FASTBOOT on MMC"
72312a10f1SAlex Kiernan	depends on MMC
73312a10f1SAlex Kiernan
74312a10f1SAlex Kiernanconfig FASTBOOT_FLASH_NAND
75312a10f1SAlex Kiernan	bool "FASTBOOT on NAND"
7642d8dd44SAlex Kiernan	depends on NAND && CMD_MTDPARTS
77312a10f1SAlex Kiernan
78312a10f1SAlex Kiernanendchoice
79312a10f1SAlex Kiernan
80312a10f1SAlex Kiernanconfig FASTBOOT_FLASH_MMC_DEV
81312a10f1SAlex Kiernan	int "Define FASTBOOT MMC FLASH default device"
82312a10f1SAlex Kiernan	depends on FASTBOOT_FLASH_MMC
83312a10f1SAlex Kiernan	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
84312a10f1SAlex Kiernan	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
85312a10f1SAlex Kiernan	help
86312a10f1SAlex Kiernan	  The fastboot "flash" command requires additional information
87312a10f1SAlex Kiernan	  regarding the non-volatile storage device. Define this to
88312a10f1SAlex Kiernan	  the eMMC device that fastboot should use to store the image.
89312a10f1SAlex Kiernan
904085b903SAlex Kiernanconfig FASTBOOT_FLASH_NAND_TRIMFFS
914085b903SAlex Kiernan	bool "Skip empty pages when flashing NAND"
924085b903SAlex Kiernan	depends on FASTBOOT_FLASH_NAND
934085b903SAlex Kiernan	help
944085b903SAlex Kiernan	  When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
954085b903SAlex Kiernan	  pages.
964085b903SAlex Kiernan
97312a10f1SAlex Kiernanconfig FASTBOOT_GPT_NAME
98312a10f1SAlex Kiernan	string "Target name for updating GPT"
9942d8dd44SAlex Kiernan	depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
100312a10f1SAlex Kiernan	default "gpt"
101312a10f1SAlex Kiernan	help
102312a10f1SAlex Kiernan	  The fastboot "flash" command supports writing the downloaded
103312a10f1SAlex Kiernan	  image to the Protective MBR and the Primary GUID Partition
104312a10f1SAlex Kiernan	  Table. (Additionally, this downloaded image is post-processed
105312a10f1SAlex Kiernan	  to generate and write the Backup GUID Partition Table.)
106312a10f1SAlex Kiernan	  This occurs when the specified "partition name" on the
107312a10f1SAlex Kiernan	  "fastboot flash" command line matches the value defined here.
108312a10f1SAlex Kiernan	  The default target name for updating GPT is "gpt".
109312a10f1SAlex Kiernan
110312a10f1SAlex Kiernanconfig FASTBOOT_MBR_NAME
111312a10f1SAlex Kiernan	string "Target name for updating MBR"
11242d8dd44SAlex Kiernan	depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
113312a10f1SAlex Kiernan	default "mbr"
114312a10f1SAlex Kiernan	help
115312a10f1SAlex Kiernan	  The fastboot "flash" command allows to write the downloaded image
116312a10f1SAlex Kiernan	  to the Master Boot Record. This occurs when the "partition name"
117312a10f1SAlex Kiernan	  specified on the "fastboot flash" command line matches the value
118312a10f1SAlex Kiernan	  defined here. The default target name for updating MBR is "mbr".
119312a10f1SAlex Kiernan
120312a10f1SAlex Kiernanendif # FASTBOOT
121312a10f1SAlex Kiernan
122312a10f1SAlex Kiernanendmenu
123