soc: nordic: Fix the way of enabling clock control for nRF54H Series

This is a follow-up to commit 7a2ce2882a.

Do not enable clock control by default on nRF54H Series SoCs when
the system timer is present, because clock control is not needed
for this purpose there.

Add missing `default y` in the CLOCK_CONTROL_NRF2 Kconfig option that
enables compilation of clock control drivers for nRF54H Series.
This way modules that actually require clock control (like drivers
that use radio) will be able to enable it using the generic option
(CLOCK_CONTROL), not the above one that is specific for nRF54H.

Update accordingly applications that referenced the CLOCK_CONTROL_NRF2
option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2024-09-27 15:14:16 +02:00 committed by David Leach
commit edc4f75b61
7 changed files with 10 additions and 11 deletions

View file

@ -175,6 +175,7 @@ endif # CLOCK_CONTROL_NRF
config CLOCK_CONTROL_NRF2 config CLOCK_CONTROL_NRF2
bool "nRF clock control support" bool "nRF clock control support"
default y
depends on SOC_SERIES_NRF54HX && !RISCV_CORE_NORDIC_VPR depends on SOC_SERIES_NRF54HX && !RISCV_CORE_NORDIC_VPR
select ONOFF select ONOFF
select NRFS if HAS_NRFS select NRFS if HAS_NRFS

View file

@ -1,6 +1,6 @@
# Copyright (c) 2024 Nordic Semiconductor ASA # Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
CONFIG_CLOCK_CONTROL_NRF2=y CONFIG_CLOCK_CONTROL=y
CONFIG_SAMPLE_CLOCK_FREQUENCY_HZ=320000000 CONFIG_SAMPLE_CLOCK_FREQUENCY_HZ=320000000

View file

@ -1,6 +1,6 @@
# Copyright (c) 2024 Nordic Semiconductor ASA # Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
CONFIG_CLOCK_CONTROL_NRF2=y CONFIG_CLOCK_CONTROL=y
CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=30 CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=30

View file

@ -1,7 +1,7 @@
# Copyright (c) 2024 Nordic Semiconductor ASA # Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
CONFIG_CLOCK_CONTROL_NRF2=y CONFIG_CLOCK_CONTROL=y
CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=20 CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=20
CONFIG_SAMPLE_CLOCK_PRECISION=1 CONFIG_SAMPLE_CLOCK_PRECISION=1

View file

@ -1,6 +1,6 @@
# Copyright (c) 2024 Nordic Semiconductor ASA # Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
CONFIG_CLOCK_CONTROL_NRF2=y CONFIG_CLOCK_CONTROL=y
CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=30 CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=30

View file

@ -7,13 +7,11 @@ if SOC_FAMILY_NORDIC_NRF
rsource "*/Kconfig.defconfig" rsource "*/Kconfig.defconfig"
# If the kernel has timer support, enable clock control # If the kernel has timer support, enable clock control, except for SoCs
if SYS_CLOCK_EXISTS # based on the Haltium platform SoCs where clock control is not needed
# for the system timer
config CLOCK_CONTROL config CLOCK_CONTROL
default y if !SOC_SERIES_NRF92X default y if SYS_CLOCK_EXISTS && !NRF_PLATFORM_HALTIUM
endif # SYS_CLOCK_EXISTS
config SYS_CLOCK_HW_CYCLES_PER_SEC config SYS_CLOCK_HW_CYCLES_PER_SEC
default 1000000 if NRF_GRTC_TIMER default 1000000 if NRF_GRTC_TIMER

View file

@ -1,6 +1,6 @@
CONFIG_ZTEST=y CONFIG_ZTEST=y
CONFIG_CLOCK_CONTROL_NRF2=y CONFIG_CLOCK_CONTROL=y
CONFIG_LOG=y CONFIG_LOG=y
CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG=y CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG=y
CONFIG_LOCAL_DOMAIN_DVFS_LIB_LOG_LEVEL_DBG=y CONFIG_LOCAL_DOMAIN_DVFS_LIB_LOG_LEVEL_DBG=y