| #
6a0116ed |
| 04-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: use fdt_reg_info()
Use fdt_reg_info() instead of fdt_reg_base_address() and fdt_reg_size() to optimize look up in the DT due to finding parent node.
Signed-off-by: Etienne Carriere <etienn
drivers: use fdt_reg_info()
Use fdt_reg_info() instead of fdt_reg_base_address() and fdt_reg_size() to optimize look up in the DT due to finding parent node.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
893a762d |
| 23-Jun-2023 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_bsec: implement the get otp by phandle
Add a new interface stm32_bsec_find_otp_by_phandle() to retrieve localization of an OTP from a given node phandle.
When the node phandle is abs
drivers: stm32_bsec: implement the get otp by phandle
Add a new interface stm32_bsec_find_otp_by_phandle() to retrieve localization of an OTP from a given node phandle.
When the node phandle is absent in the NVMEM node, layout_cell->phandle = 0 and reference to this OTP with this API function is not possible.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
show more ...
|
| #
9f007225 |
| 12-Dec-2022 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_bsec: add support for bits property in the DT
Adds the possibility to specify the number of managed bit in the NVMEM cell device tree description, using the optional bits property and
drivers: stm32_bsec: add support for bits property in the DT
Adds the possibility to specify the number of managed bit in the NVMEM cell device tree description, using the optional bits property and removes restriction on aligned NVMEM cell on 32-bit word by supporting bit offset in stm32_bsec_find_otp_in_nvmem_layout().
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
show more ...
|
| #
38df614f |
| 11-Jul-2022 |
Lionel Debieve <lionel.debieve@foss.st.com> |
drivers: stm32_bsec: keep stm32_bsec_permanent_lock_otp() under flag
Keep the function to access the OTP lock under the CFG_STM32_BSEC_WRITE flag to align with the write function.
Reviewed-by: Etie
drivers: stm32_bsec: keep stm32_bsec_permanent_lock_otp() under flag
Keep the function to access the OTP lock under the CFG_STM32_BSEC_WRITE flag to align with the write function.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
show more ...
|
| #
01a06793 |
| 27-Jan-2023 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_bsec: add BSEC_DEN_ALL_MSK support
Correctly handle the reserved bits in register BSEC_DEN with the mask BSEC_DEN_ALL_MSK.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com
drivers: stm32_bsec: add BSEC_DEN_ALL_MSK support
Correctly handle the reserved bits in register BSEC_DEN with the mask BSEC_DEN_ALL_MSK.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
show more ...
|
| #
4fb18124 |
| 02-Jun-2023 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_bsec: fix stm32_bsec_find_otp_in_nvmem_layout()
Remove the unnecessary ';' at the end of the function.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Pat
drivers: stm32_bsec: fix stm32_bsec_find_otp_in_nvmem_layout()
Remove the unnecessary ';' at the end of the function.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
show more ...
|
| #
9a54d484 |
| 15-Jun-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: fix timeouts initialization
If OP-TEE is rescheduled right after the timeouts are initialized in power_down_safmem() and power_up_safmem(), the timeout might be elapsed when res
drivers: stm32_bsec: fix timeouts initialization
If OP-TEE is rescheduled right after the timeouts are initialized in power_down_safmem() and power_up_safmem(), the timeout might be elapsed when resuming the function. This would cause the while loop to break instantly and there will be no delay between configuring the registers and reading the status.
Initializes the timeout after configuring the registers.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
ac16eac3 |
| 12-Jun-2023 |
Jose Quaresma <jose.quaresma@foundries.io> |
core: drivers: stm32_bsec: Fix conflicting types due to enum/integer mismatch
This is an error with gcc13 [-Werror=enum-int-mismatch]
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-
core: drivers: stm32_bsec: Fix conflicting types due to enum/integer mismatch
This is an error with gcc13 [-Werror=enum-int-mismatch]
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
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 ...
|
| #
10fb0d97 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: use DT NVMEM layout API
Uses OTP definition in the device tree, by using the function stm32_bsec_find_otp_in_nvmem_layout() and removes the hardcoded OTP index in platform confi
drivers: stm32_bsec: use DT NVMEM layout API
Uses OTP definition in the device tree, by using the function stm32_bsec_find_otp_in_nvmem_layout() and removes the hardcoded OTP index in platform config.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> 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@linaro.org>
show more ...
|
| #
0ec45216 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: st,non-secure-otp-provisioning property
Implementation of a new "st,non-secure-provisioning-otp" property, destined for non-secure OTP access with restrictions. At BSEC initiali
drivers: stm32_bsec: st,non-secure-otp-provisioning property
Implementation of a new "st,non-secure-provisioning-otp" property, destined for non-secure OTP access with restrictions. At BSEC initialization, OTPs defined with this property will grant their access to non-secure world only if the fuses are not permanently locked.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
0042538e |
| 05-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
plat-stm32mp1: fix visibility of stm32_bsec_shadow_register()
Makes stm32_bsec_shadow_register() function a visible driver API function as it is needed when CFG_STM32_BSEC_SIP is enabled. Fixed comm
plat-stm32mp1: fix visibility of stm32_bsec_shadow_register()
Makes stm32_bsec_shadow_register() function a visible driver API function as it is needed when CFG_STM32_BSEC_SIP is enabled. Fixed commit made it a local function which was wrong.
Fixes: a638030bce84 ("drivers: stm32_bsec: remove unused functions") Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
4b4b84a8 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: remove protection on debug configuration
Keeps stm32_bsec_write_debug_conf() out of CFG_STM32_BSEC_WRITE purpose. This switch must protect OTP memory writes, not accesses to BSE
drivers: stm32_bsec: remove protection on debug configuration
Keeps stm32_bsec_write_debug_conf() out of CFG_STM32_BSEC_WRITE purpose. This switch must protect OTP memory writes, not accesses to BSEC configuration registers.
CFG_STM32_BSEC_WRITE is now default enabled and not set to CFG_TEE_CORE_DEBUG value.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
a638030b |
| 07-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: remove unused functions
Removes unused functions stm32_bsec_otp_lock() and stm32_bsec_shadow_register().
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-o
drivers: stm32_bsec: remove unused functions
Removes unused functions stm32_bsec_otp_lock() and stm32_bsec_shadow_register().
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@linaro.org>
show more ...
|
| #
e090bb5a |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: update for stm32mp13
Adds support for stm32mp13x platforms in BSEC driver. Permanent lock status is updated without reset.
Signed-off-by: Patrick Delaunay <patrick.delaunay@fos
drivers: stm32_bsec: update for stm32mp13
Adds support for stm32mp13x platforms in BSEC driver. Permanent lock status is updated without reset.
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@linaro.org>
show more ...
|
| #
d6df31b0 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: add low power management
Adds low power management in BSEC driver to save and restore the debug settings.
It is a preliminary step for BSEC support on STM32MP13.
Signed-off-by
drivers: stm32_bsec: add low power management
Adds low power management in BSEC driver to save and restore the debug settings.
It is a preliminary step for BSEC support on STM32MP13.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
7dfc80ab |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: add new generic interfaces
Exports generic functions to retrieve the BSEC state and check if a fuse can be read depending on the BSEC current state. Adds some robustness in the
drivers: stm32_bsec: add new generic interfaces
Exports generic functions to retrieve the BSEC state and check if a fuse can be read depending on the BSEC current state. Adds some robustness in the driver to enforce security when trying to access a fuse.
It is a preliminary step for BSEC PTA introduction.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> 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@linaro.org>
show more ...
|
| #
93114f2e |
| 07-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: support NVMEM cell description in device-tree
Support the nvmem cells description in device tree and add the platform helper function stm32_bsec_find_otp_in_nvmem_layout() that
drivers: stm32_bsec: support NVMEM cell description in device-tree
Support the nvmem cells description in device tree and add the platform helper function stm32_bsec_find_otp_in_nvmem_layout() that allows drivers to find an OTP location (BSEC word number and bit size) from the OTP string identifier, name of the cell in device tree.
The bsec driver directly reads the nvmem cells sub node of bsec device.
This allow to remove the hardcoded OTP index in platform and is aligned with linux kernel binding.
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@linaro.org>
show more ...
|
| #
1ff52b85 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: move debug defines to include
Moves definition of DEBUG status macros from driver source file to its header file to allow other drivers to control the debug level. Introduces BS
drivers: stm32_bsec: move debug defines to include
Moves definition of DEBUG status macros from driver source file to its header file to allow other drivers to control the debug level. Introduces BSEC_DEBUG_ALL that is the default debug configuration. Removes configuration masking as it has no use.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
27a02b1e |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: use _fdt_reg* API
Changes bsec_dt_otp_nsec_access() to use _fdt_reg_base_address() and _fdt_reg_size().
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewe
drivers: stm32_bsec: use _fdt_reg* API
Changes bsec_dt_otp_nsec_access() to use _fdt_reg_base_address() and _fdt_reg_size().
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
c6d2483a |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: correct address in lock support for any upper_base value
The address computed in stm32_bsec_permanent_lock_otp (with hardcoded +2 offset) only supports OTP upper base offset 32.
drivers: stm32_bsec: correct address in lock support for any upper_base value
The address computed in stm32_bsec_permanent_lock_otp (with hardcoded +2 offset) only supports OTP upper base offset 32. This patch corrects to handle any value of OTP upper base.
This patch corrects to handle any value of OTP upper base. and simplify this part by using division clearer than mask in this context.
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@linaro.org>
show more ...
|
| #
4bbd20f1 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: use U() for unsigned constants
Updates with the U() macro as described in the coding guidelines.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatie
drivers: stm32_bsec: use U() for unsigned constants
Updates with the U() macro as described in the coding guidelines.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8396f62e |
| 15-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: rework and move BITS_PER_WORD
Transforms BITS_PER_WORD to BSEC_BITS_PER_WORD to specify it is BSEC-related and move it to BSEC driver header file.
Adds BSEC_BYTES_PER_WORD for
drivers: stm32_bsec: rework and move BITS_PER_WORD
Transforms BITS_PER_WORD to BSEC_BITS_PER_WORD to specify it is BSEC-related and move it to BSEC driver header file.
Adds BSEC_BYTES_PER_WORD for later use.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8c8316db |
| 24-Nov-2021 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_bsec: move to early_init stage
BSEC driver shall initialize a early_init initcall level to prepare OTP access needed to read the HUK from OTPs.
Acked-by: Jerome Forissier <jerome@for
drivers: stm32_bsec: move to early_init stage
BSEC driver shall initialize a early_init initcall level to prepare OTP access needed to read the HUK from OTPs.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|