1description: | 2 This binding is used to describe fixed partitions of a flash (or 3 other nonvolatile storage) memory. 4 5 Here is an example: 6 7 &flash0 { 8 partitions { 9 compatible = "fixed-partitions"; 10 #address-cells = <1>; 11 #size-cells = <1>; 12 13 boot_partition: partition@0 { 14 label = "mcuboot"; 15 reg = <0x00000000 0x0000C000>; 16 }; 17 slot0_partition: partition@c000 { 18 label = "image-0"; 19 reg = <0x0000C000 0x00076000>; 20 }; 21 slot1_partition: partition@82000 { 22 label = "image-1"; 23 reg = <0x00082000 0x00076000>; 24 }; 25 26 /* 27 * The flash starting at 0x000f8000 and ending at 28 * 0x000fffff is reserved for use by the application. 29 */ 30 31 /* 32 * Storage partition will be used by FCB/LittleFS/NVS 33 * if enabled. 34 */ 35 storage_partition: partition@f8000 { 36 label = "storage"; 37 reg = <0x000f8000 0x00008000>; 38 }; 39 }; 40 }; 41 42 Note that the usual name for this node is 'partitions'. 43 The fixed-partitions node should be a child of the flash 44 memory node. Note also that the flash memory node is usually 45 different from the node representing the flash controller 46 IP block. 47 48 Above, slot0_partition's register address 0xc000 means that 49 the partition begins at that offset from the parent flash 50 memory flash0's base address. That is, partition addresses 51 are relative; physical addresses must be calculated by adding 52 the start address of flash0 in memory to each partition's 53 reg address. 54 55compatible: "fixed-partitions" 56 57properties: 58 "#address-cells": 59 type: int 60 description: | 61 Number of cells required to represent a child node's 62 reg property address. This must be large enough to 63 represent the start offset of each partition. 64 65 "#size-cells": 66 type: int 67 description: | 68 Number of cells required to represent a child node's 69 reg property address. This must be large enough to 70 represent the size of each partition in bytes. 71 72child-binding: 73 description: | 74 Each child node of the fixed-partitions node represents 75 an individual flash partition. These should usually 76 look like this: 77 78 partition_nodelabel: partition@START_OFFSET { 79 label = "human-readable-name"; 80 reg = <0xSTART_OFFSET 0xSIZE>; 81 }; 82 properties: 83 label: 84 type: string 85 description: | 86 Human readable string describing the flash partition. 87 read-only: 88 type: boolean 89 description: set this property if the partition is read-only 90 reg: 91 type: array 92 description: | 93 This should be in the format <OFFSET SIZE>, where OFFSET 94 is the offset of the flash partition relative to the base 95 address of the parent memory, and SIZE is the size of 96 the partition in bytes. 97 required: true 98