1 /*
2  * Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "device_subsys.h"
8 #include <zephyr/drivers/clock_control/esp32_clock_control.h>
9 
10 /* Test common modules among espressif SOCs*/
11 static const struct device_subsys_data subsys_data[] = {
12 	{.subsys = (void *) ESP32_LEDC_MODULE},
13 	{.subsys = (void *) ESP32_UART1_MODULE},
14 	{.subsys = (void *) ESP32_I2C0_MODULE},
15 #if !defined(CONFIG_SOC_SERIES_ESP32C2)
16 	{.subsys = (void *) ESP32_UHCI0_MODULE},
17 #endif
18 #if defined(CONFIG_SOC_SERIES_ESP32C3) || defined(CONFIG_SOC_SERIES_ESP32S2) || \
19 	defined(CONFIG_SOC_SERIES_ESP32S3)
20 	{.subsys = (void *) ESP32_TIMG1_MODULE},
21 #else
22 	{.subsys = (void *) ESP32_TIMG0_MODULE},
23 #endif
24 	{.subsys = (void *) ESP32_RNG_MODULE},
25 };
26 
27 static const struct device_data devices[] = {
28 	{
29 		.dev = DEVICE_DT_GET_ONE(espressif_esp32_rtc),
30 		.subsys_data =  subsys_data,
31 		.subsys_cnt = ARRAY_SIZE(subsys_data)
32 	}
33 };
34