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

if ARCH_CHIP_STM32L4

comment "STM32L4 Configuration Options"

config STM32_L4_PERIPHERALS
	bool
	default ARCH_CHIP_STM32L4
	select STM32_HAVE_DAC1
	select STM32_HAVE_DMA1
	select STM32_HAVE_DMA2
	select STM32_HAVE_I2C1
	select STM32_HAVE_I2C2 if !(STM32_STM32L432XX || STM32_STM32L442XX)
	select STM32_HAVE_I2C3
	select STM32_HAVE_LPTIM1
	select STM32_HAVE_RNG
	select STM32_HAVE_RTC_SUBSECONDS
	select STM32_HAVE_RTC_MAGIC
	select STM32_HAVE_RTC
	select STM32_HAVE_CRC
	select STM32_HAVE_PWR
	select STM32_HAVE_BKPSRAM
	select STM32_HAVE_SPI1
	select STM32_HAVE_SPI2 if !(STM32_STM32L432XX || STM32_STM32L442XX)
	select STM32_HAVE_SPI3
	select STM32_HAVE_SYSCFG
	select STM32_HAVE_TSC
	select STM32_HAVE_SWPMI
	select STM32_HAVE_FIREWALL
	select STM32_HAVE_LPTIM_CHANNEL
	select STM32_HAVE_TIM_ADC_CHANNEL
	select STM32_HAVE_ADC_L4
	select STM32_HAVE_DAC_LL_OPS
	select STM32_HAVE_IP_WDG_M3M4_V1

choice
	prompt "STM32 L4 Chip Selection"
	default ARCH_CHIP_STM32L476RG
	depends on ARCH_CHIP_STM32L4

config ARCH_CHIP_STM32L412KB
	bool "STM32L412KB"
	select STM32_STM32L412XX
	select STM32_FLASH_CONFIG_B
	select STM32L4_IO_CONFIG_K
	---help---
		STM32 L4 Cortex M4, 128 Kb FLASH, 40 Kb SRAM

config ARCH_CHIP_STM32L432KB
	bool "STM32L432KB"
	select STM32_STM32L432XX
	select STM32_FLASH_CONFIG_B
	select STM32L4_IO_CONFIG_K
	---help---
		STM32 L4 Cortex M4, 128 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L432KC
	bool "STM32L432KC"
	select STM32_STM32L432XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_K
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L433CB
	bool "STM32L433CB"
	select STM32_STM32L433XX
	select STM32_FLASH_CONFIG_B
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, 128 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L433CC
	bool "STM32L433CC"
	select STM32_STM32L433XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L433RB
	bool "STM32L433RB"
	select STM32_STM32L433XX
	select STM32_FLASH_CONFIG_B
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 128 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L433RC
	bool "STM32L433RC"
	select STM32_STM32L433XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L433VC
	bool "STM32L433VC"
	select STM32_STM32L433XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L442KC
	bool "STM32L442KC"
	select STM32_STM32L442XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_K
	---help---
		STM32 L4 Cortex M4, AES, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L443CC
	bool "STM32L443CC"
	select STM32_STM32L443XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, AES, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L443RC
	bool "STM32L443RC"
	select STM32_STM32L443XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, AES, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L443VC
	bool "STM32L443VC"
	select STM32_STM32L443XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, AES, 256 Kb FLASH, 64 Kb SRAM

config ARCH_CHIP_STM32L451CC
	bool "STM32L451CC"
	select STM32_STM32L451XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L451CE
	bool "STM32L451CE"
	select STM32_STM32L451XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L451RC
	bool "STM32L451RC"
	select STM32_STM32L451XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L451RE
	bool "STM32L451RE"
	select STM32_STM32L451XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L451VC
	bool "STM32L451VC"
	select STM32_STM32L451XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L451VE
	bool "STM32L451VE"
	select STM32_STM32L451XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L452CC
	bool "STM32L452CC"
	select STM32_STM32L452XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L452CE
	bool "STM32L452CE"
	select STM32_STM32L452XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L452RC
	bool "STM32L452RC"
	select STM32_STM32L452XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L452RE
	bool "STM32L452RE"
	select STM32_STM32L452XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L452VC
	bool "STM32L452VC"
	select STM32_STM32L452XX
	select STM32_FLASH_CONFIG_C
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 256 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L452VE
	bool "STM32L452VE"
	select STM32_STM32L452XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L462CE
	bool "STM32L462CE"
	select STM32_STM32L462XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_C
	---help---
		STM32 L4 Cortex M4, USB FS, AES, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L462RE
	bool "STM32L462RE"
	select STM32_STM32L462XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, USB FS, AES, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L462VE
	bool "STM32L462VE"
	select STM32_STM32L462XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, USB FS, AES, 512 Kb FLASH, 128+32 Kb SRAM

