Hi,

On 1/16/26 19:57, Patrice Chotard wrote:
During clock's registration, clock's name are used to establish parent -
child relation. On STM32MP13 and STM32MP25, most of SCMI clocks are parent
clocks.

Since commit fdb1bffe2827 ("clk: scmi: Postpone clock name resolution"),
all scmi clocks are named by default "scmi-%zu" until they are enabled,
it breaks clocks registration and boot process for STM32MP13/25
platforms.

Rework the STM32 core clock driver and STM32MP13/25 clock description
to use clock index instead of their real name.

Introduce struct clk_parent_data which allows to identify parent clock
either by index or by name. Name is only used for particular clocks
provided by IP which are clock provider as i2s/i2s_ckin, usb0/ck_usbo_48m,
and ltdc/ck_ker_ltdc.

STM32_GATE() and STM32_COMPOSITE_NOMUX macros are updated in order to
use parent clock index.

As STM32MP13 supports both SPL and SCMI boot, keep using an array
with clock's name for SPL.

Fixes: fdb1bffe2827 ("clk: scmi: Postpone clock name resolution")
Signed-off-by: Patrice Chotard <[email protected]>
---
  drivers/clk/stm32/clk-stm32-core.c | 116 +++++++++--
  drivers/clk/stm32/clk-stm32-core.h |  42 ++--
  drivers/clk/stm32/clk-stm32mp13.c  | 417 ++++++++++++++++++++++++++-----------
  drivers/clk/stm32/clk-stm32mp25.c  | 405 +++++++++++++++++++++--------------
  4 files changed, 671 insertions(+), 309 deletions(-)


Reviewed-by: Patrick Delaunay <[email protected]>

Thanks
Patrick

Reply via email to