Skip to content

Commit

Permalink
clk: stm32mp13: SPIx clocks are missing
Browse files Browse the repository at this point in the history
These clocks are needed for I2S.

Change-Id: I3b8e50cf54e7725435ebc2f6341835a2e970b84f
Signed-off-by: Gabriel Fernandez <[email protected]>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/271638
Reviewed-by: CITOOLS <[email protected]>
Reviewed-by: CIBUILD <[email protected]>
Reviewed-by: Eric FOURMONT <[email protected]>
Domain-Review: Alexandre TORGUE <[email protected]>
  • Loading branch information
Gabriel-Fernandz authored and fourmone committed Oct 26, 2022
1 parent f73d7c0 commit ef0c423
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions drivers/clk/stm32/clk-stm32mp13.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,12 @@ static CLK_STM32_GATE(tim15_k, "timg3_ck", CLK_SET_RATE_PARENT, GATE_TIM15);
static CLK_STM32_GATE(tim16_k, "timg3_ck", CLK_SET_RATE_PARENT, GATE_TIM16);
static CLK_STM32_GATE(tim17_k, "timg3_ck", CLK_SET_RATE_PARENT, GATE_TIM17);

static CLK_STM32_GATE(spi2, "pclk1", 0, GATE_SPI2);
static CLK_STM32_GATE(spi3, "pclk1", 0, GATE_SPI3);

static CLK_STM32_GATE(sai1, "pclk2", 0, GATE_SAI1);
static CLK_STM32_GATE(sai2, "pclk2", 0, GATE_SAI2);
static CLK_STM32_GATE(spi1, "pclk2", 0, GATE_SPI1);

static CLK_STM32_GATE(syscfg, "pclk3", 0, GATE_SYSCFG);
static CLK_STM32_GATE(vref, "pclk3", 0, GATE_VREF);
Expand All @@ -860,6 +864,9 @@ static CLK_STM32_GATE(tzpc, "pclk5", 0, GATE_TZC);
static CLK_STM32_GATE(iwdg1, "pclk5", 0, GATE_IWDG1APB);
static CLK_STM32_GATE(bsec, "pclk5", 0, GATE_BSEC);

static CLK_STM32_GATE(spi4, "pclk6", 0, GATE_SPI4);
static CLK_STM32_GATE(spi5, "pclk6", 0, GATE_SPI5);

static CLK_STM32_GATE(dma1, "ck_mlahb", 0, GATE_DMA1);
static CLK_STM32_GATE(dma2, "ck_mlahb", 0, GATE_DMA2);
static CLK_STM32_GATE(dmamux1, "ck_mlahb", 0, GATE_DMAMUX1);
Expand Down Expand Up @@ -971,6 +978,11 @@ static const struct clock_config stm32mp13_clock_cfg[] = {
STM32_GATE_CFG(TIM17_K, tim17_k, SECF_TIM17),

/* Peripheral clocks */
STM32_GATE_CFG(SPI1, spi1, SECF_NONE),
STM32_GATE_CFG(SPI2, spi2, SECF_NONE),
STM32_GATE_CFG(SPI3, spi3, SECF_NONE),
STM32_GATE_CFG(SPI4, spi4, SECF_SPI4),
STM32_GATE_CFG(SPI5, spi5, SECF_SPI5),
STM32_GATE_CFG(SAI1, sai1, SECF_NONE),
STM32_GATE_CFG(SAI2, sai2, SECF_NONE),
STM32_GATE_CFG(SYSCFG, syscfg, SECF_NONE),
Expand Down Expand Up @@ -1627,8 +1639,12 @@ static struct clk_summary stm32mp13_clock_summary[] = {
CS_GATE("tim16_k", "timg3_ck", GATE_TIM16),
CS_GATE("tim17_k", "timg3_ck", GATE_TIM17),

CS_GATE("spi2", "pclk1", GATE_SPI2),
CS_GATE("spi3", "pclk1", GATE_SPI3),

CS_GATE("sai1", "pclk2", GATE_SAI1),
CS_GATE("sai2", "pclk2", GATE_SAI2),
CS_GATE("spi1", "pclk2", GATE_SPI1),

CS_GATE("syscfg", "pclk3", GATE_SYSCFG),
CS_GATE("vref", "pclk3", GATE_VREF),
Expand All @@ -1654,6 +1670,9 @@ static struct clk_summary stm32mp13_clock_summary[] = {
CS_GATE("iwdg1", "pclk5", GATE_IWDG1APB),
CS_GATE("bsec", "pclk5", GATE_BSEC),

CS_GATE("spi4", "pclk6", GATE_SPI4),
CS_GATE("spi5", "pclk6", GATE_SPI5),

CS_GATE("dma1", "ck_mlahb", GATE_DMA1),
CS_GATE("dma2", "ck_mlahb", GATE_DMA2),
CS_GATE("dmamux1", "ck_mlahb", GATE_DMAMUX1),
Expand Down

0 comments on commit ef0c423

Please sign in to comment.