[PATCH 0/2] clk: stm32mp13: remove LSE from the RNG1 kernel clock sources

From: Gabriel Fernandez

Date: Fri Nov 27 2026 - 05:36:32 EST


On STM32MP13 silicon cut 1.1, the value 0b10 of the RNG1SRC field of
RCC_RNG1CKSELR is reserved: LSE can no longer be selected as the RNG1
kernel clock source.

The clock framework assumes that the parent index is the value of the
mux selector field, so the LSE entry can't simply be dropped from the
parent list: ck_lsi, which is encoded as 0b11, would then end up at
index 2 and the driver would write the reserved value 0b10 to select it.

This series therefore:
- makes use of the (so far unused) "table" member of struct
stm32_mux_cfg to translate between the parent index and the value of
the selector field, as the generic clk-mux does. Muxes without a
table are not affected;
- removes ck_lse from the parents of rng1_k and describes the remaining
ones (ck_csi, pll4_r, ck_lsi) with a table { 0, 1, 3 }.

If the hardware reports a value that is not in the table (e.g. LSE left
selected by an earlier boot stage), the clock is reported as an orphan
instead of being given a wrong parent.

rng1_k is not registered when RNG1 is secured (RNG1SECF set), for
instance when OP-TEE owns the RNG, so the series only matters for
configurations where Linux owns RNG1.

No in-tree device tree selects LSE as the parent of RNG1_K.

---
Gabriel Fernandez (2):
clk: stm32: add support for a parent table in the muxes
clk: stm32mp13: remove LSE from the RNG1 clock sources

drivers/clk/stm32/clk-stm32-core.c | 35 +++++++++++++++++++++++++++++------
drivers/clk/stm32/clk-stm32-core.h | 3 ++-
drivers/clk/stm32/clk-stm32mp13.c | 18 +++++++++++++-----
3 files changed, 44 insertions(+), 12 deletions(-)
---
base-commit: a9c48428cbd8d96b26f92631d0db6f8519c5fcc5
change-id: 20261016-ups_mp13_clk_rng-fe616b378bbc

Best regards,
--
Gabriel Fernandez <gabriel.fernandez@xxxxxxxxxxx>