diff --git a/drivers/clock_control/Kconfig.nrf b/drivers/clock_control/Kconfig.nrf index 8c806119fd6..f7b0de3db09 100644 --- a/drivers/clock_control/Kconfig.nrf +++ b/drivers/clock_control/Kconfig.nrf @@ -175,6 +175,7 @@ endif # CLOCK_CONTROL_NRF config CLOCK_CONTROL_NRF2 bool "nRF clock control support" + default y depends on SOC_SERIES_NRF54HX && !RISCV_CORE_NORDIC_VPR select ONOFF select NRFS if HAS_NRFS diff --git a/drivers/clock_control/clock_control_nrf2_hsfll.c b/drivers/clock_control/clock_control_nrf2_hsfll.c index 90cd56318dd..026edf9abbd 100644 --- a/drivers/clock_control/clock_control_nrf2_hsfll.c +++ b/drivers/clock_control/clock_control_nrf2_hsfll.c @@ -17,7 +17,7 @@ LOG_MODULE_DECLARE(clock_control_nrf2, CONFIG_CLOCK_CONTROL_LOG_LEVEL); BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1, "multiple instances not supported"); -#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE +#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN #include #define FLAG_FREQ_CHANGE_CB_EXPECTED BIT(FLAGS_COMMON_BITS) @@ -131,13 +131,13 @@ static struct onoff_manager *hsfll_find_mgr(const struct device *dev, LOG_ERR("invalid frequency"); return NULL; } -#endif /* CONFIG_NRFS_HAS_DVFS_SERVICE */ +#endif /* CONFIG_NRFS_DVFS_LOCAL_DOMAIN */ static int api_request_hsfll(const struct device *dev, const struct nrf_clock_spec *spec, struct onoff_client *cli) { -#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE +#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); if (mgr) { @@ -153,7 +153,7 @@ static int api_request_hsfll(const struct device *dev, static int api_release_hsfll(const struct device *dev, const struct nrf_clock_spec *spec) { -#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE +#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); if (mgr) { @@ -170,7 +170,7 @@ static int api_cancel_or_release_hsfll(const struct device *dev, const struct nrf_clock_spec *spec, struct onoff_client *cli) { -#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE +#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); if (mgr) { @@ -197,7 +197,7 @@ static int api_get_rate_hsfll(const struct device *dev, static int hsfll_init(const struct device *dev) { -#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE +#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN struct hsfll_dev_data *dev_data = dev->data; int rc; @@ -228,12 +228,12 @@ static struct nrf_clock_control_driver_api hsfll_drv_api = { .cancel_or_release = api_cancel_or_release_hsfll, }; -#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE +#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN static struct hsfll_dev_data hsfll_data; #endif DEVICE_DT_INST_DEFINE(0, hsfll_init, NULL, - COND_CODE_1(CONFIG_NRFS_HAS_DVFS_SERVICE, + COND_CODE_1(CONFIG_NRFS_DVFS_LOCAL_DOMAIN, (&hsfll_data), (NULL)), NULL, diff --git a/samples/boards/nordic/clock_control/configs/cpuapp_hsfll.conf b/samples/boards/nordic/clock_control/configs/cpuapp_hsfll.conf index 5c1bad08a80..53eebac30be 100644 --- a/samples/boards/nordic/clock_control/configs/cpuapp_hsfll.conf +++ b/samples/boards/nordic/clock_control/configs/cpuapp_hsfll.conf @@ -1,6 +1,6 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -CONFIG_CLOCK_CONTROL_NRF2=y +CONFIG_CLOCK_CONTROL=y CONFIG_SAMPLE_CLOCK_FREQUENCY_HZ=320000000 diff --git a/samples/boards/nordic/clock_control/configs/fll16m.conf b/samples/boards/nordic/clock_control/configs/fll16m.conf index de9942857b9..c5d3a84f661 100644 --- a/samples/boards/nordic/clock_control/configs/fll16m.conf +++ b/samples/boards/nordic/clock_control/configs/fll16m.conf @@ -1,6 +1,6 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -CONFIG_CLOCK_CONTROL_NRF2=y +CONFIG_CLOCK_CONTROL=y CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=30 diff --git a/samples/boards/nordic/clock_control/configs/lfclk.conf b/samples/boards/nordic/clock_control/configs/lfclk.conf index 6cf09f0e4c7..b866d3d81d1 100644 --- a/samples/boards/nordic/clock_control/configs/lfclk.conf +++ b/samples/boards/nordic/clock_control/configs/lfclk.conf @@ -1,7 +1,7 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -CONFIG_CLOCK_CONTROL_NRF2=y +CONFIG_CLOCK_CONTROL=y CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=20 CONFIG_SAMPLE_CLOCK_PRECISION=1 diff --git a/samples/boards/nordic/clock_control/configs/uart135.conf b/samples/boards/nordic/clock_control/configs/uart135.conf index de9942857b9..c5d3a84f661 100644 --- a/samples/boards/nordic/clock_control/configs/uart135.conf +++ b/samples/boards/nordic/clock_control/configs/uart135.conf @@ -1,6 +1,6 @@ # Copyright (c) 2024 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 -CONFIG_CLOCK_CONTROL_NRF2=y +CONFIG_CLOCK_CONTROL=y CONFIG_SAMPLE_CLOCK_ACCURACY_PPM=30 diff --git a/soc/nordic/Kconfig.defconfig b/soc/nordic/Kconfig.defconfig index c912861cc4b..efa122aa5b5 100644 --- a/soc/nordic/Kconfig.defconfig +++ b/soc/nordic/Kconfig.defconfig @@ -7,13 +7,11 @@ if SOC_FAMILY_NORDIC_NRF rsource "*/Kconfig.defconfig" -# If the kernel has timer support, enable clock control -if SYS_CLOCK_EXISTS - +# If the kernel has timer support, enable clock control, except for SoCs +# based on the Haltium platform SoCs where clock control is not needed +# for the system timer config CLOCK_CONTROL - default y if !SOC_SERIES_NRF92X - -endif # SYS_CLOCK_EXISTS + default y if SYS_CLOCK_EXISTS && !NRF_PLATFORM_HALTIUM config SYS_CLOCK_HW_CYCLES_PER_SEC default 1000000 if NRF_GRTC_TIMER diff --git a/tests/drivers/clock_control/nrf_clock_control/prj.conf b/tests/drivers/clock_control/nrf_clock_control/prj.conf index 84145cf96a4..d11c2f125a0 100644 --- a/tests/drivers/clock_control/nrf_clock_control/prj.conf +++ b/tests/drivers/clock_control/nrf_clock_control/prj.conf @@ -1,6 +1,6 @@ CONFIG_ZTEST=y -CONFIG_CLOCK_CONTROL_NRF2=y +CONFIG_CLOCK_CONTROL=y CONFIG_LOG=y CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG=y CONFIG_LOCAL_DOMAIN_DVFS_LIB_LOG_LEVEL_DBG=y