[PATCH 0/3] clk: stm32mp13: add the SPI1 to SPI5 bus clocks
From: Gabriel Fernandez
Date: Tue Oct 20 2026 - 04:38:57 EST
The STM32MP13 RCC provides the kernel clocks of the SPI/I2S instances
(SPIx_K) but not their bus interface clocks, whereas the STM32 I2S binding
requires one as its "pclk" clock (the I2S driver gets it with
devm_clk_get(dev, "pclk")). The STM32MP15 RCC already exposes them.
This series adds the missing bus clocks of SPI1 to SPI5 to the STM32MP13
RCC binding and driver. It is split so that every patch builds:
- patch 1 makes the driver define the number of clocks of its provider
(STM32MP13_LAST_CLK) instead of taking STM32MP1_LAST_CLK from the
binding header. That value is not part of the binding ABI and would
have to change each time an ID is added. This is already how the
STM32MP21 clock driver does it. No functional change;
- patch 2 adds the SPI1 to SPI5 bus clock identifiers to the binding
header and drops the now unused STM32MP1_LAST_CLK;
- patch 3 registers the corresponding gates in the clock driver and
extends the number of clocks accordingly.
Each bus clock is a gate on the APB bus clock its peripheral is attached
to (pclk1 for SPI2/3, pclk2 for SPI1, pclk6 for SPI4/5). It shares the RCC
enable bit with the matching SPIx_K kernel clock, and the existing gate
enable counter makes sure the bit is only cleared once both clocks are
off. SPI4 and SPI5 remain subject to the RCC secure configuration, like
their kernel clocks.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@xxxxxxxxxxx>
---
Gabriel Fernandez (3):
clk: stm32mp13: define the number of clocks in the driver
dt-bindings: clock: stm32mp13: add SPI1 to SPI5 bus clocks
clk: stm32mp13: add the SPI1 to SPI5 bus clocks
drivers/clk/stm32/clk-stm32mp13.c | 35 +++++++++++++++++++++++++++++-
include/dt-bindings/clock/stm32mp13-clks.h | 6 ++++-
2 files changed, 39 insertions(+), 2 deletions(-)
---
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
change-id: 20261016-ups_mp13_clk_spi-cc1ad9d1f7e7
Best regards,
--
Gabriel Fernandez <gabriel.fernandez@xxxxxxxxxxx>