driver: sleeptimer: siwx917: Add siwx91x Sleeptimer driver
This commit enables the Sleeptimer driver support for the siwx917 device. Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
This commit is contained in:
parent
d5d12f43f8
commit
701be0c331
7 changed files with 51 additions and 1 deletions
|
@ -107,6 +107,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&sysrtc0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&bt_hci0 {
|
&bt_hci0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
config SILABS_SLEEPTIMER_TIMER
|
config SILABS_SLEEPTIMER_TIMER
|
||||||
bool "Silabs Sleeptimer system clock driver"
|
bool "Silabs Sleeptimer system clock driver"
|
||||||
depends on SOC_FAMILY_SILABS_S2
|
depends on SOC_FAMILY_SILABS_S2 || SOC_FAMILY_SILABS_SIWX91X
|
||||||
depends on DT_HAS_SILABS_GECKO_STIMER_ENABLED
|
depends on DT_HAS_SILABS_GECKO_STIMER_ENABLED
|
||||||
select SOC_SILABS_SLEEPTIMER
|
select SOC_SILABS_SLEEPTIMER
|
||||||
select TICKLESS_CAPABLE
|
select TICKLESS_CAPABLE
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
#include <zephyr/dt-bindings/clock/silabs/siwx91x-clock.h>
|
#include <zephyr/dt-bindings/clock/silabs/siwx91x-clock.h>
|
||||||
|
#include <freq.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -285,6 +286,16 @@
|
||||||
clocks = <&clock0 SIWX91X_CLK_WATCHDOG>;
|
clocks = <&clock0 SIWX91X_CLK_WATCHDOG>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sysrtc0: sysrtc@24048c00 {
|
||||||
|
compatible = "silabs,gecko-stimer";
|
||||||
|
reg = <0x24048c00 0x78>;
|
||||||
|
interrupts = <22 0>;
|
||||||
|
interrupt-names = "sysrtc";
|
||||||
|
clock-frequency = <DT_FREQ_K(32)>;
|
||||||
|
prescaler = <1>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -151,5 +151,23 @@ if(CONFIG_WISECONNECT_NETWORK_STACK)
|
||||||
)
|
)
|
||||||
endif() # CONFIG_WISECONNECT_NETWORK_STACK
|
endif() # CONFIG_WISECONNECT_NETWORK_STACK
|
||||||
|
|
||||||
|
if(CONFIG_SOC_SILABS_SLEEPTIMER)
|
||||||
|
zephyr_include_directories(
|
||||||
|
${SISDK_DIR}/platform/service/sleeptimer/inc
|
||||||
|
${SISDK_DIR}/platform/service/sleeptimer/src
|
||||||
|
${SISDK_DIR}/platform/service/sleeptimer/config
|
||||||
|
)
|
||||||
|
|
||||||
|
zephyr_library_sources(
|
||||||
|
${SISDK_DIR}/platform/service/sleeptimer/src/sl_sleeptimer.c
|
||||||
|
${WISECONNECT_DIR}/components/device/silabs/si91x/mcu/drivers/service/sleeptimer/src/sl_sleeptimer_hal_si91x_sysrtc.c
|
||||||
|
)
|
||||||
|
zephyr_compile_definitions(
|
||||||
|
SL_CATALOG_SLEEPTIMER_PRESENT
|
||||||
|
SL_CODE_COMPONENT_SLEEPTIMER=sleeptimer
|
||||||
|
SL_CODE_COMPONENT_HAL_SYSRTC=hal_sysrtc
|
||||||
|
)
|
||||||
|
endif() # CONFIG_SOC_SILABS_SLEEPTIMER
|
||||||
|
|
||||||
zephyr_linker_sources(ROM_SECTIONS linker/code_classification_text.ld)
|
zephyr_linker_sources(ROM_SECTIONS linker/code_classification_text.ld)
|
||||||
zephyr_linker_sources(RAMFUNC_SECTION linker/code_classification_ramfunc.ld)
|
zephyr_linker_sources(RAMFUNC_SECTION linker/code_classification_ramfunc.ld)
|
||||||
|
|
|
@ -9,3 +9,8 @@ config SOC_FAMILY_SILABS_SIWX91X
|
||||||
select CPU_HAS_ARM_MPU
|
select CPU_HAS_ARM_MPU
|
||||||
select HAS_SILABS_WISECONNECT
|
select HAS_SILABS_WISECONNECT
|
||||||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE
|
||||||
|
|
||||||
|
config SOC_SILABS_SLEEPTIMER
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
The Sleeptimer HAL module is used for SIWX91X.
|
||||||
|
|
|
@ -3,6 +3,16 @@
|
||||||
|
|
||||||
if SOC_FAMILY_SILABS_SIWX91X
|
if SOC_FAMILY_SILABS_SIWX91X
|
||||||
|
|
||||||
|
configdefault SILABS_SLEEPTIMER_TIMER
|
||||||
|
default y
|
||||||
|
|
||||||
|
configdefault CORTEX_M_SYSTICK
|
||||||
|
default n if SILABS_SLEEPTIMER_TIMER
|
||||||
|
|
||||||
|
configdefault SYS_CLOCK_TICKS_PER_SEC
|
||||||
|
default 128 if !TICKLESS_KERNEL && SILABS_SLEEPTIMER_TIMER
|
||||||
|
default 1024 if SILABS_SLEEPTIMER_TIMER
|
||||||
|
|
||||||
config WISECONNECT_NETWORK_STACK
|
config WISECONNECT_NETWORK_STACK
|
||||||
bool
|
bool
|
||||||
select CMSIS_RTOS_V2
|
select CMSIS_RTOS_V2
|
||||||
|
|
|
@ -7,4 +7,6 @@
|
||||||
|
|
||||||
#include "si91x_device.h"
|
#include "si91x_device.h"
|
||||||
|
|
||||||
|
#define SYSRTC_IRQHandler IRQ022_Handler
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue