xref: /linux/Documentation/devicetree/bindings/mtd/partitions/tplink,safeloader-partitions.yaml (revision 0d8eae7b124e2ddaee00f186fe922450faad0ed7)
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/tplink,safeloader-partitions.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TP-Link SafeLoader partitions
8
9description: |
10  TP-Link home routers store various data on flash (e.g. bootloader,
11  flash layout, firmware, product info, configuration, calibration
12  data). That requires flash partitioning.
13
14  Flash space layout of TP-Link devices is stored on flash itself using
15  a custom ASCII-based format. That format was first found in TP-Link
16  devices with a custom SafeLoader bootloader. Later it was adapted to
17  CFE and U-Boot bootloaders.
18
19  Partitions specified in partitions table cover whole flash space. Some
20  contain static data that shouldn't get modified (device's MAC or WiFi
21  calibration data). Others are semi-static (like kernel). Finally some
22  partitions contain fully changeable content (like rootfs).
23
24  This binding describes partitioning method and defines offset of ASCII
25  based partitions table. That offset is picked at manufacturing process
26  and doesn't change.
27
28maintainers:
29  - Rafał Miłecki <rafal@milecki.pl>
30
31properties:
32  compatible:
33    const: tplink,safeloader-partitions
34
35  partitions-table-offset:
36    description: Flash offset of partitions table
37    $ref: /schemas/types.yaml#/definitions/uint32
38
39patternProperties:
40  "^partition-.*$":
41    $ref: partition.yaml#
42
43required:
44  - partitions-table-offset
45
46additionalProperties: false
47
48examples:
49  - |
50    partitions {
51        compatible = "tplink,safeloader-partitions";
52        partitions-table-offset = <0x100000>;
53
54        partition-file-system {
55                linux,rootfs;
56        };
57    };
58