devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Jonathan Bakker <xc-racer2@live.ca>,
	Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH 1/5] dt-bindings: mtd: samsung-onenand: Add new binding
Date: Sun, 24 Apr 2022 12:58:03 +0200	[thread overview]
Message-ID: <2642dc72-81c3-b535-a658-025eb23679d7@linaro.org> (raw)
In-Reply-To: <CY4PR04MB05678FDFC8BF8B15174ED639CBF69@CY4PR04MB0567.namprd04.prod.outlook.com>

On 23/04/2022 05:45, Jonathan Bakker wrote:
> Add a yaml binding document for the Samsung OneNAND controller.
> It is found in several older Samsung SoC, notably the S5PV210.
> 
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> ---
>  .../bindings/mtd/samsung,onenand.yaml         | 89 +++++++++++++++++++
>  1 file changed, 89 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mtd/samsung,onenand.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mtd/samsung,onenand.yaml b/Documentation/devicetree/bindings/mtd/samsung,onenand.yaml
> new file mode 100644
> index 000000000000..25012248add6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/samsung,onenand.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/samsung,onenand.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung OneNAND controller
> +
> +maintainers:
> +  - Jonathan Bakker <xc-racer2@live.ca>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - samsung,s3c6400-onenand
> +      - samsung,s3c6410-onenand
> +      - samsung,s5pv210-onenand
> +
> +  reg:
> +    maxItems: 3

Please describe the items or add reg-names.

> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: bus
> +      - const: onenand
> +
> +  clocks:
> +    minItems: 2
> +    maxItems: 2

Drop minItems.

> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0

Don't need these, they come from nand-controller.

> +
> +allOf:
> +  - $ref: nand-controller.yaml
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - samsung,s5pv210-onenand
> +    then:
> +      required:
> +        - interrupts
> +        - clock-names
> +        - clocks

Others require it as well, don't they?

> +
> +patternProperties:
> +  "^nand@[a-f0-9]+$":
> +    type: object
> +    properties:
> +      reg:
> +        minimum: 0
> +        maximum: 1
> +
> +    additionalProperties: false

Also not needed.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

With dropping all duplicated properties from nand-controller, this can
be unevaluatedProperties:false. Unless for some reason parts of
nand-controller schema are not valid here?

> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/s5pv210.h>
> +    onenand: nand-controller@b0600000 {
> +        compatible = "samsung,s5pv210-onenand";
> +        reg = <0xb0600000 0x2000>,
> +          <0xb0000000 0x20000>,
> +          <0xb0040000 0x20000>;

Align the entries with first <> entry.

> +        interrupt-parent = <&vic1>;
> +        interrupts = <31>;
> +        clocks = <&clocks CLK_NANDXL>, <&clocks DOUT_FLASH>;
> +        clock-names = "bus", "onenand";
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        nand@0 {
> +          reg = <0>;
> +        };
> +    };


Best regards,
Krzysztof

      reply	other threads:[~2022-04-24 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220423034316.366488-2-xc-racer2@live.ca>
2022-04-23  3:45 ` [PATCH 1/5] dt-bindings: mtd: samsung-onenand: Add new binding Jonathan Bakker
2022-04-24 10:58   ` Krzysztof Kozlowski [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=2642dc72-81c3-b535-a658-025eb23679d7@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    --cc=xc-racer2@live.ca \
    /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).