diff mbox series

[RFC] dt-bindings: crypto: inside-secure,safexcel: make eip/mem IRQs optional

Message ID 20240101114432.28139-1-zajec5@gmail.com (mailing list archive)
State New, archived
Headers show
Series [RFC] dt-bindings: crypto: inside-secure,safexcel: make eip/mem IRQs optional | expand

Commit Message

Rafał Miłecki Jan. 1, 2024, 11:44 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

Binding for this cryptographic engine defined 6 interrupts since its
beginning. It seems however only 4 rings IRQs are really required for
operating this hardware. Linux driver doesn't use "eip" or "mem" IRQs
and it isn't clear if they are always available (MT7986 SoC binding
doesn't specify them).

This deals with:
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupts: [[0, 116, 4], [0, 117, 4], [0, 118, 4], [0, 119, 4]] is too short
        from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupt-names: ['ring0', 'ring1', 'ring2', 'ring3'] is too short
        from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#

Cc: Antoine Tenart <atenart@kernel.org>
Ref: ecc5287cfe53 ("arm64: dts: mt7986: add crypto related device nodes")
Cc: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../devicetree/bindings/crypto/inside-secure,safexcel.yaml      | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rob Herring (Arm) Jan. 2, 2024, 6:31 p.m. UTC | #1
On Mon, Jan 1, 2024 at 4:45 AM Rafał Miłecki <zajec5@gmail.com> wrote:
>
> From: Rafał Miłecki <rafal@milecki.pl>
>
> Binding for this cryptographic engine defined 6 interrupts since its
> beginning. It seems however only 4 rings IRQs are really required for
> operating this hardware. Linux driver doesn't use "eip" or "mem" IRQs
> and it isn't clear if they are always available (MT7986 SoC binding
> doesn't specify them).
>
> This deals with:
> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupts: [[0, 116, 4], [0, 117, 4], [0, 118, 4], [0, 119, 4]] is too short
>         from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtb: crypto@10320000: interrupt-names: ['ring0', 'ring1', 'ring2', 'ring3'] is too short
>         from schema $id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#

Which platform does the schema currently match? None, because the
Marvell ones get these:

     28  crypto@800000: interrupt-names:5: 'mem' was expected
     28  crypto@800000: interrupt-names:4: 'eip' was expected
     28  crypto@800000: interrupt-names:3: 'ring3' was expected
     28  crypto@800000: interrupt-names:2: 'ring2' was expected
     28  crypto@800000: interrupt-names:1: 'ring1' was expected
     28  crypto@800000: interrupt-names:0: 'ring0' was expected
     28  crypto@800000: 'dma-coherent' does not match any of the
regexes: 'pinctrl-[0-9]+'

(28 is the number of occurrences)

The existing list of names defines the order AND index. Since there
are 2 versions already in use, you have to define 2 lists.

>
> Cc: Antoine Tenart <atenart@kernel.org>
> Ref: ecc5287cfe53 ("arm64: dts: mt7986: add crypto related device nodes")

Not a documented tag. Don't make-up your own ones.

> Cc: Sam Shih <sam.shih@mediatek.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../devicetree/bindings/crypto/inside-secure,safexcel.yaml      | 2 ++
>  1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml b/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
index ef07258d16c1..c8f4028aa7f3 100644
--- a/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
+++ b/Documentation/devicetree/bindings/crypto/inside-secure,safexcel.yaml
@@ -26,9 +26,11 @@  properties:
     maxItems: 1
 
   interrupts:
+    minItems: 4
     maxItems: 6
 
   interrupt-names:
+    minItems: 4
     items:
       - const: ring0
       - const: ring1