config ARCH_CHIP_STM32L475RG
	bool "STM32L475RG"
	select STM32_STM32L475XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 96+32 Kb SRAM, LQFP100

config ARCH_CHIP_STM32L475RE
	bool "STM32L475RE"
	select STM32_STM32L475XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 96+32 Kb SRAM, LQFP100

config ARCH_CHIP_STM32L475RC
	bool "STM32L475RC"
	select STM32_STM32L475XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 256Kb FLASH, 96+32 Kb SRAM, LQFP100

config ARCH_CHIP_STM32L475VG
	bool "STM32L475VG"
	select STM32_STM32L475XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 96+32 Kb SRAM, LQFP64

config ARCH_CHIP_STM32L475VE
	bool "STM32L475VE"
	select STM32_STM32L475XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 96+32 Kb SRAM, LQFP64

config ARCH_CHIP_STM32L475VC
	bool "STM32L475VC"
	select STM32_STM32L475XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 256Kb FLASH, 96+32 Kb SRAM, LQFP64

config ARCH_CHIP_STM32L476JG
	bool "STM32L476JG"
	select STM32_STM32L476XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_J
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L476JE
	bool "STM32L476JE"
	select STM32_STM32L476XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_J
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L476RG
	bool "STM32L476RG"
	select STM32_STM32L476XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L476RE
	bool "STM32L476RE"
	select STM32_STM32L476XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L486RG
	bool "STM32L486RG"
	select STM32_STM32L486XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, AES, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L486JG
	bool "STM32L486JG"
	select STM32_STM32L486XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_J
	---help---
		STM32 L4 Cortex M4, AES, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L486VG
	bool "STM32L486VG"
	select STM32_STM32L486XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, AES, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L486QG
	bool "STM32L486QG"
	select STM32_STM32L486XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Q
	---help---
		STM32 L4 Cortex M4, AES, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L486ZG
	bool "STM32L486ZG"
	select STM32_STM32L486XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4 Cortex M4, AES, 1024Kb FLASH, 96+32 Kb SRAM

config ARCH_CHIP_STM32L496RE
	bool "STM32L496RE"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L496RG
	bool "STM32L496RG"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L496VE
	bool "STM32L496VE"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L496VG
	bool "STM32L496VG"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L496ZE
	bool "STM32L496ZE"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_E
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4 Cortex M4, 512Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L496ZG
	bool "STM32L496ZG"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L496AG
	bool "STM32L496AG"
	select STM32_STM32L496XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_A
	---help---
		STM32 L4 Cortex M4, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L4A6RG
	bool "STM32L4A6RG"
	select STM32_STM32L4A6XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_R
	---help---
		STM32 L4 Cortex M4, AES, HASH, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L4A6VG
	bool "STM32L4A6VG"
	select STM32_STM32L4A6XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4 Cortex M4, AES, HASH, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L4A6QG
	bool "STM32L4A6QG"
	select STM32_STM32L4A6XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Q
	---help---
		STM32 L4 Cortex M4, AES, HASH, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L4A6ZG
	bool "STM32L4A6ZG"
	select STM32_STM32L4A6XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4 Cortex M4, AES, HASH, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L4A6AG
	bool "STM32L4A6AG"
	select STM32_STM32L4A6XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_A
	---help---
		STM32 L4 Cortex M4, AES, HASH, 1024Kb FLASH, 320 Kb SRAM

