From 0c938de414afc2e68dff2aa718c3048c200c8831 Mon Sep 17 00:00:00 2001 From: Tony Han Date: Tue, 12 Sep 2023 10:59:50 +0800 Subject: [PATCH] drivers: clk: sam: update to support slow clock for sama7g5 Add CLK_DT_DECLARE for sama7g5's slow clock. Signed-off-by: Tony Han --- core/drivers/clk/sam/at91_sckc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/drivers/clk/sam/at91_sckc.c b/core/drivers/clk/sam/at91_sckc.c index f2fc1073857..59a63404086 100644 --- a/core/drivers/clk/sam/at91_sckc.c +++ b/core/drivers/clk/sam/at91_sckc.c @@ -56,4 +56,15 @@ static TEE_Result sckc_pmc_setup(const void *fdt __unused, int offs, return TEE_SUCCESS; } -CLK_DT_DECLARE(at91_sckc, "atmel,sama5d4-sckc", sckc_pmc_setup); +static const struct dt_device_match at91_sckc_match_table[] = { + { .compatible = "atmel,sama5d4-sckc" }, + { .compatible = "microchip,sama7g5-sckc" }, + { } +}; + +DEFINE_DT_DRIVER(at91_sckc_dt_driver) = { + .name = "at91_sckc", + .type = DT_DRIVER_CLK, + .match_table = at91_sckc_match_table, + .probe = sckc_pmc_setup, +};