[PATCH] dt-bindings: mtd: cadence: convert cadence-nand-controller.txt to yaml

Miquel Raynal miquel.raynal at bootlin.com
Wed Oct 4 04:32:25 PDT 2023


Hello,

> > > -Child nodes represent the available NAND chips.  
> > 
> > This is not fully pictured in the current schema, by referencing nand-
> > controller.yaml I believe you allow all kind of direct partitioning (which is legacy,
> > and not supposed to be supported here).
> > Can you try to define a partition directly within the controller node in the example
> > and see whether it still passes the checks?
> > 
> > Thanks,
> > Miquèl  
> 
> Hi Miquel,
> 
> I tried below in the controller node in example,
> 
>        ...
>         clocks = <&nf_clk>;
>         cdns,board-delay-ps = <4830>;
> 
>         partition at 0 {
>           label = "boot";
>           reg = <0 0x00200000>;
>          };
> 
>         nand at 0 {
>             reg = <0>;
>         };
> 
> It shows  'partition at 0' was unexpected.
> 
> DTC_CHK Documentation/devicetree/bindings/mtd/cadence,nand.example.dtb
> Documentation/devicetree/bindings/mtd/cadence,nand.example.dts:35.23-38.14: Warning (unique_unit_address_if_enabled): /example-0/nand-controller at 10b80000/partition at 0: duplicate unit-address (also used in node /example-0/nand-controller at 10b80000/nand at 0)
> /mnt/newvolume/users/nrabara/kernel.org/3oct23/Documentation/devicetree/bindings/mtd/cadence,nand.example.dtb: nand-controller at 10b80000: Unevaluated properties are not allowed ('partition at 0' was unexpected)
>         From schema: /mnt/newvolume/users/nrabara/kernel.org/3oct23/Documentation/devicetree/bindings/mtd/cadence,nand.yaml
> 
> However using partition in nand node is OK.
>         nand at 0 {
>             reg = <0>;
>             
>             #address-cells = <1>;
>             #size-cells = <1>;
> 
>             partition at 0 {
>               label = "boot";
>               reg = <0 0x00200000>;
>             };
> 
>             partition at 200000 {
>               label = "env";
>               reg = <0x00200000 0x00400000>;
>             };
>         };
> 
> "make dt_binding_check DT_SCHEMA_FILES=mtd/cadence,nand.yaml"  is OK without any warnings. 
> 
> DTEX    Documentation/devicetree/bindings/mtd/cadence,nand.example.dts
> DTC_CHK Documentation/devicetree/bindings/mtd/cadence,nand.example.dtb
> 
> Any additional changes required for this patch?

No, should be fine then.

Thanks,
Miquèl



More information about the linux-mtd mailing list