Message ID | 20240804114108.1893-6-ansuelsmth@gmail.com |
---|---|
State | New |
Headers | show |
Series | mtd: improve block2mtd + airoha parser | expand |
On Sun, 04 Aug 2024 13:41:05 +0200, Christian Marangi wrote: > Add Documentation for Airoha fixed-partitions compatibles. > > Airoha based SoC declare a dedicated partition at the end of the flash to > store calibration and device specific data, in addition to fixed > partitions. > The offset of this special partition is not well defined as it depends on > flash bad block management that might require reserving additional space > at the end of the flash. > > This binding allows defining all fixed partitions and marking the last one > to detect the correct offset. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > --- > .../partitions/airoha,fixed-partitions.yaml | 80 +++++++++++++++++++ > 1 file changed, 80 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.example.dtb: /example-0/partitions: failed to match any schema with compatible: ['airoha,fixed-partitions'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240804114108.1893-6-ansuelsmth@gmail.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
diff --git a/Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml new file mode 100644 index 000000000000..da7879c98317 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/airoha,fixed-partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Airoha SoC partitioning + +description: | + Airoha based SoC declare a dedicated partition at the end of the flash to + store calibration and device specific data, in addition to fixed partitions. + The offset of this special partition is not well defined as it depends on + flash bad block management that might require reserving additional space at the + end of the flash. + + This binding allows defining all fixed partitions and marking the last one to + detect the correct offset. + +maintainers: + - Christian Marangi <ansuelsmth@gmail.com> + +select: false + +properties: + compatible: + const: airoha,fixed-partition + + "#address-cells": + enum: [ 1, 2 ] + + "#size-cells": + enum: [ 1, 2 ] + +patternProperties: + "^partition@[0-9a-f]+$": + $ref: partition.yaml# + properties: + compatible: + const: airoha,dynamic-art + unevaluatedProperties: false + +required: + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + partitions { + compatible = "airoha,fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x00000000 0x00080000>; + }; + + partition@80000 { + label = "tclinux"; + reg = <0x00080000 0x02800000>; + }; + + partition@2880000 { + label = "tclinux_slave"; + reg = <0x02880000 0x02800000>; + }; + + partition@5080000 { + label = "rootfs_data"; + reg = <0x5080000 0x00800000>; + }; + + partition@ffffffff { + compatible = "airoha,dynamic-art"; + label = "art"; + reg = <0xffffffff 0x00300000>; + }; + };
Add Documentation for Airoha fixed-partitions compatibles. Airoha based SoC declare a dedicated partition at the end of the flash to store calibration and device specific data, in addition to fixed partitions. The offset of this special partition is not well defined as it depends on flash bad block management that might require reserving additional space at the end of the flash. This binding allows defining all fixed partitions and marking the last one to detect the correct offset. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> --- .../partitions/airoha,fixed-partitions.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml