summaryrefslogtreecommitdiff
path: root/drivers/clk/stm32
AgeCommit message (Collapse)Author
6 daysglobal: Correct duplicate U_BOOT_DRIVER entry namesTom Rini
The U_BOOT_DRIVER macro creates a list of drivers used at link time, and all entries here must be unique. This in turn means that all entries in the code should also be unique in order to not lead to build failures later with unexpected build combinations. Typically, the problem we have here is when a driver is obviously based on another driver and didn't update this particular field and so while the name field reflects something unique the linker entry itself is not. In a few places this provides a more suitable string name as well, however. Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> # Tegra Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-02-24clk: stm32mp21: Add clock driver supportPatrice Chotard
Add clock driver support for STM32MP21 SoCs. Signed-off-by: Nicolas Le Bayon <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2026-01-29clk: stm32: Update clock management for STM32MP13/25Patrice Chotard
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") Reviewed-by: Patrick Delaunay <[email protected]> Signed-off-by: Patrice Chotard <[email protected]>
2026-01-29clk: stm32mp13: Reorder include filesPatrice Chotard
Reorder include following rules available here : https://docs.u-boot.org/en/latest/develop/codingstyle.html#include-files Reviewed-by: Patrick Delaunay <[email protected]> Signed-off-by: Patrice Chotard <[email protected]>
2025-09-23Merge tag 'v2025.10-rc5' into nextTom Rini
Prepare v2025.10-rc5
2025-09-18ARM: stm32mp: replace RIFSC check access APIsGatien Chevallier
Replace RIFSC check access APIs by grant/release access ones that handle the RIF semaphores. Signed-off-by: Gatien Chevallier <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2025-09-16clk: stm32: Pass udevice pointer to clk_register_composite()Marek Vasut
The clk_register_composite() does clk_resolve_parent_clk() look up, which requires valid udevice pointer. Do not pass NULL, pass a valid device pointer to prevent hang on registering ck_usbo_48m clock on STM32MP13xx. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-07-29clk: stm32: Wrong macros used in register readAndrew Goodbody
Smatch reported a warning about a shift macro being used as a mask. Make the obvious changes to make this register read calculation work the same as the previous ones. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-06-14Merge patch series "Hex value prefix case cleanup"Tom Rini
E Shattow <[email protected]> says: Make consistent use of lowercase hexadecimal prefix '0x' throughout U-Boot. There are a few remaining uses of uppercase 'X' to denote hexadecimal prefix or placeholder in documentation and error messages. External devicetree-rebasing dts/upstream and the generated code of xilinx/zynq are ignored for the series. Link: https://lore.kernel.org/r/[email protected]
2025-06-14drivers: use lowercase hex prefix styleE Shattow
Use consistent lowercase hex prefix style in drivers/* Does not change hex prefix case in allcaps uppercase style error messages Signed-off-by: E Shattow <[email protected]>
2025-06-11board: stm32: add stm32h747-discovery board supportDario Binacchi
The board includes an STM32H747XI SoC with the following resources: - 2 Mbytes Flash - 1 Mbyte SRAM - LCD-TFT controller - MIPI-DSI interface - FD-CAN - USB 2.0 high-speed/full-speed - Ethernet MAC - camera interface Detailed information can be found at: https://www.st.com/en/evaluation-tools/stm32h747i-disco.html Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-06-11clk: stm32mp13: Add SPL support and clock tree init to STM32MP13 RCC driverMarek Vasut
Add SPL support and clock tree init to STM32MP13 RCC driver. This consists of two parts, make SCMI into an optional dependency and add clock tree initialization. The SCMI dependency is made optional first by registering the few core clock provided by SCMI clock as fixed clock, and second by letting the clock core parse out the clock configuration from SoC registers. The clock initialization code is derived from STM32MP15xx clock tree initialization code, which is almost identical, except for the use of new PLL2000 for PLL1 on STM32MP13xx . Signed-off-by: Marek Vasut <[email protected]>
2025-06-11clk: stm32mp13: Fix typo in STM32MP13 RCC driverMarek Vasut
Fix basic typo, missing t in security . No functional change . Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-06-11clk: stm32: fix clock counterGabriel Fernandez
In RCC the ops of the CCF registered CLK device can be called directly, this patch avoid recursive call of clk_ function done by CCF clock framework which update the clock information, for example clk_enable is called 2 times, clkp->enable_count is increased 2 times. Signed-off-by: Gabriel Fernandez <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-06-11clk: add CONFIG_CLK_AUTO_IDPatrick Delaunay
Add a new config CONFIG_CLK_AUTO_ID to support a unique clk id for all the clock providers, managed by clk uclass, when the clock reference arg[0] is the same. When the CONFIG is activated, the clock id is limited to the lower CLK_ID_SZ = 24 bits in default clock xlate function and the sequence number + 1 of the clk provider device is added for the 8 higher bits. We use sequence number + 1 to avoid the "dummy" clock id = 0, used for invalid clock when CCF is activated. When this config is activated, the new function clk_get_id() should be used to get back the internal reference to clock for the each clock provider. Signed-off-by: Patrick Delaunay <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-06-11clk: stm32mp25: implement clock check security functionGabriel Fernandez
Check clock security to avoid access at boot time. Signed-off-by: Gabriel Fernandez <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-06-11clk: stm32mp25: Add clock driver supportGabriel Fernandez
Add clock driver support for STM32MP25 SoCs. Signed-off-by: Gabriel Fernandez <[email protected]> Signed-off-by: Valentin Caron <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-04-25clk: stm32mp1: fix DSI clock settingPatrice Chotard
DSI is the peripheral clock, while DSI_K is an internal kernel clock. Even though they get the same register and same bit set to be gated, resulting in the same behavior. Signed-off-by: Raphael Gallais-Pou <[email protected]> Signed-off-by: Patrice Chotard <[email protected]>
2025-01-31stm32: remove dt-binding headers that are available upstreamPatrick Delaunay
Some dt-binding headers mask the upstream ones which can lead to build failures, or worse: super weird bugs, if they get out of sync. Remove these headers so our devicetree and binding headers will both be in sync with upstream. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2024-10-11drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07clk: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this driver directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Tom Rini <[email protected]> Acked-by: Marek Behún <[email protected]>
2024-01-19arm: Rename STM32MP15xPatrick Delaunay
CONFIG options must not use lower-case letter. Convert this and related ones to upper case. Signed-off-by: Simon Glass <[email protected] Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2024-01-19arm: Rename STM32MP13xPatrick Delaunay
CONFIG options must not use lower-case letter. Convert this and related ones to upper case. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Igor Opaniuk <[email protected]>
2023-12-15Merge tag 'clk-2024.01-next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-clk into next clock patches for u-boot/next The main thing in here is Igor's conversion of soc_clk_dump to a clk_ops member. There's also a write-protect feature for nuvoton clocks. Signed-off-by: Sean Anderson <[email protected]>
2023-12-15clk: treewide: switch to clock dump from clk_opsIgor Prusov
Switch to using new dump operation in clock provider drivers instead of overriding soc_clk_dump. Tested-by: Patrice Chotard <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Signed-off-by: Igor Prusov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-12-15clk: stm32f: fix setting of LCD clockDario Binacchi
Set pllsaidivr only if the PLLSAIR output frequency is an exact multiple of the pixel clock rate. Otherwise, we search through all combinations of pllsaidivr * pllsair and use the one which gives the rate closest to requested one. Fixes: 5e993508cb25 ("clk: clk_stm32f: Add set_rate for LTDC clock") Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-12-15clk: stm32f: fix setting of division factor for LCD_CLKDario Binacchi
The value to be written to the register must be appropriately shifted, as is correctly done in other parts of the code. Fixes: 5e993508cb25 ("clk: clk_stm32f: Add set_rate for LTDC clock") Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-10-04clk: stm32mp1: Add support for USART1 clockAnatolij Gustschin
Add USART1 clock parents and mux configuration. This allows support for configuring the USART1 as the serial console in SPL and U-Boot via device tree. Without this patch the SPL with usart1 serial console enabled crashes because it can not find the clock specified in the device tree for usart1. Signed-off-by: Anatolij Gustschin <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2023-08-16clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parentPatrick Delaunay
To disabled a clock in clock tree initialization for a mux of STM32MP15, the selected clock source index is set with the latest possible index for the number of bit used. Today this valid configuration cause a error in U-Boot messages, for example with CLK_ETH_DISABLED, when this clock is not needed for the used ETH PHY without crystal: no parents defined for clk id 123 This patch change the level of this message to avoid this trace for valid clock tree. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-12-07clk: stm32mp13: introduce STM32MP13 RCC driverGabriel Fernandez
STM32MP13 RCC driver uses Common Clock Framework and also a 'clk-stm32-core' API. Then STM32MPx RCC driver will contain only data configuration (gates, mux, dividers and the way to check security) or some specific clocks. This API will be used by all new other generations of ST Socs. Signed-off-by: Gabriel Fernandez <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Tested-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-09-06clk: stm32mp: handle ck_usbo_48m clock provided by USBPHYCPatrick Delaunay
Handle the input clock of RCC USB_PHY_48, provided by USBPHYC and named "ck_usbo_48m". Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-06-17clk: Add directory for STM32 clock driversPatrick Delaunay
Add a directory in drivers/clk to regroup the clock drivers for all STM32 Soc with CONFIG_ARCH_STM32 (MCUs with cortex M) or CONFIG_ARCH_STM32MP (MPUs with cortex A). Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> Reviewed-by: Grzegorz Szymaszek <[email protected]> Acked-by: Sean Anderson <[email protected]> Change-Id: I955af307963f732167396f0157a30cf2fc91f150