soc: silabs_exx32: Add independent Kconfig options for HAL libraries
Zephyr gecko drivers depend on libraries provided by the vendor. The same libraries may also be used directly by the application code or RAIL library. To facilitate the latter use case scenario this commit adds Kconfig options to independently enable compilation of vendor HAL library modules. Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
f17e7c5942
commit
aa2c27d007
|
@ -8,6 +8,7 @@ config SOC_FLASH_GECKO
|
|||
bool "Silicon Labs Gecko flash driver"
|
||||
depends on FLASH && SOC_FAMILY_EXX32
|
||||
select FLASH_HAS_DRIVER_ENABLED
|
||||
select SOC_GECKO_MSC
|
||||
help
|
||||
Enable Silicon Labs Gecko series internal flash driver.
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ menuconfig GPIO_GECKO
|
|||
bool "Gecko GPIO driver"
|
||||
depends on GPIO && HAS_SILABS_GECKO
|
||||
select HAS_DTS_GPIO
|
||||
select SOC_GECKO_GPIO
|
||||
help
|
||||
Enable the Gecko gpio driver.
|
||||
|
||||
|
|
|
@ -242,6 +242,7 @@ config I2C_7_IRQ_PRI
|
|||
config I2C_GECKO
|
||||
bool "Gecko I2C driver"
|
||||
depends on HAS_SILABS_GECKO
|
||||
select SOC_GECKO_I2C
|
||||
help
|
||||
Enable the SiLabs Gecko I2C bus driver.
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ menuconfig UART_GECKO
|
|||
depends on GPIO_GECKO
|
||||
select SERIAL_HAS_DRIVER
|
||||
select SERIAL_SUPPORT_INTERRUPT
|
||||
select SOC_GECKO_USART
|
||||
help
|
||||
Enable the Gecko uart driver.
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ menuconfig LEUART_GECKO
|
|||
depends on GPIO_GECKO
|
||||
select SERIAL_HAS_DRIVER
|
||||
select SERIAL_SUPPORT_INTERRUPT
|
||||
select SOC_GECKO_LEUART
|
||||
help
|
||||
Enable the Gecko leuart driver.
|
||||
|
||||
|
|
|
@ -23,13 +23,22 @@ zephyr_compile_definitions(
|
|||
)
|
||||
|
||||
zephyr_sources( emlib/src/em_system.c)
|
||||
zephyr_sources_ifdef(CONFIG_HAS_CMU emlib/src/em_cmu.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_CMU emlib/src/em_cmu.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_CORE emlib/src/em_core.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_CRYOTIMER emlib/src/em_cryotimer.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_EMU emlib/src/em_emu.c)
|
||||
zephyr_sources_ifdef(CONFIG_GPIO_GECKO emlib/src/em_gpio.c)
|
||||
zephyr_sources_ifdef(CONFIG_UART_GECKO emlib/src/em_usart.c)
|
||||
zephyr_sources_ifdef(CONFIG_LEUART_GECKO emlib/src/em_leuart.c)
|
||||
zephyr_sources_ifdef(CONFIG_I2C_GECKO emlib/src/em_i2c.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_FLASH_GECKO emlib/src/em_msc.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_GPIO emlib/src/em_gpio.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_I2C emlib/src/em_i2c.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_LETIMER emlib/src/em_letimer.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_LEUART emlib/src/em_leuart.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_MSC emlib/src/em_msc.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_PRS emlib/src/em_prs.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_RMU emlib/src/em_rmu.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_RTC emlib/src/em_rtc.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_RTCC emlib/src/em_rtcc.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_TIMER emlib/src/em_timer.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_USART emlib/src/em_usart.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_GECKO_WDOG emlib/src/em_wdog.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFM32WG Device/SiliconLabs/EFM32WG/Source/system_efm32wg.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFR32FG1P Device/SiliconLabs/EFR32FG1P/Source/system_efr32fg1p.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_EFM32HG Device/SiliconLabs/EFM32HG/Source/system_efm32hg.c)
|
||||
|
|
|
@ -24,10 +24,82 @@ config SOC_PART_NUMBER
|
|||
that you should not set directly. The part number selection choice defines
|
||||
the default value for this string.
|
||||
|
||||
config SOC_GECKO_CORE
|
||||
bool
|
||||
help
|
||||
Set if the Core interrupt handling (CORE) HAL module is used.
|
||||
|
||||
config SOC_GECKO_CRYOTIMER
|
||||
bool
|
||||
help
|
||||
Set if the Ultra Low Energy Timer/Counter (CRYOTIMER) HAL module is used.
|
||||
|
||||
config SOC_GECKO_EMU
|
||||
bool
|
||||
help
|
||||
Set if the energy management unit (EMU) is used.
|
||||
Set if the Energy Management Unit (EMU) HAL module is used.
|
||||
|
||||
config SOC_GECKO_GPIO
|
||||
bool
|
||||
help
|
||||
Set if the General Purpose Input/Output (GPIO) HAL module is used.
|
||||
|
||||
config SOC_GECKO_I2C
|
||||
bool
|
||||
help
|
||||
Set if the Inter-Integrated Circuit Interface (I2C) HAL module is used.
|
||||
|
||||
config SOC_GECKO_LETIMER
|
||||
bool
|
||||
help
|
||||
Set if the Low Energy Timer (LETIMER) HAL module is used.
|
||||
|
||||
config SOC_GECKO_LEUART
|
||||
bool
|
||||
help
|
||||
Set if the Low Energy Universal Asynchronous Receiver/Transmitter (LEUART)
|
||||
HAL module is used.
|
||||
|
||||
config SOC_GECKO_MSC
|
||||
bool
|
||||
help
|
||||
Set if the Memory System Controller (MSC) HAL module is used.
|
||||
|
||||
config SOC_GECKO_PRS
|
||||
bool
|
||||
help
|
||||
Set if the Peripheral Reflex System (PRS) HAL module is used.
|
||||
|
||||
config SOC_GECKO_RMU
|
||||
bool
|
||||
help
|
||||
Set if the Reset Management Unit (RMU) HAL module is used.
|
||||
|
||||
config SOC_GECKO_RTC
|
||||
bool
|
||||
help
|
||||
Set if the Real Time Counter (RTC) HAL module is used.
|
||||
|
||||
config SOC_GECKO_RTCC
|
||||
bool
|
||||
help
|
||||
Set if the Real Time Counter and Calendar (RTCC) HAL module is used.
|
||||
|
||||
config SOC_GECKO_TIMER
|
||||
bool
|
||||
help
|
||||
Set if the Timer/Counter (TIMER) HAL module is used.
|
||||
|
||||
config SOC_GECKO_USART
|
||||
bool
|
||||
help
|
||||
Set if the Universal Synchronous Asynchronous Receiver/Transmitter (USART)
|
||||
HAL module is used.
|
||||
|
||||
config SOC_GECKO_WDOG
|
||||
bool
|
||||
help
|
||||
Set if the Watchdog Timer (WDOG) HAL module is used.
|
||||
|
||||
config SOC_GECKO_EMU_DCDC
|
||||
bool "Enable SoC DC/DC regulator"
|
||||
|
@ -54,12 +126,12 @@ choice SOC_GECKO_EMU_DCDC_MODE
|
|||
bool "Bypass"
|
||||
endchoice
|
||||
|
||||
config HAS_CMU
|
||||
config SOC_GECKO_CMU
|
||||
bool
|
||||
help
|
||||
Set if the clock management unit (CMU) is present in the SoC.
|
||||
|
||||
if HAS_CMU
|
||||
if SOC_GECKO_CMU
|
||||
|
||||
choice
|
||||
prompt "High Frequency Clock Selection"
|
||||
|
@ -96,5 +168,5 @@ config CMU_LFXO_FREQ
|
|||
Set the external low frequency oscillator frequency in Hz. This should be set by the
|
||||
board's defconfig.
|
||||
|
||||
endif # HAS_CMU
|
||||
endif # SOC_GECKO_CMU
|
||||
endif # SOC_FAMILY_EXX32
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
if SOC_SERIES_EFM32HG
|
||||
|
||||
config GPIO
|
||||
default y
|
||||
|
||||
if GPIO
|
||||
|
||||
config GPIO_GECKO
|
||||
|
|
|
@ -13,6 +13,7 @@ config SOC_SERIES_EFM32HG
|
|||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
||||
select CPU_HAS_SYSTICK
|
||||
select HAS_SILABS_GECKO
|
||||
select HAS_CMU
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
help
|
||||
Enable support for EFM32 Happy Gecko MCU series
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
if SOC_SERIES_EFM32PG12B
|
||||
|
||||
config GPIO
|
||||
default y
|
||||
|
||||
if GPIO
|
||||
|
||||
config GPIO_GECKO
|
||||
|
|
|
@ -13,7 +13,8 @@ config SOC_SERIES_EFM32PG12B
|
|||
select SOC_FAMILY_EXX32
|
||||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
||||
select CPU_HAS_SYSTICK
|
||||
select HAS_CMU
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
help
|
||||
Enable support for EFM32 PearlGecko MCU series
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
if SOC_SERIES_EFM32WG
|
||||
|
||||
config GPIO
|
||||
default y
|
||||
|
||||
if GPIO
|
||||
|
||||
config GPIO_GECKO
|
||||
|
|
|
@ -13,6 +13,7 @@ config SOC_SERIES_EFM32WG
|
|||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
||||
select CPU_HAS_SYSTICK
|
||||
select HAS_SILABS_GECKO
|
||||
select HAS_CMU
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
help
|
||||
Enable support for EFM32 WonderGecko MCU series
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
if SOC_SERIES_EFR32FG1P
|
||||
|
||||
config GPIO
|
||||
default y
|
||||
|
||||
if GPIO
|
||||
|
||||
config GPIO_GECKO
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
config SOC_SERIES_EFR32FG1P
|
||||
bool "EFR32FG1P Series MCU"
|
||||
select HAS_SILABS_GECKO
|
||||
select HAS_CMU
|
||||
select CPU_CORTEX_M4
|
||||
select CPU_HAS_FPU
|
||||
select SOC_FAMILY_EXX32
|
||||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
||||
select CPU_HAS_SYSTICK
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_GPIO
|
||||
help
|
||||
Enable support for EFR32 FlexGecko MCU series
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
|
||||
if SOC_SERIES_EFR32MG12P
|
||||
|
||||
config GPIO
|
||||
default y
|
||||
|
||||
if GPIO
|
||||
|
||||
config GPIO_GECKO
|
||||
|
|
|
@ -13,7 +13,8 @@ config SOC_SERIES_EFR32MG12P
|
|||
select SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
||||
select CPU_HAS_SYSTICK
|
||||
select HAS_SILABS_GECKO
|
||||
select HAS_CMU
|
||||
select SOC_GECKO_CMU
|
||||
select SOC_GECKO_EMU
|
||||
select SOC_GECKO_GPIO
|
||||
help
|
||||
Enable support for EFR32 Mighty Gecko MCU series
|
||||
|
|
Loading…
Reference in a new issue