# Copyright (C) 2006 Microchip Technology Inc. and its subsidiaries
#
# SPDX-License-Identifier: MIT

mainmenu "AT91 Bootstrap configuration"

config HAVE_DOT_CONFIG
	bool
	default y
	help
	  Indicate that have an included file.

choice
	prompt "Primary Operation"
	default LOAD_AND_JUMP

config LOAD_AND_JUMP
	bool "Load and launch next software"
	select LOAD_SW
	select JUMP_TO_SW
	---help---
	  Load a software image from external media to RAM then, depending on the
	  type of software, prepare the required boot parameters, and finally jump
	  to the entry point of this software in RAM.
	  Alternatively, if XIP is enabled, execute the software in place.

config DIRECT_JUMP
	bool "Launch externally loaded software"
	select JUMP_TO_SW
	---help---
	  In some cases we cannot copy the software from external media to RAM.
	  Skip copying any software image from external media to RAM. Expect the
	  required images and boot parameters to be present in RAM already. For
	  instance they will have been loaded by a debugger via JTAG, or by the
	  SAM-BA boot assistant.
	  Jump directly to the entry point of the software in RAM.

config INIT_AND_STOP
	bool "Configure and stop"
	select BKPT_NOTIFY_DONE
	---help---
	  Configure essential peripherals. Do not not load any image. Once the
	  system is configured, trigger a breakpoint, and enter an infinite loop.
	  Wait there until a debugger takes control.
	  Resort to the debugger (attached via JTAG) for taking control and
	  possibly loading/running a software application.
	  In order to load code into DRAM from a debugger, a bootstrap is
	  required to configure the clocks, PIOs, and memory correctly. Selecting
	  this option builds a bootstrap image that can be used for this purpose.

endchoice

config BKPT_NOTIFY_DONE
	bool
	help
	  In order to load code into DRAM from a debugger, a bootstrap is
	  required to configure the clocks, peripheral I/Os, and memory correctly.
	  Selecting this option builds an image that can be used for this purpose.

config LOAD_SW
	bool
	help
	  Load a software image from external media to RAM.
	  Or prepare for executing the software in place (XIP).

config JUMP_TO_SW
	bool
	help
	  Complete bootstrap operation by jumping to the entry point of the next
	  software in RAM.

source "device/Config.in.dev"
source "device/Config.in.clk"

menu "Console and Debug"

source "device/sama5d2/Config.in.con"
source "device/sama5d4/Config.in.con"
source "device/sam9x60/Config.in.con"
source "device/sama7g5/Config.in.con"

config DEBUG
	bool "Debug Output"
	default n
	help
	  Output Debug messages
choice
	prompt "Verbosity Level"
	depends on DEBUG

config DEBUG_INFO
	bool "Informational"

config DEBUG_LOUD
	bool "Detailed"

config DEBUG_VERY_LOUD
	bool "Highest Verbosity"

endchoice

config HW_DISPLAY_BANNER
	bool "Display Banner"
	default y
	help
	  Display banner

config HW_BANNER
	string "Banner"
	default "\"\\n\\nAT91Bootstrap \" AT91BOOTSTRAP_VERSION \" (\" COMPILE_TIME \")\\n\\n\""
	depends on HW_DISPLAY_BANNER
	help
	  The banner displayed on serial port

endmenu

source "device/Config.in"

source "driver/Config.in.driver"

config PROJECT
	string
	default "dataflash"	if DATAFLASH
	default "flash"		if FLASH
	default "nandflash"	if NANDFLASH
	default "sdcard"	if SDCARD

choice
	prompt "Next Software Type"
	depends on LOAD_SW || JUMP_TO_SW
	default LOAD_UBOOT

config LOAD_UBOOT
	bool "U-Boot"
	---help---
	  Use this mode to launch a second level boot monitor
	  such as U-Boot, placed in the last MByte of SDRAM.

config LOAD_LINUX
	select LINUX_IMAGE
	bool "Linux Kernel"
	---help---
	  Boot a Linux kernel image.
	  No further bootloader required.

config LOAD_ANDROID
	depends on !LOAD_OPTEE
	select LINUX_IMAGE
	bool "Android"
	---help---
	  Boot an Android image.
	  No further bootloader required.

config LOAD_1MB
	depends on !LOAD_OPTEE
	bool "Load 1 MB into start of SDRAM"
	---help---
	  Use this mode to load an embedded application
	  which can have a size of up to 1 MByte

config LOAD_4MB
	depends on !LOAD_OPTEE
	bool "Load 4 MB into start of SDRAM"
	---help---
	  Use this mode to load an embedded application
	  which can have a size of up to 4 MByte

config LOAD_64KB
	depends on !LOAD_OPTEE
	bool "Load 64 kB into the start of SDRAM"
	---help---
	  Use this mode to load an embedded application
	  which can have max 64 kB Size

endchoice

config LINUX_IMAGE
	depends on LOAD_LINUX || LOAD_ANDROID
	bool
	help
	  Select to load linux uImage or zImage to boot

#
# Kernel Image Storage Setup
#
source "Config.in.kernel"

#
# U-Boot Image Storage Setup
#
source "Config.in.u-boot"

#
# Demo App Image Storage Setup
#
source "Config.in.app-image"

config IMAGE_NAME
	string "Next Software Image File Name"
	depends on LOAD_SW && FATFS
	default "Image" if LINUX_IMAGE
	default "u-boot.bin" if LOAD_UBOOT
	default "softpack.bin" if LOAD_64KB || LOAD_4MB || LOAD_1MB


source "device/Config.in.mach"

source "Config.in.secure"

config THUMB
	depends on !(SAMA5D3X || SAMA5D4)
	bool "Build in thumb mode"
	help
	  Build code in thumb mode

config DISABLE_WATCHDOG
	bool "Disable Watchdog"
	default y
	help
	  Disable the watchdog in the boostrap

menu "ARM TrustZone Options"
	depends on CPU_HAS_TRUSTZONE

config MATRIX
	bool "Enable Configure the Matrix"
	default y
	help
	  This interface let you to configure the MATRIX0(H64MX) and
	  MATRIX1(H32MX) slave security  and to select the APB slave security startup.

source "Config.in.optee"

config ENTER_NWD
	depends on !LOAD_OPTEE
	select MATRIX
	bool "Enable Enter the Normal World before Jumping"
	default n
	help
	  This interface let you to make the system to enter from the Secure World
	  to the Non-Secure World before the jumping.

config REDIRECT_ALL_INTS_AIC
	depends on !LOAD_OPTEE
	bool "Redirect All Peripherals Interrupts to AIC"
	default y
	help
	  This interface let you to redirect all peripherals interrupts to AIC,
	  otherwise, the secure peripherals interrupts direct to SAIC, others to AIC.

config TZC400
	bool "Configure TrustZone Controller TZC400"
	default y if CPU_HAS_TZC400
	help
	  This will select the code that initializes the TZC 400 TrustZone Controller.

config TZC400_SPECULATIVE_LOAD
	bool "Enable TZC400 Speculative Load for all regions"
	depends on TZC400
	default n
	help
	  This will enable the Speculative Load for the TZC.
	  Speculative load means that the TZC will send requests to DDR
	  before the security check, but block the results and treat the
	  requests with RAZ/WI if security check fails.
	  May improve performance but bound for security checks.
	  If unsure, say "n".

choice
	prompt "Select controller profile"
	depends on TZC400
	default TZC400_SIMPLE_PROFILE
	help
	  Decide which configuration to use for the controller.

config TZC400_SIMPLE_PROFILE
	bool "Simple TZC400 Profile"
	depends on TZC400
	help
	  A single TrustZone Area with everything permitted.
endchoice

endmenu

config PM
	bool "Power Management Options"
	depends on SUPPORT_PM
	default y
	help
	  This interface let you select the external devices on the board to
	  enter the power down mode at startup, such as Audio Codec(wm8904), HDMI(SiI9022ACUN)
	  and ethernet PHY(KSZ8081RNB). Its purpose is to make sure the external devices
	  which will not be touched in the kernel are set the proper power state.

