# ST Microelectronics STM32 all MCU lines

# Copyright (c) 2017, I-SENSE group of ICCS
# SPDX-License-Identifier: Apache-2.0

# Default configurations appplied tp the whole STM32 family

if SOC_FAMILY_STM32

rsource "*/Kconfig.defconfig"

config CLOCK_CONTROL
	default y

config CORTEX_M_SYSTICK
	default n if STM32_LPTIM_TIMER

DT_STM32_RCC_PATH := $(dt_nodelabel_path,rcc)
DT_STM32_RCC_CLOCK_FREQ := $(dt_node_int_prop_int,$(DT_STM32_RCC_PATH),clock-frequency)

DT_ST_PRESCALER := st,prescaler
DT_STM32_LPTIM_PATH := $(dt_nodelabel_path,stm32_lp_tick_source)

config SYS_CLOCK_HW_CYCLES_PER_SEC
	default "$(DT_STM32_RCC_CLOCK_FREQ)" if "$(dt_nodelabel_enabled,rcc)"

config LOG_BACKEND_SWO_REF_FREQ_HZ
	default "$(DT_STM32_RCC_CLOCK_FREQ)" if "$(dt_nodelabel_enabled,rcc)"
	depends on LOG_BACKEND_SWO

# If sysclock is not LPTIM, tick of 10000 is too high for a frequency lower than 32MHz
config SYS_CLOCK_TICKS_PER_SEC
	default 8000 if SYS_CLOCK_HW_CYCLES_PER_SEC <= 32000000
	depends on !STM32_LPTIM_TIMER

# set the tick per sec as a divider of the LPTIM clock source
# with a minimum value of 4096 for SYS_CLOCK_TICKS_PER_SEC to keep
# SYS_CLOCK_TICKS_PER_SEC not too high compared to the LPTIM counter clock
config SYS_CLOCK_TICKS_PER_SEC
	default 4096 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" < 16
	default 2048 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 16
	default 1024 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 32
	default  512 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 64
	default  256 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 128
	depends on STM32_LPTIM_TIMER && STM32_LPTIM_CLOCK_LSE

config SYS_CLOCK_TICKS_PER_SEC
	default 4000 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" < 16
	default 2000 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 16
	default 1000 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 32
	default  500 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 64
	default  250 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 128
	depends on STM32_LPTIM_TIMER && STM32_LPTIM_CLOCK_LSI

choice STM32_LPTIM_CLOCK
	default STM32_LPTIM_CLOCK_LSE if "$(dt_node_ph_array_prop_int,$(DT_STM32_LPTIM_PATH),clocks,1,bus)" = 2
	default STM32_LPTIM_CLOCK_LSI if "$(dt_node_ph_array_prop_int,$(DT_STM32_LPTIM_PATH),clocks,1,bus)" = 3
endchoice

config CLOCK_CONTROL_INIT_PRIORITY
	default 1
	depends on CLOCK_CONTROL

config PHY_INIT_PRIORITY
	default 81
	depends on NET_L2_ETHERNET && ETH_DRIVER

# Get flash configuration for NS image from dts flash partition
config USE_DT_CODE_PARTITION
	default y if TRUSTED_EXECUTION_NONSECURE

config BUILD_WITH_TFM
	default y if TRUSTED_EXECUTION_NONSECURE

endif # SOC_FAMILY_STM32
