All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>
Cc: devicetree@vger.kernel.org, herbert@gondor.apana.org.au,
	linux-crypto@vger.kernel.org, Ruud.Derwig@synopsys.com,
	manjunath.hadli@vayavyalabs.com, bhoomikak@vayavyalabs.com
Subject: Re: [PATCH v1 1/1] dt-bindings: crypto: Document support for SPAcc
Date: Thu, 5 Sep 2024 13:23:45 -0500	[thread overview]
Message-ID: <20240905182345.GA2432714-robh@kernel.org> (raw)
In-Reply-To: <20240905150910.239832-2-pavitrakumarm@vayavyalabs.com>

On Thu, Sep 05, 2024 at 08:39:10PM +0530, Pavitrakumar M wrote:
> Add DT bindings related to the SPAcc driver for Documentation.
> DWC Synopsys Security Protocol Accelerator(SPAcc) Hardware Crypto
> Engine is a crypto IP designed by Synopsys.

This belongs with the rest of your driver series.

> 
> Signed-off-by: Bhoomika K <bhoomikak@vayavyalabs.com>
> Signed-off-by: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>

There's 2 possibilities: Bhoomika is the author and you are just 
submitting it, or you both developed it. The former needs the git author 
fixed to be Bhoomika. The latter needs a Co-developed-by tag for 
Bhoomika.

> Acked-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
> ---
>  .../bindings/crypto/snps,dwc-spacc.yaml       | 79 +++++++++++++++++++
>  1 file changed, 79 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/crypto/snps,dwc-spacc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/crypto/snps,dwc-spacc.yaml b/Documentation/devicetree/bindings/crypto/snps,dwc-spacc.yaml
> new file mode 100644
> index 000000000000..a58d1b171416
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/crypto/snps,dwc-spacc.yaml
> @@ -0,0 +1,79 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/crypto/snps,dwc-spacc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Synopsys DesignWare Security Protocol Accelerator(SPAcc) Crypto Engine
> +
> +maintainers:
> +  - Ruud Derwig <Ruud.Derwig@synopsys.com>
> +
> +description:
> +  DWC Synopsys Security Protocol Accelerator(SPAcc) Hardware Crypto Engine is
> +  a crypto IP designed by Synopsys, that can accelerate cryptographic
> +  operations.
> +
> +properties:
> +  compatible:
> +    contains:

Drop contains. The list of compatible strings and order must be defined.

> +      enum:
> +        - snps,dwc-spacc
> +        - snps,dwc-spacc-6.0

What's the difference between these 2? The driver only had 1 compatible, 
so this should too.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    maxItems: 1

No, you must define the name. But really, just drop it because you don't 
need names with only 1 name.

> +
> +  little-endian: true

Do you really need this? You have a BE CPU this is used with?

> +
> +  vspacc-priority:

Custom properties need a vendor prefix (snps,).

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Set priority mode on the Virtual SPAcc. This is Virtual SPAcc priority
> +      weight. Its used in priority arbitration of the Virtual SPAccs.
> +    minimum: 0
> +    maximum: 15
> +    default: 0
> +
> +  vspacc-index:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Virtual spacc index for validation and driver functioning.

We generally don't do indexes in DT. Need a better description of why 
this is needed.

> +    minimum: 0
> +    maximum: 7
> +
> +  spacc-wdtimer:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Watchdog timer count to replace the default value in driver.
> +    minimum: 0x19000
> +    maximum: 0xFFFFF
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spacc@40000000 {

crypto@40000000

> +        compatible = "snps,dwc-spacc";
> +        reg = <0x40000000 0x3FFFF>;
> +        interrupt-parent = <&gic>;
> +        interrupts = <0 89 4>;
> +        clocks = <&clock>;
> +        clock-names = "ref_clk";
> +        vspacc-priority = <4>;
> +        spacc-wdtimer = <0x20000>;
> +        vspacc-index = <0>;
> +        little-endian;
> +    };
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2024-09-05 18:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 15:09 [PATCH v1 0/1] dt-bindings: crypto: Document support for SPAcc Pavitrakumar M
2024-09-05 15:09 ` [PATCH v1 1/1] " Pavitrakumar M
2024-09-05 17:25   ` Krzysztof Kozlowski
2024-09-05 18:23   ` Rob Herring [this message]
2024-09-05 19:28     ` Pavitrakumar Managutte
2024-09-05 20:17       ` Rob Herring
2024-09-06  6:58         ` Pavitrakumar Managutte

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=20240905182345.GA2432714-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Ruud.Derwig@synopsys.com \
    --cc=bhoomikak@vayavyalabs.com \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=manjunath.hadli@vayavyalabs.com \
    --cc=pavitrakumarm@vayavyalabs.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.