| #
7d9d593d |
| 05-Feb-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: firewall: stm32_etzpc: remove header file
Remove stm32_etzpc.h header file that is not required since the declared and defined resources are used internally in stm32_etzpc.c
By the way, al
drivers: firewall: stm32_etzpc: remove header file
Remove stm32_etzpc.h header file that is not required since the declared and defined resources are used internally in stm32_etzpc.c
By the way, also remove inclusion of stm32mp15-etzpc.h DT bindings header file from stm32_rng.c where it is not needed.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
afabc705 |
| 22-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_rng: remove registering to shared_resources driver
Remove registering of STM32 RNG driver to shared_resources driver that is deprecated since integration of the firewall framework and
drivers: stm32_rng: remove registering to shared_resources driver
Remove registering of STM32 RNG driver to shared_resources driver that is deprecated since integration of the firewall framework and will soon be removed.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
9a0e54f3 |
| 08-Oct-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: embed ETZPC functions when CFG_STM32_ETZPC is set
On platforms when CFG_STM32_ETZPC is disabled, ETZPC cannot be interrogated to get decprot attributes. Therefore do not embed ET
drivers: stm32_rng: embed ETZPC functions when CFG_STM32_ETZPC is set
On platforms when CFG_STM32_ETZPC is disabled, ETZPC cannot be interrogated to get decprot attributes. Therefore do not embed ETZPC related code.
While there, revert commit 326382a059a8 ("drivers: stm32_rng: MP15 RNG is non-secure when PRNG is enable") and prefer to use ETZPC API.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Fixes: d773ec0baf4c ("drivers: stm32_rng: update clock and power management") Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
033d7b3f |
| 02-May-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
dt-bindings: add platform specific ETZPC bindings
Define ETZPC bindings for STM32MP15 and STM32MP13 and add these header files into the stm32mp_dt_bindings helper. While there, also update some incl
dt-bindings: add platform specific ETZPC bindings
Define ETZPC bindings for STM32MP15 and STM32MP13 and add these header files into the stm32mp_dt_bindings helper. While there, also update some includes to fix the path errors.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
326382a0 |
| 14-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_rng: MP15 RNG is non-secure when PRNG is enable
Register stm32_rng device as non-secure when software PRNG is enabled instead of testing the firewall configuration that is applied fro
drivers: stm32_rng: MP15 RNG is non-secure when PRNG is enable
Register stm32_rng device as non-secure when software PRNG is enabled instead of testing the firewall configuration that is applied from stm32mp1_init_final_shres() at driver_init_late initcall level, far after RNG initialization.
Fixes: d773ec0baf4c ("drivers: stm32_rng: update clock and power management") Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
d773ec0b |
| 29-Aug-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: update clock and power management
Better handle clock and reset resources by implementing enable_rng_clock()/disable_rng_clock(). Do not implement a PM callback if OP-TEE runs wi
drivers: stm32_rng: update clock and power management
Better handle clock and reset resources by implementing enable_rng_clock()/disable_rng_clock(). Do not implement a PM callback if OP-TEE runs with a software RNG. Finally, implement shared resource management only for stm32mp15x platforms as it is not used on other platforms.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
f2fe4f00 |
| 18-Sep-2024 |
Thomas Bourgoin <thomas.bourgoin@foss.st.com> |
drivers: stm32_rng: use default PRNG init if RNG is disabled in the DT
In case RNG peripheral is not enabled in device tree, fallback to the default RNG initialization implementation.
Signed-off-by
drivers: stm32_rng: use default PRNG init if RNG is disabled in the DT
In case RNG peripheral is not enabled in device tree, fallback to the default RNG initialization implementation.
Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
cc707b85 |
| 20-Mar-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_rng: remove use of CFG_PM
Remove use of CFG_PM from STM32 RNG driver since this configuration switch is not defined in OP-TEE OS.
Reviewed-by: Gatien Chevallier <gatien.chevallier@fo
drivers: stm32_rng: remove use of CFG_PM
Remove use of CFG_PM from STM32 RNG driver since this configuration switch is not defined in OP-TEE OS.
Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
b82b7e73 |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: print RNG version at driver probe time
Print the RNG version that is read from RNG_VERR at driver probe time.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Re
drivers: stm32_rng: print RNG version at driver probe time
Print the RNG version that is read from RNG_VERR at driver probe time.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
aa12f203 |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: put max noise freq in compatible data
Define max noise clock frequency in the compatible data structure. This avoids having configuration flags in the driver.
While there, updat
drivers: stm32_rng: put max noise freq in compatible data
Define max noise clock frequency in the compatible data structure. This avoids having configuration flags in the driver.
While there, update STM32MP13/15 max RNG clock frequency to 48MHz to align with latest certifications.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
5959d83f |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: move RNG configuration to compat data
Register values cannot be part of the device tree. As choosing another RNG configuration that is not the default NIST-certified one should b
drivers: stm32_rng: move RNG configuration to compat data
Register values cannot be part of the device tree. As choosing another RNG configuration that is not the default NIST-certified one should be uncommon, it is acceptable to define it in the compatible data and require to re-compile OP-TEE to change the RNG configuration.
Also adds support for RNG V4.1 and above. These versions have a power optimization and a modification of the seed error concealment. New health tests and noise source registers are configurable and are part of the RNG configuration.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
45da6509 |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: add stm32mp25 support
Add stm32mp25 platform support in stm32_rng driver. On this platform, a security clock is shared between some hardware blocks. For the RNG, it is the RNG ke
drivers: stm32_rng: add stm32mp25 support
Add stm32mp25 platform support in stm32_rng driver. On this platform, a security clock is shared between some hardware blocks. For the RNG, it is the RNG kernel clock. Therefore, the clock gate is no more shared between the RNG bus and kernel clocks as on STM32MP1x platforms and the bus clock has to be managed on its own.
Define the number of clock in the compatible data.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
eb5cf770 |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: ensure conditional reset sequence is done
Add a check on RNG_CR_CONDRST being cleared before continuing the program to ensure that the conditional reset sequence is done.
Signed
drivers: stm32_rng: ensure conditional reset sequence is done
Add a check on RNG_CR_CONDRST being cleared before continuing the program to ensure that the conditional reset sequence is done.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
c2c5b4be |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: fix comment in stm32_rng_pm_resume()
Fix comment about the application of the RNG configuration in stm32_rng_pm_resume(). Old comment mentioned reserved bits.
Signed-off-by: Gat
drivers: stm32_rng: fix comment in stm32_rng_pm_resume()
Fix comment about the application of the RNG configuration in stm32_rng_pm_resume(). Old comment mentioned reserved bits.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
f9508605 |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: remove __unused attribute
Removes a useless __unused attribute for stm32_rng_probe() argument.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etie
drivers: stm32_rng: remove __unused attribute
Removes a useless __unused attribute for stm32_rng_probe() argument.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
fb1681df |
| 10-Jan-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: check clock enable call
Fixes clock enable request that does not check the return value.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Ca
drivers: stm32_rng: check clock enable call
Fixes clock enable request that does not check the return value.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
23bdf063 |
| 24-May-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_rng: fix case when RNG is not ready
Checks RNG data ready status bit before each read of a 32bit sample from the RNG FIFO. Indeed the data ready status bit tells that the RNG FIFO con
drivers: stm32_rng: fix case when RNG is not ready
Checks RNG data ready status bit before each read of a 32bit sample from the RNG FIFO. Indeed the data ready status bit tells that the RNG FIFO contains random bytes by burst of 32bit word, not by burst of 4 32bit words.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
f354a5d8 |
| 05-Apr-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Cheval
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
cf8bb459 |
| 10-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: stm32_*: remove code for when DT is not supported
This change removes implementation managing cases when CFG_EMBED_DTB or CFG_DT are disabled. This change aims to simplify source files and
drivers: stm32_*: remove code for when DT is not supported
This change removes implementation managing cases when CFG_EMBED_DTB or CFG_DT are disabled. This change aims to simplify source files and is related to commit [1] from which stm32mp1 platform requires DTB for the drivers configuration.
Link: [1] 474ad1856b56 ("plat-stm32mp1: conf: mandate the use of device tree on STM32MP1x platforms") Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
98c36268 |
| 18-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: make stm32_rng_read() static
Reading a random number should be done via the generic API.
Makes stm32_rng_read() static as it is unused in other files and remove stm32_rng.h, whi
drivers: stm32_rng: make stm32_rng_read() static
Reading a random number should be done via the generic API.
Makes stm32_rng_read() static as it is unused in other files and remove stm32_rng.h, which is now empty.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
27f3087b |
| 18-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: override plat_rng_init() if hardware RNG
Avoids useless operations by overriding plat_rng_init() and do nothing.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
drivers: stm32_rng: override plat_rng_init() if hardware RNG
Avoids useless operations by overriding plat_rng_init() and do nothing.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
3e64c635 |
| 18-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: implement late seed error detection
As per STM32MP1x specification, rare seed error conditions must be considered when random value read from DR register is zero.
Signed-off-by:
drivers: stm32_rng: implement late seed error detection
As per STM32MP1x specification, rare seed error conditions must be considered when random value read from DR register is zero.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
29893549 |
| 18-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: pm callbacks
Implements power management (suspend/resume) functions in stm32_rng driver.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Ca
drivers: stm32_rng: pm callbacks
Implements power management (suspend/resume) functions in stm32_rng driver.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
3c752300 |
| 18-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: support clock error detection
Adds clock error detection configuration when the clock-error-detect property is set in the RNG node in the device tree.
Signed-off-by: Gatien Chev
drivers: stm32_rng: support clock error detection
Adds clock error detection configuration when the clock-error-detect property is set in the RNG node in the device tree.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
091ef005 |
| 18-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_rng: support conditional reset
Implements a RNG variant error concealment named conditional reset that requires a software sequence before RNG being able to deliver again random bytes
drivers: stm32_rng: support conditional reset
Implements a RNG variant error concealment named conditional reset that requires a software sequence before RNG being able to deliver again random bytes. It is supported by STM32MP13
RNG peripherals that are supporting conditional reset can dynamically customize their configuration. Adds support for RNG clock frequency restraint and NIST configuration.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|