File tree Expand file tree Collapse file tree 5 files changed +59
-0
lines changed
tests/drivers/clock_control/clock_control_api Expand file tree Collapse file tree 5 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025 Microchip Technology Inc.
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ CONFIG_CLOCK_CONTROL_MCHP_ASYNC_ON=y
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Microchip Technology Inc.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ &clock {
8+ mclkperiph: mclkperiph {
9+ compatible = "microchip,sam-d5x-e5x-mclkperiph";
10+ #clock-cells = <1>;
11+
12+ sercom3 {
13+ subsystem = <CLOCK_MCHP_MCLKPERIPH_ID_APBB_SERCOM3>;
14+ mclk-en = <1>;
15+ };
16+ };
17+
18+ gclkperiph: gclkperiph {
19+ compatible = "microchip,sam-d5x-e5x-gclkperiph";
20+ #clock-cells = <1>;
21+
22+ sercom4 {
23+ subsystem = <CLOCK_MCHP_GCLKPERIPH_ID_SERCOM4_CORE>;
24+ gclkperiph-src = "gclk0";
25+ gclkperiph-en = <1>;
26+ };
27+ };
28+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 Microchip Technology Inc.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ #include "device_subsys.h"
8+ #include <zephyr/drivers/clock_control/mchp_clock_sam_d5x_e5x.h>
9+ #include <zephyr/dt-bindings/clock/mchp_sam_d5x_e5x_clock.h>
10+
11+ #define XOSC_STARTUP_US 500
12+
13+ static const struct device_subsys_data subsys_data [] = {
14+ {.subsys = (void * )CLOCK_MCHP_MCLKPERIPH_ID_APBB_SERCOM3 },
15+ {.subsys = (void * )CLOCK_MCHP_GCLKPERIPH_ID_SERCOM4_CORE },
16+ {
17+ .subsys = (void * )CLOCK_MCHP_XOSC_ID_XOSC1 ,
18+ .startup_us = XOSC_STARTUP_US ,
19+ },
20+ {.subsys = (void * )CLOCK_MCHP_XOSC32K_ID_XOSC32K }};
21+
22+ static const struct device_data devices [] = {{.dev = DEVICE_DT_GET (DT_NODELABEL (clock )),
23+ .subsys_data = subsys_data ,
24+ .subsys_cnt = ARRAY_SIZE (subsys_data )}};
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ LOG_MODULE_REGISTER(test);
1414#include "esp32_device_subsys.h"
1515#elif DT_HAS_COMPAT_STATUS_OKAY (silabs_series_clock )
1616#include "silabs_device_subsys.h"
17+ #elif DT_HAS_COMPAT_STATUS_OKAY (microchip_sam_d5x_e5x_clock )
18+ #include "mchp_device_subsys.h"
1719#else
1820#error "Unsupported board"
1921#endif
Original file line number Diff line number Diff line change 1414 - xg27_dk2602a
1515 - xg29_rb4412a
1616 - bg29_rb4420a
17+ - sam_e54_xpro
1718 integration_platforms :
1819 - esp32_devkitc/esp32/procpu
1920 drivers.clock.clock_control_nrf5 :
You can’t perform that action at this time.
0 commit comments