| 2b028a2b | 28-Aug-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
clk: implement multi-gate management at core level
The majority of all peripherals have their bus and kernel clocks with the same clock gating register bit. Therefore it is mandatory to handle a cou
clk: implement multi-gate management at core level
The majority of all peripherals have their bus and kernel clocks with the same clock gating register bit. Therefore it is mandatory to handle a counter on the gates.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a86abe43 | 28-Aug-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
clk: stm32mp1: add dsb in clock driver
Add memory barriers in RCC clock driver to ensure the system is in the expected state when requests are proceeded by RCC. No pending register operation before
clk: stm32mp1: add dsb in clock driver
Add memory barriers in RCC clock driver to ensure the system is in the expected state when requests are proceeded by RCC. No pending register operation before disabling the clocks and return to caller only when clock is enabled, so before any accesses to the clocked devices.
As the registers are mapped as device memory (shareable, bufferable), the order of operation is guaranteed only at outer shareable limit and not on each device, for example when they are not on the same bus.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| fa31123d | 16-Jul-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: clk_get_rates_array() returns ordered rates
Explicitly state in clk_get_rates_array() inline description comment that the output rates arrays is ordered by increasing frequency values.
drivers: clk: clk_get_rates_array() returns ordered rates
Explicitly state in clk_get_rates_array() inline description comment that the output rates arrays is ordered by increasing frequency values. This change allows to better fit the sole consumer of this API function that is the SCMI server implementation. SCMI specification states that discrete clock rates list shall follow this order.
Update at91_cpu_opp clock driver to ensure it satisfy this constraint. The SAM platforms that embed this driver (sama7g5) already satisfy this constraints but only at its DTS level. This change ensures the driver will always.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 28c10f9e | 17-Jun-2024 |
Gabriel Fernandez <gabriel.fernandez@foss.st.com> |
clk: stm32mp25: Introduce STM32MP25 clocks platform
This driver is based on clk-stm32-core API to manage STM32 gates, dividers and muxes.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st
clk: stm32mp25: Introduce STM32MP25 clocks platform
This driver is based on clk-stm32-core API to manage STM32 gates, dividers and muxes.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 265f4754 | 13-Jun-2024 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: add the implement of CPU OPP clock
Register CPU OPP clock with the following operations: - set_rate: call the operation of its parent - get_rates_array: return the rates got fro
drivers: clk: sam: add the implement of CPU OPP clock
Register CPU OPP clock with the following operations: - set_rate: call the operation of its parent - get_rates_array: return the rates got from DT. Skip CPU OPP clock register when OPP is not supported.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| f496f2c4 | 13-Jun-2024 |
Tony Han <tony.han@microchip.com> |
plat-sam: prepare for CPU OPP (Operating Performance Points) support
Initialize clock rates array by parsing the device tree.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carr
plat-sam: prepare for CPU OPP (Operating Performance Points) support
Initialize clock rates array by parsing the device tree.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 6b82794f | 28-Mar-2024 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: add definition for sama7g5 PMC_CPU_CKR register
The offset of "PMC CPU Clock Register" for sama7g5 is different from the one for sama5d2.
Signed-off-by: Tony Han <tony.han@microc
drivers: clk: sam: add definition for sama7g5 PMC_CPU_CKR register
The offset of "PMC CPU Clock Register" for sama7g5 is different from the one for sama5d2.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6d792c58 | 11-Apr-2024 |
Tony Han <tony.han@microchip.com> |
drivers: pm: sam: update the count of PCK clock for sama7g5
Add definition "AT91_PMC_PCK_COUNT", in sama7g5 there're 8 PCK clocks and for sama5d2 there're 4 PCK clocks.
Signed-off-by: Tony Han <ton
drivers: pm: sam: update the count of PCK clock for sama7g5
Add definition "AT91_PMC_PCK_COUNT", in sama7g5 there're 8 PCK clocks and for sama5d2 there're 4 PCK clocks.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fc57019c | 12-Sep-2023 |
Tony Han <tony.han@microchip.com> |
plat-sam: add support for Microchip sama7g54-ek board
Add the main functions for sama7g54 initialize, including: - console_init() - Matrix, TZC, TZPM, interrupt related Update conf.mk and Makefile
plat-sam: add support for Microchip sama7g54-ek board
Add the main functions for sama7g54 initialize, including: - console_init() - Matrix, TZC, TZPM, interrupt related Update conf.mk and Makefile for sama7g5 OP-TEE support.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a557f877 | 20-Mar-2024 |
Tony Han <tony.han@microchip.com> |
plat-sam: optimize the macro and makefile for building sama5d2 clocks
Rename 'CFG_DRIVERS_SAMA5D2_CLK' to 'CFG_SAMA5D2'. Adjust the sequence of source files in 'core/drivers/clk/sam/sub.mk'.
Signed
plat-sam: optimize the macro and makefile for building sama5d2 clocks
Rename 'CFG_DRIVERS_SAMA5D2_CLK' to 'CFG_SAMA5D2'. Adjust the sequence of source files in 'core/drivers/clk/sam/sub.mk'.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 9a3248fc | 29-Feb-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: replace clock main spinlock with a mutex
Change clock framework lock from an interrupts masked spinning lock to a mutex. This allows the clock framework to better handle slow stabilizi
drivers: clk: replace clock main spinlock with a mutex
Change clock framework lock from an interrupts masked spinning lock to a mutex. This allows the clock framework to better handle slow stabilizing clocks as PLLs without masking the system interrupt which can have side effects on the REE or even the TEE.
To support clock accesses during low power state transition sequences while non-secure world is no operating, the lock is not taken when the execution is not in the scope of a TEE thread.
This change is not expected to impact supported platforms that currently only access clock operation from thread contexts or atomic PM sequences.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a3552708 | 11-Mar-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: clk-stm32mp13: fix memory corruption on oscillator parent
Fix oscillators struct clk instances for STM32MP13 clock driver. These clocks have 1 parent that is set during driver initiali
drivers: clk: clk-stm32mp13: fix memory corruption on oscillator parent
Fix oscillators struct clk instances for STM32MP13 clock driver. These clocks have 1 parent that is set during driver initialization, based on device tree content, whereas referred bugged commit defined 0 parents and did not allocate memory for the parent reference.
Fixes: 95f2142bf848 ("drivers: clk: clk-stm32mp13: don't gate/ungate oscillators not wired") Tested-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com> Acked-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 74fbd273 | 25-Sep-2023 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: skip the NULL clocks when getting the clock by name
Skip the NULL items in the clock array when getting the clock by its name.
Signed-off-by: Tony Han <tony.han@microchip.com> Ac
drivers: clk: sam: skip the NULL clocks when getting the clock by name
Skip the NULL items in the clock array when getting the clock by its name.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 943d822a | 12-Sep-2023 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: add sama7g5 clock description
Define PLL, master, system, peripheral, generic clocks for sama7g5 and register the clocks to clock provider.
Signed-off-by: Tony Han <tony.han@micr
drivers: clk: sam: add sama7g5 clock description
Define PLL, master, system, peripheral, generic clocks for sama7g5 and register the clocks to clock provider.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 821cb656 | 31-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: get stm32mp13 PLL output clock duty cycle
Implement get_duty_cycle clock operation for STM32MP13 PLL output clocks.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Sign
drivers: clk: get stm32mp13 PLL output clock duty cycle
Implement get_duty_cycle clock operation for STM32MP13 PLL output clocks.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 1bc6d1bc | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: set stm32mp13 clock flags
On STM32MP13 SoC, setting PLL1P, PLL1P_DIV, MPU, AXI and MLAHB clocks rate must be handled from their respective parent clock. Set flag CLK_SET_RATE_PARENT fo
drivers: clk: set stm32mp13 clock flags
On STM32MP13 SoC, setting PLL1P, PLL1P_DIV, MPU, AXI and MLAHB clocks rate must be handled from their respective parent clock. Set flag CLK_SET_RATE_PARENT for these clocks.
On STM32MP13 SoC, MPU, AXI and MLAHB clocks are internal bus clocks that must not be disabled even when we re-parent them. Set flag CLK_SET_PARENT_PRE_ENABLE for these clocks.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 8baaac1c | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: pre-enable new parent on clock re-parent
Add new clock flag CLK_SET_PARENT_PRE_ENABLE for when an already enabled clock is re-parented and the new parent clock must be enabled before w
drivers: clk: pre-enable new parent on clock re-parent
Add new clock flag CLK_SET_PARENT_PRE_ENABLE for when an already enabled clock is re-parented and the new parent clock must be enabled before we switch of parents.
This is needed for some system clocks that cannot be disabled, for example an interconnect AXI bus clock or a CPU clock.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 8fbc0056 | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: get linear rates description
Implement clk_get_rates_steps() clock API function to get the supported clock rates description as a triplet min/max/step. This function can be used in the
drivers: clk: get linear rates description
Implement clk_get_rates_steps() clock API function to get the supported clock rates description as a triplet min/max/step. This function can be used in the scope of SCMI communication where a clock can report a linear rate list without listing all supported clock is an array which size could be quite big.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 20f97d98 | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: enable clock on rate change
Add new clock flag CLK_SET_RATE_UNGATE for clocks that must be enabled in order to change their rate.
Reviewed-by: Gatien Chevallier <gatien.chevallier@fos
drivers: clk: enable clock on rate change
Add new clock flag CLK_SET_RATE_UNGATE for clocks that must be enabled in order to change their rate.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 0ba7ae74 | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: change parent clock rate if needed
Add clock flag CLK_SET_RATE_PARENT for clocks for which rate change request must be propagated to the parent clock.
Reviewed-by: Gatien Chevallier <
drivers: clk: change parent clock rate if needed
Add clock flag CLK_SET_RATE_PARENT for clocks for which rate change request must be propagated to the parent clock.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 05771552 | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: Get duty cycle from parent clock
Add CLK_DUTY_CYCLE_PARENT clock flag for clock which duty cycle information needs to be retrieved for the clock parent.
Reviewed-by: Gatien Chevallier
drivers: clk: Get duty cycle from parent clock
Add CLK_DUTY_CYCLE_PARENT clock flag for clock which duty cycle information needs to be retrieved for the clock parent.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 59db7f68 | 26-Jan-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: Add clock duty cycle
Implement reading a clock duty cycle with new clock API function clk_get_duty_cycle() and clock operation handle ::clk_get_duty_cycle. When a clock does not provid
drivers: clk: Add clock duty cycle
Implement reading a clock duty cycle with new clock API function clk_get_duty_cycle() and clock operation handle ::clk_get_duty_cycle. When a clock does not provide the operation, it is assumed that the clock has a 50% duty cycle.
Clock duty cycle information is used for example for some analog-digital conversion peripheral. This new API function is also expected to be used by SCMI clock service introduced in the SCMI specification v3.2 [1] this allow to expose duty cycle service to SCMI clients.
Link: https://developer.arm.com/documentation/den0056/e/ [1] Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| 4318c69f | 12-Sep-2023 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: add PLL clock driver for sama7g5
As PLL is compatible for sama7g5 and sam9x60, add sam9x60 PLL functions for configuring sama7g5 PLL.
Signed-off-by: Tony Han <tony.han@microchip.
drivers: clk: sam: add PLL clock driver for sama7g5
As PLL is compatible for sama7g5 and sam9x60, add sam9x60 PLL functions for configuring sama7g5 PLL.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 9aab6fb2 | 12-Sep-2023 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: update to support generic clock for sama7g5
Add a mux table for select from different generic clock source.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Fori
drivers: clk: sam: update to support generic clock for sama7g5
Add a mux table for select from different generic clock source.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 5110b3e7 | 12-Sep-2023 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: update to support main system bus clock for sama7g5
Add functions for configuring sama7g5 main system bus clock.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome
drivers: clk: sam: update to support main system bus clock for sama7g5
Add functions for configuring sama7g5 main system bus clock.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|