Merge branch 'master' of git://git.denx.de/u-boot-socfpga
[oweals/u-boot.git] / common / spl / Kconfig
index 18dbc238bf6f3803c2a7c553c8523943514bc74e..142753f9e7aa5a2725c6025ab91d4e22b7f9bb3d 100644 (file)
@@ -25,8 +25,85 @@ config SPL_FRAMEWORK
          supports MMC, NAND and YMODEM and other methods loading of U-Boot
          and the Linux Kernel.  If unsure, say Y.
 
          supports MMC, NAND and YMODEM and other methods loading of U-Boot
          and the Linux Kernel.  If unsure, say Y.
 
+config SPL_SIZE_LIMIT
+       int "Maximum size of SPL image"
+       depends on SPL
+       default 69632 if ARCH_MX6
+       default 0
+       help
+         Specifies the maximum length of the U-Boot SPL image.
+         If this value is zero, it is ignored.
+
+config SPL_SIZE_LIMIT_SUBTRACT_GD
+       bool "SPL image size check: provide space for global data"
+       depends on SPL_SIZE_LIMIT > 0
+       help
+         If enabled, aligned size of global data is reserved in
+         SPL_SIZE_LIMIT check to ensure such an image does not overflow SRAM
+         if SPL_SIZE_LIMIT describes the size of SRAM available for SPL when
+         pre-reloc global data is put into this SRAM, too.
+
+config SPL_SIZE_LIMIT_SUBTRACT_MALLOC
+       bool "SPL image size check: provide space for malloc() pool before relocation"
+       depends on SPL_SIZE_LIMIT > 0
+       help
+         If enabled, SPL_SYS_MALLOC_F_LEN is reserved in SPL_SIZE_LIMIT check
+         to ensure such an image does not overflow SRAM if SPL_SIZE_LIMIT
+         describes the size of SRAM available for SPL when pre-reloc malloc
+         pool is put into this SRAM, too.
+
+config SPL_SIZE_LIMIT_PROVIDE_STACK
+       hex "SPL image size check: provide stack space before relocation"
+       depends on SPL_SIZE_LIMIT > 0
+       default 0
+       help
+         If set, this size is reserved in SPL_SIZE_LIMIT check to ensure such
+         an image does not overflow SRAM if SPL_SIZE_LIMIT describes the size
+         of SRAM available for SPL when the stack required before reolcation
+         uses this SRAM, too.
+
+menu "PowerPC SPL Boot options"
+       depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
+
+config SPL_NAND_BOOT
+       bool "Load SPL from NAND flash"
+
+config SPL_MMC_BOOT
+       bool "Load SPL from SD Card / eMMC"
+
+config SPL_SPI_BOOT
+       bool "Load SPL from SPI flash"
+
+config SPL_FSL_PBL
+       bool "Create SPL in Freescale PBI format"
+       help
+         Create boot binary having SPL binary in PBI format concatenated with
+         u-boot binary.
+
+endmenu
+
+config HANDOFF
+       bool "Pass hand-off information from SPL to U-Boot proper"
+       depends on BLOBLIST
+       help
+         It is useful to be able to pass information from SPL to U-Boot
+         proper to preserve state that is known in SPL and is needed in U-Boot.
+         Enable this to locate the handoff information in U-Boot proper, early
+         in boot. It is available in gd->handoff. The state state is set up
+         in SPL (or TPL if that is being used).
+
 if SPL
 
 if SPL
 
+config SPL_HANDOFF
+       bool "Pass hand-off information from SPL to U-Boot proper"
+       depends on HANDOFF
+       default y
+       help
+         This option enables SPL to write handoff information. This can be
+         used to pass information like the size of SDRAM from SPL to U-Boot
+         proper. Also SPL can receive information from TPL in the same place
+         if that is enabled.
+
 config SPL_LDSCRIPT
        string "Linker script for the SPL stage"
        default "arch/$(ARCH)/cpu/u-boot-spl.lds"
 config SPL_LDSCRIPT
        string "Linker script for the SPL stage"
        default "arch/$(ARCH)/cpu/u-boot-spl.lds"
