From 1b263ba0a6f1e4c94e7751b72953510579ed6c60 Mon Sep 17 00:00:00 2001 From: Vincent Wan Date: Thu, 31 Oct 2019 10:48:28 -0700 Subject: [PATCH] dts: specify cpu frequency for TI CC13X2/CC26X2 Add cpu clock frequency information to DTS so that it can be retrieved in the code. Signed-off-by: Vincent Wan --- boards/arm/cc1352r1_launchxl/cc1352r1_launchxl.dts | 4 ++++ boards/arm/cc26x2r1_launchxl/cc26x2r1_launchxl.dts | 4 ++++ dts/arm/ti/cc13x2_cc26x2.dtsi | 2 +- soc/arm/ti_simplelink/cc13x2_cc26x2/dts_fixup.h | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/boards/arm/cc1352r1_launchxl/cc1352r1_launchxl.dts b/boards/arm/cc1352r1_launchxl/cc1352r1_launchxl.dts index c66460528c3..60e1f70c3aa 100644 --- a/boards/arm/cc1352r1_launchxl/cc1352r1_launchxl.dts +++ b/boards/arm/cc1352r1_launchxl/cc1352r1_launchxl.dts @@ -53,6 +53,10 @@ }; }; +&cpu0 { + clock-frequency = <48000000>; +}; + &trng { status = "okay"; }; diff --git a/boards/arm/cc26x2r1_launchxl/cc26x2r1_launchxl.dts b/boards/arm/cc26x2r1_launchxl/cc26x2r1_launchxl.dts index 52829ba2405..9de4ceb150f 100644 --- a/boards/arm/cc26x2r1_launchxl/cc26x2r1_launchxl.dts +++ b/boards/arm/cc26x2r1_launchxl/cc26x2r1_launchxl.dts @@ -53,6 +53,10 @@ }; }; +&cpu0 { + clock-frequency = <48000000>; +}; + &trng { status = "okay"; }; diff --git a/dts/arm/ti/cc13x2_cc26x2.dtsi b/dts/arm/ti/cc13x2_cc26x2.dtsi index 5fe867c06b8..e89312eac54 100644 --- a/dts/arm/ti/cc13x2_cc26x2.dtsi +++ b/dts/arm/ti/cc13x2_cc26x2.dtsi @@ -13,7 +13,7 @@ #address-cells = <1>; #size-cells = <0>; - cpu@0 { + cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-m4"; reg = <0>; diff --git a/soc/arm/ti_simplelink/cc13x2_cc26x2/dts_fixup.h b/soc/arm/ti_simplelink/cc13x2_cc26x2/dts_fixup.h index 1d461377df8..c939caadbae 100644 --- a/soc/arm/ti_simplelink/cc13x2_cc26x2/dts_fixup.h +++ b/soc/arm/ti_simplelink/cc13x2_cc26x2/dts_fixup.h @@ -9,4 +9,6 @@ #define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS #define CONFIG_ENTROPY_NAME DT_INST_0_TI_CC13XX_CC26XX_TRNG_LABEL +#define DT_CPU_CLOCK_FREQUENCY DT_ARM_CORTEX_M4_0_CLOCK_FREQUENCY + /* End of SoC Level DTS fixup file */