Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add Crypto support for Kaanapali SoC
@ 2025-10-29  8:25 Jingyi Wang
  2025-10-29  8:25 ` [PATCH v2 1/3] dt-bindings: crypto: qcom,prng: Document kaanapali RNG Jingyi Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jingyi Wang @ 2025-10-29  8:25 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vinod Koul, Thara Gopinath, Bjorn Andersson,
	Konrad Dybcio
  Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Jingyi Wang,
	Gaurav Kashyap, Krzysztof Kozlowski

Add Crypto support for Qualcomm Kaanapali Platform including True Random
Number Generator and Qualcomm crypto engine.

Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
Changes in v2:
- Fix title and commit message in patch3
- Link to v1: https://lore.kernel.org/r/20250924-knp-crypto-v1-0-49af17a231b7@oss.qualcomm.com

---
Gaurav Kashyap (3):
      dt-bindings: crypto: qcom,prng: Document kaanapali RNG
      dt-bindings: crypto: qcom-qce: Document the kaanapli crypto engine
      crypto: qce: fix version check

 Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 +
 Documentation/devicetree/bindings/crypto/qcom-qce.yaml  | 1 +
 drivers/crypto/qce/core.c                               | 3 +--
 3 files changed, 3 insertions(+), 2 deletions(-)
---
base-commit: aaa9c3550b60d6259d6ea8b1175ade8d1242444e
change-id: 20251029-knp-crypto-e2323bd596e3

Best regards,
-- 
Jingyi Wang <jingyi.wang@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/3] dt-bindings: crypto: qcom,prng: Document kaanapali RNG
  2025-10-29  8:25 [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Jingyi Wang
@ 2025-10-29  8:25 ` Jingyi Wang
  2025-10-29  8:25 ` [PATCH v2 2/3] dt-bindings: crypto: qcom-qce: Document the kaanapli crypto engine Jingyi Wang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Jingyi Wang @ 2025-10-29  8:25 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vinod Koul, Thara Gopinath, Bjorn Andersson,
	Konrad Dybcio
  Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Jingyi Wang,
	Gaurav Kashyap, Krzysztof Kozlowski

From: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>

Document kaanapali compatible for the True Random Number Generator.

Signed-off-by: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
index ed7e16bd11d3..597441d94cf1 100644
--- a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml
@@ -20,6 +20,7 @@ properties:
               - qcom,ipq5332-trng
               - qcom,ipq5424-trng
               - qcom,ipq9574-trng
+              - qcom,kaanapali-trng
               - qcom,qcs615-trng
               - qcom,qcs8300-trng
               - qcom,sa8255p-trng

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] dt-bindings: crypto: qcom-qce: Document the kaanapli crypto engine
  2025-10-29  8:25 [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Jingyi Wang
  2025-10-29  8:25 ` [PATCH v2 1/3] dt-bindings: crypto: qcom,prng: Document kaanapali RNG Jingyi Wang
@ 2025-10-29  8:25 ` Jingyi Wang
  2025-10-29  8:25 ` [PATCH v2 3/3] crypto: qce: fix version check Jingyi Wang
  2025-11-06  7:04 ` [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Herbert Xu
  3 siblings, 0 replies; 8+ messages in thread
From: Jingyi Wang @ 2025-10-29  8:25 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vinod Koul, Thara Gopinath, Bjorn Andersson,
	Konrad Dybcio
  Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Jingyi Wang,
	Gaurav Kashyap, Krzysztof Kozlowski

From: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>

Document the crypto engine on the kaanapali platform.

Signed-off-by: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
 Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index e009cb712fb8..79d5be2548bc 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -45,6 +45,7 @@ properties:
 
       - items:
           - enum:
+              - qcom,kaanapali-qce
               - qcom,qcs615-qce
               - qcom,qcs8300-qce
               - qcom,sa8775p-qce

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] crypto: qce: fix version check
  2025-10-29  8:25 [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Jingyi Wang
  2025-10-29  8:25 ` [PATCH v2 1/3] dt-bindings: crypto: qcom,prng: Document kaanapali RNG Jingyi Wang
  2025-10-29  8:25 ` [PATCH v2 2/3] dt-bindings: crypto: qcom-qce: Document the kaanapli crypto engine Jingyi Wang
@ 2025-10-29  8:25 ` Jingyi Wang
  2025-10-29  9:41   ` Konrad Dybcio
  2025-10-29 15:27   ` Bjorn Andersson
  2025-11-06  7:04 ` [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Herbert Xu
  3 siblings, 2 replies; 8+ messages in thread
From: Jingyi Wang @ 2025-10-29  8:25 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vinod Koul, Thara Gopinath, Bjorn Andersson,
	Konrad Dybcio
  Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Jingyi Wang,
	Gaurav Kashyap

From: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>

The previous version check made it difficult to support newer major
versions (e.g., v6.0) without adding extra checks/macros. Update the
logic to only reject v5.0 and allow future versions without additional
changes.

Signed-off-by: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
---
 drivers/crypto/qce/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
index e95e84486d9a..b966f3365b7d 100644
--- a/drivers/crypto/qce/core.c
+++ b/drivers/crypto/qce/core.c
@@ -21,7 +21,6 @@
 #include "sha.h"
 #include "aead.h"
 
-#define QCE_MAJOR_VERSION5	0x05
 #define QCE_QUEUE_LENGTH	1
 
 #define QCE_DEFAULT_MEM_BANDWIDTH	393600
@@ -161,7 +160,7 @@ static int qce_check_version(struct qce_device *qce)
 	 * the driver does not support v5 with minor 0 because it has special
 	 * alignment requirements.
 	 */
-	if (major != QCE_MAJOR_VERSION5 || minor == 0)
+	if (major == 5 && minor == 0)
 		return -ENODEV;
 
 	qce->burst_size = QCE_BAM_BURST_SIZE;

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] crypto: qce: fix version check
  2025-10-29  8:25 ` [PATCH v2 3/3] crypto: qce: fix version check Jingyi Wang