config ARCH_CHIP_STM32L4R5VG
	bool "STM32L4R5VG"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5QG
	bool "STM32L4R5QG"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Q
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5ZG
	bool "STM32L4R5ZG"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5AG
	bool "STM32L4R5AG"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_A
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5VI
	bool "STM32L4R5VI"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5QI
	bool "STM32L4R5QI"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_Q
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5ZI
	bool "STM32L4R5ZI"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R5AI
	bool "STM32L4R5AI"
	select STM32_STM32L4R5XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_A
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R9VG
	bool "STM32L4R9VG"
	select STM32_STM32L4R9XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R9ZG
	bool "STM32L4R9ZG"
	select STM32_STM32L4R9XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R9AG
	bool "STM32L4R9AG"
	select STM32_STM32L4R9XX
	select STM32_FLASH_CONFIG_G
	select STM32L4_IO_CONFIG_A
	---help---
		STM32 L4+ Cortex M4, 1024Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R9VI
	bool "STM32L4R9VI"
	select STM32_STM32L4R9XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_V
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R9ZI
	bool "STM32L4R9ZI"
	select STM32_STM32L4R9XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_Z
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

config ARCH_CHIP_STM32L4R9AI
	bool "STM32L4R9AI"
	select STM32_STM32L4R9XX
	select STM32_FLASH_CONFIG_I
	select STM32L4_IO_CONFIG_A
	---help---
		STM32 L4+ Cortex M4, 2048Kb FLASH, 640 Kb SRAM

endchoice # STM32 L4 Chip Selection

# Chip product lines

config STM32_STM32L4X1
	# STM32L4x1 Access Lines
	#
	# Avoid using this config as it is basically same subfamily
	# as STM32_STM32L4X3 (documented in RM0394).
	#
	# Note: This is _not_ for STM32L471xx (documented in RM0392).
	bool
	default n
	select STM32_STM32L4X3

config STM32_STM32L4X2
	# STM32L4x2 USB Device Lines
	#
	# Avoid using this config as it is basically same subfamily
	# as STM32_STM32L4X3 (documented in RM0394).
	bool
	default n
	select STM32_STM32L4X3
	select STM32_HAVE_USBFS

config STM32_STM32L4X3
	# STM32L4 devices documented in RM0394, regardless of what ST's
	# marketing calls them.
	bool
	default n
	select ARCH_HAVE_FPU
	select STM32_HAVE_CAN1
	select STM32_HAVE_TIM1
	select STM32_HAVE_TIM2
	select STM32_HAVE_TIM6
	select STM32_HAVE_TIM15
	select STM32_HAVE_TIM16
	select STM32_HAVE_LPUART1
	select STM32_HAVE_USART1
	select STM32_HAVE_USART2
	select STM32_HAVE_USART3 if !(STM32_STM32L432XX || STM32_STM32L442XX)
	select STM32_HAVE_LPTIM1
	select STM32_HAVE_LPTIM2
	select STM32_HAVE_COMP
	select STM32_HAVE_SAI1
	select STM32_HAVE_LCD if !(STM32_STM32L4X1 || STM32_STM32L4X2)
	select STM32_HAVE_HSI48

config STM32_STM32L4X5
	# STM32L4 USB OTG Lines (documented in RM0351)
	bool
	default n
	select ARCH_HAVE_FPU
	select STM32_HAVE_CAN1
	select STM32_HAVE_TIM1
	select STM32_HAVE_TIM2
	select STM32_HAVE_TIM6
	select STM32_HAVE_TIM15
	select STM32_HAVE_TIM16
	select STM32_HAVE_LPUART1
	select STM32_HAVE_USART1
	select STM32_HAVE_USART2
	select STM32_HAVE_USART3
	select STM32_HAVE_UART4
	select STM32_HAVE_UART5
	select STM32_HAVE_ADC2
	select STM32_HAVE_ADC3
	select STM32_HAVE_DAC2
	select STM32_HAVE_FSMC
	select STM32_HAVE_TIM3
	select STM32_HAVE_TIM4
	select STM32_HAVE_TIM5
	select STM32_HAVE_TIM7
	select STM32_HAVE_TIM8
	select STM32_HAVE_TIM17
	select STM32_HAVE_LPTIM1
	select STM32_HAVE_LPTIM2
	select STM32_HAVE_COMP
	select STM32_HAVE_SAI1
	select STM32_HAVE_SAI2
	select STM32_HAVE_SDMMC1
	select STM32_HAVE_OTGFS
	select STM32_HAVE_DFSDM1
	select STM32_HAVE_QSPI

