1 /*
2  * Copyright (c) 2019, Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "device_subsys.h"
8 #include <zephyr/drivers/clock_control/nrf_clock_control.h>
9 
10 static const struct device_subsys_data subsys_data[] = {
11 	{
12 		.subsys = CLOCK_CONTROL_NRF_SUBSYS_HF,
13 		.startup_us =
14 			IS_ENABLED(CONFIG_SOC_SERIES_NRF91X) ?
15 				3000 : 500
16 	},
17 #ifndef CONFIG_SOC_NRF52832
18 	/* On nrf52832 LF clock cannot be stopped because it leads
19 	 * to RTC COUNTER register reset and that is unexpected by
20 	 * system clock which is disrupted and may hang in the test.
21 	 */
22 	{
23 		.subsys = CLOCK_CONTROL_NRF_SUBSYS_LF,
24 		.startup_us = (CLOCK_CONTROL_NRF_K32SRC ==
25 			NRF_CLOCK_LFCLK_RC) ? 1000 : 500000
26 	}
27 #endif /* !CONFIG_SOC_NRF52832 */
28 };
29 
30 static const struct device_data devices[] = {
31 	{
32 		.dev = DEVICE_DT_GET_ONE(nordic_nrf_clock),
33 		.subsys_data =  subsys_data,
34 		.subsys_cnt = ARRAY_SIZE(subsys_data)
35 	}
36 };
37