devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v5 2/2] dt-bindings: mtd: davinci: convert to yaml
Date: Fri, 18 Oct 2024 11:12:38 +0200	[thread overview]
Message-ID: <ZxImhhPhOWuYqSfK@gmail.com> (raw)
In-Reply-To: <10a0efab-83a8-4168-993a-c4482a568c96@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 4011 bytes --]


Kryzstof,

On Mon, Oct 14, 2024 at 08:08:15PM +0200, Krzysztof Kozlowski wrote:
> On 14/10/2024 14:04, Marcus Folkesson wrote:

[...]

> > 
> >   reg:
> >     items:
> >       - description: |
> >         Contains 2 offset/length values:
> >         - offset and length for the access window.
> >         - offset and length for accessing the AEMIF
> >         control registers.
> 
> You need to list two items, so two times "- description:"
> (and drop redundant parts like "offset and length" because this cannot
> be anything else)
> 
> and this should be pointed out by testing, so open the example and try
> to explain why it is so different than expected.
> 
> 
> Unless, it is supposed to be one item... but how do I know? You are
> looking at the device and its driver, not  me.

Ok, thank you.

I will go for:

  reg:
    items:
      - description:
          Access window
      - description:
          AEMIF control registers



[...]

> > 
> > But I'm getting the following errors:
> > 
> > ```
> > .../ti,davinci-nand.example.dtb: nand-controller@2000000,0: #size-cells: 0 was expected
> >         from schema $id: http://devicetree.org/schemas/mtd/ti,davinci-nand.yaml#
> > .../ti,davinci-nand.example.dtb: nand-controller@2000000,0: reg: [[0, 33554432], [33554432, 1], [0, 32768]] is too long
> >         from schema $id: http://devicetree.org/schemas/mtd/ti,davinci-nand.yaml#
> > .../ti,davinci-nand.example.dtb: nand-controller@2000000,0: Unevaluated properties are not allowed ('reg' was unexpected)
> >         from schema $id: http://devicetree.org/schemas/mtd/ti,davinci-nand.yaml#
> > ```
> 
> Well, obviously. That's the point of the schema. The example part is
> embedded in node with some address/size cells, which might fit your case
> or might not.
> 
> > 
> > The resuling 'ti,davinci-nand.example.dts' contains the following:
> > 
> > ```
> >     example-0 {
> >         #address-cells = <1>;
> >         #size-cells = <1>;
> > 
> >         nand-controller@2000000,0 {
> >           compatible = "ti,davinci-nand";
> >           #address-cells = <1>;
> >           #size-cells = <1>;
> >           reg = <0 0x02000000 0x02000000
> >           1 0x00000000 0x00008000>;
> > ```
> >         
> > 
> > How do I set #address-cells in example-0 to 2?
> > I guess that is the problem.
> 
> 
> 
> You just set it... There are dozens/hundreds of schemas doing it, what
> is exactly a problem here?

I think I will solve the problem by including the parent nodes.
What do you think about this?

examples:
  - |
    aemif: aemif@68000000 {
      compatible = "ti,da850-aemif";
      #address-cells = <2>;
      #size-cells = <1>;

      reg = <0x68000000 0x00008000>;
      ranges = <0 0 0x60000000 0x08000000
      1 0 0x68000000 0x00008000>;
      clocks = <&psc0 3>;
      clock-names = "aemif";
      clock-ranges;

      cs3 {
        #address-cells = <2>;
        #size-cells = <1>;
        clock-ranges;
        ranges;

        ti,cs-chipselect = <3>;

        nand-controller@2000000,0 {
          compatible = "ti,davinci-nand";
          #address-cells = <1>;
          #size-cells = <0>;
          reg = <0 0x02000000 0x02000000
          1 0x00000000 0x00008000>;

          ti,davinci-chipselect = <1>;
          ti,davinci-mask-ale = <0>;
          ti,davinci-mask-cle = <0>;
          ti,davinci-mask-chipsel = <0>;

          ti,davinci-nand-buswidth = <16>;
          ti,davinci-ecc-mode = "hw";
          ti,davinci-ecc-bits = <4>;
          ti,davinci-nand-use-bbt;

          partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
              label = "u-boot env";
              reg = <0 0x020000>;
            };
          };
        };
      };
    };


> 
> Best regards,
> Krzysztof
> 

Best regards,
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-10-18  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08  7:02 [PATCH v5 0/2] Add support for "on-die" ECC on Davinci Marcus Folkesson
2024-10-08  7:02 ` [PATCH v5 1/2] mtd: nand: davinci: add support for on-die ECC engine type Marcus Folkesson
2024-10-08  7:02 ` [PATCH v5 2/2] dt-bindings: mtd: davinci: convert to yaml Marcus Folkesson
2024-10-08  8:10   ` Miquel Raynal
2024-10-08 13:28   ` Krzysztof Kozlowski
2024-10-14 12:04     ` Marcus Folkesson
2024-10-14 18:08       ` Krzysztof Kozlowski
2024-10-18  9:12         ` Marcus Folkesson [this message]
2024-10-26 18:16           ` Krzysztof Kozlowski

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=ZxImhhPhOWuYqSfK@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=vigneshr@ti.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 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).