@ 2025-10-29  9:41   ` Konrad Dybcio
  2025-10-29 15:32     ` Bjorn Andersson
  2025-10-29 15:27   ` Bjorn Andersson
  1 sibling, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-10-29  9:41 UTC (permalink / raw)
  To: Jingyi Wang, Herbert Xu, David S. Miller, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul, Thara Gopinath,
	Bjorn Andersson, Konrad Dybcio
  Cc: aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Gaurav Kashyap

On 10/29/25 9:25 AM, Jingyi Wang wrote:
> From: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
> 
> The previous version check made it difficult to support newer major
> versions (e.g., v6.0) without adding extra checks/macros. Update the
> logic to only reject v5.0 and allow future versions without additional
> changes.
> 
> Signed-off-by: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
>  drivers/crypto/qce/core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
> index e95e84486d9a..b966f3365b7d 100644
> --- a/drivers/crypto/qce/core.c
> +++ b/drivers/crypto/qce/core.c
> @@ -21,7 +21,6 @@
>  #include "sha.h"
>  #include "aead.h"
>  
> -#define QCE_MAJOR_VERSION5	0x05
>  #define QCE_QUEUE_LENGTH	1
>  
>  #define QCE_DEFAULT_MEM_BANDWIDTH	393600
> @@ -161,7 +160,7 @@ static int qce_check_version(struct qce_device *qce)
>  	 * the driver does not support v5 with minor 0 because it has special
>  	 * alignment requirements.
>  	 */
> -	if (major != QCE_MAJOR_VERSION5 || minor == 0)
> +	if (major == 5 && minor == 0)
>  		return -ENODEV;

This also allows major < 5, should we add a second check to reject that?

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] crypto: qce: fix version check
  2025-10-29  8:25 ` [PATCH v2 3/3] crypto: qce: fix version check Jingyi Wang
  2025-10-29  9:41   ` Konrad Dybcio
@ 2025-10-29 15:27   ` Bjorn Andersson
  1 sibling, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2025-10-29 15:27 UTC (permalink / raw)
  To: Jingyi Wang
  Cc: Herbert Xu, David S. Miller, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vinod Koul, Thara Gopinath, Konrad Dybcio, aiqun.yu,
	tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Gaurav Kashyap

On Wed, Oct 29, 2025 at 01:25:31AM -0700, Jingyi Wang wrote:
> From: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
> 
> The previous version check made it difficult to support newer major
> versions (e.g., v6.0) without adding extra checks/macros. Update the
> logic to only reject v5.0 and allow future versions without additional
> changes.
> 
> Signed-off-by: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>

Reviewed-by: Bjorn Andersson <andersson@kernel.org>

> ---
>  drivers/crypto/qce/core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
> index e95e84486d9a..b966f3365b7d 100644
> --- a/drivers/crypto/qce/core.c
> +++ b/drivers/crypto/qce/core.c
> @@ -21,7 +21,6 @@
>  #include "sha.h"
>  #include "aead.h"
>  
> -#define QCE_MAJOR_VERSION5	0x05
>  #define QCE_QUEUE_LENGTH	1
>  
>  #define QCE_DEFAULT_MEM_BANDWIDTH	393600
> @@ -161,7 +160,7 @@ static int qce_check_version(struct qce_device *qce)
>  	 * the driver does not support v5 with minor 0 because it has special
>  	 * alignment requirements.
>  	 */
> -	if (major != QCE_MAJOR_VERSION5 || minor == 0)
> +	if (major == 5 && minor == 0)
>  		return -ENODEV;
>  
>  	qce->burst_size = QCE_BAM_BURST_SIZE;
> 
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] crypto: qce: fix version check
  2025-10-29  9:41   ` Konrad Dybcio
@ 2025-10-29 15:32     ` Bjorn Andersson
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2025-10-29 15:32 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Jingyi Wang, Herbert Xu, David S. Miller, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul, Thara Gopinath,
	Konrad Dybcio, aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang,
	linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	Gaurav Kashyap

On Wed, Oct 29, 2025 at 10:41:48AM +0100, Konrad Dybcio wrote:
> On 10/29/25 9:25 AM, Jingyi Wang wrote:
> > From: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
> > 
> > The previous version check made it difficult to support newer major
> > versions (e.g., v6.0) without adding extra checks/macros. Update the
> > logic to only reject v5.0 and allow future versions without additional
> > changes.
> > 
> > Signed-off-by: Gaurav Kashyap <gaurav.kashyap@oss.qualcomm.com>
> > Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> > ---
> >  drivers/crypto/qce/core.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
> > index e95e84486d9a..b966f3365b7d 100644
> > --- a/drivers/crypto/qce/core.c
> > +++ b/drivers/crypto/qce/core.c
> > @@ -21,7 +21,6 @@
> >  #include "sha.h"
> >  #include "aead.h"
> >  
> > -#define QCE_MAJOR_VERSION5	0x05
> >  #define QCE_QUEUE_LENGTH	1
> >  
> >  #define QCE_DEFAULT_MEM_BANDWIDTH	393600
> > @@ -161,7 +160,7 @@ static int qce_check_version(struct qce_device *qce)
> >  	 * the driver does not support v5 with minor 0 because it has special
> >  	 * alignment requirements.
> >  	 */
> > -	if (major != QCE_MAJOR_VERSION5 || minor == 0)
> > +	if (major == 5 && minor == 0)
> >  		return -ENODEV;
> 
> This also allows major < 5, should we add a second check to reject that?
> 

The comment says we don't support v5.0, now the code says the same.

I think it's okay to leave handling of previous versions as undefined.
Given the current way this is expressed, there's can't be any existing
users...

Regards,
Bjorn

> Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/3] Add Crypto support for Kaanapali SoC
  2025-10-29  8:25 [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Jingyi Wang
                   ` (2 preceding siblings ...)
  2025-10-29  8:25 ` [PATCH v2 3/3] crypto: qce: fix version check Jingyi Wang
@ 2025-11-06  7:04 ` Herbert Xu
  3 siblings, 0 replies; 8+ messages in thread
From: Herbert Xu @ 2025-11-06  7:04 UTC (permalink / raw)
  To: Jingyi Wang
  Cc: David S. Miller, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Vinod Koul, Thara Gopinath, Bjorn Andersson, Konrad Dybcio,
	aiqun.yu, tingwei.zhang, trilok.soni, yijie.yang, linux-arm-msm,
	linux-crypto, devicetree, linux-kernel, Gaurav Kashyap,
	Krzysztof Kozlowski

On Wed, Oct 29, 2025 at 01:25:28AM -0700, Jingyi Wang wrote:
> Add Crypto support for Qualcomm Kaanapali Platform including True Random
> Number Generator and Qualcomm crypto engine.
> 
> Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
> ---
> Changes in v2:
> - Fix title and commit message in patch3
> - Link to v1: https://lore.kernel.org/r/20250924-knp-crypto-v1-0-49af17a231b7@oss.qualcomm.com
> 
> ---
> Gaurav Kashyap (3):
>       dt-bindings: crypto: qcom,prng: Document kaanapali RNG
>       dt-bindings: crypto: qcom-qce: Document the kaanapli crypto engine
>       crypto: qce: fix version check
> 
>  Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 +
>  Documentation/devicetree/bindings/crypto/qcom-qce.yaml  | 1 +
>  drivers/crypto/qce/core.c                               | 3 +--
>  3 files changed, 3 insertions(+), 2 deletions(-)
> ---
> base-commit: aaa9c3550b60d6259d6ea8b1175ade8d1242444e
> change-id: 20251029-knp-crypto-e2323bd596e3
> 
> Best regards,
> -- 
> Jingyi Wang <jingyi.wang@oss.qualcomm.com>

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-06  7:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29  8:25 [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Jingyi Wang
2025-10-29  8:25 ` [PATCH v2 1/3] dt-bindings: crypto: qcom,prng: Document kaanapali RNG Jingyi Wang
2025-10-29  8:25 ` [PATCH v2 2/3] dt-bindings: crypto: qcom-qce: Document the kaanapli crypto engine Jingyi Wang
2025-10-29  8:25 ` [PATCH v2 3/3] crypto: qce: fix version check Jingyi Wang
2025-10-29  9:41   ` Konrad Dybcio
2025-10-29 15:32     ` Bjorn Andersson
2025-10-29 15:27   ` Bjorn Andersson
2025-11-06  7:04 ` [PATCH v2 0/3] Add Crypto support for Kaanapali SoC Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox