[PATCH v5 2/2] dt-bindings: mtd: davinci: convert to yaml
Marcus Folkesson
marcus.folkesson at gmail.com
Fri Oct 18 02:12:38 PDT 2024
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 at 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 at 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 at 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 at 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 at 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 at 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 at 0 {
label = "u-boot env";
reg = <0 0x020000>;
};
};
};
};
};
>
> Best regards,
> Krzysztof
>
Best regards,
Marcus Folkesson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20241018/07fa43e8/attachment.sig>
More information about the linux-mtd
mailing list