Re: [PATCH] dt-bindings: mtd: partitions: convert Broadcom's TRX to the json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

On 17.02.2022 04:59, Rob Herring wrote:
On Wed, 16 Feb 2022 11:41:26 +0100, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx>

This helps validating DTS files.

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
---
  .../bindings/mtd/partitions/brcm,trx.txt      | 42 ---------------
  .../bindings/mtd/partitions/brcm,trx.yaml     | 51 +++++++++++++++++++
  2 files changed, 51 insertions(+), 42 deletions(-)
  delete mode 100644 Documentation/devicetree/bindings/mtd/partitions/brcm,trx.txt
  create mode 100644 Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml


My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.example.dt.yaml: partition@200000: compatible:0: 'brcm,trx' was expected
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.example.dt.yaml: partition@200000: compatible: ['linksys,ns-firmware', 'brcm,trx'] is too long
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mtd/partitions/brcm,trx.yaml

could you advise the best way to solve that?


1. compatible = "brcm,trx";

Most Broadcom 47xx devices have one firmware partition using TRX format.
So we want something like:

partition@200000 {
        compatible = "brcm,trx";
        label = "firmware";
        reg = <0x200000 0xf00000>;
};


2. compatible = "linksys,ns-firmware", "brcm,trx";

Linksys has two firmware partitions and operating system has to choose
the right one to proceed with (to parse for kernel & rootfs). They still
use TRX format though. So we want something like:

partition@200000 {
        compatible = "linksys,ns-firmware", "brcm,trx";
        reg = <0x200000 0xf00000>;
};

partition@1100000 {
        compatible = "linksys,ns-firmware", "brcm,trx";
        reg = <0x1100000 0xf00000>;
};


I thought of moving "linksys,ns-firmware" documentation to the
brcm,trx.yaml but its part of the compatible = "linksys,ns-partitions";
(parent node) so it doesn't fit there well.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux