#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config ESP32S3_MERGE_BINS
	bool "Merge raw binary files into a single file"
	default n
	---help---
		Merge the raw binary files into a single file for flashing to the
		device.
		This is only useful when the path to binary files (e.g. bootloader)
		is provided via the ESPTOOL_BINDIR variable.

config ESP32S3_QEMU_IMAGE
	bool "ESP32S3 binary image for QEMU"
	default n
	select ESP32S3_MERGE_BINS
	---help---
		Create a binary flash image used for QEMU.

config ESP32S3_SPEED_UP_ISR
	bool "Speed up ISR"
	default n
	---help---
		Move ESP32-S3's interrupt, OS timer tick, and scheduler functions
		from Flash to IRAM. This can speed up interrupt service processing
		and also reduce reading data from Flash.

		If you run applications that need continue reading data from PSRAM,
		such as LCD display, please select this option.

config ESP32S3_STORAGE_MTD_OFFSET
	hex "Storage MTD base address in SPI Flash"
	default 0x180000 if !ESP32S3_HAVE_OTA_PARTITION
	default 0x250000 if ESP32S3_HAVE_OTA_PARTITION
	depends on ESP32S3_MTD
	---help---
		MTD base address in SPI Flash.

config ESP32S3_STORAGE_MTD_SIZE
	hex "Storage MTD size in SPI Flash"
	default 0x100000
	range 0x0 0x400000 if ESP32S3_FLASH_4M
	range 0x0 0x800000 if ESP32S3_FLASH_8M
	range 0x0 0x1000000 if ESP32S3_FLASH_16M
	range 0x0 0x2000000 if ESP32S3_FLASH_32M
	depends on ESP32S3_MTD
	---help---
		MTD size in SPI Flash.

choice ESP32S3_SPIFLASH_FS
	prompt "Mount SPI Flash MTD on bring-up"
	default ESP32S3_SPIFLASH_SMARTFS
	depends on ESP32S3_MTD
	optional
	---help---
		Mount the SPI Flash MTD with the selected File System format on board
		bring-up.
		If not selected, the MTD will be registered as a device node on /dev.

config ESP32S3_SPIFLASH_SMARTFS
	bool "SmartFS"
	select FS_SMARTFS
	select MTD_SMART

config ESP32S3_SPIFLASH_NXFFS
	bool "NXFFS"
	select FS_NXFFS

config ESP32S3_SPIFLASH_SPIFFS
	bool "SPIFFS"
	select FS_SPIFFS

config ESP32S3_SPIFLASH_LITTLEFS
	bool "LittleFS"
	select FS_LITTLEFS

endchoice # ESP32S3_SPIFLASH_FS

if PM

config PM_EXT1_WAKEUP
	bool "PM EXT1 Wakeup"
	default n
	---help---
		Enable EXT1 wakeup functionality.
		This allows the system to wake up from PM_STANDBY or PM_SLEEP
		when a GPIO pin configured as an EXT1 wakeup source is triggered.

if PM_EXT1_WAKEUP

menu "PM EXT1 Wakeup Sources"

config PM_EXT1_WAKEUP_RTC_GPIO0
	bool "RTC_GPIO0"
	default n
	---help---
		Enable RTC GPIO0 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO1
	bool "RTC_GPIO1"
	default n
	---help---
		Enable RTC GPIO1 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO2
	bool "RTC_GPIO2"
	default n
	---help---
		Enable RTC GPIO2 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO3
	bool "RTC_GPIO3"
	default n
	---help---
		Enable RTC GPIO3 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO4
	bool "RTC_GPIO4"
	default n
	---help---
		Enable RTC GPIO4 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO5
	bool "RTC_GPIO5"
	default n
	---help---
		Enable RTC GPIO5 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO6
	bool "RTC_GPIO6"
	default n
	---help---
		Enable RTC GPIO6 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO7
	bool "RTC_GPIO7"
	default n
	---help---
		Enable RTC GPIO7 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO8
	bool "RTC_GPIO8"
	default n
	---help---
		Enable RTC GPIO8 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO9
	bool "RTC_GPIO9"
	default n
	---help---
		Enable RTC GPIO9 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO10
	bool "RTC_GPIO10"
	default n
	---help---
		Enable RTC GPIO10 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO11
	bool "RTC_GPIO11"
	default n
	---help---
		Enable RTC GPIO11 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO12
	bool "RTC_GPIO12"
	default n
	---help---
		Enable RTC GPIO12 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO13
	bool "RTC_GPIO13"
	default n
	---help---
		Enable RTC GPIO13 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO14
	bool "RTC_GPIO14"
	default n
	---help---
		Enable RTC GPIO14 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO15
	bool "RTC_GPIO15"
	default n
	---help---
		Enable RTC GPIO15 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO16
	bool "RTC_GPIO16"
	default n
	---help---
		Enable RTC GPIO16 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO17
	bool "RTC_GPIO17"
	default n
	---help---
		Enable RTC GPIO17 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO18
	bool "RTC_GPIO18"
	default n
	---help---
		Enable RTC GPIO18 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO19
	bool "RTC_GPIO19"
	default n
	---help---
		Enable RTC GPIO19 as an EXT1 wakeup source.

config PM_EXT1_WAKEUP_RTC_GPIO20
	bool "RTC_GPIO20"
	default n
	---help---
		Enable RTC GPIO20 as an EXT1 wakeup source.

endmenu # PM_EXT1_WAKEUP_SOURCES


config PM_EXT1_WAKEUP_TRIGGER_MODE
	int "PM EXT1 Wakeup Trigger Mode"
	range 0 1
	default 0
	---help---
		Select EXT1 wakeup mode:
		0 = Wakeup when any selected GPIO is LOW
		1 = Wakeup when any selected GPIO is HIGH

endif # PM_EXT1_WAKEUP

config PM_ALARM_SEC
	int "PM_STANDBY delay (seconds)"
	default 15
	---help---
		Number of seconds to wait in PM_STANDBY before going to PM_STANDBY mode.

config PM_ALARM_NSEC
	int "PM_STANDBY delay (nanoseconds)"
	default 0
	---help---
		Number of additional nanoseconds to wait in PM_STANDBY before going to PM_STANDBY mode.

config PM_SLEEP_WAKEUP_SEC
	int "PM_SLEEP delay (seconds)"
	default 20
	---help---
		Number of seconds to wait in PM_SLEEP.

config PM_SLEEP_WAKEUP_NSEC
	int "PM_SLEEP delay (nanoseconds)"
	default 0
	---help---
		Number of additional nanoseconds to wait in PM_SLEEP.

endif # PM

config ESP32S3_BOARD_I2C
	bool
	default y if ESP32S3_I2C0 || ESP32S3_I2C1

