diff mbox series

[1/5] dt/bindings: Add bindings for FWU Metadata mtd storage

Message ID 20220722174319.64006-2-jassisinghbrar@gmail.com
State New
Headers show
Series FWU: Add support for mtd backed feature on DeveloperBox | expand

Commit Message

Jassi Brar July 22, 2022, 5:43 p.m. UTC
From: Sughosh Ganu <sughosh.ganu@linaro.org>

Add bindings needed for accessing the FWU metadata regions.
These include the compatible string which point to the access
method, the actual device which stores the FWU metadata and
the offsets for both metadata regions.

The current patch adds basic bindings needed for accessing the
metadata structure on non-GPT mtd regions.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
 .../firmware/fwu-mdata-mtd.yaml               | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml

Comments

Sughosh Ganu July 25, 2022, 7:04 a.m. UTC | #1
On Fri, 22 Jul 2022 at 23:13, <jassisinghbrar@gmail.com> wrote:
>
> From: Sughosh Ganu <sughosh.ganu@linaro.org>
>
> Add bindings needed for accessing the FWU metadata regions.
> These include the compatible string which point to the access
> method, the actual device which stores the FWU metadata and
> the offsets for both metadata regions.
>
> The current patch adds basic bindings needed for accessing the
> metadata structure on non-GPT mtd regions.
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

This patch is authored by Masami Hiramatsu, and should reflect that.

-sughosh

> ---
>  .../firmware/fwu-mdata-mtd.yaml               | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
>
> diff --git a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
> new file mode 100644
> index 0000000000..4f5404f999
> --- /dev/null
> +++ b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-sf.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: FWU metadata on MTD device without GPT
> +
> +maintainers:
> + - Masami Hiramatsu <masami.hiramatsu@linaro.org>
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: u-boot,fwu-mdata-mtd
> +
> +  fwu-mdata-store:
> +    maxItems: 1
> +    description: Phandle of the MTD device which contains the FWU medatata.
> +
> +  mdata-offsets:
> +    minItems: 2
> +    description: Offsets of the primary and secondary FWU metadata in the NOR flash.
> +
> +required:
> +  - compatible
> +  - fwu-mdata-store
> +  - mdata-offsets
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    fwu-mdata {
> +        compatible = "u-boot,fwu-mdata-mtd";
> +        fwu-mdata-store = <&spi-flash>;
> +        mdata-offsets = <0x500000 0x530000>;
> +    };
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
new file mode 100644
index 0000000000..4f5404f999
--- /dev/null
+++ b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-sf.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: FWU metadata on MTD device without GPT
+
+maintainers:
+ - Masami Hiramatsu <masami.hiramatsu@linaro.org>
+
+properties:
+  compatible:
+    items:
+      - const: u-boot,fwu-mdata-mtd
+
+  fwu-mdata-store:
+    maxItems: 1
+    description: Phandle of the MTD device which contains the FWU medatata.
+
+  mdata-offsets:
+    minItems: 2
+    description: Offsets of the primary and secondary FWU metadata in the NOR flash.
+
+required:
+  - compatible
+  - fwu-mdata-store
+  - mdata-offsets
+
+additionalProperties: false
+
+examples:
+  - |
+    fwu-mdata {
+        compatible = "u-boot,fwu-mdata-mtd";
+        fwu-mdata-store = <&spi-flash>;
+        mdata-offsets = <0x500000 0x530000>;
+    };