menu "Select the Devices to the Low-power mode"
	depends on PM

config MAC0_PHY
	bool "MAC0 PHYs"
	depends on HAS_EHT0_PHY
	select MACB
	default y
	help
	  This interface allow you to select the MAC0 PHY on the board
	  which will be put into the Power-Down mode.

config MAC1_PHY
	bool "MAC1 PHYs"
	depends on HAS_EHT1_PHY
	select MACB
	default y
	help
	  This interface allow you to select the MAC1 PHY on the board
	  which will be put into the Power-Down mode.

config HDMI
	bool "HDMI (SiI9022)"
	depends on HAS_HDMI
	select TWI
	default y
	help
	  This interface allow you to select the HDMI chip on the board
	  which will be put into the Power-Down mode.

config HDMI_ON_TWI
	int "HDMI on TWI bus (configured in menu \"TWI BUS setting\")"
	depends on HDMI
	default 0
	help
	  This interface allow you select which TWI bus for the HDMI to wire on.

config WM8904
	bool "Audio CODEC (wm8904)"
	depends on HAS_AUDIO_CODEC
	select TWI
	default y
	help
	  This interface allow you to select the CODEC chip on the board
	  which will be put into the Power-Down mode.

config CODEC_ON_TWI
	int "CODEC on TWI bus (configured in menu \"TWI BUS setting\")"
	depends on WM8904
	default 0
	help
	  This interface allow you select which TWI bus for the CODEC to wire on.

config ACT8865_POWER_SAVING
	bool "PMIC (ACT8865) Power Saving"
	depends on ACT8865
	default y
	help
	  This interface allow you to select the PMIC(ACT8865) chip on the board
	  which will be set the Power-Saving mode.

endmenu

config BACKUP_MODE
	bool "Enable Backup Mode"
	default n
	help
	  Enables "Backup mode". Starting with sama5d2, it is possible to put
	  use DDR Self Refresh and shutdown the core. Resuming from that state
	  requires support in the bootloader.

menu "Board's Workaround Options"

choice
	prompt "Workaround for Board Quirks"
	default BOARD_QUIRK_NONE

config BOARD_QUIRK_NONE
	bool "None Quirks for the board"

config BOARD_QUIRK_SAMA5D3
	bool "Quirks for SAMA5D3-EK / SAMA5D3-CMP board"

config BOARD_QUIRK_SAMA5D4
	bool "Quirks for SAMA5D4-EK / SAMA5D4-XPLAINED board"

config BOARD_QUIRK_SAMA5D2_XULT
	bool "Quirks for SAMA5D2-XULT board"

config BOARD_QUIRK_SAMA5D2_ICP
	bool "Quirks for SAMA5D2-ICP board"

config BOARD_QUIRK_SAMA5D2_SIP
	bool "Quirks for boards using SAMA5D225C-D1M/SAMA5D27C-D1G/SAMA5D28C-D1G"

config BOARD_QUIRK_SAM9X60_EK
	bool "Quirks for SAM9X60-EK board"

config BOARD_QUIRK_SAM9X60_EB
	bool "Quirks for SAM9X60-SDR-SIP-EB / SAM9X60-DDR2-SIP-EB board"

config BOARD_QUIRK_SAMA7G5_EK
	bool "Quirks for SAMA7G5-EK board"
	help
	  On SAMA7G5 EK board, pin PC15/16 are connected to STBY of the CAN transceivers,
	  enabling this quirk will put the transceivers to normal mode.

config BOARD_QUIRK_SAM9X60_CURIOSITY
        bool "Quirks for SAM9X60_CURIOSITY board"

endchoice

config LED_ON_BOARD
	bool "There are LEDs on the board"
	default n

menu "LED setting"
	depends on LED_ON_BOARD

choice
	prompt "LED (red) PIO Select"
	default LED_R_NONE

config LED_R_NONE
	bool "No Red LED on the board"

