0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mtd/partitions/fixed-partitions.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Fixed partitions
0008
0009 description: |
0010 This binding can be used on platforms which have strong conventions about
0011 which portions of a flash are used for what purposes, but which don't use an
0012 on-flash partition table such as RedBoot.
0013
0014 The partition table should be a node named "partitions". Partitions are then
0015 defined as subnodes.
0016
0017 maintainers:
0018 - Rafał Miłecki <rafal@milecki.pl>
0019
0020 properties:
0021 compatible:
0022 oneOf:
0023 - const: fixed-partitions
0024 - items:
0025 - const: sercomm,sc-partitions
0026 - const: fixed-partitions
0027
0028 "#address-cells": true
0029
0030 "#size-cells": true
0031
0032 patternProperties:
0033 "@[0-9a-f]+$":
0034 allOf:
0035 - $ref: "partition.yaml#"
0036 - if:
0037 properties:
0038 compatible:
0039 contains:
0040 const: sercomm,sc-partitions
0041 then:
0042 properties:
0043 sercomm,scpart-id:
0044 description: Partition id in Sercomm partition map. Mtd
0045 parser uses this id to find a record in the partition map
0046 containing offset and size of the current partition. The
0047 values from partition map overrides partition offset and
0048 size defined in reg property of the dts. Frequently these
0049 values are the same, but may differ if device has bad
0050 eraseblocks on a flash.
0051 $ref: /schemas/types.yaml#/definitions/uint32
0052
0053 required:
0054 - "#address-cells"
0055 - "#size-cells"
0056
0057 additionalProperties: true
0058
0059 examples:
0060 - |
0061 partitions {
0062 compatible = "fixed-partitions";
0063 #address-cells = <1>;
0064 #size-cells = <1>;
0065
0066 partition@0 {
0067 label = "u-boot";
0068 reg = <0x0000000 0x100000>;
0069 read-only;
0070 };
0071
0072 uimage@100000 {
0073 reg = <0x0100000 0x200000>;
0074 };
0075 };
0076
0077 - |
0078 partitions {
0079 compatible = "fixed-partitions";
0080 #address-cells = <1>;
0081 #size-cells = <2>;
0082
0083 /* a 4 GiB partition */
0084 partition@0 {
0085 label = "filesystem";
0086 reg = <0x00000000 0x1 0x00000000>;
0087 };
0088 };
0089
0090 - |
0091 partitions {
0092 compatible = "fixed-partitions";
0093 #address-cells = <2>;
0094 #size-cells = <2>;
0095
0096 /* an 8 GiB partition */
0097 partition@0 {
0098 label = "filesystem #1";
0099 reg = <0x0 0x00000000 0x2 0x00000000>;
0100 };
0101
0102 /* a 4 GiB partition */
0103 partition@200000000 {
0104 label = "filesystem #2";
0105 reg = <0x2 0x00000000 0x1 0x00000000>;
0106 };
0107 };
0108
0109 - |
0110 partitions {
0111 compatible = "fixed-partitions";
0112 #address-cells = <1>;
0113 #size-cells = <1>;
0114
0115 partition@0 {
0116 label = "bootloader";
0117 reg = <0x000000 0x100000>;
0118 read-only;
0119 };
0120
0121 firmware@100000 {
0122 compatible = "brcm,trx";
0123 label = "firmware";
0124 reg = <0x100000 0xe00000>;
0125 };
0126
0127 calibration@f00000 {
0128 compatible = "fixed-partitions";
0129 label = "calibration";
0130 reg = <0xf00000 0x100000>;
0131 ranges = <0 0xf00000 0x100000>;
0132 #address-cells = <1>;
0133 #size-cells = <1>;
0134
0135 partition@0 {
0136 label = "wifi0";
0137 reg = <0x000000 0x080000>;
0138 };
0139
0140 partition@80000 {
0141 label = "wifi1";
0142 reg = <0x080000 0x080000>;
0143 };
0144 };
0145 };
0146
0147 - |
0148 partitions {
0149 compatible = "sercomm,sc-partitions", "fixed-partitions";
0150 #address-cells = <1>;
0151 #size-cells = <1>;
0152
0153 partition@0 {
0154 label = "u-boot";
0155 reg = <0x0 0x100000>;
0156 sercomm,scpart-id = <0>;
0157 read-only;
0158 };
0159
0160 partition@100000 {
0161 label = "dynamic partition map";
0162 reg = <0x100000 0x100000>;
0163 sercomm,scpart-id = <1>;
0164 };
0165
0166 partition@200000 {
0167 label = "Factory";
0168 reg = <0x200000 0x100000>;
0169 sercomm,scpart-id = <2>;
0170 read-only;
0171 };
0172 };