1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mtd/partitions/fixed-partitions.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Fixed partitions 8 9description: | 10 This binding can be used on platforms which have strong conventions about 11 which portions of a flash are used for what purposes, but which don't use an 12 on-flash partition table such as RedBoot. 13 14 The partition table should be a node named "partitions". Partitions are then 15 defined as subnodes. 16 17maintainers: 18 - Rafał Miłecki <rafal@milecki.pl> 19 20properties: 21 compatible: 22 oneOf: 23 - const: fixed-partitions 24 - items: 25 - const: sercomm,sc-partitions 26 - const: fixed-partitions 27 28 "#address-cells": true 29 30 "#size-cells": true 31 32patternProperties: 33 "@[0-9a-f]+$": 34 allOf: 35 - $ref: "partition.yaml#" 36 - if: 37 properties: 38 compatible: 39 contains: 40 const: sercomm,sc-partitions 41 then: 42 properties: 43 sercomm,scpart-id: 44 description: Partition id in Sercomm partition map. Mtd 45 parser uses this id to find a record in the partition map 46 containing offset and size of the current partition. The 47 values from partition map overrides partition offset and 48 size defined in reg property of the dts. Frequently these 49 values are the same, but may differ if device has bad 50 eraseblocks on a flash. 51 $ref: /schemas/types.yaml#/definitions/uint32 52 53required: 54 - "#address-cells" 55 - "#size-cells" 56 57additionalProperties: true 58 59examples: 60 - | 61 partitions { 62 compatible = "fixed-partitions"; 63 #address-cells = <1>; 64 #size-cells = <1>; 65 66 partition@0 { 67 label = "u-boot"; 68 reg = <0x0000000 0x100000>; 69 read-only; 70 }; 71 72 uimage@100000 { 73 reg = <0x0100000 0x200000>; 74 }; 75 }; 76 77 - | 78 partitions { 79 compatible = "fixed-partitions"; 80 #address-cells = <1>; 81 #size-cells = <2>; 82 83 /* a 4 GiB partition */ 84 partition@0 { 85 label = "filesystem"; 86 reg = <0x00000000 0x1 0x00000000>; 87 linux,rootfs; 88 }; 89 }; 90 91 - | 92 partitions { 93 compatible = "fixed-partitions"; 94 #address-cells = <2>; 95 #size-cells = <2>; 96 97 /* an 8 GiB partition */ 98 partition@0 { 99 label = "filesystem #1"; 100 reg = <0x0 0x00000000 0x2 0x00000000>; 101 }; 102 103 /* a 4 GiB partition */ 104 partition@200000000 { 105 label = "filesystem #2"; 106 reg = <0x2 0x00000000 0x1 0x00000000>; 107 }; 108 }; 109 110 - | 111 partitions { 112 compatible = "fixed-partitions"; 113 #address-cells = <1>; 114 #size-cells = <1>; 115 116 partition@0 { 117 label = "bootloader"; 118 reg = <0x000000 0x100000>; 119 read-only; 120 }; 121 122 firmware@100000 { 123 compatible = "brcm,trx"; 124 label = "firmware"; 125 reg = <0x100000 0xe00000>; 126 }; 127 128 calibration@f00000 { 129 compatible = "fixed-partitions"; 130 label = "calibration"; 131 reg = <0xf00000 0x100000>; 132 ranges = <0 0xf00000 0x100000>; 133 #address-cells = <1>; 134 #size-cells = <1>; 135 136 partition@0 { 137 label = "wifi0"; 138 reg = <0x000000 0x080000>; 139 }; 140 141 partition@80000 { 142 label = "wifi1"; 143 reg = <0x080000 0x080000>; 144 }; 145 }; 146 }; 147 148 - | 149 partitions { 150 compatible = "sercomm,sc-partitions", "fixed-partitions"; 151 #address-cells = <1>; 152 #size-cells = <1>; 153 154 partition@0 { 155 label = "u-boot"; 156 reg = <0x0 0x100000>; 157 sercomm,scpart-id = <0>; 158 read-only; 159 }; 160 161 partition@100000 { 162 label = "dynamic partition map"; 163 reg = <0x100000 0x100000>; 164 sercomm,scpart-id = <1>; 165 }; 166 167 partition@200000 { 168 label = "Factory"; 169 reg = <0x200000 0x100000>; 170 sercomm,scpart-id = <2>; 171 read-only; 172 }; 173 }; 174