diff --git a/applications/machine_learning/configuration/nrf52840dk_nrf52840/prj.conf b/applications/machine_learning/configuration/nrf52840dk_nrf52840/prj.conf index be82c1675e36..3d12a980d10a 100644 --- a/applications/machine_learning/configuration/nrf52840dk_nrf52840/prj.conf +++ b/applications/machine_learning/configuration/nrf52840dk_nrf52840/prj.conf @@ -87,6 +87,9 @@ CONFIG_UART_CONSOLE=n CONFIG_LOG_BACKEND_UART=n CONFIG_UART_ASYNC_API=y +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y + ################################################################################ # Debug configuration (logger using RTT) diff --git a/applications/machine_learning/configuration/nrf5340dk_nrf5340_cpuapp/prj.conf b/applications/machine_learning/configuration/nrf5340dk_nrf5340_cpuapp/prj.conf index 4b60cb547a73..42cffba3b268 100644 --- a/applications/machine_learning/configuration/nrf5340dk_nrf5340_cpuapp/prj.conf +++ b/applications/machine_learning/configuration/nrf5340dk_nrf5340_cpuapp/prj.conf @@ -128,6 +128,9 @@ CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y CONFIG_BT_DEVICE_NAME="EI nRF53DK" +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y + ################################################################################ # Debug configuration (logger using RTT) diff --git a/applications/machine_learning/configuration/nrf54l15dk_nrf54l15_cpuapp/prj.conf b/applications/machine_learning/configuration/nrf54l15dk_nrf54l15_cpuapp/prj.conf index fe0759b8b941..efc90632600a 100644 --- a/applications/machine_learning/configuration/nrf54l15dk_nrf54l15_cpuapp/prj.conf +++ b/applications/machine_learning/configuration/nrf54l15dk_nrf54l15_cpuapp/prj.conf @@ -88,6 +88,9 @@ CONFIG_UART_CONSOLE=n CONFIG_LOG_BACKEND_UART=n CONFIG_UART_ASYNC_API=y +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y + ################################################################################ # Debug configuration (logger using RTT) diff --git a/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp/prj.conf b/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp/prj.conf index efbf961903a3..61346be20e3f 100644 --- a/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp/prj.conf +++ b/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp/prj.conf @@ -136,6 +136,9 @@ CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y CONFIG_BT_DEVICE_NAME="EI Thingy53" +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y + ################################################################################ # Debug configuration (logger using CDC ACM) diff --git a/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp_ns/prj.conf b/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp_ns/prj.conf index efbf961903a3..61346be20e3f 100644 --- a/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp_ns/prj.conf +++ b/applications/machine_learning/configuration/thingy53_nrf5340_cpuapp_ns/prj.conf @@ -136,6 +136,9 @@ CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y CONFIG_BT_DEVICE_NAME="EI Thingy53" +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y + ################################################################################ # Debug configuration (logger using CDC ACM) diff --git a/applications/nrf5340_audio/src/audio/audio_datapath.c b/applications/nrf5340_audio/src/audio/audio_datapath.c index bf5f48559113..2234f1c9a519 100644 --- a/applications/nrf5340_audio/src/audio/audio_datapath.c +++ b/applications/nrf5340_audio/src/audio/audio_datapath.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/applications/nrf5340_audio/src/audio/le_audio_rx.c b/applications/nrf5340_audio/src/audio/le_audio_rx.c index d034967aa6d3..80da597b5d7d 100644 --- a/applications/nrf5340_audio/src/audio/le_audio_rx.c +++ b/applications/nrf5340_audio/src/audio/le_audio_rx.c @@ -8,7 +8,6 @@ #include #include -#include #include "streamctrl.h" #include "audio_datapath.h" diff --git a/applications/nrf5340_audio/src/modules/audio_i2s.c b/applications/nrf5340_audio/src/modules/audio_i2s.c index a0222c7542e2..f01c641360ed 100644 --- a/applications/nrf5340_audio/src/modules/audio_i2s.c +++ b/applications/nrf5340_audio/src/modules/audio_i2s.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "audio_sync_timer.h" diff --git a/applications/nrf5340_audio/src/utils/peripherals.c b/applications/nrf5340_audio/src/utils/peripherals.c index f70bdc66e9ef..f0816c7a7b91 100644 --- a/applications/nrf5340_audio/src/utils/peripherals.c +++ b/applications/nrf5340_audio/src/utils/peripherals.c @@ -5,7 +5,7 @@ */ #include "peripherals.h" -#include +#include #include "led_assignments.h" #include "led.h" @@ -148,10 +148,7 @@ int peripherals_init(void) } /* Use this to turn on 128 MHz clock for cpu_app */ - ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1); - if (ret) { - return ret; - } + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); return 0; } diff --git a/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/app.overlay b/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/app.overlay index e538f3876f61..8aac6568bb2e 100644 --- a/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/app.overlay +++ b/applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/app.overlay @@ -2,3 +2,7 @@ compatible = "nordic,nrf-spi"; status = "okay"; }; + +&lfclk { + k32src = "rc"; +}; diff --git a/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/app.overlay b/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/app.overlay index 80a45b15f7bd..de8964e2eb9a 100644 --- a/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/app.overlay +++ b/applications/nrf_desktop/configuration/nrf52kbd_nrf52832/app.overlay @@ -10,3 +10,7 @@ }; }; }; + +&lfclk { + k32src = "rc"; +}; diff --git a/applications/nrf_desktop/src/modules/hfclk_lock.c b/applications/nrf_desktop/src/modules/hfclk_lock.c index 0db0bed4162d..db6267234784 100644 --- a/applications/nrf_desktop/src/modules/hfclk_lock.c +++ b/applications/nrf_desktop/src/modules/hfclk_lock.c @@ -17,11 +17,16 @@ #include LOG_MODULE_REGISTER(MODULE); +#if defined(CONFIG_CLOCK_CONTROL_NRF) static struct onoff_manager *mgr; +#else +static const struct device *dev; +#endif static struct onoff_client cli; static void hfclk_lock(void) { +#if defined(CONFIG_CLOCK_CONTROL_NRF) if (mgr) { return; } @@ -41,12 +46,36 @@ static void hfclk_lock(void) module_set_state(MODULE_STATE_READY); } } +#else + if (dev) { + return; + } + + dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + if (!dev) { + module_set_state(MODULE_STATE_ERROR); + } else { + int err; + + sys_notify_init_spinwait(&cli.notify); + err = nrf_clock_control_request(dev, NULL, &cli); + if (err < 0) { + dev = NULL; + module_set_state(MODULE_STATE_ERROR); + } else { + module_set_state(MODULE_STATE_READY); + } + } +#endif } static void hfclk_unlock(void) { int err; +#if defined(CONFIG_CLOCK_CONTROL_NRF) if (!mgr) { return; } @@ -54,6 +83,15 @@ static void hfclk_unlock(void) err = onoff_cancel_or_release(mgr, &cli); module_set_state((err < 0) ? MODULE_STATE_ERROR : MODULE_STATE_OFF); mgr = NULL; +#else + if (!dev) { + return; + } + + err = nrf_clock_control_cancel_or_release(dev, NULL, &cli); + module_set_state((err < 0) ? MODULE_STATE_ERROR : MODULE_STATE_OFF); + dev = NULL; +#endif } diff --git a/drivers/Kconfig b/drivers/Kconfig index c2b7c0c1988d..b5452405085b 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -28,19 +28,4 @@ config HPF default y if MSPI_HPF # Temporary kconfig to include DPPI channel allocation for HPF -config CLOCK_CONTROL_NRF2 - bool "Use NRF2 clock control API" - depends on CLOCK_CONTROL - depends on SOC_SERIES_NRF54HX && !RISCV_CORE_NORDIC_VPR - default y - help - The clock control drivers are currently split into two groups, - one which implement the "NRF2" clock control API, and one which - implements the "NRF" clock control API. This config helps - applications and subsystems align to the clock control API - implemented for an SoC. - - This config can be removed once all clock control drivers have - been updated to use the "NRF2" API. - endmenu diff --git a/drivers/serial/uart_nrf_sw_lpuart.c b/drivers/serial/uart_nrf_sw_lpuart.c index 2514517ae4d2..d3638005abac 100644 --- a/drivers/serial/uart_nrf_sw_lpuart.c +++ b/drivers/serial/uart_nrf_sw_lpuart.c @@ -354,11 +354,19 @@ static void deactivate_rx(struct lpuart_data *data) int err; if (IS_ENABLED(CONFIG_NRF_SW_LPUART_HFXO_ON_RX)) { +#if defined(CONFIG_CLOCK_CONTROL_NRF) struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); err = onoff_cancel_or_release(mgr, &data->rx_clk_cli); __ASSERT_NO_MSG(err >= 0); +#else + const struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + err = nrf_clock_control_cancel_or_release(dev, NULL, &data->rx_clk_cli); + __ASSERT_NO_MSG(err >= 0); +#endif } /* abort rx */ @@ -413,6 +421,7 @@ static void rx_hfclk_callback(struct onoff_manager *mgr, static void rx_hfclk_request(struct lpuart_data *data) { +#if defined(CONFIG_CLOCK_CONTROL_NRF) struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); int err; @@ -420,6 +429,16 @@ static void rx_hfclk_request(struct lpuart_data *data) sys_notify_init_callback(&data->rx_clk_cli.notify, rx_hfclk_callback); err = onoff_request(mgr, &data->rx_clk_cli); __ASSERT_NO_MSG(err >= 0); +#else + const struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + int err; + + sys_notify_init_callback(&data->rx_clk_cli.notify, rx_hfclk_callback); + err = nrf_clock_control_request(dev, NULL, &data->rx_clk_cli); + __ASSERT_NO_MSG(err >= 0); +#endif } static void start_rx_activation(struct lpuart_data *data) diff --git a/dts/common/nordic/nrf54ls05b.dtsi b/dts/common/nordic/nrf54ls05b.dtsi index 0491e052ed86..e0a38adb923c 100644 --- a/dts/common/nordic/nrf54ls05b.dtsi +++ b/dts/common/nordic/nrf54ls05b.dtsi @@ -448,6 +448,20 @@ status = "disabled"; }; + lfclk: lfclk@10e000 { + compatible = "nordic,nrf-clock-lfclk"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + + xo: xo@10e000 { + compatible = "nordic,nrf-clock-xo"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + power: power@10e000 { compatible = "nordic,nrf-power"; reg = <0x10e000 0x1000>; diff --git a/dts/common/nordic/nrf54lv10a.dtsi b/dts/common/nordic/nrf54lv10a.dtsi index d98c89dcecf0..a80641ac9d60 100644 --- a/dts/common/nordic/nrf54lv10a.dtsi +++ b/dts/common/nordic/nrf54lv10a.dtsi @@ -495,6 +495,20 @@ status = "disabled"; }; + lfclk: lfclk@10e000 { + compatible = "nordic,nrf-clock-lfclk"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + + xo: xo@10e000 { + compatible = "nordic,nrf-clock-xo"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + power: power@10e000 { compatible = "nordic,nrf-power"; reg = <0x10e000 0x1000>; diff --git a/dts/common/nordic/nrf7120_enga.dtsi b/dts/common/nordic/nrf7120_enga.dtsi index 55ba72123a19..d8e96bbd3f81 100644 --- a/dts/common/nordic/nrf7120_enga.dtsi +++ b/dts/common/nordic/nrf7120_enga.dtsi @@ -861,6 +861,27 @@ status = "disabled"; }; + lfclk: lfclk@10e000 { + compatible = "nordic,nrf-clock-lfclk"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + + xo: xo@10e000 { + compatible = "nordic,nrf-clock-xo"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + + xo24m: xo24m@10e000 { + compatible = "nordic,nrf-clock-xo24m"; + reg = <0x10e000 0x1000>; + interrupts = <270 NRF_DEFAULT_IRQ_PRIORITY>; + status = "disabled"; + }; + audio_auxpll: auxpll@130000 { compatible = "nordic,nrf-auxpll"; reg = <0x130000 0x1000>; diff --git a/samples/bluetooth/central_uart/prj.conf b/samples/bluetooth/central_uart/prj.conf index 643922000367..087174dbe879 100644 --- a/samples/bluetooth/central_uart/prj.conf +++ b/samples/bluetooth/central_uart/prj.conf @@ -42,3 +42,6 @@ CONFIG_LOG_BACKEND_UART=n CONFIG_LOG_PRINTK=n CONFIG_ASSERT=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/conn_time_sync/prj.conf b/samples/bluetooth/conn_time_sync/prj.conf index 24d416b59707..e560542ebccf 100644 --- a/samples/bluetooth/conn_time_sync/prj.conf +++ b/samples/bluetooth/conn_time_sync/prj.conf @@ -24,3 +24,6 @@ CONFIG_BT_CTLR_SDC_CONN_ANCHOR_POINT_REPORT=y CONFIG_BT_HCI_VS_EVT_USER=y CONFIG_NRFX_GPPI=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/direct_test_mode/src/dtm.c b/samples/bluetooth/direct_test_mode/src/dtm.c index bef31f1b8ba4..e3c79e5a0576 100644 --- a/samples/bluetooth/direct_test_mode/src/dtm.c +++ b/samples/bluetooth/direct_test_mode/src/dtm.c @@ -26,7 +26,7 @@ #include #include -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) #include #endif @@ -718,23 +718,35 @@ static void anomaly_timer_handler(nrf_timer_event_t event_type, void *context); static void dtm_timer_handler(nrf_timer_event_t event_type, void *context); static void radio_handler(const void *context); -#if defined(CONFIG_CLOCK_CONTROL_NRF) +#if defined(CONFIG_CLOCK_CONTROL_NRFX) static int clock_init(void) { int err; int res; - struct onoff_manager *clk_mgr; struct onoff_client clk_cli; +#if defined(CONFIG_CLOCK_CONTROL_NRF) + struct onoff_manager *clk_mgr; clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); if (!clk_mgr) { +#else + const struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + + if (!dev) { +#endif printk("Unable to get the Clock manager\n"); return -ENXIO; } sys_notify_init_spinwait(&clk_cli.notify); +#if defined(CONFIG_CLOCK_CONTROL_NRF) err = onoff_request(clk_mgr, &clk_cli); +#else + err = nrf_clock_control_request(dev, NULL, &clk_cli); +#endif if (err < 0) { printk("Clock request failed: %d\n", err); return err; @@ -761,7 +773,7 @@ static int clock_init(void) return err; } -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) int clock_init(void) { @@ -791,7 +803,7 @@ int clock_init(void) #else BUILD_ASSERT(false, "No Clock Control driver"); -#endif /* defined(CONFIG_CLOCK_CONTROL_NRF2) */ +#endif /* defined(CONFIG_CLOCK_CONTROL_NRFS) */ static int timer_init(void) { diff --git a/samples/bluetooth/direction_finding_connectionless_tx/prj.conf b/samples/bluetooth/direction_finding_connectionless_tx/prj.conf index e583e35e45b2..502e5ac8ce03 100644 --- a/samples/bluetooth/direction_finding_connectionless_tx/prj.conf +++ b/samples/bluetooth/direction_finding_connectionless_tx/prj.conf @@ -17,3 +17,6 @@ CONFIG_BT_DF_CONNECTIONLESS_CTE_TX=y # Disable AoD Feature (antenna switching) in Tx mode in Host CONFIG_BT_DF_CTE_TX_AOD=n + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/direction_finding_peripheral/prj.conf b/samples/bluetooth/direction_finding_peripheral/prj.conf index 1da0905df11d..e20aeed73411 100644 --- a/samples/bluetooth/direction_finding_peripheral/prj.conf +++ b/samples/bluetooth/direction_finding_peripheral/prj.conf @@ -19,3 +19,6 @@ CONFIG_BT_DF_CONNECTION_CTE_RSP=y # Disable AoD Feature (antenna switching) in Tx mode in Host CONFIG_BT_DF_CTE_TX_AOD=n + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/fast_pair/locator_tag/configuration/prj.conf b/samples/bluetooth/fast_pair/locator_tag/configuration/prj.conf index 5ee516cc6625..cb80fdc10ac3 100644 --- a/samples/bluetooth/fast_pair/locator_tag/configuration/prj.conf +++ b/samples/bluetooth/fast_pair/locator_tag/configuration/prj.conf @@ -108,3 +108,6 @@ CONFIG_BT_FAST_PAIR_FMDN_TX_POWER_CORRECTION_VAL=-15 # Fast Pair use case configuration CONFIG_BT_FAST_PAIR_USE_CASE_LOCATOR_TAG=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/iso_combined_bis_and_cis/prj.conf b/samples/bluetooth/iso_combined_bis_and_cis/prj.conf index 4a227bf3cf4c..c4c053c5b368 100644 --- a/samples/bluetooth/iso_combined_bis_and_cis/prj.conf +++ b/samples/bluetooth/iso_combined_bis_and_cis/prj.conf @@ -27,3 +27,6 @@ CONFIG_BT_CTLR_SDC_CENTRAL_ACL_EVENT_SPACING_DEFAULT=10000 CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=2500 CONFIG_BT_CTLR_SDC_BIG_RESERVED_TIME_US=5000 CONFIG_BT_CTLR_SDC_CIG_RESERVED_TIME_US=5000 + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/iso_time_sync/prj.conf b/samples/bluetooth/iso_time_sync/prj.conf index 11bfe0bdbc1c..3801cbd86fe2 100644 --- a/samples/bluetooth/iso_time_sync/prj.conf +++ b/samples/bluetooth/iso_time_sync/prj.conf @@ -29,3 +29,6 @@ CONFIG_CONSOLE=y CONFIG_CONSOLE_SUBSYS=y CONFIG_CONSOLE_HANDLER=y CONFIG_CONSOLE_GETCHAR=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/mesh/light_ctrl/prj.conf b/samples/bluetooth/mesh/light_ctrl/prj.conf index 879d1ff995f0..e5d483b2cbd6 100644 --- a/samples/bluetooth/mesh/light_ctrl/prj.conf +++ b/samples/bluetooth/mesh/light_ctrl/prj.conf @@ -63,3 +63,6 @@ CONFIG_BT_MESH_LIGHT_CTRL_SRV_TIME_PROLONG=3 CONFIG_BT_MESH_LIGHT_CTRL_SRV_RESUME_DELAY=30 CONFIG_BT_MESH_SCENE_SRV=y CONFIG_BT_MESH_SENSOR_SRV=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c b/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c index dd34ab78c26d..07056eda7675 100644 --- a/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c +++ b/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include "presets.h" @@ -702,8 +702,7 @@ void nrf_auraconfig_main(void) LOG_DBG("Main started"); - ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1); - ERR_CHK_MSG(ret, "Failed to set HFCLK divider"); + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); ret = led_init(); ERR_CHK_MSG(ret, "Failed to initialize LED module"); diff --git a/samples/bluetooth/nrf_dm/prj.conf b/samples/bluetooth/nrf_dm/prj.conf index 8b994dab8107..964eb1764c4e 100644 --- a/samples/bluetooth/nrf_dm/prj.conf +++ b/samples/bluetooth/nrf_dm/prj.conf @@ -36,3 +36,6 @@ CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_DK_LIBRARY=y CONFIG_DM_HIGH_PRECISION_CALC=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/bluetooth/peripheral_lbs/prj.conf b/samples/bluetooth/peripheral_lbs/prj.conf index 63a681872413..13c90983ef26 100644 --- a/samples/bluetooth/peripheral_lbs/prj.conf +++ b/samples/bluetooth/peripheral_lbs/prj.conf @@ -15,3 +15,6 @@ CONFIG_BT_LBS_POLL_BUTTON=y CONFIG_DK_LIBRARY=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/cellular/at_client/src/main.c b/samples/cellular/at_client/src/main.c index f4b567e67013..c729275f418d 100644 --- a/samples/cellular/at_client/src/main.c +++ b/samples/cellular/at_client/src/main.c @@ -15,12 +15,21 @@ /* To strictly comply with UART timing, enable external XTAL oscillator */ void enable_xtal(void) { - struct onoff_manager *clk_mgr; static struct onoff_client cli = {}; +#if defined(CONFIG_CLOCK_CONTROL_NRF) + struct onoff_manager *clk_mgr; + clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); sys_notify_init_spinwait(&cli.notify); (void)onoff_request(clk_mgr, &cli); +#else + const struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + sys_notify_init_spinwait(&cli.notify); + (void)nrf_clock_control_request(dev, &cli); +#endif } int main(void) diff --git a/samples/esb/esb_monitor/src/main.c b/samples/esb/esb_monitor/src/main.c index e629b68495fc..2527cf63389a 100644 --- a/samples/esb/esb_monitor/src/main.c +++ b/samples/esb/esb_monitor/src/main.c @@ -15,7 +15,7 @@ #include #include #include -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) #include #endif #if NRF54L_ERRATA_20_PRESENT @@ -113,14 +113,16 @@ void event_handler(struct esb_evt const *event) } } -#if defined(CONFIG_CLOCK_CONTROL_NRF) +#if defined(CONFIG_CLOCK_CONTROL_NRFX) int clocks_start(void) { int err; int res; - struct onoff_manager *clk_mgr; struct onoff_client clk_cli; +#if defined(CONFIG_CLOCK_CONTROL_NRF) + struct onoff_manager *clk_mgr; + clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); if (!clk_mgr) { LOG_ERR("Unable to get the Clock manager"); @@ -130,6 +132,19 @@ int clocks_start(void) sys_notify_init_spinwait(&clk_cli.notify); err = onoff_request(clk_mgr, &clk_cli); +#else + const static struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + if (!dev) { + LOG_ERR("Unable to get the Clock device"); + return -ENXIO; + } + + sys_notify_init_spinwait(&clk_cli.notify); + + err = nrf_clock_control_request(dev, NULL, &clk_cli); +#endif if (err < 0) { LOG_ERR("Clock request failed: %d", err); return err; @@ -158,7 +173,7 @@ int clocks_start(void) return 0; } -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) int clocks_start(void) { @@ -196,7 +211,7 @@ int clocks_start(void) #else BUILD_ASSERT(false, "No Clock Control driver"); -#endif /* defined(CONFIG_CLOCK_CONTROL_NRF2) */ +#endif /* defined(CONFIG_CLOCK_CONTROL_NRFS) */ int esb_initialize(void) { diff --git a/samples/esb/esb_prx/src/main.c b/samples/esb/esb_prx/src/main.c index acdf28e203b1..6a025b7ce33b 100644 --- a/samples/esb/esb_prx/src/main.c +++ b/samples/esb/esb_prx/src/main.c @@ -16,7 +16,7 @@ #include #include #include -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) #include #endif #if NRF54L_ERRATA_20_PRESENT @@ -74,13 +74,14 @@ void event_handler(struct esb_evt const *event) } } -#if defined(CONFIG_CLOCK_CONTROL_NRF) +#if defined(CONFIG_CLOCK_CONTROL_NRFX) int clocks_start(void) { int err; int res; - struct onoff_manager *clk_mgr; struct onoff_client clk_cli; +#if defined(CONFIG_CLOCK_CONTROL_NRF) + struct onoff_manager *clk_mgr; clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); if (!clk_mgr) { @@ -91,6 +92,20 @@ int clocks_start(void) sys_notify_init_spinwait(&clk_cli.notify); err = onoff_request(clk_mgr, &clk_cli); +#else + const static struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + + if (!dev) { + LOG_ERR("Unable to get the Clock device"); + return -ENXIO; + } + + sys_notify_init_spinwait(&clk_cli.notify); + + err = nrf_clock_control_request(dev, NULL, &clk_cli); +#endif if (err < 0) { LOG_ERR("Clock request failed: %d", err); return err; @@ -119,7 +134,7 @@ int clocks_start(void) return 0; } -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) int clocks_start(void) { @@ -157,7 +172,7 @@ int clocks_start(void) #else BUILD_ASSERT(false, "No Clock Control driver"); -#endif /* defined(CONFIG_CLOCK_CONTROL_NRF2) */ +#endif /* defined(CONFIG_CLOCK_CONTROL_NRFS) */ int esb_initialize(void) { diff --git a/samples/esb/esb_ptx/src/main.c b/samples/esb/esb_ptx/src/main.c index 9b84ade02df2..1adc88c07475 100644 --- a/samples/esb/esb_ptx/src/main.c +++ b/samples/esb/esb_ptx/src/main.c @@ -16,7 +16,7 @@ #include #include #include -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) #include #endif #if NRF54L_ERRATA_20_PRESENT @@ -64,13 +64,14 @@ void event_handler(struct esb_evt const *event) } } -#if defined(CONFIG_CLOCK_CONTROL_NRF) +#if defined(CONFIG_CLOCK_CONTROL_NRFX) int clocks_start(void) { int err; int res; - struct onoff_manager *clk_mgr; struct onoff_client clk_cli; +#if defined(CONFIG_CLOCK_CONTROL_NRF) + struct onoff_manager *clk_mgr; clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); if (!clk_mgr) { @@ -81,6 +82,20 @@ int clocks_start(void) sys_notify_init_spinwait(&clk_cli.notify); err = onoff_request(clk_mgr, &clk_cli); +#else + const static struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + + if (!dev) { + LOG_ERR("Unable to get the Clock device"); + return -ENXIO; + } + + sys_notify_init_spinwait(&clk_cli.notify); + + err = nrf_clock_control_request(dev, NULL, &clk_cli); +#endif if (err < 0) { LOG_ERR("Clock request failed: %d", err); return err; @@ -109,7 +124,7 @@ int clocks_start(void) return 0; } -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) int clocks_start(void) { @@ -146,7 +161,7 @@ int clocks_start(void) #else BUILD_ASSERT(false, "No Clock Control driver"); -#endif /* defined(CONFIG_CLOCK_CONTROL_NRF2) */ +#endif /* defined(CONFIG_CLOCK_CONTROL_NRFS) */ int esb_initialize(void) { diff --git a/samples/matter/lock/prj.conf b/samples/matter/lock/prj.conf index c12ae281bc3a..7e8c0b460df9 100644 --- a/samples/matter/lock/prj.conf +++ b/samples/matter/lock/prj.conf @@ -48,3 +48,6 @@ CONFIG_CHIP_APP_LOG_LEVEL=3 # Enable Factory Data feature CONFIG_CHIP_FACTORY_DATA=y CONFIG_CHIP_FACTORY_DATA_BUILD=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/openthread/cli/prj.conf b/samples/openthread/cli/prj.conf index 65cdc43a201f..534de4e19da4 100644 --- a/samples/openthread/cli/prj.conf +++ b/samples/openthread/cli/prj.conf @@ -20,3 +20,6 @@ CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000 CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y CONFIG_GPIO_SHELL=y + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/openthread/coap_client/prj.conf b/samples/openthread/coap_client/prj.conf index bb9adfd48e35..32bef6bea700 100644 --- a/samples/openthread/coap_client/prj.conf +++ b/samples/openthread/coap_client/prj.conf @@ -38,3 +38,6 @@ CONFIG_FPU=y # Increase main stack size to meet networking requirements CONFIG_MAIN_STACK_SIZE=4096 + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/openthread/coap_server/prj.conf b/samples/openthread/coap_server/prj.conf index f8eb22fcff42..7ba0383ea51a 100644 --- a/samples/openthread/coap_server/prj.conf +++ b/samples/openthread/coap_server/prj.conf @@ -30,3 +30,6 @@ CONFIG_FPU=y # Increase main stack size to meet networking requirements CONFIG_MAIN_STACK_SIZE=4096 + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/openthread/coprocessor/prj.conf b/samples/openthread/coprocessor/prj.conf index ea93eb5635cb..caaccb13392f 100644 --- a/samples/openthread/coprocessor/prj.conf +++ b/samples/openthread/coprocessor/prj.conf @@ -22,3 +22,6 @@ CONFIG_USE_SEGGER_RTT=n # Disable GPIO CONFIG_GPIO=n + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/peripheral/802154_phy_test/prj.conf b/samples/peripheral/802154_phy_test/prj.conf index cbf71a1d26ed..f9a0cf5509e7 100644 --- a/samples/peripheral/802154_phy_test/prj.conf +++ b/samples/peripheral/802154_phy_test/prj.conf @@ -34,3 +34,6 @@ CONFIG_SHELL_VT100_COLORS=n CONFIG_DK_LIBRARY=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/samples/peripheral/radio_test/src/main.c b/samples/peripheral/radio_test/src/main.c index 1becef74d6cc..241efc568657 100644 --- a/samples/peripheral/radio_test/src/main.c +++ b/samples/peripheral/radio_test/src/main.c @@ -11,7 +11,7 @@ #if defined(NRF54L15_XXAA) #include #endif /* defined(NRF54L15_XXAA) */ -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) #include #endif #include @@ -25,13 +25,14 @@ /* Empty trim value */ #define TRIM_VALUE_EMPTY 0xFFFFFFFF -#if defined(CONFIG_CLOCK_CONTROL_NRF) +#if defined(CONFIG_CLOCK_CONTROL_NRFX) static void clock_init(void) { int err; int res; - struct onoff_manager *clk_mgr; struct onoff_client clk_cli; +#if defined(CONFIG_CLOCK_CONTROL_NRF) + struct onoff_manager *clk_mgr; clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); if (!clk_mgr) { @@ -42,6 +43,20 @@ static void clock_init(void) sys_notify_init_spinwait(&clk_cli.notify); err = onoff_request(clk_mgr, &clk_cli); +#else + static const struct device *dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); + + if (!dev) { + printk("Unable to get the Clock device\n"); + return; + } + + sys_notify_init_spinwait(&clk_cli.notify); + + err = nrf_clock_control_request(dev, NULL, &clk_cli); +#endif if (err < 0) { printk("Clock request failed: %d\n", err); return; @@ -69,7 +84,7 @@ static void clock_init(void) printk("Clock has started\n"); } -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) static void clock_init(void) { diff --git a/samples/wifi/ble_coex/src/main.c b/samples/wifi/ble_coex/src/main.c index 654a67f72574..3383c8a7b534 100644 --- a/samples/wifi/ble_coex/src/main.c +++ b/samples/wifi/ble_coex/src/main.c @@ -17,7 +17,7 @@ LOG_MODULE_REGISTER(ble_coex, CONFIG_LOG_DEFAULT_LEVEL); #include #if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) -#include +#include #endif #include #include @@ -361,8 +361,9 @@ int main(void) net_mgmt_add_event_callback(&net_addr_mgmt_cb); -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) - nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1); +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); #endif LOG_INF("Starting %s with CPU frequency: %d MHz", CONFIG_BOARD, SystemCoreClock/MHZ(1)); diff --git a/samples/wifi/shell/src/main.c b/samples/wifi/shell/src/main.c index 73a08d9d49f3..d7646e4c34a0 100644 --- a/samples/wifi/shell/src/main.c +++ b/samples/wifi/shell/src/main.c @@ -11,7 +11,7 @@ #include #include #if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) -#include +#include #endif #include #include @@ -49,10 +49,10 @@ int init_usb(void) int main(void) { -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) /* For now hardcode to 128MHz */ - nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, - NRF_CLOCK_HFCLK_DIV_1); + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); #endif printk("Starting %s with CPU frequency: %d MHz\n", CONFIG_BOARD, SystemCoreClock/MHZ(1)); diff --git a/samples/wifi/thread_coex/src/ot_coex_functions.c b/samples/wifi/thread_coex/src/ot_coex_functions.c index 4812862ac87e..f170c82213da 100644 --- a/samples/wifi/thread_coex/src/ot_coex_functions.c +++ b/samples/wifi/thread_coex/src/ot_coex_functions.c @@ -6,8 +6,9 @@ #include "ot_coex_functions.h" -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) -#include +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#include #endif bool is_ot_device_role_client; @@ -68,10 +69,10 @@ void wifi_mgmt_callback_functions(void) net_mgmt_add_event_callback(&net_addr_mgmt_cb); -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) /* For now hardcode to 128MHz */ - nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, - NRF_CLOCK_HFCLK_DIV_1); + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); #endif LOG_INF("Starting %s with CPU frequency: %d MHz", CONFIG_BOARD, SystemCoreClock/MHZ(1)); diff --git a/samples/wifi/throughput/src/main.c b/samples/wifi/throughput/src/main.c index 231f20687841..be79fb028f62 100644 --- a/samples/wifi/throughput/src/main.c +++ b/samples/wifi/throughput/src/main.c @@ -10,17 +10,18 @@ #include #include -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) -#include +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#include #endif #include int main(void) { -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) /* For now hardcode to 128MHz */ - nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, - NRF_CLOCK_HFCLK_DIV_1); + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); #endif printk("Starting %s with CPU frequency: %d MHz\n", CONFIG_BOARD, SystemCoreClock/MHZ(1)); diff --git a/samples/wifi/wfa_qt_app/src/qt_app_main.c b/samples/wifi/wfa_qt_app/src/qt_app_main.c index ba6e7a1a6ae4..41fece58a900 100644 --- a/samples/wifi/wfa_qt_app/src/qt_app_main.c +++ b/samples/wifi/wfa_qt_app/src/qt_app_main.c @@ -10,8 +10,9 @@ #include #include -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) -#include +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#include #endif #include #include @@ -38,10 +39,10 @@ int main(void) struct in_addr addr = {0}; struct in_addr mask; -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) /* For now hardcode to 128MHz */ - nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, - NRF_CLOCK_HFCLK_DIV_1); + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); #endif printk("Starting %s with CPU frequency: %d MHz\n", CONFIG_BOARD, SystemCoreClock/MHZ(1)); diff --git a/subsys/mpsl/clock_ctrl/Kconfig b/subsys/mpsl/clock_ctrl/Kconfig index 46c9eda80db1..b24ec0b131ac 100644 --- a/subsys/mpsl/clock_ctrl/Kconfig +++ b/subsys/mpsl/clock_ctrl/Kconfig @@ -18,7 +18,7 @@ if MPSL_USE_EXTERNAL_CLOCK_CONTROL config MPSL_EXT_CLK_CTRL_CLOCK_REQUEST_WAIT_TIMEOUT_MS int "Timeout value that MPSL will wait for request to be completed by a clock driver, in milliseconds" - default CLOCK_CONTROL_NRF_LFCLK_CLOCK_TIMEOUT_MS if CLOCK_CONTROL_NRF_LFCLK + default CLOCK_CONTROL_NRFS_LFCLK_CLOCK_TIMEOUT_MS if CLOCK_CONTROL_NRFS_LFCLK default 1000 help The option specifies a timeout value that MPSL clock control integration layer diff --git a/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c b/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c index 7fbec7a99248..f72bfe05daca 100644 --- a/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c +++ b/subsys/mpsl/clock_ctrl/mpsl_clock_ctrl.c @@ -218,7 +218,9 @@ static bool m_hfclk_is_running(void) unsigned int key = irq_lock(); - (void)nrfx_clock_is_running(NRF_CLOCK_DOMAIN_HFCLK, &type); + COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nrfx_clock_hfclk_running_check), + (nrfx_clock_xo_running_check))(&type); irq_unlock(key); @@ -246,7 +248,9 @@ static bool m_lfclk_calibration_is_enabled(void) static int32_t m_lfclk_request(void) { +#if defined(CONFIG_CLOCK_CONTROL_NRF) struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_LF); +#endif int32_t err; /* Workaround for NRFX-6865. The nrf clock control as well as nrfx_clock doesn't enable @@ -259,7 +263,12 @@ static int32_t m_lfclk_request(void) sys_notify_init_callback(&m_lfclk_state.cli.notify, m_clock_request_cb); (void)k_sem_init(&m_lfclk_state.sem, 0, 1); +#if defined(CONFIG_CLOCK_CONTROL_NRF) err = onoff_request(mgr, &m_lfclk_state.cli); +#else + err = nrf_clock_control_request(DEVICE_DT_GET_ONE(nordic_nrf_clock_lfclk), NULL, + &m_lfclk_state.cli); +#endif if (err < 0) { return err; } @@ -271,11 +280,17 @@ static int32_t m_lfclk_request(void) static int32_t m_lfclk_release(void) { - struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_LF); int32_t err; +#if defined(CONFIG_CLOCK_CONTROL_NRFX) + struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_LF); /* In case there is other ongoing request, cancel it. */ err = onoff_cancel_or_release(mgr, &m_lfclk_state.cli); +#else + /* In case there is other ongoing request, cancel it. */ + err = nrf_clock_control_cancel_or_release(DEVICE_DT_GET_ONE(nordic_nrf_clock_lfclk), NULL, + &m_lfclk_state.cli); +#endif if (err < 0) { return err; } @@ -292,7 +307,7 @@ static int32_t m_lfclk_release(void) return 0; } -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) /* Minimum accuracy of LFCLK that is required by Bluetooth Core Specification Version 6.1, Vol 6, * Part B, Section 4.2.2. @@ -322,7 +337,7 @@ static const struct nrf_clock_spec m_hfclk_specs = { static void m_lfclk_calibration_start(void) { - /* This function is not supported when CONFIG_CLOCK_CONTROL_NRF2 is set. + /* This function is not supported when CONFIG_CLOCK_CONTROL_NRFS is set. * As of now MPSL does not use this API in this configuration. */ __ASSERT_NO_MSG(false); @@ -330,7 +345,7 @@ static void m_lfclk_calibration_start(void) static bool m_lfclk_calibration_is_enabled(void) { - /* This function should not be called from MPSL if CONFIG_CLOCK_CONTROL_NRF2 is set */ + /* This function should not be called from MPSL if CONFIG_CLOCK_CONTROL_NRFS is set */ __ASSERT_NO_MSG(false); return false; } @@ -511,7 +526,7 @@ static mpsl_clock_hfclk_ctrl_source_t m_nrf_hfclk_ctrl_data = { .hfclk_is_running = m_hfclk_is_running, }; -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) static int m_lfclk_accuracy_get(void) { int err; @@ -536,7 +551,7 @@ static int m_lfclk_accuracy_get(void) return m_lfclk_specs.accuracy; } -#endif /* CONFIG_CLOCK_CONTROL_NRF2 */ +#endif /* CONFIG_CLOCK_CONTROL_NRFS */ int32_t mpsl_clock_ctrl_init(void) { @@ -549,13 +564,13 @@ int32_t mpsl_clock_ctrl_init(void) } #endif /* CONFIG_MPSL_EXT_CLK_CTRL_NVM_CLOCK_REQUEST */ -#if defined(CONFIG_CLOCK_CONTROL_NRF) +#if defined(CONFIG_CLOCK_CONTROL_NRFX) #if DT_NODE_EXISTS(DT_NODELABEL(hfxo)) m_nrf_hfclk_ctrl_data.startup_time_us = z_nrf_clock_bt_ctlr_hf_get_startup_time_us(); #else m_nrf_hfclk_ctrl_data.startup_time_us = CONFIG_MPSL_HFCLK_LATENCY; #endif /* DT_NODE_EXISTS(DT_NODELABEL(hfxo)) */ -#elif defined(CONFIG_CLOCK_CONTROL_NRF2) +#elif defined(CONFIG_CLOCK_CONTROL_NRFS) #if DT_NODE_HAS_STATUS(HFCLK_LABEL, okay) && DT_NODE_HAS_COMPAT(HFCLK_LABEL, nordic_nrf54h_hfxo) uint32_t startup_time_us; @@ -581,9 +596,9 @@ int32_t mpsl_clock_ctrl_init(void) #error "Unsupported HFCLK statup time get operation" #endif /* CONFIG_CLOCK_CONTROL_NRF */ -#if defined(CONFIG_CLOCK_CONTROL_NRF2) +#if defined(CONFIG_CLOCK_CONTROL_NRFS) m_nrf_lfclk_ctrl_data.accuracy_ppm = m_lfclk_accuracy_get(); -#endif /* CONFIG_CLOCK_CONTROL_NRF2 */ +#endif /* CONFIG_CLOCK_CONTROL_NRFS */ return mpsl_clock_ctrl_source_register(&m_nrf_lfclk_ctrl_data, &m_nrf_hfclk_ctrl_data); } diff --git a/subsys/net/lib/nrf70_fw_ext/ext_fw_load.c b/subsys/net/lib/nrf70_fw_ext/ext_fw_load.c index 6a92c74b4687..48a394ec35cc 100644 --- a/subsys/net/lib/nrf70_fw_ext/ext_fw_load.c +++ b/subsys/net/lib/nrf70_fw_ext/ext_fw_load.c @@ -14,8 +14,9 @@ #include #if defined(CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP) && defined(CONFIG_NORDIC_QSPI_NOR) #include -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) -#include +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#include #endif #endif /* CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP */ @@ -242,25 +243,22 @@ enum nrf_wifi_status nrf_wifi_fw_load(void *rpu_ctx) return status; } #elif CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) static nrf_clock_hfclk_div_t saved_divider = NRF_CLOCK_HFCLK_DIV_1; #endif static void enable_xip_and_set_cpu_freq(void) { -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) /* Save the current divider */ - saved_divider = nrfx_clock_divider_get(NRF_CLOCK_DOMAIN_HFCLK); + saved_divider = nrfx_clock_hfclk_divider_get(); if (saved_divider == NRF_CLOCK_HFCLK_DIV_2) { LOG_DBG("CPU frequency is already set to 64 MHz (DIV_2)"); } else { /* Set CPU frequency to 64MHz (DIV_2) */ - int ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_2); - - if (ret != 0) { - LOG_ERR("Failed to set CPU frequency: %d", ret); - return; - } + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_2); LOG_DBG("CPU frequency set to 64 MHz"); } @@ -285,18 +283,15 @@ static void disable_xip_and_restore_cpu_freq(void) LOG_DBG("XIP disabled"); #endif -#if NRFX_CLOCK_ENABLED && (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) +#if defined(NRFX_CLOCK_HFCLK) && \ + (defined(CLOCK_FEATURE_HFCLK_DIVIDE_PRESENT) || NRF_CLOCK_HAS_HFCLK192M) /* Restore CPU frequency to the saved value */ - nrf_clock_hfclk_div_t current_divider = nrfx_clock_divider_get(NRF_CLOCK_DOMAIN_HFCLK); + nrf_clock_hfclk_div_t current_divider = nrfx_clock_hfclk_divider_get(); if (current_divider != saved_divider) { - int ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, saved_divider); + nrfx_clock_hfclk_divider_set(saved_divider); - if (ret != 0) { - LOG_ERR("Failed to restore CPU frequency: %d", ret); - } else { - LOG_DBG("CPU frequency restored to original value"); - } + LOG_DBG("CPU frequency restored to original value"); } else { LOG_DBG("CPU frequency is already at the saved value"); } diff --git a/subsys/nfc/lib/platform.c b/subsys/nfc/lib/platform.c index 36a1abf0029d..4543330225cf 100644 --- a/subsys/nfc/lib/platform.c +++ b/subsys/nfc/lib/platform.c @@ -7,10 +7,10 @@ #include #include -#if IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) +#if IS_ENABLED(CONFIG_CLOCK_CONTROL_NRFX) #include #include -#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF2) +#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRFS) #include #include #endif /* IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) */ @@ -49,8 +49,12 @@ LOG_MODULE_REGISTER(nfc_platform, CONFIG_NFC_PLATFORM_LOG_LEVEL); #if IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) static struct onoff_manager *hf_mgr; -#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF2) +#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRFS) static const struct device *clk_dev = DEVICE_DT_GET(DT_NODELABEL(hfxo)); +#elif defined(CONFIG_CLOCK_CONTROL_NRFX_HFCLK) || defined(CONFIG_CLOCK_CONTROL_NRFX_XO) +static const struct device *clk_dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); #else BUILD_ASSERT(false, "No Clock Control driver"); #endif /* IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) */ @@ -248,7 +252,8 @@ void nfc_platform_event_handler(nrfx_nfct_evt_t const *event) #if IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) sys_notify_init_callback(&cli.notify, clock_handler); err = onoff_request(hf_mgr, &cli); -#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF2) +#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRFS) || defined(CONFIG_CLOCK_CONTROL_NRFX_HFCLK) || \ + defined(CONFIG_CLOCK_CONTROL_NRFX_XO) sys_notify_init_callback(&cli.notify, clock_handler); err = nrf_clock_control_request(clk_dev, NULL, &cli); #endif /* IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) */ @@ -259,7 +264,8 @@ void nfc_platform_event_handler(nrfx_nfct_evt_t const *event) #if IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) err = onoff_cancel_or_release(hf_mgr, &cli); -#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF2) +#elif IS_ENABLED(CONFIG_CLOCK_CONTROL_NRFS) || defined(CONFIG_CLOCK_CONTROL_NRFX_HFCLK) || \ + defined(CONFIG_CLOCK_CONTROL_NRFX_XO) err = nrf_clock_control_cancel_or_release(clk_dev, NULL, &cli); #endif /* IS_ENABLED(CONFIG_CLOCK_CONTROL_NRF) */ __ASSERT_NO_MSG(err >= 0); diff --git a/tests/benchmarks/current_consumption/nrf54l_errata30_idle/prj.conf b/tests/benchmarks/current_consumption/nrf54l_errata30_idle/prj.conf index 056b3a044ff2..3c42e70c56d2 100644 --- a/tests/benchmarks/current_consumption/nrf54l_errata30_idle/prj.conf +++ b/tests/benchmarks/current_consumption/nrf54l_errata30_idle/prj.conf @@ -3,7 +3,7 @@ CONFIG_UART_CONSOLE=n CONFIG_SERIAL=n # Enable periodic HFINT calibration to activate Errata 30 workaround -CONFIG_CLOCK_CONTROL_NRF_HFINT_CALIBRATION=y +CONFIG_CLOCK_CONTROL_NRFX_HFINT_CALIBRATION=y # Make calibration period low so it impacts power consumption. # This should be much higher for actual application. -CONFIG_CLOCK_CONTROL_NRF_HFINT_CALIBRATION_PERIOD=300 +CONFIG_CLOCK_CONTROL_NRFX_HFINT_CALIBRATION_PERIOD=300 diff --git a/tests/benchmarks/peripheral_load/src/clock_thread.c b/tests/benchmarks/peripheral_load/src/clock_thread.c index f995a2a391e8..59fd168ff023 100644 --- a/tests/benchmarks/peripheral_load/src/clock_thread.c +++ b/tests/benchmarks/peripheral_load/src/clock_thread.c @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#ifdef CONFIG_CLOCK_CONTROL_NRF2 +#ifdef CONFIG_CLOCK_CONTROL_NRFS #include "common.h" #include diff --git a/tests/bluetooth/iso/src/main.c b/tests/bluetooth/iso/src/main.c index 7b1733b7573e..6156ecbcf19a 100644 --- a/tests/bluetooth/iso/src/main.c +++ b/tests/bluetooth/iso/src/main.c @@ -6,21 +6,15 @@ #include #include "iso_broadcast_src.h" #include "iso_broadcast_sink.h" -#include "nrfx_clock.h" +#include "nrfx_clock_hfclk.h" #include LOG_MODULE_REGISTER(main, CONFIG_ISO_TEST_LOG_LEVEL); static int hfclock_config_and_start(void) { - int ret; - /* Use this to turn on 128 MHz clock for cpu_app */ - ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1); - - if (ret) { - return ret; - } + nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1); nrf_clock_hfclk_t clk_src; diff --git a/tests/drivers/grtc/grtc_clk_output/src/main.c b/tests/drivers/grtc/grtc_clk_output/src/main.c index 661c816a9039..8d03c4d20dc3 100644 --- a/tests/drivers/grtc/grtc_clk_output/src/main.c +++ b/tests/drivers/grtc/grtc_clk_output/src/main.c @@ -37,35 +37,47 @@ static void clock_started_callback(struct onoff_manager *mgr, #if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll16m)) #define NODE_HFCLK DT_NODELABEL(fll16m) #define HFCLK_FREQUENCY DT_PROP_OR(NODE_HFCLK, frequency, 0) - -static const struct device *fll16m = DEVICE_DT_GET(NODE_HFCLK); -static const struct nrf_clock_spec hfclk_spec = { +static const struct device *clk_dev = DEVICE_DT_GET(NODE_HFCLK); +static const struct nrf_clock_spec fll16m_spec = { .frequency = HFCLK_FREQUENCY, }; +static const struct nrf_clock_spec *clk_spec = &fll16m_spec; + #elif defined(CONFIG_SOC_SERIES_NRF54LX) +#if defined(CONFIG_CLOCK_CONTROL_NRF) static struct onoff_manager *clk_mgr; +#else +static const struct device *clk_dev = DEVICE_DT_GET_ONE(COND_CODE_1(NRF_CLOCK_HAS_HFCLK, + (nordic_nrf_clock_hfclk), + (nordic_nrf_clock_xo))); +static const struct nrf_clock_spec *clk_spec; +#endif #endif static int hf_clock_request(void) { sys_notify_init_callback(&clk_cli.notify, clock_started_callback); -#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll16m)) - return nrf_clock_control_request(fll16m, &hfclk_spec, &clk_cli); -#elif defined(CONFIG_SOC_SERIES_NRF54LX) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll16m)) || defined(CONFIG_SOC_SERIES_NRF54LX) +#if defined(CONFIG_CLOCK_CONTROL_NRF) clock_control_subsys_t subsys = CLOCK_CONTROL_NRF_SUBSYS_HF; clk_mgr = z_nrf_clock_control_get_onoff(subsys); return onoff_request(clk_mgr, &clk_cli); +#else + return nrf_clock_control_request(clk_dev, clk_spec, &clk_cli); +#endif #endif return -ENOTSUP; } static int hf_clock_release(void) { -#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll16m)) - return nrf_clock_control_release(fll16m, &hfclk_spec); -#elif defined(CONFIG_SOC_SERIES_NRF54LX) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll16m)) || defined(CONFIG_SOC_SERIES_NRF54LX) +#if defined(CONFIG_CLOCK_CONTROL_NRF) return onoff_release(clk_mgr); +#else + return nrf_clock_control_release(clk_dev, clk_spec); +#endif #endif return -ENOTSUP; } diff --git a/tests/samples/bluetooth/samples_test_app/prj.conf b/tests/samples/bluetooth/samples_test_app/prj.conf index f773d06035b5..84c583022f69 100644 --- a/tests/samples/bluetooth/samples_test_app/prj.conf +++ b/tests/samples/bluetooth/samples_test_app/prj.conf @@ -28,3 +28,6 @@ CONFIG_SETTINGS=y CONFIG_SETTINGS_FCB=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 + +# Enable old clock_control_nrf api implementation for mpsl to use +CONFIG_CLOCK_CONTROL_NRF=y diff --git a/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.conf b/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.conf index 665541934fd0..fe24c467b1cd 100644 --- a/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.conf +++ b/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.conf @@ -1,4 +1,3 @@ CONFIG_ZTEST=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=n +CONFIG_CLOCK_CONTROL_NRFX_K32SRC_RC_CALIBRATION=n CONFIG_TEST_NRF_HF_STARTUP_TIME_US=1000 diff --git a/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.overlay b/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.overlay new file mode 100644 index 000000000000..cdeeb80d8d44 --- /dev/null +++ b/tests/zephyr/drivers/clock_control/clock_control_api/nrf_lfclk_rc.overlay @@ -0,0 +1,3 @@ +&lfclk { + k32src = "rc"; +}; \ No newline at end of file diff --git a/tests/zephyr/drivers/clock_control/clock_control_api/testcase.yaml b/tests/zephyr/drivers/clock_control/clock_control_api/testcase.yaml index a35f4251e9d5..01911e75f58a 100644 --- a/tests/zephyr/drivers/clock_control/clock_control_api/testcase.yaml +++ b/tests/zephyr/drivers/clock_control/clock_control_api/testcase.yaml @@ -17,4 +17,6 @@ common: tests: nrf.extended.drivers.clock.clock_control_nrf5: {} nrf.extended.drivers.clock.clock_control_nrf5_lfclk_rc: - extra_args: EXTRA_CONF_FILE="nrf_lfclk_rc.conf" + extra_args: + - EXTRA_CONF_FILE="nrf_lfclk_rc.conf" + - EXTRA_DTC_OVERLAY_FILE="nrf_lfclk_rc.overlay" diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_calibration/clock_calibration.overlay b/tests/zephyr/drivers/clock_control/nrf_clock_calibration/clock_calibration.overlay new file mode 100644 index 000000000000..cdeeb80d8d44 --- /dev/null +++ b/tests/zephyr/drivers/clock_control/nrf_clock_calibration/clock_calibration.overlay @@ -0,0 +1,3 @@ +&lfclk { + k32src = "rc"; +}; \ No newline at end of file diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_calibration/prj.conf b/tests/zephyr/drivers/clock_control/nrf_clock_calibration/prj.conf index 5c7bfc52ad78..ad2e4f42b3a2 100644 --- a/tests/zephyr/drivers/clock_control/nrf_clock_calibration/prj.conf +++ b/tests/zephyr/drivers/clock_control/nrf_clock_calibration/prj.conf @@ -1,12 +1,11 @@ CONFIG_ZTEST=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y -CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=1 -CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_TEMP_DIFF=2 -CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_PERIOD=150 -CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_DEBUG=y -CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_LF_ALWAYS_ON=n +CONFIG_CLOCK_CONTROL_NRFX_CALIBRATION_MAX_SKIP=1 +CONFIG_CLOCK_CONTROL_NRFX_CALIBRATION_TEMP_DIFF=2 +CONFIG_CLOCK_CONTROL_NRFX_CALIBRATION_PERIOD=150 +CONFIG_CLOCK_CONTROL_NRFX_CALIBRATION_DEBUG=y +CONFIG_CLOCK_CONTROL_NRFX_CALIBRATION_LF_ALWAYS_ON=n #disable temperature sensor, mock is used CONFIG_SENSOR=y CONFIG_TEMP_NRF5=n -CONFIG_CLOCK_CONTROL_NRF_USES_TEMP_SENSOR=n +CONFIG_CLOCK_CONTROL_NRFX_USES_TEMP_SENSOR=n diff --git a/tests/zephyr/drivers/clock_control/nrf_clock_calibration/testcase.yaml b/tests/zephyr/drivers/clock_control/nrf_clock_calibration/testcase.yaml index c2b6bb8d08ed..bec6d84e10d2 100644 --- a/tests/zephyr/drivers/clock_control/nrf_clock_calibration/testcase.yaml +++ b/tests/zephyr/drivers/clock_control/nrf_clock_calibration/testcase.yaml @@ -14,3 +14,4 @@ tests: integration_platforms: - nrf54ls05dk/nrf54ls05b/cpuapp timeout: 30 + extra_args: EXTRA_DTC_OVERLAY_FILE="clock_calibration.overlay" diff --git a/west.yml b/west.yml index 6da75b5f244e..22a6f66c9654 100644 --- a/west.yml +++ b/west.yml @@ -64,7 +64,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 0783923a766da87024851b71030e1f70dd404b60 + revision: pull/3495/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above