Skip to content

Commit d9a1683

Browse files
Rafał Miłeckimiquelraynal
authored andcommitted
dt-bindings: mtd: partitions: convert BCM47xx to the json-schema
This helps validating DTS files. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220216104135.31307-1-zajec5@gmail.com
1 parent ceef4cf commit d9a1683

2 files changed

Lines changed: 48 additions & 42 deletions

File tree

Documentation/devicetree/bindings/mtd/partitions/brcm,bcm947xx-cfe-partitions.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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/brcm,bcm947xx-cfe-partitions.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Broadcom BCM47xx Partitions
8+
9+
description: |
10+
Broadcom is one of hardware manufacturers providing SoCs (BCM47xx) used in
11+
home routers. Their BCM947xx boards using CFE bootloader have several
12+
partitions without any on-flash partition table. On some devices their sizes
13+
and/or meanings can also vary so fixed partitioning can't be used.
14+
15+
Discovering partitions on these devices is possible thanks to having a special
16+
header and/or magic signature at the beginning of each of them. They are also
17+
block aligned which is important for determinig a size.
18+
19+
Most of partitions use ASCII text based magic for determining a type. More
20+
complex partitions (like TRX with its HDR0 magic) may include extra header
21+
containing some details, including a length.
22+
23+
A list of supported partitions includes:
24+
1) Bootloader with Broadcom's CFE (Common Firmware Environment)
25+
2) NVRAM with configuration/calibration data
26+
3) Device manufacturer's data with some default values (e.g. SSIDs)
27+
4) TRX firmware container which can hold up to 4 subpartitions
28+
5) Backup TRX firmware used after failed upgrade
29+
30+
As mentioned earlier, role of some partitions may depend on extra
31+
configuration. For example both: main firmware and backup firmware use the
32+
same TRX format with the same header. To distinguish currently used firmware a
33+
CFE's environment variable "bootpartition" is used.
34+
35+
maintainers:
36+
- Rafał Miłecki <rafal@milecki.pl>
37+
38+
properties:
39+
compatible:
40+
const: brcm,bcm947xx-cfe-partitions
41+
42+
additionalProperties: false
43+
44+
examples:
45+
- |
46+
partitions {
47+
compatible = "brcm,bcm947xx-cfe-partitions";
48+
};

0 commit comments

Comments
 (0)