Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dawid Olesinski" <dawidro@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 1/4] dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding
Date: Sun, 16 Aug 2026 19:49:07 +0000	[thread overview]
Message-ID: <20260816194907.9CB1C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260816194112.552100-2-dawidro@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The schema fails to use conditional `if-then` blocks to enforce variant-specific resource constraints for resets, allowing invalid configurations to silently pass validation.
- [Medium] The `rockchip,rk3588-crypto` compatible string incorrectly declares `rockchip,rk3568-crypto` as a fallback despite having incompatible hardware resource requirements.
--

--- Patch [1]: [PATCH v3 1/4] dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding ---
commit e7f36faa96ab3720550555cbd2cbc8b8549dc8d0
Author: Dawid Olesinski <dawidro@gmail.com>

dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding

This commit adds a YAML device tree binding for the Rockchip V2 cryptographic
hardware accelerator present on the RK3568 and RK3588 SoCs. It defines
clocks, resets, and interrupts, noting that RK3588 accesses these via the
ARM SCMI firmware interface while RK3568 uses direct CRU access.

> diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml
> @@ -0,0 +1,83 @@
[ ... ]
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: rockchip,rk3568-crypto
> +      - items:
> +          - enum:
> +              - rockchip,rk3588-crypto
> +          - const: rockchip,rk3568-crypto

[Severity: Medium]
Is it safe to declare rockchip,rk3568-crypto as a fallback for
rockchip,rk3588-crypto here?

Since the older RK3568 hardware requires 3 resets and the RK3588 provides
only 1 (via SCMI), wouldn't an older OS probing the RK3588 device using
this fallback string fail to probe due to missing resources?

> +
> +  reg:
> +    maxItems: 1
[ ... ]
> +  clock-names:
> +    items:
> +      - const: core
> +      - const: aclk
> +      - const: hclk
> +
> +  resets:
> +    minItems: 1
> +    maxItems: 3
> +
> +  reset-names:
> +    minItems: 1
> +    items:
> +      - const: core
> +      - const: aclk
> +      - const: hclk

[Severity: Medium]
Should there be an allOf with an if-then conditional block to enforce the
exact number of resets based on the compatible string?

With minItems set to 1 globally, an incomplete device tree node for RK3568
with only one reset would silently pass dt_binding_check validation, even
though the hardware requires all three.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260816194112.552100-1-dawidro@gmail.com?part=1

  reply	other threads:[~2026-08-16 19:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 17:58 [PATCH v2 0/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader Dawid Olesinski
2026-07-08 17:58 ` [PATCH v2 1/4] dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding Dawid Olesinski
2026-07-08 18:13   ` sashiko-bot
2026-07-08 23:53   ` Sebastian Reichel
2026-07-08 17:58 ` [PATCH v2 2/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader driver Dawid Olesinski
2026-07-08 18:13   ` sashiko-bot
2026-07-08 17:58 ` [PATCH v2 3/4] arm64: dts: rockchip: Add crypto node to rk356x-base Dawid Olesinski
2026-07-08 23:56   ` Sebastian Reichel
2026-07-09  7:07     ` Heiko Stübner
2026-07-10 14:30       ` Dawid Olesinski
2026-07-25 14:13         ` Diederik de Haas
2026-07-08 17:58 ` [PATCH v2 4/4] arm64: dts: rockchip: Add crypto node to rk3588-base Dawid Olesinski
2026-08-03 10:42 ` [PATCH v2 0/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader Diederik de Haas
2026-08-16 19:39 ` [PATCH v3 " Dawid Olesinski
2026-08-16 19:39   ` [PATCH v3 1/4] dt-bindings: crypto: rockchip: Add RK356x/RK3588 crypto engine binding Dawid Olesinski
2026-08-16 19:49     ` sashiko-bot [this message]
2026-08-16 19:39   ` [PATCH v3 2/4] crypto: rockchip: Add RK356x/RK3588 cryptographic offloader driver Dawid Olesinski
2026-08-16 19:56     ` sashiko-bot
2026-08-16 19:39   ` [PATCH v3 3/4] arm64: dts: rockchip: Add crypto node to rk356x-base Dawid Olesinski
2026-08-16 19:48     ` sashiko-bot
2026-08-16 19:39   ` [PATCH v3 4/4] arm64: dts: rockchip: Add crypto node to rk3588-base Dawid Olesinski
2026-08-16 19:51     ` sashiko-bot

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=20260816194907.9CB1C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=dawidro@gmail.com \
    --cc=devicetree@vger.kernel.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