Skip to content
Permalink
Browse files

drivers: Add counter driver (RTCC) for SiLabs Gecko SoCs

This commit adds counter driver based on RTCC module for SiLabs Gecko
SoCs.

Tested with SLWSTK6061A / BRD4250B wireless starter kit.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
  • Loading branch information...
mnkp authored and nashif committed May 17, 2019
1 parent 240c516 commit abbd952d2b629d1680900dae187b27119a63b586
@@ -38,4 +38,11 @@ config GPIO_GECKO_PORTF

endif # GPIO_GECKO

if COUNTER

config COUNTER_GECKO_RTCC
default y

endif # COUNTER

endif # BOARD_EFM32PG_STK3402A
@@ -48,6 +48,8 @@ The efm32pg_stk3402a board configuration supports the following hardware feature
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| COUNTER | on-chip | rtcc |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | flash memory |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
@@ -73,6 +73,11 @@
status = "ok";
};

&rtcc0 {
prescaler = <1>;
status = "ok";
};

&gpio {
location-swo = <0>;
status = "ok";
@@ -38,4 +38,11 @@ config GPIO_GECKO_PORTF

endif # GPIO_GECKO

if COUNTER

config COUNTER_GECKO_RTCC
default y

endif # COUNTER

endif # BOARD_EFR32_SLWSTK6061A
@@ -60,6 +60,8 @@ The efr32_slwstk6061a board configuration supports the following hardware featur
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| COUNTER | on-chip | rtcc |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | flash memory |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
@@ -62,6 +62,11 @@
status = "ok";
};

&rtcc0 {
prescaler = <1>;
status = "ok";
};

&gpio {
location-swo = <0>;
status = "ok";
@@ -29,4 +29,11 @@ config GPIO_GECKO_PORTF

endif # GPIO_GECKO

if COUNTER

config COUNTER_GECKO_RTCC
default y

endif # COUNTER

endif # BOARD_EFR32MG_SLTB004A
@@ -63,6 +63,8 @@ The efr32mg_sltb004a board configuration supports the following hardware feature
+-----------+------------+-------------------------------------+
| SYSTICK | on-chip | systick |
+-----------+------------+-------------------------------------+
| COUNTER | on-chip | rtcc |
+-----------+------------+-------------------------------------+
| FLASH | on-chip | flash memory |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
@@ -78,6 +78,11 @@
status = "ok";
};

&rtcc0 {
prescaler = <1>;
status = "ok";
};

&gpio {
location-swo = <0>;
status = "ok";
@@ -6,6 +6,7 @@ zephyr_library_sources_ifdef(CONFIG_AON_COUNTER_QMSI counter_qmsi_aon.c)
zephyr_library_sources_ifdef(CONFIG_AON_TIMER_QMSI counter_qmsi_aonpt.c)
zephyr_library_sources_ifdef(CONFIG_TIMER_TMR_CMSDK_APB timer_tmr_cmsdk_apb.c)
zephyr_library_sources_ifdef(CONFIG_TIMER_DTMR_CMSDK_APB timer_dtmr_cmsdk_apb.c)
zephyr_library_sources_ifdef(CONFIG_COUNTER_GECKO_RTCC counter_gecko_rtcc.c)
zephyr_library_sources_ifdef(CONFIG_COUNTER_IMX_EPIT counter_imx_epit.c)
zephyr_library_sources_ifdef(CONFIG_COUNTER_MCUX_RTC counter_mcux_rtc.c)
zephyr_library_sources_ifdef(CONFIG_COUNTER_NRF_TIMER counter_nrfx_timer.c)
@@ -20,6 +20,8 @@ config COUNTER_LOG_LEVEL
help
Counter logging level.

source "drivers/counter/Kconfig.gecko"

source "drivers/counter/Kconfig.qmsi"

source "drivers/counter/Kconfig.tmr_cmsdk_apb"
@@ -0,0 +1,14 @@
# Kconfig - Silicon Labs Gecko Counter driver config
#
# Copyright (c) 2019, Piotr Mienkowski
#
# SPDX-License-Identifier: Apache-2.0

config COUNTER_GECKO_RTCC
bool "Silicon Labs Gecko Counter (RTCC) driver"
depends on SOC_FAMILY_EXX32
select SOC_GECKO_CMU
select SOC_GECKO_RTCC
help
Enable counter driver based on RTCC module for Silicon Labs Gecko
chips.

0 comments on commit abbd952

Please sign in to comment.
You can’t perform that action at this time.