config LED_R_ON_PIOA
	bool "LED on PIOA"

config LED_R_ON_PIOB
	bool "LED on PIOB"

config LED_R_ON_PIOC
	bool "LED on PIOC"

config LED_R_ON_PIOD
	bool "LED on PIOD"

config LED_R_ON_PIOE
	bool "LED on PIOE"
	depends on PIO_E

endchoice

config LED_R_PIN
	depends on !LED_R_NONE
	int "LED (red) on I/O Line"
	range 0 31
	default 0

config LED_R_VALUE
	depends on !LED_R_NONE
	int "LED (red) initial value"
	range 0 1
	default 0

choice
	prompt "LED (green) PIO Select"
	default LED_G_NONE

config LED_G_NONE
	bool "No Green LED on the board"

config LED_G_ON_PIOA
	bool "LED on PIOA"

config LED_G_ON_PIOB
	bool "LED on PIOB"

config LED_G_ON_PIOC
	bool "LED on PIOC"

config LED_G_ON_PIOD
	bool "LED on PIOD"

config LED_G_ON_PIOE
	bool "LED on PIOE"
	depends on PIO_E

endchoice

config LED_G_PIN
	depends on !LED_G_NONE
	int "LED (green) on I/O Line"
	range 0 31
	default 0

config LED_G_VALUE
	depends on !LED_G_NONE
	int "LED (green) initial value"
	range 0 1
	default 1

choice
	prompt "LED (blue) PIO Select"
	default LED_B_NONE

config LED_B_NONE
	bool "No Blue LED on the board"

config LED_B_ON_PIOA
	bool "LED on PIOA"

config LED_B_ON_PIOB
	bool "LED on PIOB"

config LED_B_ON_PIOC
	bool "LED on PIOC"

config LED_B_ON_PIOD
	bool "LED on PIOD"

config LED_B_ON_PIOE
	bool "LED on PIOE"
	depends on PIO_E

endchoice

config LED_B_PIN
	depends on !LED_B_NONE
	int "LED (blue) on I/O Line"
	range 0 31
	default 0

config LED_B_VALUE
	depends on !LED_B_NONE
	int "LED (blue) initial value"
	range 0 1
	default 0

endmenu

menu "TWI BUS setting"

config TWI0
	depends on CPU_HAS_TWI0
	bool "include TWI0 to TWI buses"
	default n

config TWI0_IOSET
	depends on TWI0 && TWI_IOSET
	int "IOSET Used for TWI0"
	range 1 TWI_IOSET_MAX
	default 1

config TWI1
	depends on CPU_HAS_TWI1
	bool "include TWI1 to TWI buses"
	default n

config TWI1_IOSET
	depends on TWI1 && TWI_IOSET
	int "IOSET Used for TWI1"
	range 1 TWI_IOSET_MAX
	default 1

config TWI2
	depends on CPU_HAS_TWI2
	bool "include TWI2 to TWI buses"
	default n

config TWI2_IOSET
	depends on TWI2 && TWI_IOSET
	int "IOSET Used for TWI2"
	range 1 TWI_IOSET_MAX
	default 1

config TWI3
	depends on CPU_HAS_TWI3
	bool "include TWI3 to TWI buses"
	default n

config TWI3_IOSET
	depends on TWI3 && TWI_IOSET
	int "IOSET Used for TWI3"
	range 1 TWI_IOSET_MAX
	default 1

config FLEXCOM0
	depends on CPU_HAS_FLEXCOM0
	bool "include FLEXCOM0 to TWI buses"
	default n

config FLEXCOM0_IOSET
	depends on FLEXCOM0 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM0"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM1
	depends on CPU_HAS_FLEXCOM1
	bool "include FLEXCOM1 to TWI buses"
	default n

config FLEXCOM1_IOSET
	depends on FLEXCOM1 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM1"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM2
	depends on CPU_HAS_FLEXCOM2
	bool "include FLEXCOM2 to TWI buses"
	default n

