[PATCH v3 01/10] dt-bindings: mtd: partitions: add OpenWrt defined U-Boot Image

Bjørn Mork bjorn at mork.no
Wed Jan 20 10:44:42 EST 2021


Rafał Miłecki <zajec5 at gmail.com> writes:

> Did you check that binding with the dt_binding_check?
>
> Something like:
> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml
> (you may need arch too, e.g. ARCH=arm64)

Yes, I actually did since I'm not exactly used to writing these files
(or any docs, really :-)

So I used
https://www.kernel.org/doc/html/latest/devicetree/writing-schema.html
and tried my best to follow all the instructions.

Retested it now, just to be sure.  Need to add the "^openwrt,.*" vendor
opbviously if this should go upstream:

bjorn at miraculix:/usr/local/src/git/linux$ git diff Documentation/devicetree/bindings/vendor-prefixes.yaml
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 041ae90b0d8f..bb70d31ec380 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -812,6 +812,8 @@ patternProperties:
     description: OpenCores.org
   "^openrisc,.*":
     description: OpenRISC.io
+  "^openwrt,.*":
+    description: OpenWrt
   "^option,.*":
     description: Option NV
   "^oranth,.*":


And I get some warnings I really don't understand:

bjorn at miraculix:/usr/local/src/git/linux$ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml
  CHKDT   Documentation/devicetree/bindings/processed-schema-examples.json
  SCHEMA  Documentation/devicetree/bindings/processed-schema-examples.json
  DTC     Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.example.dt.yaml
  CHECK   Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.example.dt.yaml
/usr/local/src/git/linux/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.example.dt.yaml: partition at 300000: 'label', 'reg' do not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /usr/local/src/git/linux/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml
/usr/local/src/git/linux/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.example.dt.yaml: partition at 70000: 'label', 'reg' do not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /usr/local/src/git/linux/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml
/usr/local/src/git/linux/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.example.dt.yaml: partition at 6c0000: 'label', 'reg' do not match any of the regexes: 'pinctrl-[0-9]+'
        From schema: /usr/local/src/git/linux/Documentation/devicetree/bindings/mtd/partitions/openwrt,uimage.yaml


> I think preferred license for yaml (that dt_binding_check checks for) is
> # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Wondered about that, but didn't find any specific recommendation.  And
there are all plenty of both:

bjorn at miraculix:/usr/local/src/git/linux$ git grep -h SPDX-License-Identifier Documentation/devicetree/bindings/|sort|uniq -c
      6 # SPDX-License-Identifier: (GPL-2.0)
    378 # SPDX-License-Identifier: GPL-2.0
     10 # SPDX-License-Identifier: GPL-2.0+
      4 .. SPDX-License-Identifier: GPL-2.0
      1 # SPDX-License-Identifier: (GPL-2.0-only)
     71 # SPDX-License-Identifier: GPL-2.0-only
     15 # SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
      3 # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
    539 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
     79 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
    307 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
      7 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
      9 # SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
      1 # SPDX-License-Identifier: (GPL-2.0-or-later)
      4 # SPDX-License-Identifier: GPL-2.0-or-later
      5 # SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
      3 # SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
      3 # SPDX-License-Identifier: (GPL-2.0 OR MIT)
      3 # SPDX-License-Identifier: (GPL-2.0+ OR MIT)
      3 # SPDX-License-Identifier: (GPL-2.0+ OR X11)


But I won't object to changing it if you think that is better somehow.
It's not like I see the real differnece here..  Why would anyone want to
distibute a modified version of this schema in any other form than yaml
source?


Bjørn



More information about the openwrt-devel mailing list