* [PATCH] arm64: defconfig: Enable secure QFPROM driver
@ 2024-06-19 10:56 Komal Bajaj
2024-06-19 10:57 ` Dmitry Baryshkov
2024-06-19 11:08 ` Krzysztof Kozlowski
0 siblings, 2 replies; 11+ messages in thread
From: Komal Bajaj @ 2024-06-19 10:56 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Bjorn Andersson,
Krzysztof Kozlowski, Dmitry Baryshkov, Konrad Dybcio,
Srinivas Kandagatla
Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, quic_mojha,
Komal Bajaj
Enable the secure QFPROM driver which is used by QDU1000
platform for reading the secure qfprom region to get the
DDR channel configuration.
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 838b4466d6f6..c940437ae1b3 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
CONFIG_NVMEM_MESON_EFUSE=m
CONFIG_NVMEM_MTK_EFUSE=y
CONFIG_NVMEM_QCOM_QFPROM=y
+CONFIG_NVMEM_QCOM_SEC_QFPROM=y
CONFIG_NVMEM_RMEM=m
CONFIG_NVMEM_ROCKCHIP_EFUSE=y
CONFIG_NVMEM_ROCKCHIP_OTP=y
--
2.42.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 10:56 [PATCH] arm64: defconfig: Enable secure QFPROM driver Komal Bajaj
@ 2024-06-19 10:57 ` Dmitry Baryshkov
2024-06-19 11:08 ` Krzysztof Kozlowski
1 sibling, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2024-06-19 10:57 UTC (permalink / raw)
To: Komal Bajaj
Cc: Catalin Marinas, Will Deacon, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm, quic_mojha
On Wed, 19 Jun 2024 at 13:57, Komal Bajaj <quic_kbajaj@quicinc.com> wrote:
>
> Enable the secure QFPROM driver which is used by QDU1000
> platform for reading the secure qfprom region to get the
> DDR channel configuration.
>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
> arch/arm64/configs/defconfig | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 10:56 [PATCH] arm64: defconfig: Enable secure QFPROM driver Komal Bajaj
2024-06-19 10:57 ` Dmitry Baryshkov
@ 2024-06-19 11:08 ` Krzysztof Kozlowski
2024-06-19 12:10 ` Mukesh Ojha
1 sibling, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-19 11:08 UTC (permalink / raw)
To: Komal Bajaj, Catalin Marinas, Will Deacon, Bjorn Andersson,
Dmitry Baryshkov, Konrad Dybcio, Srinivas Kandagatla
Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, quic_mojha
On 19/06/2024 12:56, Komal Bajaj wrote:
> Enable the secure QFPROM driver which is used by QDU1000
Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
Qualcomm downstream stuff.
> platform for reading the secure qfprom region to get the
> DDR channel configuration.
>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
> arch/arm64/configs/defconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 838b4466d6f6..c940437ae1b3 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> CONFIG_NVMEM_MESON_EFUSE=m
> CONFIG_NVMEM_MTK_EFUSE=y
> CONFIG_NVMEM_QCOM_QFPROM=y
> +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
Module
> CONFIG_NVMEM_RMEM=m
> CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> CONFIG_NVMEM_ROCKCHIP_OTP=y
> --
> 2.42.0
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 11:08 ` Krzysztof Kozlowski
@ 2024-06-19 12:10 ` Mukesh Ojha
2024-06-19 12:23 ` Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Mukesh Ojha @ 2024-06-19 12:10 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Komal Bajaj, Catalin Marinas, Will Deacon, Bjorn Andersson,
Dmitry Baryshkov, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
> On 19/06/2024 12:56, Komal Bajaj wrote:
> > Enable the secure QFPROM driver which is used by QDU1000
>
> Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
> Qualcomm downstream stuff.
>
> > platform for reading the secure qfprom region to get the
> > DDR channel configuration.
> >
> > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > ---
> > arch/arm64/configs/defconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > index 838b4466d6f6..c940437ae1b3 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> > CONFIG_NVMEM_MESON_EFUSE=m
> > CONFIG_NVMEM_MTK_EFUSE=y
> > CONFIG_NVMEM_QCOM_QFPROM=y
> > +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
>
> Module
Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
should be m or both y
-Mukesh
>
> > CONFIG_NVMEM_RMEM=m
> > CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> > CONFIG_NVMEM_ROCKCHIP_OTP=y
> > --
> > 2.42.0
> >
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 12:10 ` Mukesh Ojha
@ 2024-06-19 12:23 ` Krzysztof Kozlowski
2024-06-19 13:14 ` Dmitry Baryshkov
2024-06-19 16:42 ` Bjorn Andersson
2 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-19 12:23 UTC (permalink / raw)
To: Mukesh Ojha
Cc: Komal Bajaj, Catalin Marinas, Will Deacon, Bjorn Andersson,
Dmitry Baryshkov, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On 19/06/2024 14:10, Mukesh Ojha wrote:
> On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
>> On 19/06/2024 12:56, Komal Bajaj wrote:
>>> Enable the secure QFPROM driver which is used by QDU1000
>>
>> Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
>> Qualcomm downstream stuff.
>>
>>> platform for reading the secure qfprom region to get the
>>> DDR channel configuration.
>>>
>>> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
>>> ---
>>> arch/arm64/configs/defconfig | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
>>> index 838b4466d6f6..c940437ae1b3 100644
>>> --- a/arch/arm64/configs/defconfig
>>> +++ b/arch/arm64/configs/defconfig
>>> @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
>>> CONFIG_NVMEM_MESON_EFUSE=m
>>> CONFIG_NVMEM_MTK_EFUSE=y
>>> CONFIG_NVMEM_QCOM_QFPROM=y
>>> +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
>>
>> Module
>
> Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
> Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
> should be m or both y
Why? There is no dependency in Kconfig.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 12:10 ` Mukesh Ojha
2024-06-19 12:23 ` Krzysztof Kozlowski
@ 2024-06-19 13:14 ` Dmitry Baryshkov
2024-06-19 16:38 ` Mukesh Ojha
2024-06-19 16:42 ` Bjorn Andersson
2 siblings, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2024-06-19 13:14 UTC (permalink / raw)
To: Mukesh Ojha
Cc: Krzysztof Kozlowski, Komal Bajaj, Catalin Marinas, Will Deacon,
Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On Wed, Jun 19, 2024 at 05:40:42PM GMT, Mukesh Ojha wrote:
> On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
> > On 19/06/2024 12:56, Komal Bajaj wrote:
> > > Enable the secure QFPROM driver which is used by QDU1000
> >
> > Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
> > Qualcomm downstream stuff.
> >
> > > platform for reading the secure qfprom region to get the
> > > DDR channel configuration.
> > >
> > > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > > ---
> > > arch/arm64/configs/defconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > index 838b4466d6f6..c940437ae1b3 100644
> > > --- a/arch/arm64/configs/defconfig
> > > +++ b/arch/arm64/configs/defconfig
> > > @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> > > CONFIG_NVMEM_MESON_EFUSE=m
> > > CONFIG_NVMEM_MTK_EFUSE=y
> > > CONFIG_NVMEM_QCOM_QFPROM=y
> > > +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
> >
> > Module
>
> Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
> Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
> should be m or both y
Looking back in time, CONFIG_NVMEM_QCOM_QFPROM was enabled as built-in
to get TSENS to work (which makes sense, we don't want the CPUs to
burn). What the actual users for NVMEM_QCOM_SEC_QFPROM?
>
> -Mukesh
> >
> > > CONFIG_NVMEM_RMEM=m
> > > CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> > > CONFIG_NVMEM_ROCKCHIP_OTP=y
> > > --
> > > 2.42.0
> > >
> >
> > Best regards,
> > Krzysztof
> >
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 13:14 ` Dmitry Baryshkov
@ 2024-06-19 16:38 ` Mukesh Ojha
2024-06-19 16:51 ` Bjorn Andersson
0 siblings, 1 reply; 11+ messages in thread
From: Mukesh Ojha @ 2024-06-19 16:38 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Krzysztof Kozlowski, Komal Bajaj, Catalin Marinas, Will Deacon,
Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On Wed, Jun 19, 2024 at 04:14:50PM +0300, Dmitry Baryshkov wrote:
> On Wed, Jun 19, 2024 at 05:40:42PM GMT, Mukesh Ojha wrote:
> > On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
> > > On 19/06/2024 12:56, Komal Bajaj wrote:
> > > > Enable the secure QFPROM driver which is used by QDU1000
> > >
> > > Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
> > > Qualcomm downstream stuff.
> > >
> > > > platform for reading the secure qfprom region to get the
> > > > DDR channel configuration.
> > > >
> > > > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > > > ---
> > > > arch/arm64/configs/defconfig | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > > index 838b4466d6f6..c940437ae1b3 100644
> > > > --- a/arch/arm64/configs/defconfig
> > > > +++ b/arch/arm64/configs/defconfig
> > > > @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> > > > CONFIG_NVMEM_MESON_EFUSE=m
> > > > CONFIG_NVMEM_MTK_EFUSE=y
> > > > CONFIG_NVMEM_QCOM_QFPROM=y
> > > > +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
> > >
> > > Module
> >
> > Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
> > Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
> > should be m or both y
>
> Looking back in time, CONFIG_NVMEM_QCOM_QFPROM was enabled as built-in
> to get TSENS to work (which makes sense, we don't want the CPUs to
> burn). What the actual users for NVMEM_QCOM_SEC_QFPROM?
CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM are similar driver
for same device and only difference is register region lies in secure space
for the latter;
Currently, LLCC is the only client for CONFIG_NVMEM_QCOM_SEC_QFPROM, however
if someday if the region lies in non-secure space in that case, client
started depending on CONFIG_NVMEM_QCOM_QFPROM.
It reminds me, we have not yet put depends on for LLCC on NVMEM_QCOM_SEC_QFPROM
doing which is resulting in recursive dependency[1].
It looks we need to select NVMEM_QCOM_SEC_QFPROM from QCOM_LLCC config and that
may not need config enablement here.
[1]
fs/sysfs/Kconfig:2:error: recursive dependency detected!
fs/sysfs/Kconfig:2: symbol SYSFS is selected by CONFIGFS_FS
fs/configfs/Kconfig:2: symbol CONFIGFS_FS is selected by GPIO_SIM
drivers/gpio/Kconfig:1884: symbol GPIO_SIM depends on GPIOLIB
drivers/gpio/Kconfig:6: symbol GPIOLIB is selected by I2C_MUX_LTC4306
drivers/i2c/muxes/Kconfig:47: symbol I2C_MUX_LTC4306 depends on I2C_MUX
drivers/i2c/Kconfig:62: symbol I2C_MUX is selected by DRM_SII902X
drivers/gpu/drm/bridge/Kconfig:270: symbol DRM_SII902X depends on DRM_BRIDGE
drivers/gpu/drm/bridge/Kconfig:2: symbol DRM_BRIDGE is selected by DRM_MSM
drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on QCOM_LLCC
drivers/soc/qcom/Kconfig:47: symbol QCOM_LLCC depends on NVMEM_QCOM_SEC_QFPROM
drivers/nvmem/Kconfig:230: symbol NVMEM_QCOM_SEC_QFPROM depends on NVMEM
drivers/nvmem/Kconfig:2: symbol NVMEM is selected by EEPROM_AT24
drivers/misc/eeprom/Kconfig:4: symbol EEPROM_AT24 depends on SYSFS
For a resolution refer to Documentation/kbuild/kconfig-language.rst
-Mukesh
>
> >
> > -Mukesh
> > >
> > > > CONFIG_NVMEM_RMEM=m
> > > > CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> > > > CONFIG_NVMEM_ROCKCHIP_OTP=y
> > > > --
> > > > 2.42.0
> > > >
> > >
> > > Best regards,
> > > Krzysztof
> > >
>
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 12:10 ` Mukesh Ojha
2024-06-19 12:23 ` Krzysztof Kozlowski
2024-06-19 13:14 ` Dmitry Baryshkov
@ 2024-06-19 16:42 ` Bjorn Andersson
2024-06-20 9:43 ` Komal Bajaj
2 siblings, 1 reply; 11+ messages in thread
From: Bjorn Andersson @ 2024-06-19 16:42 UTC (permalink / raw)
To: Mukesh Ojha
Cc: Krzysztof Kozlowski, Komal Bajaj, Catalin Marinas, Will Deacon,
Dmitry Baryshkov, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On Wed, Jun 19, 2024 at 05:40:42PM +0530, Mukesh Ojha wrote:
> On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
> > On 19/06/2024 12:56, Komal Bajaj wrote:
> > > Enable the secure QFPROM driver which is used by QDU1000
> >
> > Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
> > Qualcomm downstream stuff.
> >
> > > platform for reading the secure qfprom region to get the
> > > DDR channel configuration.
> > >
> > > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > > ---
> > > arch/arm64/configs/defconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > index 838b4466d6f6..c940437ae1b3 100644
> > > --- a/arch/arm64/configs/defconfig
> > > +++ b/arch/arm64/configs/defconfig
> > > @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> > > CONFIG_NVMEM_MESON_EFUSE=m
> > > CONFIG_NVMEM_MTK_EFUSE=y
> > > CONFIG_NVMEM_QCOM_QFPROM=y
> > > +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
> >
> > Module
>
> Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
> Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
> should be m or both y
>
While that would be a convenient guideline, you're adding runtime
overhead to all other targets (Qualcomm and non-Qualcomm) so the desire
to keep anything that can module outweigh such convenience.
Based on the recent addition of llcc and qfprom nodes I'm _guessing_
that LLCC is the one user of this today, and it is =m, so therefore
SEC_QFPROM can be =m as well.
By expanding the commit message slightly, we could have avoided the
"why?" questions and the need for me to "guess" the actual dependency.
Regards,
Bjorn
> -Mukesh
> >
> > > CONFIG_NVMEM_RMEM=m
> > > CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> > > CONFIG_NVMEM_ROCKCHIP_OTP=y
> > > --
> > > 2.42.0
> > >
> >
> > Best regards,
> > Krzysztof
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 16:38 ` Mukesh Ojha
@ 2024-06-19 16:51 ` Bjorn Andersson
2024-06-19 18:46 ` Mukesh Ojha
0 siblings, 1 reply; 11+ messages in thread
From: Bjorn Andersson @ 2024-06-19 16:51 UTC (permalink / raw)
To: Mukesh Ojha
Cc: Dmitry Baryshkov, Krzysztof Kozlowski, Komal Bajaj,
Catalin Marinas, Will Deacon, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On Wed, Jun 19, 2024 at 10:08:10PM +0530, Mukesh Ojha wrote:
> On Wed, Jun 19, 2024 at 04:14:50PM +0300, Dmitry Baryshkov wrote:
> > On Wed, Jun 19, 2024 at 05:40:42PM GMT, Mukesh Ojha wrote:
> > > On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
> > > > On 19/06/2024 12:56, Komal Bajaj wrote:
> > > > > Enable the secure QFPROM driver which is used by QDU1000
> > > >
> > > > Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
> > > > Qualcomm downstream stuff.
> > > >
> > > > > platform for reading the secure qfprom region to get the
> > > > > DDR channel configuration.
> > > > >
> > > > > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > > > > ---
> > > > > arch/arm64/configs/defconfig | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > > > index 838b4466d6f6..c940437ae1b3 100644
> > > > > --- a/arch/arm64/configs/defconfig
> > > > > +++ b/arch/arm64/configs/defconfig
> > > > > @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> > > > > CONFIG_NVMEM_MESON_EFUSE=m
> > > > > CONFIG_NVMEM_MTK_EFUSE=y
> > > > > CONFIG_NVMEM_QCOM_QFPROM=y
> > > > > +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
> > > >
> > > > Module
> > >
> > > Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
> > > Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
> > > should be m or both y
> >
> > Looking back in time, CONFIG_NVMEM_QCOM_QFPROM was enabled as built-in
> > to get TSENS to work (which makes sense, we don't want the CPUs to
> > burn). What the actual users for NVMEM_QCOM_SEC_QFPROM?
>
>
> CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM are similar driver
> for same device and only difference is register region lies in secure space
> for the latter;
>
> Currently, LLCC is the only client for CONFIG_NVMEM_QCOM_SEC_QFPROM, however
> if someday if the region lies in non-secure space in that case, client
> started depending on CONFIG_NVMEM_QCOM_QFPROM.
>
> It reminds me, we have not yet put depends on for LLCC on NVMEM_QCOM_SEC_QFPROM
> doing which is resulting in recursive dependency[1].
>
Kconfig "depends on" describes build time dependencies and LLCC doesn't
depend on NVMEM_QCOM_SEC_QFPROM.
It does depend on nvmem_cell_read_u8() being defined, but as
CONFIG_NVMEM is bool there will either be a proper implementation (=y)
or a static inline stub (=n) of this function, so we don't need to
describe this dependency.
> It looks we need to select NVMEM_QCOM_SEC_QFPROM from QCOM_LLCC config and that
> may not need config enablement here.
>
This is a runtime dependency, created through the nvmem framework by the
relationship defined in DeviceTree. We don't describe those.
Regards,
Bjorn
> [1]
> fs/sysfs/Kconfig:2:error: recursive dependency detected!
> fs/sysfs/Kconfig:2: symbol SYSFS is selected by CONFIGFS_FS
> fs/configfs/Kconfig:2: symbol CONFIGFS_FS is selected by GPIO_SIM
> drivers/gpio/Kconfig:1884: symbol GPIO_SIM depends on GPIOLIB
> drivers/gpio/Kconfig:6: symbol GPIOLIB is selected by I2C_MUX_LTC4306
> drivers/i2c/muxes/Kconfig:47: symbol I2C_MUX_LTC4306 depends on I2C_MUX
> drivers/i2c/Kconfig:62: symbol I2C_MUX is selected by DRM_SII902X
> drivers/gpu/drm/bridge/Kconfig:270: symbol DRM_SII902X depends on DRM_BRIDGE
> drivers/gpu/drm/bridge/Kconfig:2: symbol DRM_BRIDGE is selected by DRM_MSM
> drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on QCOM_LLCC
> drivers/soc/qcom/Kconfig:47: symbol QCOM_LLCC depends on NVMEM_QCOM_SEC_QFPROM
> drivers/nvmem/Kconfig:230: symbol NVMEM_QCOM_SEC_QFPROM depends on NVMEM
> drivers/nvmem/Kconfig:2: symbol NVMEM is selected by EEPROM_AT24
> drivers/misc/eeprom/Kconfig:4: symbol EEPROM_AT24 depends on SYSFS
> For a resolution refer to Documentation/kbuild/kconfig-language.rst
>
> -Mukesh
>
> >
> > >
> > > -Mukesh
> > > >
> > > > > CONFIG_NVMEM_RMEM=m
> > > > > CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> > > > > CONFIG_NVMEM_ROCKCHIP_OTP=y
> > > > > --
> > > > > 2.42.0
> > > > >
> > > >
> > > > Best regards,
> > > > Krzysztof
> > > >
> >
> > --
> > With best wishes
> > Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 16:51 ` Bjorn Andersson
@ 2024-06-19 18:46 ` Mukesh Ojha
0 siblings, 0 replies; 11+ messages in thread
From: Mukesh Ojha @ 2024-06-19 18:46 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Dmitry Baryshkov, Krzysztof Kozlowski, Komal Bajaj,
Catalin Marinas, Will Deacon, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On Wed, Jun 19, 2024 at 09:51:48AM -0700, Bjorn Andersson wrote:
> On Wed, Jun 19, 2024 at 10:08:10PM +0530, Mukesh Ojha wrote:
> > On Wed, Jun 19, 2024 at 04:14:50PM +0300, Dmitry Baryshkov wrote:
> > > On Wed, Jun 19, 2024 at 05:40:42PM GMT, Mukesh Ojha wrote:
> > > > On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
> > > > > On 19/06/2024 12:56, Komal Bajaj wrote:
> > > > > > Enable the secure QFPROM driver which is used by QDU1000
> > > > >
> > > > > Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
> > > > > Qualcomm downstream stuff.
> > > > >
> > > > > > platform for reading the secure qfprom region to get the
> > > > > > DDR channel configuration.
> > > > > >
> > > > > > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > > > > > ---
> > > > > > arch/arm64/configs/defconfig | 1 +
> > > > > > 1 file changed, 1 insertion(+)
> > > > > >
> > > > > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > > > > > index 838b4466d6f6..c940437ae1b3 100644
> > > > > > --- a/arch/arm64/configs/defconfig
> > > > > > +++ b/arch/arm64/configs/defconfig
> > > > > > @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
> > > > > > CONFIG_NVMEM_MESON_EFUSE=m
> > > > > > CONFIG_NVMEM_MTK_EFUSE=y
> > > > > > CONFIG_NVMEM_QCOM_QFPROM=y
> > > > > > +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
> > > > >
> > > > > Module
> > > >
> > > > Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
> > > > Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
> > > > should be m or both y
> > >
> > > Looking back in time, CONFIG_NVMEM_QCOM_QFPROM was enabled as built-in
> > > to get TSENS to work (which makes sense, we don't want the CPUs to
> > > burn). What the actual users for NVMEM_QCOM_SEC_QFPROM?
> >
> >
> > CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM are similar driver
> > for same device and only difference is register region lies in secure space
> > for the latter;
> >
> > Currently, LLCC is the only client for CONFIG_NVMEM_QCOM_SEC_QFPROM, however
> > if someday if the region lies in non-secure space in that case, client
> > started depending on CONFIG_NVMEM_QCOM_QFPROM.
> >
> > It reminds me, we have not yet put depends on for LLCC on NVMEM_QCOM_SEC_QFPROM
> > doing which is resulting in recursive dependency[1].
> >
>
> Kconfig "depends on" describes build time dependencies and LLCC doesn't
> depend on NVMEM_QCOM_SEC_QFPROM.
>
> It does depend on nvmem_cell_read_u8() being defined, but as
> CONFIG_NVMEM is bool there will either be a proper implementation (=y)
> or a static inline stub (=n) of this function, so we don't need to
> describe this dependency.
I remember nvmem_cell_read_u8() patch., however, got misleaded by some of the
in kernel example like.,
config ARM_QCOM_CPUFREQ_NVMEM
tristate "Qualcomm nvmem based CPUFreq"
depends on ARCH_QCOM
depends on NVMEM_QCOM_QFPROM
depends on QCOM_SMEM
select PM_OPP
help
This adds the CPUFreq driver for Qualcomm Kryo SoC based boards.
If in doubt, say N.
Here, ARM_QCOM_CPUFREQ_NVMEM should not depend on NVMEM_QCOM_QFPROM
for compilation, as NVMEM_QCOM_QFPROM is the provider driver while
all the stubs are available and ARM_QCOM_CPUFREQ_NVMEM is consumer here.
-Mukesh
>
> > It looks we need to select NVMEM_QCOM_SEC_QFPROM from QCOM_LLCC config and that
> > may not need config enablement here.
> >
>
> This is a runtime dependency, created through the nvmem framework by the
> relationship defined in DeviceTree. We don't describe those.
>
> Regards,
> Bjorn
>
> > [1]
> > fs/sysfs/Kconfig:2:error: recursive dependency detected!
> > fs/sysfs/Kconfig:2: symbol SYSFS is selected by CONFIGFS_FS
> > fs/configfs/Kconfig:2: symbol CONFIGFS_FS is selected by GPIO_SIM
> > drivers/gpio/Kconfig:1884: symbol GPIO_SIM depends on GPIOLIB
> > drivers/gpio/Kconfig:6: symbol GPIOLIB is selected by I2C_MUX_LTC4306
> > drivers/i2c/muxes/Kconfig:47: symbol I2C_MUX_LTC4306 depends on I2C_MUX
> > drivers/i2c/Kconfig:62: symbol I2C_MUX is selected by DRM_SII902X
> > drivers/gpu/drm/bridge/Kconfig:270: symbol DRM_SII902X depends on DRM_BRIDGE
> > drivers/gpu/drm/bridge/Kconfig:2: symbol DRM_BRIDGE is selected by DRM_MSM
> > drivers/gpu/drm/msm/Kconfig:3: symbol DRM_MSM depends on QCOM_LLCC
> > drivers/soc/qcom/Kconfig:47: symbol QCOM_LLCC depends on NVMEM_QCOM_SEC_QFPROM
> > drivers/nvmem/Kconfig:230: symbol NVMEM_QCOM_SEC_QFPROM depends on NVMEM
> > drivers/nvmem/Kconfig:2: symbol NVMEM is selected by EEPROM_AT24
> > drivers/misc/eeprom/Kconfig:4: symbol EEPROM_AT24 depends on SYSFS
> > For a resolution refer to Documentation/kbuild/kconfig-language.rst
> >
> > -Mukesh
> >
> > >
> > > >
> > > > -Mukesh
> > > > >
> > > > > > CONFIG_NVMEM_RMEM=m
> > > > > > CONFIG_NVMEM_ROCKCHIP_EFUSE=y
> > > > > > CONFIG_NVMEM_ROCKCHIP_OTP=y
> > > > > > --
> > > > > > 2.42.0
> > > > > >
> > > > >
> > > > > Best regards,
> > > > > Krzysztof
> > > > >
> > >
> > > --
> > > With best wishes
> > > Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] arm64: defconfig: Enable secure QFPROM driver
2024-06-19 16:42 ` Bjorn Andersson
@ 2024-06-20 9:43 ` Komal Bajaj
0 siblings, 0 replies; 11+ messages in thread
From: Komal Bajaj @ 2024-06-20 9:43 UTC (permalink / raw)
To: Bjorn Andersson, Mukesh Ojha
Cc: Krzysztof Kozlowski, Catalin Marinas, Will Deacon,
Dmitry Baryshkov, Konrad Dybcio, Srinivas Kandagatla,
linux-arm-kernel, linux-kernel, linux-arm-msm
On 6/19/2024 10:12 PM, Bjorn Andersson wrote:
> On Wed, Jun 19, 2024 at 05:40:42PM +0530, Mukesh Ojha wrote:
>> On Wed, Jun 19, 2024 at 01:08:48PM +0200, Krzysztof Kozlowski wrote:
>>> On 19/06/2024 12:56, Komal Bajaj wrote:
>>>> Enable the secure QFPROM driver which is used by QDU1000
>>>
>>> Qualcomm QDU1000. You are changing kernel-wide defconfig, not some
>>> Qualcomm downstream stuff.
>>>
>>>> platform for reading the secure qfprom region to get the
>>>> DDR channel configuration.
>>>>
>>>> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
>>>> ---
>>>> arch/arm64/configs/defconfig | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
>>>> index 838b4466d6f6..c940437ae1b3 100644
>>>> --- a/arch/arm64/configs/defconfig
>>>> +++ b/arch/arm64/configs/defconfig
>>>> @@ -1575,6 +1575,7 @@ CONFIG_NVMEM_LAYERSCAPE_SFP=m
>>>> CONFIG_NVMEM_MESON_EFUSE=m
>>>> CONFIG_NVMEM_MTK_EFUSE=y
>>>> CONFIG_NVMEM_QCOM_QFPROM=y
>>>> +CONFIG_NVMEM_QCOM_SEC_QFPROM=y
>>>
>>> Module
>>
>> Should not this be inline with what CONFIG_NVMEM_QCOM_QFPROM is having ?
>> Either both CONFIG_NVMEM_QCOM_QFPROM and CONFIG_NVMEM_QCOM_SEC_QFPROM
>> should be m or both y
>>
>
> While that would be a convenient guideline, you're adding runtime
> overhead to all other targets (Qualcomm and non-Qualcomm) so the desire
> to keep anything that can module outweigh such convenience.
>
> Based on the recent addition of llcc and qfprom nodes I'm _guessing_
> that LLCC is the one user of this today, and it is =m, so therefore
> SEC_QFPROM can be =m as well.
>
>
> By expanding the commit message slightly, we could have avoided the
> "why?" questions and the need for me to "guess" the actual dependency.
>
Thanks Bjorn for the suggestion.
I will incorporate the suggested changes in the next patch.
Thanks
Komal
> Regards,
> Bjorn
>
>> -Mukesh
>>>
>>>> CONFIG_NVMEM_RMEM=m
>>>> CONFIG_NVMEM_ROCKCHIP_EFUSE=y
>>>> CONFIG_NVMEM_ROCKCHIP_OTP=y
>>>> --
>>>> 2.42.0
>>>>
>>>
>>> Best regards,
>>> Krzysztof
>>>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-06-20 9:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 10:56 [PATCH] arm64: defconfig: Enable secure QFPROM driver Komal Bajaj
2024-06-19 10:57 ` Dmitry Baryshkov
2024-06-19 11:08 ` Krzysztof Kozlowski
2024-06-19 12:10 ` Mukesh Ojha
2024-06-19 12:23 ` Krzysztof Kozlowski
2024-06-19 13:14 ` Dmitry Baryshkov
2024-06-19 16:38 ` Mukesh Ojha
2024-06-19 16:51 ` Bjorn Andersson
2024-06-19 18:46 ` Mukesh Ojha
2024-06-19 16:42 ` Bjorn Andersson
2024-06-20 9:43 ` Komal Bajaj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).