From f9ecf05e5d1f407133a45cc7572d6018af4b5644 Mon Sep 17 00:00:00 2001 From: Thomas Perrot Date: Fri, 10 Nov 2023 09:35:39 +0100 Subject: [PATCH] plat-sam: registers additional sama7g5 clocks for SCMI usage - Add the macro definitions for each SCMI clocks. - Add the table of PMC-SCMI map for sama7g5 clocks. Signed-off-by: Thomas Perrot --- core/arch/arm/plat-sam/scmi_server.c | 40 +++++++++++++++++++++++++++ core/include/dt-bindings/clock/at91.h | 8 ++++++ 2 files changed, 48 insertions(+) diff --git a/core/arch/arm/plat-sam/scmi_server.c b/core/arch/arm/plat-sam/scmi_server.c index ba48e262438..abb1371f9e3 100644 --- a/core/arch/arm/plat-sam/scmi_server.c +++ b/core/arch/arm/plat-sam/scmi_server.c @@ -191,6 +191,31 @@ static const struct sama5d2_pmc_clk pmc_clks[] = { .pmc_type = PMC_TYPE_SYSTEM, .pmc_id = 15 }, + { + .scmi_id = AT91_SCMI_CLK_PERIPH_ASRC_CLK, + .pmc_type = PMC_TYPE_PERIPHERAL, + .pmc_id = ID_ASRC + }, + { + .scmi_id = AT91_SCMI_CLK_GCK_ASRC_GCLK, + .pmc_type = PMC_TYPE_GCK, + .pmc_id = ID_ASRC + }, + { + .scmi_id = AT91_SCMI_CLK_PERIPH_CSI_CLK, + .pmc_type = PMC_TYPE_PERIPHERAL, + .pmc_id = ID_CSI + }, + { + .scmi_id = AT91_SCMI_CLK_GCK_CSI_GCLK, + .pmc_type = PMC_TYPE_GCK, + .pmc_id = ID_CSI + }, + { + .scmi_id = AT91_SCMI_CLK_PERIPH_CSI2DC_CLK, + .pmc_type = PMC_TYPE_PERIPHERAL, + .pmc_id = ID_CSI2DC + }, { .scmi_id = AT91_SCMI_CLK_PERIPH_MACB0_CLK, .pmc_type = PMC_TYPE_PERIPHERAL, @@ -206,6 +231,21 @@ static const struct sama5d2_pmc_clk pmc_clks[] = { .pmc_type = PMC_TYPE_GCK, .pmc_id = ID_GMAC0_TSU }, + { + .scmi_id = AT91_SCMI_CLK_PERIPH_MACB1_CLK, + .pmc_type = PMC_TYPE_PERIPHERAL, + .pmc_id = ID_GMAC1 + }, + { + .scmi_id = AT91_SCMI_CLK_GCK_MACB1_GCLK, + .pmc_type = PMC_TYPE_GCK, + .pmc_id = ID_GMAC1 + }, + { + .scmi_id = AT91_SCMI_CLK_GCK_MACB1_TSU, + .pmc_type = PMC_TYPE_GCK, + .pmc_id = ID_GMAC1_TSU + }, { .scmi_id = AT91_SCMI_CLK_PERIPH_TDES_CLK, .pmc_type = PMC_TYPE_PERIPHERAL, diff --git a/core/include/dt-bindings/clock/at91.h b/core/include/dt-bindings/clock/at91.h index ab71449b2c1..d2a042c2f91 100644 --- a/core/include/dt-bindings/clock/at91.h +++ b/core/include/dt-bindings/clock/at91.h @@ -182,6 +182,14 @@ #define AT91_SCMI_CLK_GCK_QSPI1_GCLK 86 #define AT91_SCMI_CLK_GCK_SPDIFRX_GCLK 87 #define AT91_SCMI_CLK_GCK_SPDIFTX_GCLK 88 +#define AT91_SCMI_CLK_GCK_MACB1_GCLK 89 +#define AT91_SCMI_CLK_PERIPH_MACB1_CLK 90 +#define AT91_SCMI_CLK_GCK_MACB1_TSU 91 +#define AT91_SCMI_CLK_PERIPH_CSI_CLK 92 +#define AT91_SCMI_CLK_GCK_CSI_GCLK 93 +#define AT91_SCMI_CLK_PERIPH_CSI2DC_CLK 94 +#define AT91_SCMI_CLK_PERIPH_ASRC_CLK 95 +#define AT91_SCMI_CLK_GCK_ASRC_GCLK 96 #endif #endif