lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxImhhPhOWuYqSfK@gmail.com>
Date: Fri, 18 Oct 2024 11:12:38 +0200
From: Marcus Folkesson <marcus.folkesson@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Miquel Raynal <miquel.raynal@...tlin.com>,
	Richard Weinberger <richard@....at>,
	Vignesh Raghavendra <vigneshr@...com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v5 2/2] dt-bindings: mtd: davinci: convert to yaml


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@...0000,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@...0000,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@...0000,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@...0000,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@...00000 {
      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@...0000,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

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