Linux cryptographic layer development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Demeter Barna" <me@fromdisposition.org>,
	"Abel Vesa" <abelvesa@kernel.org>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>
Cc: linux-crypto@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: qcom: sm8350: Add the inline crypto engine
Date: Thu, 05 Nov 2026 16:11:32 +0000	[thread overview]
Message-ID: <sashiko-outbox-199445@kernel.org> (raw)
In-Reply-To: <20261105-b4-sm8350-ice-v1-2-f55e6ea8e1ca@fromdisposition.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: crypto: qcom,inline-crypto-engine: inverted if-not condition for SM8350
- [Low] arm64: dts: qcom: sm8350: ICE reg size 0x11000 instead of 0x18000
--

commit da3fc875e05c7271bcc6b15fe532d10c5104a0b1
Author: Demeter Barna <me@fromdisposition.org>

arm64: dts: qcom: sm8350: Add the inline crypto engine

This commit adds the UFS inline crypto engine (ICE) device node at 0x1d88000
to the SM8350 device tree and links it to the UFS host controller via the
qcom,ice property.

> diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
> index 55b32050ce9c8..2b258c4b4fa71 100644
> --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi

[ ... ]

> @@ -1807,6 +1809,17 @@ ufs_mem_phy: phy@1d87000 {
>  			status = "disabled";
>  		};
>  
> +		ice: crypto@1d88000 {
> +			compatible = "qcom,sm8350-inline-crypto-engine",
> +				     "qcom,inline-crypto-engine";

[Severity: Medium]
In the accompanying binding commit 4bdcd3be438d ("dt-bindings: crypto:
qcom,inline-crypto-engine: Add SM8350"), the commit message states:

  Document the compatible and require the power domain and clock names
  for it, as for SM8450.

However, in Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml,
qcom,sm8350-inline-crypto-engine was added to the negated compatible enum
under allOf:

  # Do not extend the list.
  # Legacy SoCs are allowed for single clock.
  # New SoCs must provide both clocks and power domains.
  allOf:
    - if:
        not:
          properties:
            compatible:
              contains:
                enum:
                  ...
                  - qcom,sc7280-inline-crypto-engine
                  - qcom,sm8350-inline-crypto-engine
                  - qcom,sm8450-inline-crypto-engine
                  ...
      then:
        required:
          - power-domains
          - clock-names
        properties:
          clocks:
            minItems: 2
          clock-names:
            minItems: 2

Because that condition uses if: not: (introduced in commit 3360fa760425 to
exempt legacy SoCs), doesn't adding qcom,sm8350-inline-crypto-engine to that
enum exempt SM8350 from requiring power-domains, clock-names, and two clocks
during dtbs_check validation instead of requiring them?

> +			reg = <0 0x01d88000 0 0x11000>;

[Severity: Low]
Should the reg size in ice: crypto@1d88000 be 0x18000 instead of 0x11000?

When qcom_ice_probe() in drivers/soc/qcom/ice.c maps this resource via
devm_platform_ioremap_resource(), 0x11000 covers the 0x8000 ICE region plus
only 0x9000 bytes of the HWKM region from the downstream vendor device tree,
leaving the upper 0x7000 bytes of the 0x10000 HWKM block unmapped.

Other upstream Qualcomm SoCs with ICE v3.2.0+ and HWKM at 0x01d88000, such as
SC7280 in arch/arm64/boot/dts/qcom/kodiak.dtsi and SM8450 in
arch/arm64/boot/dts/qcom/sm8450.dtsi (as well as SM8550, SM8650, SM8750,
SA8775P, and QCS8300), use:

  reg = <0 0x01d88000 0 0x18000>;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261105-b4-sm8350-ice-v1-0-f55e6ea8e1ca@fromdisposition.org?part=2

      reply	other threads:[~2026-11-05 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 15:29 [PATCH 0/2] arm64: dts: qcom: sm8350: Add the inline crypto engine Demeter Barna via B4 Relay
2026-11-05 15:29 ` [PATCH 1/2] dt-bindings: crypto: qcom,inline-crypto-engine: Add SM8350 Demeter Barna via B4 Relay
2026-11-05 15:33   ` sashiko-bot
2026-11-05 15:29 ` [PATCH 2/2] arm64: dts: qcom: sm8350: Add the inline crypto engine Demeter Barna via B4 Relay
2026-11-05 16:11   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-199445@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=me@fromdisposition.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox