Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

CONFIG_CLOCK_CONTROL_MCHP_ASYNC_ON=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2025 Microchip Technology Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

&clock {
mclkperiph: mclkperiph {
compatible = "microchip,sam-d5x-e5x-mclkperiph";
#clock-cells = <1>;

sercom3 {
subsystem = <CLOCK_MCHP_MCLKPERIPH_ID_APBB_SERCOM3>;
mclk-en = <1>;
};
};

gclkperiph: gclkperiph {
compatible = "microchip,sam-d5x-e5x-gclkperiph";
#clock-cells = <1>;

sercom4 {
subsystem = <CLOCK_MCHP_GCLKPERIPH_ID_SERCOM4_CORE>;
gclkperiph-src = "gclk0";
gclkperiph-en = <1>;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2025 Microchip Technology Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#include "device_subsys.h"
#include <zephyr/drivers/clock_control/mchp_clock_sam_d5x_e5x.h>
#include <zephyr/dt-bindings/clock/mchp_sam_d5x_e5x_clock.h>

#define XOSC_STARTUP_US 500

static const struct device_subsys_data subsys_data[] = {
{.subsys = (void *)CLOCK_MCHP_MCLKPERIPH_ID_APBB_SERCOM3},
{.subsys = (void *)CLOCK_MCHP_GCLKPERIPH_ID_SERCOM4_CORE},
{
.subsys = (void *)CLOCK_MCHP_XOSC_ID_XOSC1,
.startup_us = XOSC_STARTUP_US,
},
{.subsys = (void *)CLOCK_MCHP_XOSC32K_ID_XOSC32K}};

static const struct device_data devices[] = {{.dev = DEVICE_DT_GET(DT_NODELABEL(clock)),
.subsys_data = subsys_data,
.subsys_cnt = ARRAY_SIZE(subsys_data)}};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ LOG_MODULE_REGISTER(test);
#include "esp32_device_subsys.h"
#elif DT_HAS_COMPAT_STATUS_OKAY(silabs_series_clock)
#include "silabs_device_subsys.h"
#elif DT_HAS_COMPAT_STATUS_OKAY(microchip_sam_d5x_e5x_clock)
#include "mchp_device_subsys.h"
#else
#error "Unsupported board"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ tests:
- xg27_dk2602a
- xg29_rb4412a
- bg29_rb4420a
- sam_e54_xpro
integration_platforms:
- esp32_devkitc/esp32/procpu
drivers.clock.clock_control_nrf5:
Expand Down