config FLEXCOM2_IOSET
	depends on FLEXCOM2 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM2"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM3
	depends on CPU_HAS_FLEXCOM3
	bool "include FLEXCOM3 to TWI buses"
	default n

config FLEXCOM3_IOSET
	depends on FLEXCOM3 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM3"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM4
	depends on CPU_HAS_FLEXCOM4
	bool "include FLEXCOM4 to TWI buses"
	default n

config FLEXCOM4_IOSET
	depends on FLEXCOM4 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM4"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM5
	depends on CPU_HAS_FLEXCOM5
	bool "include FLEXCOM5 to TWI buses"
	default n

config FLEXCOM5_IOSET
	depends on FLEXCOM5 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM5"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM6
	depends on CPU_HAS_FLEXCOM6
	bool "include FLEXCOM6 to TWI buses"
	default n

config FLEXCOM6_IOSET
	depends on FLEXCOM6 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM6"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM7
	depends on CPU_HAS_FLEXCOM7
	bool "include FLEXCOM7 to TWI buses"
	default n

config FLEXCOM7_IOSET
	depends on FLEXCOM7 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM7"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM8
	depends on CPU_HAS_FLEXCOM8
	bool "include FLEXCOM8 to TWI buses"
	default n

config FLEXCOM8_IOSET
	depends on FLEXCOM8 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM8"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM9
	depends on CPU_HAS_FLEXCOM9
	bool "include FLEXCOM9 to TWI buses"
	default n

config FLEXCOM9_IOSET
	depends on FLEXCOM9 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM9"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM10
	depends on CPU_HAS_FLEXCOM10
	bool "include FLEXCOM10 to TWI buses"
	default n

config FLEXCOM10_IOSET
	depends on FLEXCOM10 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM10"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM11
	depends on CPU_HAS_FLEXCOM11
	bool "include FLEXCOM11 to TWI buses"
	default n

config FLEXCOM11_IOSET
	depends on FLEXCOM11 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM11"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

config FLEXCOM12
	depends on CPU_HAS_FLEXCOM12
	bool "include FLEXCOM12 to TWI buses"
	default n

config FLEXCOM12_IOSET
	depends on FLEXCOM12 && FLEXCOM_TWI_IOSET
	int "IOSET Used for FLEXCOM12"
	range 1 FLEXCOM_TWI_IOSET_MAX
	default 1

endmenu

config ACT8865
	bool "PMIC (ACT8865 / ACT8945A) Support"
	default n
	select TWI


config ACT8865_SET_VOLTAGE
	bool "Set ACT8865 Initial Output Voltage"
	depends on ACT8865
	default n
	help
	  This interface let you to set the ACT8865 initial output value

config ACT8865_VSEL
	int "VSEL pin for Step-Down DC/DCs Output Voltage Selection"
	depends on ACT8865
	default 0
	help
	  This interface lets you choose the ACT8865 VSEL pin input value

config DISABLE_ACT8865_I2C
	bool "Disable the ACT8865 I2C interface"
	depends on ACT8865
	select ACT8865_SET_VOLTAGE
	default y
	help
	  This interface let you to disable the ACT8865's I2C interface.
	  There are some issue about active-semi ACT8865's I2C interface,
	  which affects the other chip which stands on the same I2C bus, such as MXT touchscreen.

config SUSPEND_ACT8945A_CHARGER
	bool "Suspend ACT8945A Charger"
	depends on ACT8865
	default n
	help
	  This interface let you to suspend the ACT8945A charger
	  function after boot.

config MCP16502
	bool "PMIC (MCP16502) Support"
	default n
	select TWI

config MCP16502_SET_VOLTAGE
	bool "Set MCP16502 Initial Output Voltage"
	depends on MCP16502
	default n
	help
	  This interface let you to set the MCP16502 initial output value

config PMIC_ON_TWI
	int "PMIC on TWI bus (configured in menu \"TWI BUS setting\")"
	depends on ACT8865 || MCP16502
	default 0
	help
	  This interface allow you select which TWI bus for the PMIC to wire on.

