Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 4 | $id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-mtd.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/base.yaml# |
Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 6 | |
| 7 | title: FWU metadata on MTD device without GPT |
| 8 | |
| 9 | maintainers: |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 10 | - Jassi Brar <jaswinder.singh@linaro.org> |
Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 11 | |
| 12 | properties: |
| 13 | compatible: |
| 14 | items: |
| 15 | - const: u-boot,fwu-mdata-mtd |
| 16 | |
| 17 | fwu-mdata-store: |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 18 | $ref: /schemas/types.yaml#/definitions/phandle |
| 19 | description: Phandle of the MTD device which contains the FWU MetaData and Banks. |
Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 20 | |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 21 | mdata-parts: |
| 22 | $ref: /schemas/types.yaml#/definitions/non-unique-string-array |
Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 23 | minItems: 2 |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 24 | maxItems: 2 |
| 25 | description: labels of the primary and secondary FWU metadata partitions in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node. |
| 26 | |
| 27 | patternProperties: |
| 28 | "fwu-bank[0-9]": |
| 29 | type: object |
| 30 | description: List of FWU mtd-backed banks. Typically two banks. |
| 31 | |
| 32 | properties: |
| 33 | id: |
| 34 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 35 | description: Index of the bank. |
| 36 | |
| 37 | label: |
| 38 | $ref: /schemas/types.yaml#/definitions/non-unique-string-array |
| 39 | minItems: 1 |
| 40 | maxItems: 1 |
| 41 | description: label of the partition, in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node, that holds this bank. |
| 42 | |
| 43 | patternProperties: |
| 44 | "fwu-image[0-9]": |
| 45 | type: object |
| 46 | description: List of images in the FWU mtd-backed bank. |
| 47 | |
| 48 | properties: |
| 49 | id: |
| 50 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 51 | description: Index of the bank. |
| 52 | |
| 53 | offset: |
| 54 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 55 | description: Offset, from start of the bank, where the image is located. |
| 56 | |
| 57 | size: |
| 58 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 59 | description: Size reserved for the image. |
| 60 | |
| 61 | uuid: |
| 62 | $ref: /schemas/types.yaml#/definitions/non-unique-string-array |
| 63 | minItems: 1 |
| 64 | maxItems: 1 |
| 65 | description: UUID of the image. |
| 66 | |
| 67 | required: |
| 68 | - id |
| 69 | - offset |
| 70 | - size |
| 71 | - uuid |
| 72 | additionalProperties: false |
| 73 | |
| 74 | required: |
| 75 | - id |
| 76 | - label |
| 77 | - fwu-images |
| 78 | additionalProperties: false |
Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 79 | |
| 80 | required: |
| 81 | - compatible |
| 82 | - fwu-mdata-store |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 83 | - mdata-parts |
| 84 | - fwu-banks |
Sughosh Ganu | 02b1979 | 2022-07-22 12:43:15 -0500 | [diff] [blame] | 85 | additionalProperties: false |
| 86 | |
| 87 | examples: |
| 88 | - | |
Jassi Brar | a56e345 | 2023-03-06 17:18:14 -0600 | [diff] [blame] | 89 | fwu-mdata { |
| 90 | compatible = "u-boot,fwu-mdata-mtd"; |
| 91 | fwu-mdata-store = <&flash0>; |
| 92 | mdata-parts = "MDATA-Pri", "MDATA-Sec"; |
| 93 | |
| 94 | fwu-bank0 { |
| 95 | id = <0>; |
| 96 | label = "FIP-Bank0"; |
| 97 | fwu-image0 { |
| 98 | id = <0>; |
| 99 | offset = <0x0>; |
| 100 | size = <0x400000>; |
| 101 | uuid = "5a66a702-99fd-4fef-a392-c26e261a2828"; |
| 102 | }; |
| 103 | }; |
| 104 | fwu-bank1 { |
| 105 | id = <1>; |
| 106 | label = "FIP-Bank1"; |
| 107 | fwu-image0 { |
| 108 | id = <0>; |
| 109 | offset = <0x0>; |
| 110 | size = <0x400000>; |
| 111 | uuid = "a8f868a1-6e5c-4757-878d-ce63375ef2c0"; |
| 112 | }; |
| 113 | }; |
| 114 | }; |
| 115 | ... |