soc: ti: cc13/26xx: clean up include hierarchy
Removes duplicate code and inconsistencies in the naming of the
cc13xx_cc26xx devicetree and RTC driver hierarchy and alignes it with
the actual TI product series naming hierarchy.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
diff --git a/CODEOWNERS b/CODEOWNERS
index 44dd1b5..a1457cf 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -445,7 +445,7 @@
/drivers/timer/*riscv_machine* @kgugala @pgielda
/drivers/timer/*ite_it8xxx2* @ite
/drivers/timer/*xlnx_psttc* @wjliang @stephanosio
-/drivers/timer/*cc13x2_cc26x2_rtc* @vanti
+/drivers/timer/*cc13xx_cc26xx_rtc* @vanti
/drivers/timer/*cavs* @dcpleung
/drivers/timer/*stm32_lptim* @FRASTM
/drivers/timer/*leon_gptimer* @julius-barendt
diff --git a/drivers/timer/CMakeLists.txt b/drivers/timer/CMakeLists.txt
index b026a22..ced74f9 100644
--- a/drivers/timer/CMakeLists.txt
+++ b/drivers/timer/CMakeLists.txt
@@ -8,7 +8,7 @@
zephyr_library_sources_ifdef(CONFIG_ARCV2_TIMER arcv2_timer0.c)
zephyr_library_sources_ifdef(CONFIG_ARM_ARCH_TIMER arm_arch_timer.c)
zephyr_library_sources_ifdef(CONFIG_INTEL_ADSP_TIMER intel_adsp_timer.c)
-zephyr_library_sources_ifdef(CONFIG_CC13X2_CC26X2_RTC_TIMER cc13x2_cc26x2_rtc_timer.c)
+zephyr_library_sources_ifdef(CONFIG_CC13XX_CC26XX_RTC_TIMER cc13xx_cc26xx_rtc_timer.c)
zephyr_library_sources_ifdef(CONFIG_CORTEX_M_SYSTICK cortex_m_systick.c)
zephyr_library_sources_ifdef(CONFIG_ESP32C3_SYS_TIMER esp32c3_sys_timer.c)
zephyr_library_sources_ifdef(CONFIG_GECKO_BURTC_TIMER gecko_burtc_timer.c)
diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index 1b6c487..3631c55 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -68,7 +68,7 @@
source "drivers/timer/Kconfig.arcv2"
source "drivers/timer/Kconfig.arm_arch"
source "drivers/timer/Kconfig.cavs"
-source "drivers/timer/Kconfig.cc13x2_cc26x2_rtc"
+source "drivers/timer/Kconfig.cc13xx_cc26xx_rtc"
source "drivers/timer/Kconfig.cortex_m_systick"
source "drivers/timer/Kconfig.esp32c3_sys"
source "drivers/timer/Kconfig.gecko"
diff --git a/drivers/timer/Kconfig.cc13x2_cc26x2_rtc b/drivers/timer/Kconfig.cc13xx_cc26xx_rtc
similarity index 72%
rename from drivers/timer/Kconfig.cc13x2_cc26x2_rtc
rename to drivers/timer/Kconfig.cc13xx_cc26xx_rtc
index b734b1f..5b4b82a 100644
--- a/drivers/timer/Kconfig.cc13x2_cc26x2_rtc
+++ b/drivers/timer/Kconfig.cc13xx_cc26xx_rtc
@@ -3,13 +3,13 @@
# Copyright (c) 2019 Intel Corp.
# SPDX-License-Identifier: Apache-2.0
-config CC13X2_CC26X2_RTC_TIMER
- bool "TI SimpleLink CC13x2/CC26x2 RTC timer"
+config CC13XX_CC26XX_RTC_TIMER
+ bool "TI SimpleLink CC13xx/CC26xx RTC system clock timer"
default y
depends on DT_HAS_TI_CC13XX_CC26XX_RTC_ENABLED
select TICKLESS_CAPABLE
select TIMER_HAS_64BIT_CYCLE_COUNTER
help
This module implements a kernel device driver for the TI SimpleLink
- CC13X2_CC26X2 series Real Time Counter and provides the standard
+ CC13XX_CC26XX series Real Time Counter and provides the standard
"system clock driver" interfaces.
diff --git a/drivers/timer/cc13x2_cc26x2_rtc_timer.c b/drivers/timer/cc13xx_cc26xx_rtc_timer.c
similarity index 100%
rename from drivers/timer/cc13x2_cc26x2_rtc_timer.c
rename to drivers/timer/cc13xx_cc26xx_rtc_timer.c
diff --git a/dts/arm/ti/cc1352r.dtsi b/dts/arm/ti/cc1352r.dtsi
index 97c7ad3..34f36ee 100644
--- a/dts/arm/ti/cc1352r.dtsi
+++ b/dts/arm/ti/cc1352r.dtsi
@@ -5,7 +5,7 @@
*/
#include <mem.h>
-#include <ti/cc13x2_cc26x2.dtsi>
+#include <ti/cc13xx_cc26xx.dtsi>
/ {
sram0: memory@20000000 {
diff --git a/dts/arm/ti/cc1352r7.dtsi b/dts/arm/ti/cc1352r7.dtsi
index 0b098c8..56bcb96 100644
--- a/dts/arm/ti/cc1352r7.dtsi
+++ b/dts/arm/ti/cc1352r7.dtsi
@@ -5,7 +5,7 @@
*/
#include <mem.h>
-#include <ti/cc13x2_cc26x2.dtsi>
+#include <ti/cc13xx_cc26xx.dtsi>
/ {
sram0: memory@20000000 {
diff --git a/dts/arm/ti/cc13x2_cc26x2.dtsi b/dts/arm/ti/cc13xx_cc26xx.dtsi
similarity index 100%
rename from dts/arm/ti/cc13x2_cc26x2.dtsi
rename to dts/arm/ti/cc13xx_cc26xx.dtsi
diff --git a/dts/arm/ti/cc2652r.dtsi b/dts/arm/ti/cc2652r.dtsi
index 97c7ad3..1f6bdf8 100644
--- a/dts/arm/ti/cc2652r.dtsi
+++ b/dts/arm/ti/cc2652r.dtsi
@@ -5,27 +5,4 @@
*/
#include <mem.h>
-#include <ti/cc13x2_cc26x2.dtsi>
-
-/ {
- sram0: memory@20000000 {
- reg = <0x20000000 DT_SIZE_K(80)>;
- };
-};
-
-&flash0 {
- reg = <0x0 DT_SIZE_K(352)>;
-
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- /* CCFG registers occupy the last 88 bytes of flash */
- ti_ccfg_partition: partition@57fa8 {
- compatible = "zephyr,memory-region";
- reg = <0x57fa8 88>;
- zephyr,memory-region = "FLASH_CCFG";
- };
- };
-};
+#include <ti/cc1352r.dtsi>
diff --git a/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c b/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c
index 9db48d9..8c2ea2f 100644
--- a/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c
+++ b/soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c
@@ -8,7 +8,7 @@
#include <driverlib/setup.h>
-static int ti_cc13x2_cc26x2_init(void)
+static int ti_cc13x7_cc26x7_init(void)
{
/* Performs necessary trim of the device. */
@@ -17,4 +17,4 @@
return 0;
}
-SYS_INIT(ti_cc13x2_cc26x2_init, PRE_KERNEL_1, 0);
+SYS_INIT(ti_cc13x7_cc26x7_init, PRE_KERNEL_1, 0);
diff --git a/tests/kernel/sleep/src/usleep.c b/tests/kernel/sleep/src/usleep.c
index e014a84..67037e5 100644
--- a/tests/kernel/sleep/src/usleep.c
+++ b/tests/kernel/sleep/src/usleep.c
@@ -29,12 +29,11 @@
* nRF51, which has a slow CPU clock.
*/
#define MAXIMUM_SHORTEST_TICKS (IS_ENABLED(CONFIG_SOC_SERIES_NRF51X) ? 6 : 3)
-/*
- * Similar situation for TI CC13X2/CC26X2 RTC due to the limitation
- * that a value too close to the current time cannot be loaded to
- * its comparator.
+/* Similar situation for TI CC13XX/CC26XX RTC kernel timer due to the
+ * limitation that a value too close to the current time cannot be
+ * loaded to its comparator.
*/
-#elif defined(CONFIG_CC13X2_CC26X2_RTC_TIMER) && \
+#elif defined(CONFIG_CC13XX_CC26XX_RTC_TIMER) && \
(CONFIG_SYS_CLOCK_TICKS_PER_SEC > 16384)
#define MAXIMUM_SHORTEST_TICKS 3
#else