config VOLTAGE_OUT1
	int "Voltage(mV) on PMIC's OUT1"
	default 0
	depends on ACT8865_SET_VOLTAGE || MCP16502_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT1, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_OUT2
	int "Voltage(mV) on PMIC's OUT2"
	default 0
	depends on ACT8865_SET_VOLTAGE || MCP16502_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT2, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_OUT3
	int "Voltage(mV) on PMIC's OUT3"
	default 0
	depends on ACT8865_SET_VOLTAGE || MCP16502_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT3, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_OUT4
	int "Voltage(mV) on PMIC's OUT4"
	default 0
	depends on ACT8865_SET_VOLTAGE || MCP16502_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT4, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_OUT5
	int "Voltage(mV) on PMIC's OUT5"
	default 0
	depends on ACT8865_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT5, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_OUT6
	int "Voltage(mV) on PMIC's OUT6"
	default 0
	depends on ACT8865_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT6, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_OUT7
	int "Voltage(mV) on PMIC's OUT7"
	default 0
	depends on ACT8865_SET_VOLTAGE
	help
	  The voltage on PMIC's OUT7, valid values: 0, 1100, 1200, 1250, 1300, 1350, 1800, 2500, 3300

config VOLTAGE_LDO1
	int "Voltage(mV) on PMIC's LDO1"
	default 0
	depends on MCP16502_SET_VOLTAGE
	help
	  The voltage on PMIC's LDO1, valid values: 0, 1100, 1200, 1250, 1350, 1800, 2500, 3300

config VOLTAGE_LDO2
	int "Voltage(mV) on PMIC's LDO2"
	default 0
	depends on MCP16502_SET_VOLTAGE
	help
	  The voltage on PMIC's LDO2, valid values: 0, 1100, 1200, 1250, 1350, 1800, 2500, 3300

endmenu

menu "Board Hardware Information Options"

config LOAD_HW_INFO
	bool "Load Board Hardware Information"
	default n

choice
	prompt "Select Where to Load Board Hardware Information"
	depends on LOAD_HW_INFO

config LOAD_ONE_WIRE
	bool "1-Wire Chips"

config LOAD_EEPROM
	bool "EEPROM Chips"
	select TWI

endchoice

choice
	prompt "1-Wire PIO Select"
	depends on LOAD_ONE_WIRE
	default ONE_WIRE_ON_PIOA

config ONE_WIRE_ON_PIOA
	bool "1-Wire on PIOA"

config ONE_WIRE_ON_PIOB
	bool "1-Wire on PIOB"

config ONE_WIRE_ON_PIOC
	bool "1-Wire on PIOC"

config ONE_WIRE_ON_PIOD
	bool "1-Wire on PIOD"

config ONE_WIRE_ON_PIOE
	bool "1-Wire on PIOE"
	depends on PIO_E

endchoice

config ONE_WIRE_PIN
	int "1-Wire on I/O Line"
	depends on LOAD_ONE_WIRE
	range 0 31
	default 0

config EEPROM_ON_TWI
	int "EEPROM on TWI bus (configured in menu \"TWI BUS setting\")"
	depends on LOAD_EEPROM
	default 0
	help
	  This interface allow you select which TWI bus for the EEPROM to wire on.

config EEPROM_ADDR
	hex "EEPROM Device Address"
	depends on LOAD_EEPROM
	default 0x50

config EEPROM_SIZE
	int "EEPROM Size"
	depends on LOAD_EEPROM
	default 128

endmenu

menu "Basic Drivers support"

config PIT
	bool "Programmable interrupt timer support"
	default y
	depends on AT91SAM9260 || AT91SAM9261 || AT91SAM9263 || AT91SAM9G10 || \
		AT91SAM9G20 || AT91SAM9G45 || AT91SAM9N12 || AT91SAM9RL || \
		AT91SAM9X5 || AT91SAM9XE || SAMA5D4 || SAMA5D3X || SAMA5D2 || \
		SAM9X60
	help
	  Programmable interrupt timer support

config PIT64B
	bool "64-bit Periodic Interval Timer"
	default y
	depends on SAMA7G5
	help
	  Enable 64-bit periodic interval timer.

choice
	prompt "Watchdog timer controller selection"
	default WDT

config WDT
	bool "Watchdog timer support"
	depends on !CPU_HAS_WDT2
	help
	  Watchdog timer support

config WDT2
	bool "Watchdog timer 2 support"
	depends on CPU_HAS_WDT2
	help
	  Watchdog timer 2 support. This is a newer version of the old
	  watchdog timer (WDT). Only one of them is present in each
	  product.

endchoice

config WDTS
	bool "Programmable Secure dual watchdog timer support"
	depends on CPU_HAS_DWDT && WDT2
	help
	  This adds support for an additional Programmable Secure Watchdog.
	  Products with this additional watchdog have a Dual Watchog Timer.

config RSTC
	bool "Reset controller support"
	default y
	help
	  Reset controller support

config USART
	bool "Serial controller support"
	default y
	help
	  Serial controller support

config PIO
	bool "Programmable I/O support"
	default y
	help
	  Programmable I/O support

config PIO_E
	bool
	depends on SAMA5D4 || SAMA5D3X || SAMA7G5
	default y

config PMC_COMMON
	bool "Common support for power management controller"
	default y
	help
	  Common support for power management controller

config PMC_V1
	bool "Power management controller support for first version"
	depends on SAMA5D4 || SAMA5D3X || SAMA5D2
	default y
	help
	  Enable power management controller support for first version

config PMC_V2
	bool "Peripheral management controller support for second version"
	depends on SAM9X60
	default y
	help
	  Enable power management controller support for second version

config PMC_V3
	bool "Peripheral management controller support for third version"
	depends on SAMA7G5
	default y
	help
	  Enable power management controller support for third version
config PMC_PERIPH_CLK_SAM9X5
	bool "PMC peripheral clock control for SAM9X5 SoCs and above"
	depends on SAMA5D3X || SAMA5D4 || SAMA5D2 || SAM9X60 || SAMA7G5
	default y
	help
	  Enable peripheral clock control for SAM9X5 SoCs and above

config PMC_GENERIC_CLK
	bool "PMC generic clock control support"
	depends on SAMA5D2 || SAM9X60 || SAMA7G5
	default y
	help
	  Enable generic clock control support

config PMC_UTMI_CLK
	bool "PMC UTMI clock control support"
	depends on SAMA5D3X || SAMA5D4 || SAMA5D2
	default y
	help
	  Enable PMC UTMI clock control

config PMC_PLL_CLK
	bool "PMC PLL clock control support"
	depends on SAMA5D4 || SAMA5D3X || SAMA5D2
	default y
	help
	  Enable PMC PLL clock control

config PMC_PLL_CLK_SAM9X60
	bool "PMC PLL clock control support for SAM9X60 SoCs"
	depends on SAM9X60 || SAMA7G5
	default y
	help
	  Enable PMC PLL clock control for SAM9X60 SoCs

config PMC_MCK_CLK
	bool "PMC master clock support"
	depends on AT91SAM9260 || AT91SAM9261 || AT91SAM9263 || AT91SAM9G10 || \
		AT91SAM9G20 || AT91SAM9G45 || AT91SAM9N12 || AT91SAM9RL || \
		AT91SAM9X5 || AT91SAM9XE || SAMA5D4 || SAMA5D3X || SAMA5D2 || \
		SAM9X60
	default y
	help
	  Enable PMC master clock support

config PMC_MCK_CLK_SAMA7G5
	bool "PMC master clock support for SAMA7G5 SoCs"
	depends on SAMA7G5
	default y
	help
	  Enable PMC master clock support for SAMA7G5 SoCs

config SHDWC
	bool "Shutdown controller support"
	default n
	help
	  Shutdown controller support

config SFRBU
	bool "SFRBU support"
	depends on SAMA5D2 || SAMA7G5
	default y
	help
	  SFRBU support
endmenu

