162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/mtd/partitions/brcm,bcm947xx-cfe-partitions.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Broadcom BCM47xx Partitions
862306a36Sopenharmony_ci
962306a36Sopenharmony_cidescription: |
1062306a36Sopenharmony_ci  Broadcom is one of hardware manufacturers providing SoCs (BCM47xx) used in
1162306a36Sopenharmony_ci  home routers. Their BCM947xx boards using CFE bootloader have several
1262306a36Sopenharmony_ci  partitions without any on-flash partition table. On some devices their sizes
1362306a36Sopenharmony_ci  and/or meanings can also vary so fixed partitioning can't be used.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci  Discovering partitions on these devices is possible thanks to having a special
1662306a36Sopenharmony_ci  header and/or magic signature at the beginning of each of them. They are also
1762306a36Sopenharmony_ci  block aligned which is important for determinig a size.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci  Most of partitions use ASCII text based magic for determining a type. More
2062306a36Sopenharmony_ci  complex partitions (like TRX with its HDR0 magic) may include extra header
2162306a36Sopenharmony_ci  containing some details, including a length.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci  A list of supported partitions includes:
2462306a36Sopenharmony_ci  1) Bootloader with Broadcom's CFE (Common Firmware Environment)
2562306a36Sopenharmony_ci  2) NVRAM with configuration/calibration data
2662306a36Sopenharmony_ci  3) Device manufacturer's data with some default values (e.g. SSIDs)
2762306a36Sopenharmony_ci  4) TRX firmware container which can hold up to 4 subpartitions
2862306a36Sopenharmony_ci  5) Backup TRX firmware used after failed upgrade
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci  As mentioned earlier, role of some partitions may depend on extra
3162306a36Sopenharmony_ci  configuration. For example both: main firmware and backup firmware use the
3262306a36Sopenharmony_ci  same TRX format with the same header. To distinguish currently used firmware a
3362306a36Sopenharmony_ci  CFE's environment variable "bootpartition" is used.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_cimaintainers:
3662306a36Sopenharmony_ci  - Rafał Miłecki <rafal@milecki.pl>
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciselect: false
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciproperties:
4162306a36Sopenharmony_ci  compatible:
4262306a36Sopenharmony_ci    const: brcm,bcm947xx-cfe-partitions
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ciadditionalProperties: false
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciexamples:
4762306a36Sopenharmony_ci  - |
4862306a36Sopenharmony_ci    partitions {
4962306a36Sopenharmony_ci        compatible = "brcm,bcm947xx-cfe-partitions";
5062306a36Sopenharmony_ci    };
51