diff mbox series

[2/7] configs: default activate CONFIG_RNG_STM32 for STM32MP13x platforms

Message ID 20230907162200.205602-2-gatien.chevallier@foss.st.com
State Superseded
Delegated to: Patrice Chotard
Headers show
Series [1/7] rng: stm32: rename STM32 RNG driver | expand

Commit Message

Gatien Chevallier Sept. 7, 2023, 4:21 p.m. UTC
Default embed this configuration. If OP-TEE PTA RNG is present as well,
the priority will be given to it instead of the U-Boot driver.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
 configs/stm32mp13_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Heinrich Schuchardt Sept. 8, 2023, 6:58 p.m. UTC | #1
On 9/7/23 18:21, Gatien Chevallier wrote:
> Default embed this configuration. If OP-TEE PTA RNG is present as well,
> the priority will be given to it instead of the U-Boot driver.

Are you relying here on drivers being probed in alphabetical sequence?

Best regards

Heinrich

>
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> ---
>   configs/stm32mp13_defconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
> index 82b62744f6..4a899c85de 100644
> --- a/configs/stm32mp13_defconfig
> +++ b/configs/stm32mp13_defconfig
> @@ -65,6 +65,7 @@ CONFIG_DM_REGULATOR_GPIO=y
>   CONFIG_DM_REGULATOR_SCMI=y
>   CONFIG_RESET_SCMI=y
>   CONFIG_DM_RNG=y
> +CONFIG_RNG_STM32=y
>   CONFIG_DM_RTC=y
>   CONFIG_RTC_STM32=y
>   CONFIG_SERIAL_RX_BUFFER=y
Patrick Delaunay Sept. 11, 2023, 9:50 a.m. UTC | #2
Hi,

On 9/7/23 18:21, Gatien Chevallier wrote:
> Default embed this configuration. If OP-TEE PTA RNG is present as well,
> the priority will be given to it instead of the U-Boot driver.


The STM32 RNG driver will be probed when the is activated in U-Boot 
device tree,

it is avaiable for non secure world.


OP-TEE RNG PTA will be registered when the RNG access is liited to

secure world by firewall.


For me not priority here but secure/non secure configuration, managed by 
device tree.


>
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> ---
>   configs/stm32mp13_defconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
> index 82b62744f6..4a899c85de 100644
> --- a/configs/stm32mp13_defconfig
> +++ b/configs/stm32mp13_defconfig
> @@ -65,6 +65,7 @@ CONFIG_DM_REGULATOR_GPIO=y
>   CONFIG_DM_REGULATOR_SCMI=y
>   CONFIG_RESET_SCMI=y
>   CONFIG_DM_RNG=y
> +CONFIG_RNG_STM32=y
>   CONFIG_DM_RTC=y
>   CONFIG_RTC_STM32=y
>   CONFIG_SERIAL_RX_BUFFER=y


with commit message update


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
Gatien Chevallier Sept. 11, 2023, 9:51 a.m. UTC | #3
On 9/8/23 20:58, Heinrich Schuchardt wrote:
> On 9/7/23 18:21, Gatien Chevallier wrote:
>> Default embed this configuration. If OP-TEE PTA RNG is present as well,
>> the priority will be given to it instead of the U-Boot driver.
> 
> Are you relying here on drivers being probed in alphabetical sequence?
> 
> Best regards
> 
> Heinrich
> 

Hello Heinrich,

I've made a strange wording here.

OP-TEE RNG PTA shouldn't be exposed if the RNG is non-secure as it
shouldn't be handled by the secure world. If it is, it is a bad
OP-TEE configuration.

On the contrary, if the RNG OPTEE PTA is exposed, then the OP-TEE
RNG PTA should be used. Therefore, the RNG node status shouldn't
be set to "okay" in U-boot's device tree.

Hope this solves the confusion, I'll reword the sentence.

Best regards,
Gatien

>>
>> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
>> ---
>>   configs/stm32mp13_defconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
>> index 82b62744f6..4a899c85de 100644
>> --- a/configs/stm32mp13_defconfig
>> +++ b/configs/stm32mp13_defconfig
>> @@ -65,6 +65,7 @@ CONFIG_DM_REGULATOR_GPIO=y
>>   CONFIG_DM_REGULATOR_SCMI=y
>>   CONFIG_RESET_SCMI=y
>>   CONFIG_DM_RNG=y
>> +CONFIG_RNG_STM32=y
>>   CONFIG_DM_RTC=y
>>   CONFIG_RTC_STM32=y
>>   CONFIG_SERIAL_RX_BUFFER=y
>
diff mbox series

Patch

diff --git a/configs/stm32mp13_defconfig b/configs/stm32mp13_defconfig
index 82b62744f6..4a899c85de 100644
--- a/configs/stm32mp13_defconfig
+++ b/configs/stm32mp13_defconfig
@@ -65,6 +65,7 @@  CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_REGULATOR_SCMI=y
 CONFIG_RESET_SCMI=y
 CONFIG_DM_RNG=y
+CONFIG_RNG_STM32=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_STM32=y
 CONFIG_SERIAL_RX_BUFFER=y