Skip to content

Commit 6a0f685

Browse files
soc: silabs: siwx91x: define hardware sys clock from dts
This patch introduce configuration of the symbol 'SYS_CLOCK_HW_CYCLES_PER_SEC' with dts entry rather than a hardcoded value. Signed-off-by: Martin Hoff <[email protected]>
1 parent 8ae3880 commit 6a0f685

File tree

7 files changed

+16
-3
lines changed

7 files changed

+16
-3
lines changed

boards/silabs/dev_kits/siwx917_dk2605a/siwx917_dk2605a.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
};
8686
};
8787

88+
&cpu0 {
89+
clock-frequency = <180000000>;
90+
};
91+
8892
&ulpuart {
8993
pinctrl-0 = <&ulpuart_default>;
9094
pinctrl-names = "default";

boards/silabs/dev_kits/siwx917_dk2605a/siwx917_dk2605a_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright (c) 2025 Silicon Laboratories Inc.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=180000000
54
CONFIG_USE_DT_CODE_PARTITION=y
65
CONFIG_CONSOLE=y
76
CONFIG_UART_CONSOLE=y

boards/silabs/radio_boards/siwx917_rb4338a/siwx917_rb4338a.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
};
7878
};
7979

80+
&cpu0 {
81+
clock-frequency = <180000000>;
82+
};
83+
8084
&ulpuart {
8185
pinctrl-0 = <&ulpuart_default>;
8286
pinctrl-names = "default";

boards/silabs/radio_boards/siwx917_rb4338a/siwx917_rb4338a_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright (c) 2024 Silicon Laboratories Inc.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=180000000
54
CONFIG_USE_DT_CODE_PARTITION=y
65
CONFIG_CONSOLE=y
76
CONFIG_UART_CONSOLE=y

boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@
7878
};
7979
};
8080

81+
&cpu0 {
82+
clock-frequency = <180000000>;
83+
};
84+
8185
&ulpuart {
8286
pinctrl-0 = <&ulpuart_default>;
8387
pinctrl-names = "default";

boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright (c) 2025 Silicon Laboratories Inc.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=180000000
54
CONFIG_USE_DT_CODE_PARTITION=y
65
CONFIG_CONSOLE=y
76
CONFIG_UART_CONSOLE=y

soc/silabs/silabs_siwx91x/Kconfig.defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ if SOC_FAMILY_SILABS_SIWX91X
66
configdefault CORTEX_M_SYSTICK
77
default n if SILABS_SLEEPTIMER_TIMER
88

9+
configdefault SYS_CLOCK_HW_CYCLES_PER_SEC
10+
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) if CORTEX_M_SYSTICK
11+
default 32768
12+
913
configdefault SYS_CLOCK_TICKS_PER_SEC
1014
default 128 if !TICKLESS_KERNEL && SILABS_SLEEPTIMER_TIMER
1115
default 1024 if SILABS_SLEEPTIMER_TIMER

0 commit comments

Comments
 (0)