@@ -36,6 +113,13 @@ config SPL_LDSCRIPT
          U-Boot stage.  Set this to the path of the linker-script to
          be used for SPL.
 
          U-Boot stage.  Set this to the path of the linker-script to
          be used for SPL.
 
+config SPL_TEXT_BASE
+       hex "SPL Text Base"
+       default ISW_ENTRY_ADDR if AM43XX || AM33XX || OMAP54XX || ARCH_KEYSTONE
+       default 0x0
+       help
+         The address in memory that SPL will be running from.
+
 config SPL_BOARD_INIT
        bool "Call board-specific initialization in SPL"
        help
 config SPL_BOARD_INIT
        bool "Call board-specific initialization in SPL"
        help
@@ -80,6 +164,16 @@ config SPL_LEGACY_IMAGE_SUPPORT
          is y. If this is not set, SPL will move on to other available
          boot media to find a suitable image.
 
          is y. If this is not set, SPL will move on to other available
          boot media to find a suitable image.
 
+config SPL_LEGACY_IMAGE_CRC_CHECK
+       bool "Check CRC of Legacy images"
+       depends on SPL_LEGACY_IMAGE_SUPPORT
+       select SPL_CRC32_SUPPORT
+       help
+         Enable this to check the CRC of Legacy images. While this increases
+         reliability, it affects both code size and boot duration.
+         If disabled, Legacy images are booted if the image magic and size
+         are correct, without further integrity checks.
+
 config SPL_SYS_MALLOC_SIMPLE
        bool
        prompt "Only use malloc_simple functions in the SPL"
 config SPL_SYS_MALLOC_SIMPLE
        bool
        prompt "Only use malloc_simple functions in the SPL"
@@ -135,12 +229,21 @@ config SPL_SEPARATE_BSS
          location is used. Normally we put the device tree at the end of BSS
          but with this option enabled, it goes at _image_binary_end.
 
          location is used. Normally we put the device tree at the end of BSS
          but with this option enabled, it goes at _image_binary_end.
 
