18c2ecf20Sopenharmony_ciBroadcom BCM47xx Partitions
28c2ecf20Sopenharmony_ci===========================
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciBroadcom is one of hardware manufacturers providing SoCs (BCM47xx) used in
58c2ecf20Sopenharmony_cihome routers. Their BCM947xx boards using CFE bootloader have several partitions
68c2ecf20Sopenharmony_ciwithout any on-flash partition table. On some devices their sizes and/or
78c2ecf20Sopenharmony_cimeanings can also vary so fixed partitioning can't be used.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciDiscovering partitions on these devices is possible thanks to having a special
108c2ecf20Sopenharmony_ciheader and/or magic signature at the beginning of each of them. They are also
118c2ecf20Sopenharmony_ciblock aligned which is important for determinig a size.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciMost of partitions use ASCII text based magic for determining a type. More
148c2ecf20Sopenharmony_cicomplex partitions (like TRX with its HDR0 magic) may include extra header
158c2ecf20Sopenharmony_cicontaining some details, including a length.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciA list of supported partitions includes:
188c2ecf20Sopenharmony_ci1) Bootloader with Broadcom's CFE (Common Firmware Environment)
198c2ecf20Sopenharmony_ci2) NVRAM with configuration/calibration data
208c2ecf20Sopenharmony_ci3) Device manufacturer's data with some default values (e.g. SSIDs)
218c2ecf20Sopenharmony_ci4) TRX firmware container which can hold up to 4 subpartitions
228c2ecf20Sopenharmony_ci5) Backup TRX firmware used after failed upgrade
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciAs mentioned earlier, role of some partitions may depend on extra configuration.
258c2ecf20Sopenharmony_ciFor example both: main firmware and backup firmware use the same TRX format with
268c2ecf20Sopenharmony_cithe same header. To distinguish currently used firmware a CFE's environment
278c2ecf20Sopenharmony_civariable "bootpartition" is used.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciDevices using Broadcom partitions described above should should have flash node
318c2ecf20Sopenharmony_ciwith a subnode named "partitions" using following properties:
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciRequired properties:
348c2ecf20Sopenharmony_ci- compatible : (required) must be "brcm,bcm947xx-cfe-partitions"
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ciExample:
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciflash@0 {
398c2ecf20Sopenharmony_ci	partitions {
408c2ecf20Sopenharmony_ci		compatible = "brcm,bcm947xx-cfe-partitions";
418c2ecf20Sopenharmony_ci	};
428c2ecf20Sopenharmony_ci};
43