config STM32_STM32L4X6
	# STM32L4x6 (documented in RM0351)
	bool
	default n
	select ARCH_HAVE_FPU
	select STM32_HAVE_CAN1
	select STM32_HAVE_TIM1
	select STM32_HAVE_TIM2
	select STM32_HAVE_TIM6
	select STM32_HAVE_TIM15
	select STM32_HAVE_TIM16
	select STM32_HAVE_LPUART1
	select STM32_HAVE_USART1
	select STM32_HAVE_USART2
	select STM32_HAVE_USART3
	select STM32_HAVE_UART4
	select STM32_HAVE_UART5
	select STM32_HAVE_ADC2
	select STM32_HAVE_ADC3
	select STM32_HAVE_DAC2
	select STM32_HAVE_FSMC
	select STM32_HAVE_TIM3
	select STM32_HAVE_TIM4
	select STM32_HAVE_TIM5
	select STM32_HAVE_TIM7
	select STM32_HAVE_TIM8
	select STM32_HAVE_TIM17
	select STM32_HAVE_LPTIM1
	select STM32_HAVE_LPTIM2
	select STM32_HAVE_COMP
	select STM32_HAVE_SAI1
	select STM32_HAVE_SAI2
	select STM32_HAVE_SDMMC1
	select STM32_HAVE_OTGFS
	select STM32_HAVE_LCD
	select STM32_HAVE_QSPI

config STM32_STM32L4XR
	# STM32L4+ (documented in RM0432)
	bool
	default n
	select ARCH_HAVE_FPU
	select STM32_HAVE_CAN1
	select STM32_HAVE_TIM1
	select STM32_HAVE_TIM2
	select STM32_HAVE_TIM6
	select STM32_HAVE_TIM15
	select STM32_HAVE_TIM16
	select STM32_HAVE_LPUART1
	select STM32_HAVE_USART1
	select STM32_HAVE_USART2
	select STM32_HAVE_USART3
	select STM32_HAVE_UART4
	select STM32_HAVE_UART5
	select STM32_HAVE_DAC2
	select STM32_HAVE_FSMC
	select STM32_HAVE_TIM3
	select STM32_HAVE_TIM4
	select STM32_HAVE_TIM5
	select STM32_HAVE_TIM7
	select STM32_HAVE_TIM8
	select STM32_HAVE_TIM17
	select STM32_HAVE_LPTIM1
	select STM32_HAVE_LPTIM2
	select STM32_HAVE_COMP
	select STM32_HAVE_SAI1
	select STM32_HAVE_SAI2
	select STM32_HAVE_SDMMC1
	select STM32_HAVE_OTGFS
	select STM32_HAVE_I2C4
	select STM32_HAVE_DCMI
	select STM32_HAVE_DFSDM1
	select STM32_HAVE_HSI48
	select STM32_HAVE_DMAMUX

# Chip subfamilies:

config STM32_STM32L412XX
	bool
	default n
	select STM32_STM32L4X2
	select STM32_HAVE_ADC2

config STM32_STM32L422XX
	bool
	default n
	select STM32_STM32L4X2
	select STM32_HAVE_ADC2
	select STM32_HAVE_AES
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L431XX
	bool
	default n
	select STM32_STM32L4X1
	select STM32_HAVE_DAC2
	select STM32_HAVE_TIM7
	select STM32_HAVE_SDMMC1 if (STM32L4_IO_CONFIG_V || STM32L4_IO_CONFIG_R)

config STM32_STM32L432XX
	bool
	default n
	select STM32_STM32L4X2
	select STM32_HAVE_DAC2
	select STM32_HAVE_TIM7

config STM32_STM32L433XX
	bool
	default n
	select STM32_STM32L4X3
	select STM32_HAVE_DAC2
	select STM32_HAVE_TIM7

config STM32_STM32L442XX
	bool
	default n
	select STM32_STM32L4X2
	select STM32_HAVE_DAC2
	select STM32_HAVE_TIM7
	select STM32_HAVE_AES
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L443XX
	bool
	default n
	select STM32_STM32L4X3
	select STM32_HAVE_DAC2
	select STM32_HAVE_TIM7
	select STM32_HAVE_SDMMC1
	select STM32_HAVE_AES
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L451XX
	bool
	default n
	select STM32_STM32L4X1
	select STM32_HAVE_UART4
	select STM32_HAVE_TIM3
	select STM32_HAVE_I2C4
	select STM32_HAVE_SDMMC1 if !STM32L4_IO_CONFIG_C
	select STM32_HAVE_DFSDM1

