Merge git://git.denx.de/u-boot-marvell
[platform/kernel/u-boot.git] / drivers / fastboot / Kconfig
1 menu "Fastboot support"
2
3 config FASTBOOT
4         bool
5         imply ANDROID_BOOT_IMAGE
6         imply CMD_FASTBOOT
7
8 config USB_FUNCTION_FASTBOOT
9         bool "Enable USB fastboot gadget"
10         depends on USB_GADGET
11         default y if ARCH_SUNXI && USB_MUSB_GADGET
12         select FASTBOOT
13         select USB_GADGET_DOWNLOAD
14         help
15           This enables the USB part of the fastboot gadget.
16
17 config UDP_FUNCTION_FASTBOOT
18         depends on NET
19         select FASTBOOT
20         bool "Enable fastboot protocol over UDP"
21         help
22           This enables the fastboot protocol over UDP.
23
24 if FASTBOOT
25
26 config FASTBOOT_BUF_ADDR
27         hex "Define FASTBOOT buffer address"
28         default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
29         default 0x81000000 if ARCH_OMAP2PLUS
30         default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
31         default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
32         default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
33                                 ROCKCHIP_RK322X
34         default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
35                                 ROCKCHIP_RK3399
36         default 0x280000 if ROCKCHIP_RK3368
37         default 0x100000 if ARCH_ZYNQMP
38         default 0 if SANDBOX
39         help
40           The fastboot protocol requires a large memory buffer for
41           downloads. Define this to the starting RAM address to use for
42           downloaded images.
43
44 config FASTBOOT_BUF_SIZE
45         hex "Define FASTBOOT buffer size"
46         default 0x8000000 if ARCH_ROCKCHIP
47         default 0x6000000 if ARCH_ZYNQMP
48         default 0x2000000 if ARCH_SUNXI
49         default 0x8192 if SANDBOX
50         default 0x7000000
51         help
52           The fastboot protocol requires a large memory buffer for
53           downloads. This buffer should be as large as possible for a
54           platform. Define this to the size available RAM for fastboot.
55
56 config FASTBOOT_USB_DEV
57         int "USB controller number"
58         depends on USB_FUNCTION_FASTBOOT
59         default 0
60         help
61           Some boards have USB OTG controller other than 0. Define this
62           option so it can be used in compiled environment (e.g. in
63           CONFIG_BOOTCOMMAND).
64
65 config FASTBOOT_FLASH
66         bool "Enable FASTBOOT FLASH command"
67         default y if ARCH_SUNXI || ARCH_ROCKCHIP
68         depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
69         select IMAGE_SPARSE
70         help
71           The fastboot protocol includes a "flash" command for writing
72           the downloaded image to a non-volatile storage device. Define
73           this to enable the "fastboot flash" command.
74
75 choice
76         prompt "Flash provider for FASTBOOT"
77         depends on FASTBOOT_FLASH
78
79 config FASTBOOT_FLASH_MMC
80         bool "FASTBOOT on MMC"
81         depends on MMC
82
83 config FASTBOOT_FLASH_NAND
84         bool "FASTBOOT on NAND"
85         depends on MTD_RAW_NAND && CMD_MTDPARTS
86
87 endchoice
88
89 config FASTBOOT_FLASH_MMC_DEV
90         int "Define FASTBOOT MMC FLASH default device"
91         depends on FASTBOOT_FLASH_MMC
92         default 0 if ARCH_ROCKCHIP
93         default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
94         default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
95         help
96           The fastboot "flash" command requires additional information
97           regarding the non-volatile storage device. Define this to
98           the eMMC device that fastboot should use to store the image.
99
100 config FASTBOOT_FLASH_NAND_TRIMFFS
101         bool "Skip empty pages when flashing NAND"
102         depends on FASTBOOT_FLASH_NAND
103         help
104           When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
105           pages.
106
107 config FASTBOOT_MMC_BOOT_SUPPORT
108         bool "Enable EMMC_BOOT flash/erase"
109         depends on FASTBOOT_FLASH_MMC
110         help
111           The fastboot "flash" and "erase" commands normally does operations
112           on eMMC userdata. Define this to enable the special commands to
113           flash/erase eMMC boot partition.
114           The default target name for updating eMMC boot partition 1/2 is
115           CONFIG_FASTBOOT_MMC_BOOT1_NAME/CONFIG_FASTBOOT_MMC_BOOT2_NAME.
116
117 config FASTBOOT_MMC_BOOT1_NAME
118         string "Target name for updating EMMC_BOOT1"
119         depends on FASTBOOT_MMC_BOOT_SUPPORT
120         default "mmc0boot0"
121         help
122           The fastboot "flash" and "erase" commands support operations on
123           EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on
124           the "fastboot flash" and "fastboot erase" commands match the value
125           defined here.
126           The default target name for updating EMMC_BOOT1 is "mmc0boot0".
127
128 config FASTBOOT_MMC_BOOT2_NAME
129         string "Target name for updating EMMC_BOOT2"
130         depends on FASTBOOT_MMC_BOOT_SUPPORT
131         default "mmc0boot1"
132         help
133           The fastboot "flash" and "erase" commands support operations on
134           EMMC_BOOT2. This occurs when the specified "EMMC_BOOT2 name" on
135           the "fastboot flash" and "fastboot erase" commands match the value
136           defined here.
137           The default target name for updating EMMC_BOOT2 is "mmc0boot1".
138
139 config FASTBOOT_MMC_USER_SUPPORT
140         bool "Enable eMMC userdata partition flash/erase"
141         depends on FASTBOOT_FLASH_MMC
142         help
143           Define this to enable the support "flash" and "erase" command on
144           eMMC userdata. The "flash" command only update the MBR and GPT
145           header when CONFIG_EFI_PARTITION is supported.
146           The "erase" command erase all the userdata.
147           This occurs when the specified "partition name" on the
148           fastboot command line matches the value CONFIG_FASTBOOT_MMC_USER_NAME.
149
150 config FASTBOOT_MMC_USER_NAME
151         string "Target name for updating EMMC_USER"
152         depends on FASTBOOT_MMC_USER_SUPPORT
153         default "mmc0"
154         help
155           The fastboot "flash" and "erase" command supports EMMC_USER.
156           This occurs when the specified "EMMC_USER name" on the
157           "fastboot flash" and the "fastboot erase" commands match the value
158           defined here.
159           The default target name for erasing EMMC_USER is "mmc0".
160
161 config FASTBOOT_GPT_NAME
162         string "Target name for updating GPT"
163         depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
164         default "gpt"
165         help
166           The fastboot "flash" command supports writing the downloaded
167           image to the Protective MBR and the Primary GUID Partition
168           Table. (Additionally, this downloaded image is post-processed
169           to generate and write the Backup GUID Partition Table.)
170           This occurs when the specified "partition name" on the
171           "fastboot flash" command line matches the value defined here.
172           The default target name for updating GPT is "gpt".
173
174 config FASTBOOT_MBR_NAME
175         string "Target name for updating MBR"
176         depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
177         default "mbr"
178         help
179           The fastboot "flash" command allows to write the downloaded image
180           to the Master Boot Record. This occurs when the "partition name"
181           specified on the "fastboot flash" command line matches the value
182           defined here. The default target name for updating MBR is "mbr".
183
184 config FASTBOOT_CMD_OEM_FORMAT
185         bool "Enable the 'oem format' command"
186         depends on FASTBOOT_FLASH_MMC && CMD_GPT
187         help
188           Add support for the "oem format" command from a client. This
189           relies on the env variable partitions to contain the list of
190           partitions as required by the gpt command.
191
192 config FASTBOOT_CMD_OEM_PARTCONF
193         bool "Enable the 'oem partconf' command"
194         depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
195         help
196           Add support for the "oem partconf" command from a client. This set
197           the mmc boot-partition for the selecting eMMC device.
198
199 config FASTBOOT_CMD_OEM_BOOTBUS
200         bool "Enable the 'oem bootbus' command"
201         depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
202         help
203           Add support for the "oem bootbus" command from a client. This set
204           the mmc boot configuration for the selecting eMMC device.
205
206 endif # FASTBOOT
207
208 endmenu