| d8bfc12a | 25-Apr-2025 |
Thomas Bourgoin <thomas.bourgoin@foss.st.com> |
plat: stm32mp2: sysconf: fix CA35SS register names
Align register names with the reference manuel for Arm Cortex-A35 (CA35SS) - CA35SS SYSCFG registers (with 0x2000 offset) - CA35SS Standardized sta
plat: stm32mp2: sysconf: fix CA35SS register names
Align register names with the reference manuel for Arm Cortex-A35 (CA35SS) - CA35SS SYSCFG registers (with 0x2000 offset) - CA35SS Standardized status and control (SSC) registers
This path removes the confusion between SSC and subsystem (SS).
Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com> Co-developed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 636e1d3c | 20-Jun-2025 |
Gabriel Fernandez <gabriel.fernandez@foss.st.com> |
clk: stm32mp25: cosmetic fixes for STM32MP25 clock driver
Cosmetic fixes to align STM32MP21 and STM32MP25 clock drivers.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by
clk: stm32mp25: cosmetic fixes for STM32MP25 clock driver
Cosmetic fixes to align STM32MP21 and STM32MP25 clock drivers.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| 1e45c633 | 13-May-2025 |
Gabriel Fernandez <gabriel.fernandez@foss.st.com> |
clk: stm32mp21: introduce STM32MP21 clock driver
As the STM32MP25 clock driver, this driver is based on the clk-stm32-core API to manage STM32 gates, dividers, and multiplexer.
Signed-off-by: Yann
clk: stm32mp21: introduce STM32MP21 clock driver
As the STM32MP25 clock driver, this driver is based on the clk-stm32-core API to manage STM32 gates, dividers, and multiplexer.
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 7b8c7554 | 03-Jun-2025 |
Gabriel Fernandez <gabriel.fernandez@foss.st.com> |
clk: stm32mp25: force ARM_DIVSEL for flexgen63 config at 400MHz
When clkext2f is selected as the clock source, a division by 2 must be applied to the SSC register (A3x_SS_CHGCLKREQ.ARM_DIVSEL) becau
clk: stm32mp25: force ARM_DIVSEL for flexgen63 config at 400MHz
When clkext2f is selected as the clock source, a division by 2 must be applied to the SSC register (A3x_SS_CHGCLKREQ.ARM_DIVSEL) because the clkext2f frequency of 400MHz is not supported.
This patch also rename the function stm32mp2_a35_ss_on_hsi to stm32mp2_a35_ss_on_bypass to be aligned with reference manual.
Fixes: 28c10f9efa6a ("clk: stm32mp25: Introduce STM32MP25 clocks platform") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| e6b19839 | 05-Feb-2025 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: select AUDIOPLL as the source for sama7g5 I2SMCC0 GCLK
Initialize the generic clock used by for sama7g5 I2SMCC0 peripheral.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked
drivers: clk: sam: select AUDIOPLL as the source for sama7g5 I2SMCC0 GCLK
Initialize the generic clock used by for sama7g5 I2SMCC0 peripheral.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| b20bd0e0 | 23-Jan-2025 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: fix underflow of the divider for sama7g5 PLL clocks
Fix the underflow of the divider calculated when clock given rate is greater than the rate of the clock parent.
Fixes: 4318c69
drivers: clk: sam: fix underflow of the divider for sama7g5 PLL clocks
Fix the underflow of the divider calculated when clock given rate is greater than the rate of the clock parent.
Fixes: 4318c69fa77d ("drivers: clk: sam: add PLL clock driver for sama7g5") Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| e83d1906 | 09-Jan-2025 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: fix operation on wrong PMC_PLL_CTRLx registers
When writing/reading a PLL control register (PMC_PLL_CTRLx), the ID in PMC_PLL_UPDT specifies which PLL fields are written/read. Set
drivers: clk: sam: fix operation on wrong PMC_PLL_CTRLx registers
When writing/reading a PLL control register (PMC_PLL_CTRLx), the ID in PMC_PLL_UPDT specifies which PLL fields are written/read. Set correct ID to PMC_PLL_UPDT to avoid operating on wrong PMC_PLL_CTRLx.
Fixes: 4318c69fa77d ("drivers: clk: sam: add PLL clock driver for sama7g5") Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 5d74b835 | 09-Jan-2025 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: initialize the clocks used by sama7g5 PDMC0
Initialize the audio PLL and generic clocks used by for sama7g5 PDMC0 peripheral.
Signed-off-by: Tony Han <tony.han@microchip.com> Ack
drivers: clk: sam: initialize the clocks used by sama7g5 PDMC0
Initialize the audio PLL and generic clocks used by for sama7g5 PDMC0 peripheral.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| b71b399e | 08-Jan-2025 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: initialize the clock range values for sama7g5 SCMI clocks
Initialize the clock range values for sama7g5 clocks so that they can be used in responding SCMI CLOCK_DESCRIBE_RATES com
drivers: clk: sam: initialize the clock range values for sama7g5 SCMI clocks
Initialize the clock range values for sama7g5 clocks so that they can be used in responding SCMI CLOCK_DESCRIBE_RATES command.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| f90d78a6 | 08-Jan-2025 |
Tony Han <tony.han@microchip.com> |
plat-sam: add clock range support for the clocks used by SCMI
Add clock range attribute to the struct for the clocks. New function for initializing the clock range for the clocks. Implement "plat_sc
plat-sam: add clock range support for the clocks used by SCMI
Add clock range attribute to the struct for the clocks. New function for initializing the clock range for the clocks. Implement "plat_scmi_clock_rates_by_step()" to be used by SCMI.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 1f2e0a3f | 12-Dec-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
clk: stm32mp25: configure STGEN flexgen in .enable ops
STGEN flexgen is skipped during RCC probe to prevent misalignment between stgen_clk frequency and STGEN register. Configure the STGEN flexgen i
clk: stm32mp25: configure STGEN flexgen in .enable ops
STGEN flexgen is skipped during RCC probe to prevent misalignment between stgen_clk frequency and STGEN register. Configure the STGEN flexgen in the .enable ops so that it is configured after the STGEN itself is configured and started.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 4b6058e4 | 03-Nov-2021 |
Gabriel Fernandez <gabriel.fernandez@foss.st.com> |
clk: fix clk_get_rate() when parent clock rate was changed
clk_get_rate() returns a cached value of the clock rate.
If the rate of the parent clock changed, then the rate is not synchronized. Chan
clk: fix clk_get_rate() when parent clock rate was changed
clk_get_rate() returns a cached value of the clock rate.
If the rate of the parent clock changed, then the rate is not synchronized. Change the function to compute all clock parents' rates and return the synchronized value.
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> Fixes: 2305544b3b9b ("drivers: clk: add generic clock framework")
show more ...
|
| 83aae07d | 12-Oct-2024 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: rename the sama7g5 UTMI clocks for USB PHY
The UTMI clocks for USB PHY are handled in OP-TEE due to they are controlled by the registers from RSTC (reset controller) which is alwa
drivers: clk: sam: rename the sama7g5 UTMI clocks for USB PHY
The UTMI clocks for USB PHY are handled in OP-TEE due to they are controlled by the registers from RSTC (reset controller) which is always-secured. SCMI "reset domain management protocol" makes it prossible to handle the resets from the kernel running in normal world. So the code in kernel for these clocks need to be enabled. Here renaming the clocks to avoid registering them failed from the kernel.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 87823696 | 08-Jan-2025 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
clk: clk-stm32-core: fix use of ROUNDUP2_DIV() in stm32_div_get_rate()
Replace the use of ROUNDUP2_DIV() by ROUNDUP_DIV() in stm32_div_get_rate() as some dividers may not be a power of two. In this
clk: clk-stm32-core: fix use of ROUNDUP2_DIV() in stm32_div_get_rate()
Replace the use of ROUNDUP2_DIV() by ROUNDUP_DIV() in stm32_div_get_rate() as some dividers may not be a power of two. In this case, the platform panics.
Fixes: 76d6685e5f3b ("tree-wide: use power-of-2 rounding macros where applicable") Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| a53e4bda | 16-Oct-2024 |
Tony Han <tony.han@microchip.com> |
drivers: clk: sam: extend the time for waiting PLL ready
The start-up time (simulation data) of sama7g5 PLL is 50us in condition reaching 95% of target frequency. The PLL lock status bit is not set
drivers: clk: sam: extend the time for waiting PLL ready
The start-up time (simulation data) of sama7g5 PLL is 50us in condition reaching 95% of target frequency. The PLL lock status bit is not set a few times with current timeout setting. Extend the time to make sure the check is successful for any cases.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 76d6685e | 17-Dec-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
tree-wide: use power-of-2 rounding macros where applicable
Use ROUNDUP2(), ROUNDUP2_OVERFLOW(), ROUNDUP2_DIV() and ROUNDDOWN2() at places where the rounding argument is a variable value and we want
tree-wide: use power-of-2 rounding macros where applicable
Use ROUNDUP2(), ROUNDUP2_OVERFLOW(), ROUNDUP2_DIV() and ROUNDDOWN2() at places where the rounding argument is a variable value and we want to leverage the implementation of these routines optimized for a power-of-2 rounding argument.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b5f8fc36 | 27-Nov-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
clk: stm32mp25: add support for RIF configuration application
This driver now implements RIF configuration for RCC, which is a RIF aware IP. It means that the RCC driver is in charge of configuring
clk: stm32mp25: add support for RIF configuration application
This driver now implements RIF configuration for RCC, which is a RIF aware IP. It means that the RCC driver is in charge of configuring its own RIF restrictions and that the RCC has dedicated RIF configuration registers.
To avoid issues when manipulating clocks during OP-TEE boot or low-power sequences, apply the RIF configuration for RCC resources at driver_init_late level.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 6226e120 | 04-Oct-2024 |
Pascal Paillet <p.paillet@foss.st.com> |
drivers: clk: change tree trace level
Change clock trace level of print tree so that it can bee seen when it is requested by xtest --stats --clocks.
Signed-off-by: Pascal Paillet <p.paillet@foss.st
drivers: clk: change tree trace level
Change clock trace level of print tree so that it can bee seen when it is requested by xtest --stats --clocks.
Signed-off-by: Pascal Paillet <p.paillet@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| d0c71719 | 23-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
plat-stm32mp1: shared_resource stops checking clock dependencies
Remove management of STM32MP15 secure clock support from the platform specific share_resource.c driver. It is not needed STM32 ETZPC
plat-stm32mp1: shared_resource stops checking clock dependencies
Remove management of STM32MP15 secure clock support from the platform specific share_resource.c driver. It is not needed STM32 ETZPC and RCC platform drivers now checks these dependencies.
Therefore the change removes stm32mp_register_clock_parents_secure() and its related and ensures stm32mp_register_[non_]secure_xxx() (from shared_resource.c driver) is not used for a clock (here PLL3).
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
show more ...
|
| f0440c1f | 30-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: stm32mp15: default disable mckprot hardening
Default disable RCC MCKPROT hardening configuration for STM32MP15 platforms since remoteproc driver enables it when required.
Remove disab
drivers: clk: stm32mp15: default disable mckprot hardening
Default disable RCC MCKPROT hardening configuration for STM32MP15 platforms since remoteproc driver enables it when required.
Remove disabling of RCC MCKPROT from STM32MP15 shared_resource driver since this is now done from the STM32MP15 clock driver.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
show more ...
|
| 6efa483f | 02-Jul-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: don't mix error codes in stm32mp25 driver
Don't mix error codes in stm32mp25 clock driver: some function return a TEE_Result value, some return a 0/-1 integer value.
Signed-off-by: Et
drivers: clk: don't mix error codes in stm32mp25 driver
Don't mix error codes in stm32mp25 clock driver: some function return a TEE_Result value, some return a 0/-1 integer value.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 2604f62d | 02-Jul-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: fix error cases in STM32MP25 clocks
Fix missing test on some function return code in stm32mp25 clock driver.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by
drivers: clk: fix error cases in STM32MP25 clocks
Fix missing test on some function return code in stm32mp25 clock driver.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 98642cf4 | 02-Jul-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: restore clock on clk_stm32_flexgen_get_round_rate() failure
Disable the enabled clock in clk_stm32_flexgen_get_round_rate() when the clock failed to enable.
Signed-off-by: Etienne Car
drivers: clk: restore clock on clk_stm32_flexgen_get_round_rate() failure
Disable the enabled clock in clk_stm32_flexgen_get_round_rate() when the clock failed to enable.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| 6a977fc4 | 02-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: clk: stm32: fix stm32mp13 clock gates initialization
Correct STM32MP13 clock gates initialization regarding the enable reference counting. The fixed commit introduced side effect where cloc
drivers: clk: stm32: fix stm32mp13 clock gates initialization
Correct STM32MP13 clock gates initialization regarding the enable reference counting. The fixed commit introduced side effect where clock gates with a disable init state overflow the gate refcount to -1 and clock gates with a enable init state take a refcount that is never released.
For this purpose, add stm32_gate_set_init_state() function in stm32 clock core driver for STM32MP13 gate clocks initialization expects to set some clock gate hardware state (enabled or disabled) before any refcount is considered.
Fixes: 2b028a2ba197 ("clk: implement multi-gate management at core level") Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| cf0b089d | 28-Aug-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
clk: stm32-core: set clock number to 0 if node is not found
If fdt_clk_stm32_parse_by_name() is called for a clock node that is not present, the fdt_getprop() may return an error value for len. In t
clk: stm32-core: set clock number to 0 if node is not found
If fdt_clk_stm32_parse_by_name() is called for a clock node that is not present, the fdt_getprop() may return an error value for len. In this case, set *nb to 0 instead of returning an error code.
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Gabriel FERNANDEZ <gabriel.fernandez@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|