-config SPL_DISABLE_BANNER_PRINT
-       bool "Disable output of the SPL banner 'U-Boot SPL ...'"
+config SPL_BANNER_PRINT
+       bool "Enable output of the SPL banner 'U-Boot SPL ...'"
+       default y
+       help
+         If this option is enabled, SPL will print the banner with version
+         info. Disabling this option could be useful to reduce TPL boot time
+         (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
+
+config TPL_BANNER_PRINT
+       bool "Enable output of the TPL banner 'U-Boot TPL ...'"
+       default y
        help
          If this option is enabled, SPL will not print the banner with version
        help
          If this option is enabled, SPL will not print the banner with version
-         info. Selecting this option could be useful to reduce SPL boot time
-         (e.g. approx. 6 ms slower, when output on i.MX6 with 115200 baud).
+         info. Disabling this option could be useful to reduce SPL boot time
+         (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
 
 config SPL_DISPLAY_PRINT
        bool "Display a board-specific message in SPL"
 
 config SPL_DISPLAY_PRINT
        bool "Display a board-specific message in SPL"
@@ -207,13 +310,13 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
 
 config SPL_CRC32_SUPPORT
        bool "Support CRC32"
 
 config SPL_CRC32_SUPPORT
        bool "Support CRC32"
-       depends on SPL_FIT
+       default y if SPL_LEGACY_IMAGE_SUPPORT
        help
        help
-         Enable this to support CRC32 in FIT images within SPL. This is a
-         32-bit checksum value that can be used to verify images. This is
-         the least secure type of checksum, suitable for detected
-         accidental image corruption. For secure applications you should
-         consider SHA1 or SHA256.
+         Enable this to support CRC32 in uImages or FIT images within SPL.
+         This is a 32-bit checksum value that can be used to verify images.
+         For FIT images, this is the least secure type of checksum, suitable
+         for detected accidental image corruption. For secure applications you
+         should consider SHA1 or SHA256.
 
 config SPL_MD5_SUPPORT
        bool "Support MD5"
 
 config SPL_MD5_SUPPORT
        bool "Support MD5"
@@ -236,7 +339,7 @@ config SPL_SHA1_SUPPORT
          checksum is a 160-bit (20-byte) hash value used to check that the
          image contents have not been corrupted or maliciously altered.
          While SHA1 is fairly secure it is coming to the end of its life
          checksum is a 160-bit (20-byte) hash value used to check that the
          image contents have not been corrupted or maliciously altered.
          While SHA1 is fairly secure it is coming to the end of its life
-         due to the expanding computing power avaiable to brute-force
+         due to the expanding computing power available to brute-force
          attacks. For more security, consider SHA256.
 
 config SPL_SHA256_SUPPORT
          attacks. For more security, consider SHA256.
 
 config SPL_SHA256_SUPPORT
@@ -257,6 +360,7 @@ config SPL_FIT_IMAGE_TINY
        bool "Remove functionality from SPL FIT loading to reduce size"
        depends on SPL_FIT
        default y if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6
        bool "Remove functionality from SPL FIT loading to reduce size"
        depends on SPL_FIT
        default y if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6
+       default y if ARCH_IMX8M
        help
          Enable this to reduce the size of the FIT image loading code
          in SPL, if space for the SPL binary is very tight.
        help
          Enable this to reduce the size of the FIT image loading code
          in SPL, if space for the SPL binary is very tight.
@@ -295,6 +399,16 @@ config SPL_HASH_SUPPORT
          this option to build system-specific drivers for hash acceleration
          as part of an SPL build.
 
          this option to build system-specific drivers for hash acceleration
          as part of an SPL build.
 
+config TPL_HASH_SUPPORT
+       bool "Support hashing drivers in TPL"
+       select SHA1
+       select SHA256
+       help
+         Enable hashing drivers in SPL. These drivers can be used to
+         accelerate secure boot processing in secure applications. Enable
+         this option to build system-specific drivers for hash acceleration
+         as part of an SPL build.
+
 config SPL_DMA_SUPPORT
        bool "Support DMA drivers"
        help
 config SPL_DMA_SUPPORT
        bool "Support DMA drivers"
        help
@@ -347,7 +461,7 @@ config SPL_ETH_SUPPORT
          is required since the network stack uses a number of environment
          variables. See also SPL_NET_SUPPORT.
 
          is required since the network stack uses a number of environment
          variables. See also SPL_NET_SUPPORT.
 
-config SPL_EXT_SUPPORT
+config SPL_FS_EXT4
        bool "Support EXT filesystems"
        help
          Enable support for EXT2/3/4 filesystems with SPL. This permits
        bool "Support EXT filesystems"
        help
          Enable support for EXT2/3/4 filesystems with SPL. This permits
@@ -355,7 +469,7 @@ config SPL_EXT_SUPPORT
          filesystem from within SPL. Support for the underlying block
          device (e.g. MMC or USB) must be enabled separately.
 
          filesystem from within SPL. Support for the underlying block
          device (e.g. MMC or USB) must be enabled separately.
 
-config SPL_FAT_SUPPORT
+config SPL_FS_FAT
        bool "Support FAT filesystems"
        select FS_FAT
        help
        bool "Support FAT filesystems"
        select FS_FAT
        help
@@ -364,6 +478,13 @@ config SPL_FAT_SUPPORT
          filesystem from within SPL. Support for the underlying block
          device (e.g. MMC or USB) must be enabled separately.
 
          filesystem from within SPL. Support for the underlying block
          device (e.g. MMC or USB) must be enabled separately.
 
+config SPL_FAT_WRITE
+       bool "Support write for FAT filesystems"
+       help
+         Enable write support for FAT and VFAT filesystems with SPL.
+         Support for the underlying block device (e.g. MMC or USB) must be
+         enabled separately.
+
 config SPL_FPGA_SUPPORT
        bool "Support FPGAs"
        help
 config SPL_FPGA_SUPPORT
        bool "Support FPGAs"
        help
@@ -376,7 +497,7 @@ config SPL_FPGA_SUPPORT
          within SPL.
 
 config SPL_GPIO_SUPPORT
          within SPL.
 
 config SPL_GPIO_SUPPORT
-       bool "Support GPIO"
+       bool "Support GPIO in SPL"
        help
          Enable support for GPIOs (General-purpose Input/Output) in SPL.
          GPIOs allow U-Boot to read the state of an input line (high or
        help
          Enable support for GPIOs (General-purpose Input/Output) in SPL.
          GPIOs allow U-Boot to read the state of an input line (high or
@@ -410,6 +531,7 @@ config SPL_LIBCOMMON_SUPPORT
 
 config SPL_LIBDISK_SUPPORT
        bool "Support disk partitions"
 
 config SPL_LIBDISK_SUPPORT
        bool "Support disk partitions"
+       select PARTITIONS
        help
          Enable support for disk partitions within SPL. 'Disk' is something
          of a misnomer as it includes non-spinning media such as flash (as
        help
          Enable support for disk partitions within SPL. 'Disk' is something
          of a misnomer as it includes non-spinning media such as flash (as
@@ -441,6 +563,7 @@ config SPL_DM_MAILBOX
 config SPL_MMC_SUPPORT
        bool "Support MMC"
        depends on MMC
 config SPL_MMC_SUPPORT
        bool "Support MMC"
        depends on MMC
+       select HAVE_BLOCK_DEVICE
        help
          Enable support for MMC (Multimedia Card) within SPL. This enables
          the MMC protocol implementation and allows any enabled drivers to
        help
          Enable support for MMC (Multimedia Card) within SPL. This enables
          the MMC protocol implementation and allows any enabled drivers to
@@ -566,12 +689,12 @@ config SPL_PAYLOAD
        default "tpl/u-boot-with-tpl.bin" if TPL
        default "u-boot.bin"
        help
        default "tpl/u-boot-with-tpl.bin" if TPL
        default "u-boot.bin"
        help
-         Payload for SPL boot. For backward compability, default to
+         Payload for SPL boot. For backward compatibility, default to
          u-boot.bin, i.e. RAW image without any header. In case of
          TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
          use u-boot.img.
 
          u-boot.bin, i.e. RAW image without any header. In case of
          TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
          use u-boot.img.
 
-config SPL_PCI_SUPPORT
+config SPL_PCI
        bool "Support PCI drivers"
        help
          Enable support for PCI in SPL. For platforms that need PCI to boot,
        bool "Support PCI drivers"
        help
          Enable support for PCI in SPL. For platforms that need PCI to boot,
@@ -688,13 +811,34 @@ config SPL_SPI_FLASH_SUPPORT
          lines). This enables the drivers in drivers/mtd/spi as part of an
          SPL build. This normally requires SPL_SPI_SUPPORT.
 
          lines). This enables the drivers in drivers/mtd/spi as part of an
          SPL build. This normally requires SPL_SPI_SUPPORT.
 
+if SPL_SPI_FLASH_SUPPORT
+
+config SPL_SPI_FLASH_TINY
+       bool "Enable low footprint SPL SPI Flash support"
+       depends on !SPI_FLASH_BAR
+       default y if SPI_FLASH
+       help
+        Enable lightweight SPL SPI Flash support that supports just reading
+        data/images from flash. No support to write/erase flash. Enable
+        this if you have SPL size limitations and don't need full
+        fledged SPI flash support.
+
+config SPL_SPI_FLASH_SFDP_SUPPORT
+       bool "SFDP table parsing support for SPI NOR flashes"
+       depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
+       help
+        Enable support for parsing and auto discovery of parameters for
+        SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
+        tables as per JESD216 standard in SPL.
+
 config SPL_SPI_LOAD
        bool "Support loading from SPI flash"
 config SPL_SPI_LOAD
        bool "Support loading from SPI flash"
-       depends on SPL_SPI_FLASH_SUPPORT
        help
          Enable support for loading next stage, U-Boot or otherwise, from
          SPI NOR in U-Boot SPL.
 
        help
          Enable support for loading next stage, U-Boot or otherwise, from
          SPI NOR in U-Boot SPL.
 
+endif # SPL_SPI_FLASH_SUPPORT
+
 config SPL_SPI_SUPPORT
        bool "Support SPI drivers"
        help
 config SPL_SPI_SUPPORT
        bool "Support SPI drivers"
        help
@@ -715,6 +859,7 @@ config SPL_THERMAL
 
 config SPL_USB_HOST_SUPPORT
        bool "Support USB host drivers"
 
 config SPL_USB_HOST_SUPPORT
        bool "Support USB host drivers"
+       select HAVE_BLOCK_DEVICE
        help
          Enable access to USB (Universal Serial Bus) host devices so that
          SPL can load U-Boot from a connected USB peripheral, such as a USB
        help
          Enable access to USB (Universal Serial Bus) host devices so that
          SPL can load U-Boot from a connected USB peripheral, such as a USB
@@ -723,9 +868,9 @@ config SPL_USB_HOST_SUPPORT
          device can be attached. This option enables the drivers in
          drivers/usb/host as part of an SPL build.
 
          device can be attached. This option enables the drivers in
          drivers/usb/host as part of an SPL build.
 
-config SPL_USB_SUPPORT
+config SPL_USB_STORAGE
        bool "Support loading from USB"
        bool "Support loading from USB"
-       depends on SPL_USB_HOST_SUPPORT
+       depends on SPL_USB_HOST_SUPPORT && !(BLK && !DM_USB)
        help
          Enable support for USB devices in SPL. This allows use of USB
          devices such as hard drives and flash drivers for loading U-Boot.
        help
          Enable support for USB devices in SPL. This allows use of USB
          devices such as hard drives and flash drivers for loading U-Boot.
@@ -733,13 +878,13 @@ config SPL_USB_SUPPORT
          config options. This enables loading from USB using a configured
          device.
 
          config options. This enables loading from USB using a configured
          device.
 
-config SPL_USB_GADGET_SUPPORT
+config SPL_USB_GADGET
        bool "Suppport USB Gadget drivers"
        help
          Enable USB Gadget API which allows to enable USB device functions
          in SPL.
 
        bool "Suppport USB Gadget drivers"
        help
          Enable USB Gadget API which allows to enable USB device functions
          in SPL.
 
-if SPL_USB_GADGET_SUPPORT
+if SPL_USB_GADGET
 
 config SPL_USB_ETHER
        bool "Support USB Ethernet drivers"
 
 config SPL_USB_ETHER
        bool "Support USB Ethernet drivers"
@@ -751,7 +896,7 @@ config SPL_USB_ETHER
          since the network stack uses a number of environment variables.
          See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
 
          since the network stack uses a number of environment variables.
          See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
 
-config SPL_DFU_SUPPORT
+config SPL_DFU
        bool "Support DFU (Device Firmware Upgrade)"
        select SPL_HASH_SUPPORT
        select SPL_DFU_NO_RESET
        bool "Support DFU (Device Firmware Upgrade)"
        select SPL_HASH_SUPPORT
        select SPL_DFU_NO_RESET
@@ -766,11 +911,11 @@ config SPL_DFU_SUPPORT
 
 choice
        bool "DFU device selection"
 
 choice
        bool "DFU device selection"
-       depends on SPL_DFU_SUPPORT
+       depends on SPL_DFU
 
 config SPL_DFU_RAM
        bool "RAM device"
 
 config SPL_DFU_RAM
        bool "RAM device"
-       depends on SPL_DFU_SUPPORT && SPL_RAM_SUPPORT
+       depends on SPL_DFU && SPL_RAM_SUPPORT
        help
         select RAM/DDR memory device for loading binary images
         (u-boot/kernel) to the selected device partition using
        help
         select RAM/DDR memory device for loading binary images
         (u-boot/kernel) to the selected device partition using
@@ -832,6 +977,13 @@ config SPL_AM33XX_ENABLE_RTC32K_OSC
          Enable access to the AM33xx RTC and select the external 32kHz clock
          source.
 
          Enable access to the AM33xx RTC and select the external 32kHz clock
          source.
 
+config SPL_OPTEE
+       bool "Support OP-TEE Trusted OS"
+       depends on ARM
+       help
+         OP-TEE is an open source Trusted OS  which is loaded by SPL.
+         More detail at: https://github.com/OP-TEE/optee_os
+
 config TPL
        bool
        depends on SUPPORT_TPL
 config TPL
        bool
        depends on SUPPORT_TPL
@@ -841,6 +993,16 @@ config TPL
 
 if TPL
 
 
 if TPL
 
+config TPL_HANDOFF
+       bool "Pass hand-off information from TPL to SPL and U-Boot proper"
+       depends on HANDOFF
+       default y
+       help
+         This option enables TPL to write handoff information. This can be
+         used to pass information like the size of SDRAM from TPL to U-Boot
+         proper. The information is also available to SPL if it is useful
+         there.
+
 config TPL_BOARD_INIT
        bool "Call board-specific initialization in TPL"
        help
 config TPL_BOARD_INIT
        bool "Call board-specific initialization in TPL"
        help
@@ -851,6 +1013,8 @@ config TPL_BOARD_INIT
 config TPL_LDSCRIPT
         string "Linker script for the TPL stage"
        depends on TPL
 config TPL_LDSCRIPT
         string "Linker script for the TPL stage"
        depends on TPL
+       default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
+       default "arch/$(ARCH)/cpu/u-boot-spl.lds"
        help
          The TPL stage will usually require a different linker-script
          (as it runs from a different memory region) than the regular
        help
          The TPL stage will usually require a different linker-script
          (as it runs from a different memory region) than the regular
@@ -921,6 +1085,17 @@ config TPL_ENV_SUPPORT
        help
          Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
 
        help
          Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
 
+config TPL_GPIO_SUPPORT
+       bool "Support GPIO in TPL"
+       help
+         Enable support for GPIOs (General-purpose Input/Output) in TPL.
+         GPIOs allow U-Boot to read the state of an input line (high or
+         low) and set the state of an output line. This can be used to
+         drive LEDs, control power to various system parts and read user
+         input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
+         for example. Enable this option to build the drivers in
+         drivers/gpio as part of an TPL build.
+
 config TPL_I2C_SUPPORT
        bool "Support I2C"
        help
 config TPL_I2C_SUPPORT
        bool "Support I2C"
        help
@@ -956,6 +1131,22 @@ config TPL_NAND_SUPPORT
        help
          Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
 
        help
          Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
 
+config TPL_PCI
+       bool "Support PCI drivers"
+       help
+         Enable support for PCI in TPL. For platforms that need PCI to boot,
+         or must perform some init using PCI in SPL, this provides the
+         necessary driver support. This enables the drivers in drivers/pci
+         as part of a TPL build.
+
+config TPL_PCH_SUPPORT
+       bool "Support PCH drivers"
+       help
+         Enable support for PCH (Platform Controller Hub) devices in TPL.
+         These are used to set up GPIOs and the SPI peripheral early in
+         boot. This enables the drivers in drivers/pch as part of a TPL
+         build.
+
 config TPL_RAM_SUPPORT
        bool "Support booting from RAM"
        help
 config TPL_RAM_SUPPORT
        bool "Support booting from RAM"
        help
@@ -970,6 +1161,15 @@ config TPL_RAM_DEVICE
          be already in memory when TPL takes over, e.g. loaded by the boot
          ROM.
 
          be already in memory when TPL takes over, e.g. loaded by the boot
          ROM.
 
+config TPL_RTC_SUPPORT
+       bool "Support RTC drivers"
+       help
+         Enable RTC (Real-time Clock) support in TPL. This includes support
+         for reading and setting the time. Some RTC devices also have some
+         non-volatile (battery-backed) memory which is accessible if
+         needed. This enables the drivers in drivers/rtc as part of an TPL
+         build.
+
 config TPL_SERIAL_SUPPORT
        bool "Support serial"
        select TPL_PRINTF
 config TPL_SERIAL_SUPPORT
        bool "Support serial"
        select TPL_PRINTF
@@ -1008,5 +1208,17 @@ config TPL_YMODEM_SUPPORT
 
 endif # TPL
 
 
 endif # TPL
 
+config SPL_AT91_MCK_BYPASS
+       bool "Use external clock signal as a source of main clock for AT91 platforms"
+       depends on ARCH_AT91
+       default n
+       help
+         Use external 8 to 24 Mhz clock signal as source of main clock instead
+         of an external crystal oscillator.
+         This option disables the internal driving on the XOUT pin.
+         The external source has to provide a stable clock on the XIN pin.
+         If this option is disabled, the SoC expects a crystal oscillator
+         that needs driving on both XIN and XOUT lines.
+
 endif # SPL
 endmenu
 endif # SPL
 endmenu