Skip to content

dts: ti: cc13xx_cc26xx: devicetree sysclk alignment #59965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions boards/arm/beagle_bcf/beagleconnect_freedom.dts
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@
};
};

&rtc {
status = "okay";
};

&ieee802154 {
status = "okay";
};
Expand Down
4 changes: 0 additions & 4 deletions boards/arm/cc1352p1_launchxl/cc1352p1_launchxl.dts
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};

&rtc {
status = "okay";
};

&radio {
status = "okay";
};
Expand Down
4 changes: 0 additions & 4 deletions boards/arm/cc1352r1_launchxl/cc1352r1_launchxl.dts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};

&rtc {
status = "okay";
};

&radio {
status = "okay";
};
Expand Down
4 changes: 0 additions & 4 deletions boards/arm/cc1352r_sensortag/cc1352r_sensortag.dts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,6 @@
/* TODO: "jedec,spi-nor" for the mx25r8035 */
};

&rtc {
status = "okay";
};

&radio {
status = "okay";
};
Expand Down
4 changes: 0 additions & 4 deletions boards/arm/cc26x2r1_launchxl/cc26x2r1_launchxl.dts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};

&rtc {
status = "okay";
};

&wdt0 {
status = "okay";
};
2 changes: 1 addition & 1 deletion drivers/timer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ zephyr_library_sources_ifdef(CONFIG_APIC_TSC_DEADLINE_TIMER apic_tsc.c)
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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ source "drivers/timer/Kconfig.apic"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
depends on DT_HAS_TI_CC13XX_CC26XX_RTC_TIMER_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.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#define DT_DRV_COMPAT ti_cc13xx_cc26xx_rtc
#define DT_DRV_COMPAT ti_cc13xx_cc26xx_rtc_timer

/*
* TI SimpleLink CC13X2/CC26X2 RTC-based system timer
Expand Down
2 changes: 1 addition & 1 deletion dts/arm/ti/cc1352r.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <mem.h>
#include <ti/cc13x2_cc26x2.dtsi>
#include <ti/cc13xx_cc26xx.dtsi>

/ {
sram0: memory@20000000 {
Expand Down
2 changes: 1 addition & 1 deletion dts/arm/ti/cc1352r7.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <mem.h>
#include <ti/cc13x2_cc26x2.dtsi>
#include <ti/cc13xx_cc26xx.dtsi>

/ {
sram0: memory@20000000 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@
status = "disabled";
};

/* The RTC peripheral backs the kernel system clock and tick timer. */
rtc: rtc@40092000 {
compatible = "ti,cc13xx-cc26xx-rtc";
compatible = "ti,cc13xx-cc26xx-rtc-timer";
reg = <0x40092000 0x1000>;
interrupts = <4 0>; /* interrupt #20 = 4 + 16 */
status = "disabled";
status = "okay"; /* the system clock timer is mandatory */
};

radio: radio@40040000 {
Expand Down
25 changes: 1 addition & 24 deletions dts/arm/ti/cc2652r.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion dts/bindings/rtc/ti,cc13xx-cc26xx-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

description: TI SimpleLink CC13xx/CC26xx RTC

compatible: "ti,cc13xx-cc26xx-rtc"
compatible: "ti,cc13xx-cc26xx-rtc-timer"

include: rtc.yaml

Expand Down
4 changes: 2 additions & 2 deletions soc/arm/ti_simplelink/cc13x2x7_cc26x2x7/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -17,4 +17,4 @@ static int ti_cc13x2_cc26x2_init(void)
return 0;
}

SYS_INIT(ti_cc13x2_cc26x2_init, PRE_KERNEL_1, 0);
SYS_INIT(ti_cc13x7_cc26x7_init, PRE_KERNEL_1, 0);
9 changes: 4 additions & 5 deletions tests/kernel/sleep/src/usleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down