Skip to content

Commit

Permalink
plat-sam: registers additional sama7g5 clocks for SCMI usage
Browse files Browse the repository at this point in the history
- Add the macro definitions for each SCMI clocks.
- Add the table of PMC-SCMI map for sama7g5 clocks.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
  • Loading branch information
tprrt authored and TonyHan11 committed Dec 20, 2023
1 parent 6655ee0 commit 75ea6b6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
40 changes: 40 additions & 0 deletions core/arch/arm/plat-sam/scmi_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,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,
Expand All @@ -186,6 +211,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,
Expand Down
8 changes: 8 additions & 0 deletions core/include/dt-bindings/clock/at91.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,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

0 comments on commit 75ea6b6

Please sign in to comment.