config STM32_STM32L452XX
	bool
	default n
	select STM32_STM32L4X2
	select STM32_HAVE_UART4
	select STM32_HAVE_TIM3
	select STM32_HAVE_I2C4
	select STM32_HAVE_SDMMC1
	select STM32_HAVE_DFSDM1

config STM32_STM32L462XX
	bool
	default n
	select STM32_STM32L4X2
	select STM32_HAVE_UART4
	select STM32_HAVE_TIM3
	select STM32_HAVE_I2C4
	select STM32_HAVE_SDMMC1
	select STM32_HAVE_DFSDM1
	select STM32_HAVE_AES
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L471XX
	bool
	default n
	select STM32_HAVE_CAN1
	select STM32_HAVE_TIM1
	select STM32_HAVE_TIM2
	select STM32_HAVE_TIM6
	select STM32_HAVE_TIM15
	select STM32_HAVE_TIM16
	# TODO

config STM32_STM32L475XX
	bool
	default n
	select STM32_STM32L4X5

config STM32_STM32L476XX
	bool
	default n
	select STM32_STM32L4X6

config STM32_STM32L486XX
	bool
	default n
	select STM32_STM32L4X6
	select STM32_HAVE_AES
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L496XX
	bool
	default n
	select STM32_STM32L4X6
	select STM32_ADC2_HAVE_OUTPUT_DFSDM
	select STM32_ADC3_HAVE_OUTPUT_DFSDM
	select STM32_HAVE_I2C4
	select STM32_HAVE_CAN2
	select STM32_HAVE_DCMI
	select STM32_HAVE_DMA2D
	select STM32_HAVE_IP_DMA2D_M3M4_V1
	select STM32_HAVE_DFSDM1
	select STM32_HAVE_HSI48

config STM32_STM32L4A6XX
	bool
	default n
	select STM32_STM32L496XX
	select STM32_HAVE_AES
	select STM32_HAVE_HASH
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L4R5XX
	bool
	default n
	select STM32_STM32L4XR

config STM32_STM32L4S5XX
	bool
	default n
	select STM32_STM32L4XR
	select STM32_HAVE_AES
	select STM32_HAVE_HASH
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L4R7XX
	bool
	default n
	select STM32_STM32L4XR
	select STM32_HAVE_DMA2D
	select STM32_HAVE_IP_DMA2D_M3M4_V1

config STM32_STM32L4S7XX
	bool
	default n
	select STM32_STM32L4XR
	select STM32_HAVE_DMA2D
	select STM32_HAVE_IP_DMA2D_M3M4_V1
	select STM32_HAVE_AES
	select STM32_HAVE_HASH
	select STM32_HAVE_IP_AES_M3M4_V1

config STM32_STM32L4R9XX
	bool
	default n
	select STM32_STM32L4XR
	select STM32_HAVE_DMA2D
	select STM32_HAVE_IP_DMA2D_M3M4_V1
	select STM32_HAVE_LTDC

config STM32_STM32L4S9XX
	bool
	default n
	select STM32_STM32L4XR
	select STM32_HAVE_DMA2D
	select STM32_HAVE_IP_DMA2D_M3M4_V1
	select STM32_HAVE_LTDC
	select STM32_HAVE_AES
	select STM32_HAVE_HASH
	select STM32_HAVE_IP_AES_M3M4_V1

# Pin/package configurations

config STM32L4_IO_CONFIG_K
	# Package designator K
	bool
	default n

config STM32L4_IO_CONFIG_T
	# Package designator T
	bool
	default n

config STM32L4_IO_CONFIG_C
	# Package designator C
	bool
	default n

config STM32L4_IO_CONFIG_R
	# Package designator R
	bool
	default n

config STM32L4_IO_CONFIG_J
	# Package designator J
	bool
	default n

config STM32L4_IO_CONFIG_M
	# Package designator M
	bool
	default n

config STM32L4_IO_CONFIG_V
	# Package designator V
	bool
	default n

config STM32L4_IO_CONFIG_Q
	# Package designator Q
	bool
	default n

config STM32L4_IO_CONFIG_Z
	# Package designator Z
	bool
	default n

config STM32L4_IO_CONFIG_A
	# Package designator A
	bool
	default n

comment "STM32L4 SRAM2 and SRAM3 Options"

endif # ARCH_CHIP_STM32L4
