162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/mtd/partitions/fixed-partitions.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Fixed partitions
862306a36Sopenharmony_ci
962306a36Sopenharmony_cidescription: |
1062306a36Sopenharmony_ci  This binding can be used on platforms which have strong conventions about
1162306a36Sopenharmony_ci  which portions of a flash are used for what purposes, but which don't use an
1262306a36Sopenharmony_ci  on-flash partition table such as RedBoot.
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci  The partition table should be a node named "partitions". Partitions are then
1562306a36Sopenharmony_ci  defined as subnodes.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_cimaintainers:
1862306a36Sopenharmony_ci  - Rafał Miłecki <rafal@milecki.pl>
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciproperties:
2162306a36Sopenharmony_ci  compatible:
2262306a36Sopenharmony_ci    oneOf:
2362306a36Sopenharmony_ci      - const: fixed-partitions
2462306a36Sopenharmony_ci      - items:
2562306a36Sopenharmony_ci          - const: sercomm,sc-partitions
2662306a36Sopenharmony_ci          - const: fixed-partitions
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci  "#address-cells": true
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci  "#size-cells": true
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_cipatternProperties:
3362306a36Sopenharmony_ci  "@[0-9a-f]+$":
3462306a36Sopenharmony_ci    $ref: partition.yaml#
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci    properties:
3762306a36Sopenharmony_ci      sercomm,scpart-id:
3862306a36Sopenharmony_ci        description: Partition id in Sercomm partition map. Mtd parser
3962306a36Sopenharmony_ci          uses this id to find a record in the partition map containing
4062306a36Sopenharmony_ci          offset and size of the current partition. The values from
4162306a36Sopenharmony_ci          partition map overrides partition offset and size defined in
4262306a36Sopenharmony_ci          reg property of the dts. Frequently these values are the same,
4362306a36Sopenharmony_ci          but may differ if device has bad eraseblocks on a flash.
4462306a36Sopenharmony_ci        $ref: /schemas/types.yaml#/definitions/uint32
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_cirequired:
4762306a36Sopenharmony_ci  - "#address-cells"
4862306a36Sopenharmony_ci  - "#size-cells"
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciadditionalProperties: true
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ciexamples:
5362306a36Sopenharmony_ci  - |
5462306a36Sopenharmony_ci    partitions {
5562306a36Sopenharmony_ci        compatible = "fixed-partitions";
5662306a36Sopenharmony_ci        #address-cells = <1>;
5762306a36Sopenharmony_ci        #size-cells = <1>;
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci        partition@0 {
6062306a36Sopenharmony_ci            label = "u-boot";
6162306a36Sopenharmony_ci            reg = <0x0000000 0x100000>;
6262306a36Sopenharmony_ci            read-only;
6362306a36Sopenharmony_ci        };
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci        uimage@100000 {
6662306a36Sopenharmony_ci            reg = <0x0100000 0x200000>;
6762306a36Sopenharmony_ci        };
6862306a36Sopenharmony_ci    };
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci  - |
7162306a36Sopenharmony_ci    partitions {
7262306a36Sopenharmony_ci        compatible = "fixed-partitions";
7362306a36Sopenharmony_ci        #address-cells = <1>;
7462306a36Sopenharmony_ci        #size-cells = <2>;
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci        /* a 4 GiB partition */
7762306a36Sopenharmony_ci        partition@0 {
7862306a36Sopenharmony_ci            label = "filesystem";
7962306a36Sopenharmony_ci            reg = <0x00000000 0x1 0x00000000>;
8062306a36Sopenharmony_ci            linux,rootfs;
8162306a36Sopenharmony_ci        };
8262306a36Sopenharmony_ci    };
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci  - |
8562306a36Sopenharmony_ci    partitions {
8662306a36Sopenharmony_ci        compatible = "fixed-partitions";
8762306a36Sopenharmony_ci        #address-cells = <2>;
8862306a36Sopenharmony_ci        #size-cells = <2>;
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci        /* an 8 GiB partition */
9162306a36Sopenharmony_ci        partition@0 {
9262306a36Sopenharmony_ci            label = "filesystem #1";
9362306a36Sopenharmony_ci            reg = <0x0 0x00000000 0x2 0x00000000>;
9462306a36Sopenharmony_ci        };
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci        /* a 4 GiB partition */
9762306a36Sopenharmony_ci        partition@200000000 {
9862306a36Sopenharmony_ci            label = "filesystem #2";
9962306a36Sopenharmony_ci            reg = <0x2 0x00000000 0x1 0x00000000>;
10062306a36Sopenharmony_ci        };
10162306a36Sopenharmony_ci    };
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci  - |
10462306a36Sopenharmony_ci    partitions {
10562306a36Sopenharmony_ci        compatible = "fixed-partitions";
10662306a36Sopenharmony_ci        #address-cells = <1>;
10762306a36Sopenharmony_ci        #size-cells = <1>;
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ci        partition@0 {
11062306a36Sopenharmony_ci            label = "bootloader";
11162306a36Sopenharmony_ci            reg = <0x000000 0x100000>;
11262306a36Sopenharmony_ci            read-only;
11362306a36Sopenharmony_ci        };
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci        firmware@100000 {
11662306a36Sopenharmony_ci            compatible = "brcm,trx";
11762306a36Sopenharmony_ci            label = "firmware";
11862306a36Sopenharmony_ci            reg = <0x100000 0xe00000>;
11962306a36Sopenharmony_ci        };
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci        calibration@f00000 {
12262306a36Sopenharmony_ci            compatible = "fixed-partitions";
12362306a36Sopenharmony_ci            label = "calibration";
12462306a36Sopenharmony_ci            reg = <0xf00000 0x100000>;
12562306a36Sopenharmony_ci            ranges = <0 0xf00000 0x100000>;
12662306a36Sopenharmony_ci            #address-cells = <1>;
12762306a36Sopenharmony_ci            #size-cells = <1>;
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci            partition@0 {
13062306a36Sopenharmony_ci                label = "wifi0";
13162306a36Sopenharmony_ci                reg = <0x000000 0x080000>;
13262306a36Sopenharmony_ci            };
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci            partition@80000 {
13562306a36Sopenharmony_ci                label = "wifi1";
13662306a36Sopenharmony_ci                reg = <0x080000 0x080000>;
13762306a36Sopenharmony_ci            };
13862306a36Sopenharmony_ci        };
13962306a36Sopenharmony_ci    };
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci  - |
14262306a36Sopenharmony_ci    partitions {
14362306a36Sopenharmony_ci        compatible = "sercomm,sc-partitions", "fixed-partitions";
14462306a36Sopenharmony_ci        #address-cells = <1>;
14562306a36Sopenharmony_ci        #size-cells = <1>;
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci        partition@0 {
14862306a36Sopenharmony_ci            label = "u-boot";
14962306a36Sopenharmony_ci            reg = <0x0 0x100000>;
15062306a36Sopenharmony_ci            sercomm,scpart-id = <0>;
15162306a36Sopenharmony_ci            read-only;
15262306a36Sopenharmony_ci        };
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci        partition@100000 {
15562306a36Sopenharmony_ci            label = "dynamic partition map";
15662306a36Sopenharmony_ci            reg = <0x100000 0x100000>;
15762306a36Sopenharmony_ci            sercomm,scpart-id = <1>;
15862306a36Sopenharmony_ci        };
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ci        partition@200000 {
16162306a36Sopenharmony_ci            label = "Factory";
16262306a36Sopenharmony_ci            reg = <0x200000 0x100000>;
16362306a36Sopenharmony_ci            sercomm,scpart-id = <2>;
16462306a36Sopenharmony_ci            read-only;
16562306a36Sopenharmony_ci        };
16662306a36Sopenharmony_ci    };
167