public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Enable Inline crypto engine for kodiak and monaco
@ 2026-03-06  9:33 Neeraj Soni
  2026-03-06  9:33 ` [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle Neeraj Soni
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Neeraj Soni @ 2026-03-06  9:33 UTC (permalink / raw)
  To: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio
  Cc: linux-mmc, devicetree, linux-kernel, neeraj.soni

Document Inline Crypto Engine (ICE) handle for SDHC and add its device-tree
node to enable it for kodiak and monaco.

How this patch was tested:
- export ARCH=arm64
- export CROSS_COMPILE=aarch64-linux-gnu-
- make menuconfig
- make defconifg
- make DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/sdhci-msm.yaml dt_binding_check
- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CHECK_DTBS=y dtbs

---
Changes in v5:
- Updated the constraint for SDHCI 'v4' vs rest to reflect the 'qcom,ice'
  constraint.

Changes in v4:
- Added a new patch (3/3) for device tree changes for Monaco SoC.
- Updated commit subject of cover letter to reflect "monaco".
- Removed the text description of constraints from "description:" for "qcom,ice" and
  wrapped the code.
- Corrected the schema code to reflect the constraint of "qcom,ice" usage properly.

Changes in v3:
- Described the purpose for phandle in "description:" for "qcom,ice".
- Re-added the "if: required:" description for "qcom,ice" with proper
  encoding.
- Corrected the uppercase for base address and reg address space for ICE DT node.

Changes in v2:
- Removed the "if: required:" description for "qcom,ice" dt-binding
  as the ICE node is optional.
- Corrected the ICE dt node entry according to the dt-binding description.
- Added test details.

Changes in v1:
- Updated the dt-binding for ICE node.
- Added the dt node for ICE for kodiak.

Neeraj Soni (3):
  dt-bindings: mmc: sdhci-msm: Add ICE phandle
  arm64: dts: qcom: kodiak: enable the inline crypto engine for SDHC
  arm64: dts: qcom: monaco: enable the inline crypto engine for SDHC

 .../devicetree/bindings/mmc/sdhci-msm.yaml    | 95 +++++++++++++------
 arch/arm64/boot/dts/qcom/kodiak.dtsi          |  9 ++
 arch/arm64/boot/dts/qcom/monaco.dtsi          |  9 ++
 3 files changed, 85 insertions(+), 28 deletions(-)

--
2.34.1


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

* [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle
  2026-03-06  9:33 [PATCH v5 0/3] Enable Inline crypto engine for kodiak and monaco Neeraj Soni
@ 2026-03-06  9:33 ` Neeraj Soni
  2026-03-07 10:36   ` Krzysztof Kozlowski
  2026-03-06  9:33 ` [PATCH v5 2/3] arm64: dts: qcom: kodiak: enable the inline crypto engine for SDHC Neeraj Soni
  2026-03-06  9:33 ` [PATCH v5 3/3] arm64: dts: qcom: monaco: " Neeraj Soni
  2 siblings, 1 reply; 8+ messages in thread
From: Neeraj Soni @ 2026-03-06  9:33 UTC (permalink / raw)
  To: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio
  Cc: linux-mmc, devicetree, linux-kernel, neeraj.soni, Abel Vesa,
	Abhinaba Rakshit

Starting with sc7280(kodiak), the ICE will have its own device-tree node.
So add the qcom,ice property to reference it.

To avoid double-modeling, when qcom,ice is present, disallow an embedded ICE
register region in the SDHCI node. Older SoCs without ICE remain valid as
no additional requirement is imposed.

Co-developed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Co-developed-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com>
Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@oss.qualcomm.com>
Signed-off-by: Neeraj Soni <neeraj.soni@oss.qualcomm.com>

---

Some initial work is done by Abel here:
https://lore.kernel.org/all/ba3da82d-999b-b040-5230-36e60293e0fd@linaro.org/
and by Abhinaba here:
https://lore.kernel.org/all/20251009-add-separate-ice-ufs-and-emmc-device-nodes-for-qcs615-platform-v1-1-2a34d8d03c72@oss.qualcomm.com/

This patch adds the purpose and usage for phandle in the description and encodes
it properly in the schema.
---
 .../devicetree/bindings/mmc/sdhci-msm.yaml    | 95 +++++++++++++------
 1 file changed, 67 insertions(+), 28 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
index 938be8228d66..cc9f7724bdf0 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
+++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
@@ -140,6 +140,11 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32
     description: platform specific settings for DLL_CONFIG reg.
 
+  qcom,ice:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to the Inline Crypto Engine (ICE) hardware block for this controller.
+
   iommus:
     minItems: 1
     maxItems: 8
@@ -193,35 +198,69 @@ allOf:
             enum:
               - qcom,sdhci-msm-v4
     then:
-      properties:
-        reg:
-          minItems: 2
-          items:
-            - description: Host controller register map
-            - description: SD Core register map
-            - description: CQE register map
-            - description: Inline Crypto Engine register map
-        reg-names:
-          minItems: 2
-          items:
-            - const: hc
-            - const: core
-            - const: cqhci
-            - const: ice
+      if:
+        required:
+          - qcom,ice
+      then:
+        properties:
+          reg:
+            minItems: 2
+            items:
+              - description: Host controller register map
+              - description: SD Core register map
+              - description: CQE register map
+          reg-names:
+            minItems: 2
+            items:
+              - const: hc
+              - const: core
+              - const: cqhci
+      else:
+        properties:
+          reg:
+            minItems: 2
+            items:
+              - description: Host controller register map
+              - description: SD Core register map
+              - description: CQE register map
+              - description: Inline Crypto Engine register map
+          reg-names:
+            minItems: 2
+            items:
+              - const: hc
+              - const: core
+              - const: cqhci
+              - const: ice
     else:
-      properties:
-        reg:
-          minItems: 1
-          items:
-            - description: Host controller register map
-            - description: CQE register map
-            - description: Inline Crypto Engine register map
-        reg-names:
-          minItems: 1
-          items:
-            - const: hc
-            - const: cqhci
-            - const: ice
+      if:
+        required:
+          - qcom,ice
+      then:
+        properties:
+          reg:
+            minItems: 1
+            items:
+              - description: Host controller register map
+              - description: CQE register map
+          reg-names:
+            minItems: 1
+            items:
+              - const: hc
+              - const: cqhci
+      else:
+        properties:
+          reg:
+            minItems: 1
+            items:
+              - description: Host controller register map
+              - description: CQE register map
+              - description: Inline Crypto Engine register map
+          reg-names:
+            minItems: 1
+            items:
+              - const: hc
+              - const: cqhci
+              - const: ice
 
 unevaluatedProperties: false
 
-- 
2.34.1


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

* [PATCH v5 2/3] arm64: dts: qcom: kodiak: enable the inline crypto engine for SDHC
  2026-03-06  9:33 [PATCH v5 0/3] Enable Inline crypto engine for kodiak and monaco Neeraj Soni
  2026-03-06  9:33 ` [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle Neeraj Soni
@ 2026-03-06  9:33 ` Neeraj Soni
  2026-03-06  9:33 ` [PATCH v5 3/3] arm64: dts: qcom: monaco: " Neeraj Soni
  2 siblings, 0 replies; 8+ messages in thread
From: Neeraj Soni @ 2026-03-06  9:33 UTC (permalink / raw)
  To: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio
  Cc: linux-mmc, devicetree, linux-kernel, neeraj.soni

Add an ICE node to kodiak SoC description and enable it by adding a
phandle to the SDHC node.

Signed-off-by: Neeraj Soni <neeraj.soni@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/kodiak.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi
index c2ccbb67f800..de01a6669522 100644
--- a/arch/arm64/boot/dts/qcom/kodiak.dtsi
+++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi
@@ -1045,6 +1045,8 @@ sdhc_1: mmc@7c4000 {
 			qcom,dll-config = <0x0007642c>;
 			qcom,ddr-config = <0x80040868>;
 
+			qcom,ice = <&sdhc_ice>;
+
 			mmc-ddr-1_8v;
 			mmc-hs200-1_8v;
 			mmc-hs400-1_8v;
@@ -1071,6 +1073,13 @@ opp-384000000 {
 			};
 		};
 
+		sdhc_ice: crypto@7c8000 {
+			compatible = "qcom,sc7280-inline-crypto-engine",
+				     "qcom,inline-crypto-engine";
+			reg = <0x0 0x007c8000 0x0 0x18000>;
+			clocks = <&gcc GCC_SDCC1_ICE_CORE_CLK>;
+		};
+
 		gpi_dma0: dma-controller@900000 {
 			#dma-cells = <3>;
 			compatible = "qcom,sc7280-gpi-dma", "qcom,sm6350-gpi-dma";
-- 
2.34.1


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

* [PATCH v5 3/3] arm64: dts: qcom: monaco: enable the inline crypto engine for SDHC
  2026-03-06  9:33 [PATCH v5 0/3] Enable Inline crypto engine for kodiak and monaco Neeraj Soni
  2026-03-06  9:33 ` [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle Neeraj Soni
  2026-03-06  9:33 ` [PATCH v5 2/3] arm64: dts: qcom: kodiak: enable the inline crypto engine for SDHC Neeraj Soni
@ 2026-03-06  9:33 ` Neeraj Soni
  2026-03-07 10:37   ` Krzysztof Kozlowski
  2 siblings, 1 reply; 8+ messages in thread
From: Neeraj Soni @ 2026-03-06  9:33 UTC (permalink / raw)
  To: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio
  Cc: linux-mmc, devicetree, linux-kernel, neeraj.soni

Add an ICE node to monaco SoC description and enable it by adding a
phandle to the SDHC node.
---
 arch/arm64/boot/dts/qcom/monaco.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi
index 816fa2af8a9a..365af78b01ae 100644
--- a/arch/arm64/boot/dts/qcom/monaco.dtsi
+++ b/arch/arm64/boot/dts/qcom/monaco.dtsi
@@ -4202,6 +4202,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
 			supports-cqe;
 			dma-coherent;
 
+			qcom,ice = <&sdhc_ice>;
+
 			status = "disabled";
 
 			sdhc1_opp_table: opp-table {
@@ -4229,6 +4231,13 @@ opp-384000000 {
 			};
 		};
 
+		sdhc_ice: crypto@87c8000 {
+			compatible = "qcom,qcs8300-inline-crypto-engine",
+				     "qcom,inline-crypto-engine";
+			reg = <0x0 0x087c8000 0x0 0x18000>;
+			clocks = <&gcc GCC_SDCC1_ICE_CORE_CLK>;
+		};
+
 		usb_1_hsphy: phy@8904000 {
 			compatible = "qcom,qcs8300-usb-hs-phy",
 				     "qcom,usb-snps-hs-7nm-phy";
-- 
2.34.1


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

* Re: [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle
  2026-03-06  9:33 ` [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle Neeraj Soni
@ 2026-03-07 10:36   ` Krzysztof Kozlowski
  2026-03-10  4:15     ` Neeraj Soni
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-07 10:36 UTC (permalink / raw)
  To: Neeraj Soni
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio,
	linux-mmc, devicetree, linux-kernel, Abel Vesa, Abhinaba Rakshit

On Fri, Mar 06, 2026 at 03:03:30PM +0530, Neeraj Soni wrote:
> Starting with sc7280(kodiak), the ICE will have its own device-tree node.
> So add the qcom,ice property to reference it.
> 
> To avoid double-modeling, when qcom,ice is present, disallow an embedded ICE

Can you finally fix checkpatch warning? I have impression you ignore
checkpatch in each posting.

Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597

> register region in the SDHCI node. Older SoCs without ICE remain valid as
> no additional requirement is imposed.

With this fixed

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH v5 3/3] arm64: dts: qcom: monaco: enable the inline crypto engine for SDHC
  2026-03-06  9:33 ` [PATCH v5 3/3] arm64: dts: qcom: monaco: " Neeraj Soni
@ 2026-03-07 10:37   ` Krzysztof Kozlowski
  2026-03-10  4:23     ` Neeraj Soni
  0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-07 10:37 UTC (permalink / raw)
  To: Neeraj Soni
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio,
	linux-mmc, devicetree, linux-kernel

On Fri, Mar 06, 2026 at 03:03:32PM +0530, Neeraj Soni wrote:
> Add an ICE node to monaco SoC description and enable it by adding a
> phandle to the SDHC node.

No SoB, broken/missing DCO.

checkpatch also would tell you that.

Best regards,
Krzysztof


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

* Re: [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle
  2026-03-07 10:36   ` Krzysztof Kozlowski
@ 2026-03-10  4:15     ` Neeraj Soni
  0 siblings, 0 replies; 8+ messages in thread
From: Neeraj Soni @ 2026-03-10  4:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio,
	linux-mmc, devicetree, linux-kernel, Abel Vesa, Abhinaba Rakshit



On 3/7/2026 4:06 PM, Krzysztof Kozlowski wrote:
> On Fri, Mar 06, 2026 at 03:03:30PM +0530, Neeraj Soni wrote:
>> Starting with sc7280(kodiak), the ICE will have its own device-tree node.
>> So add the qcom,ice property to reference it.
>>
>> To avoid double-modeling, when qcom,ice is present, disallow an embedded ICE
> 
> Can you finally fix checkpatch warning? I have impression you ignore
> checkpatch in each posting.
> 
> Please wrap commit message according to Linux coding style / submission
> process (neither too early nor over the limit):
> https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
> 
Sure I will fix this in next patch.

>> register region in the SDHCI node. Older SoCs without ICE remain valid as
>> no additional requirement is imposed.
> 
> With this fixed
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> 
> Best regards,
> Krzysztof
> 
Regards
Neeraj

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

* Re: [PATCH v5 3/3] arm64: dts: qcom: monaco: enable the inline crypto engine for SDHC
  2026-03-07 10:37   ` Krzysztof Kozlowski
@ 2026-03-10  4:23     ` Neeraj Soni
  0 siblings, 0 replies; 8+ messages in thread
From: Neeraj Soni @ 2026-03-10  4:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, andersson, konradybcio,
	linux-mmc, devicetree, linux-kernel



On 3/7/2026 4:07 PM, Krzysztof Kozlowski wrote:
> On Fri, Mar 06, 2026 at 03:03:32PM +0530, Neeraj Soni wrote:
>> Add an ICE node to monaco SoC description and enable it by adding a
>> phandle to the SDHC node.
> 
> No SoB, broken/missing DCO.
> 
> checkpatch also would tell you that.
>
Sure. I will fix this in next patch.
 
> Best regards,
> Krzysztof
> 
Regards
Neeraj

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

end of thread, other threads:[~2026-03-10  4:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06  9:33 [PATCH v5 0/3] Enable Inline crypto engine for kodiak and monaco Neeraj Soni
2026-03-06  9:33 ` [PATCH v5 1/3] dt-bindings: mmc: sdhci-msm: Add ICE phandle Neeraj Soni
2026-03-07 10:36   ` Krzysztof Kozlowski
2026-03-10  4:15     ` Neeraj Soni
2026-03-06  9:33 ` [PATCH v5 2/3] arm64: dts: qcom: kodiak: enable the inline crypto engine for SDHC Neeraj Soni
2026-03-06  9:33 ` [PATCH v5 3/3] arm64: dts: qcom: monaco: " Neeraj Soni
2026-03-07 10:37   ` Krzysztof Kozlowski
2026-03-10  4:23     ` Neeraj Soni

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