devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	horia.geanta@nxp.com, pankaj.gupta@nxp.com, gaurav.jain@nxp.com,
	shawnguo@kernel.org, s.hauer@pengutronix.de
Cc: kernel@pengutronix.de, stefan@agner.ch,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 4/9] dt-bindings: crypto: add fsl-sec4-snvs DT schema
Date: Fri, 3 Mar 2023 10:58:53 +0100	[thread overview]
Message-ID: <49da270d-6802-79e9-843f-d46efc9ef728@linaro.org> (raw)
In-Reply-To: <20230301015702.3388458-5-peng.fan@oss.nxp.com>

On 01/03/2023 02:56, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Convert fsl-sec4.txt SNVS RTC and PowerKey to DT schema

This is a mess. Subject says add, commit msg says convert and body does
what?

> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../bindings/crypto/fsl-sec4-snvs.yaml        | 153 ++++++++++++++++++
>  1 file changed, 153 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/crypto/fsl-sec4-snvs.yaml
> 
> diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4-snvs.yaml b/Documentation/devicetree/bindings/crypto/fsl-sec4-snvs.yaml
> new file mode 100644
> index 000000000000..633e70f9b303
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4-snvs.yaml

Filename matching compatibles.

> @@ -0,0 +1,153 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/crypto/fsl-sec4-snvs.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP SEC4 SNVS Binding

Drop Binding.


> +
> +description:
> +  CONTENTS
> +    -Secure Non-Volatile Storage (SNVS) Node
> +    -Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node

OK, this is some copy-paste from some poor other code. Please fix all
your bindings like I mentioned in previous emails.

> +
> +  Node defines address range and the associated interrupt for the SNVS
> +  function.  This function monitors security state information & reports
> +  security violations. This also included rtc, system power off and ON/OFF
> +  key.
> +
> +  For more information on SEC4, ref fsl-sec4-crypto.yaml
> +
> +maintainers:
> +  - Peng Fan <peng.fan@nxp.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: fsl,sec-v4.0-mon
> +          - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +  ranges:
> +    description:
> +      A standard property. Specifies the physical address range of the SNVS

So the rest are non-standard properties?


> +      register space.  A triplet that includes the child address, parent
> +      address, & length.
> +
> +  interrupts:
> +    description:
> +      Specifies the interrupts generated by this device.  The value of the
> +      interrupts property consists of one interrupt specifier. The format
> +      of the specifier is defined by the binding document describing the
> +      node's interrupt parent.

Please point me to any useful information in this description. Anything
useful. All interrupts are generated from the devices, aren't they?

> +    minItems: 1
> +    maxItems: 2

No, you need to describe the items instead.

> +

(...)

> +    sec_mon: sec_mon@314000 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

No underscores in node names.

> +        compatible = "fsl,sec-v4.0-mon", "syscon";
> +        reg = <0x314000 0x1000>;
> +
> +        snvs-rtc-lp {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation


> +            compatible = "fsl,sec-v4.0-mon-rtc-lp";
> +            regmap = <&sec_mon>;
> +            offset = <0x34>;
> +            interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
> +            clocks = <&clks IMX7D_SNVS_CLK>;
> +            clock-names = "snvs-rtc";
> +        };
> +
> +        snvs-powerkey {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation



Best regards,
Krzysztof


  parent reply	other threads:[~2023-03-03  9:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  1:56 [PATCH 0/9] dt-bindings: crypto: convert fsl-sec4 to DT schema Peng Fan (OSS)
2023-03-01  1:56 ` [PATCH 1/9] ARM: dts: vfxxx: drop the number after jr Peng Fan (OSS)
2023-03-01  1:56 ` [PATCH 2/9] dt-bindings: crypto: fsl-sec4: convert to DT schema Peng Fan (OSS)
2023-03-03  9:53   ` Krzysztof Kozlowski
2023-03-01  1:56 ` [PATCH 3/9] dt-bindings: crypto: fsl-sec4: support sec5.4/0 and i.MX6UL Peng Fan (OSS)
2023-03-03  9:55   ` Krzysztof Kozlowski
2023-03-07  6:56   ` Gaurav Jain
2023-03-01  1:56 ` [PATCH 4/9] dt-bindings: crypto: add fsl-sec4-snvs DT schema Peng Fan (OSS)
2023-03-01  3:07   ` Rob Herring
2023-03-03  9:58   ` Krzysztof Kozlowski [this message]
2023-03-01  1:56 ` [PATCH 5/9] dt-bindings: crypto: fsl-sec4-snvs: add simple-mfd compatible Peng Fan (OSS)
2023-03-03 10:00   ` Krzysztof Kozlowski
2023-03-01  1:56 ` [PATCH 6/9] dt-bindings: crypto: fsl-sec4-snvs: add fsl sec 5.x compatible Peng Fan (OSS)
2023-03-03 10:01   ` Krzysztof Kozlowski
2023-03-07  6:47   ` Gaurav Jain
2023-03-07  6:58     ` Peng Fan
2023-03-01  1:57 ` [PATCH 7/9] dt-bindings: crypto: drop fsl-sec4 txt binding Peng Fan (OSS)
2023-03-02 13:26   ` kernel test robot
2023-03-03 10:02   ` Krzysztof Kozlowski
2023-03-01  1:57 ` [PATCH 8/9] dt-bindings: crypto: fsl-sec4-snvs: add snvs-lpgpr support Peng Fan (OSS)
2023-03-03 10:03   ` Krzysztof Kozlowski
2023-03-01  1:57 ` [PATCH 9/9] dt-bindings: crypto: fsl-sec4-snvs: add poweroff support Peng Fan (OSS)
2023-03-03 10:03   ` Krzysztof Kozlowski
2023-03-01  3:06 ` [PATCH 0/9] dt-bindings: crypto: convert fsl-sec4 to DT schema Rob Herring
2023-03-01  3:10   ` Peng Fan

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=49da270d-6802-79e9-843f-d46efc9ef728@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gaurav.jain@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    /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;
as well as URLs for NNTP newsgroup(s).