summaryrefslogtreecommitdiffstats
path: root/Documentation/boards/imx.rst
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2023-10-17 16:51:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-10-24 11:01:59 +0200
commit0aa8ed7a6272b4af7d420bd954c5a2bac4c197b7 (patch)
tree46c9753e8dd2ca59752e7e6bdde85482dfeba541 /Documentation/boards/imx.rst
parent12d72bebaf80ea33167bde21318ee4f5edaa5cfb (diff)
downloadbarebox-0aa8ed7a6272b4af7d420bd954c5a2bac4c197b7.tar.gz
barebox-0aa8ed7a6272b4af7d420bd954c5a2bac4c197b7.tar.xz
Documentation: boards: imx: add FlexSPI sub-section
Document the FlexSPI image and boot feature to make it easier for users to enable the support. Also document the image layout since it became more complex with FlexSPI and HAB, so a detailed overview is very helpful. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20231017145131.3069283-30-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/boards/imx.rst')
-rw-r--r--Documentation/boards/imx.rst80
1 files changed, 80 insertions, 0 deletions
diff --git a/Documentation/boards/imx.rst b/Documentation/boards/imx.rst
index a8f014dd1b..2a51681906 100644
--- a/Documentation/boards/imx.rst
+++ b/Documentation/boards/imx.rst
@@ -394,6 +394,86 @@ with only the image name as argument:
scripts/imx/imx-usb-loader images/barebox-freescale-imx51-babbage.img
+FlexSPI Boot
+^^^^^^^^^^^^
+
+FlexSPI boot is currently supported on: i.MX8MM, i.MX8MN and i.MX8MP.
+
+To generate FlexSPI/QSPI image(s) the board flash header file must specify:
+``flexspi_ivtofs`` and ``flexspi_fcfbofs``.
+
+It is recommended to do this via the ``include/mach/imx/flexspi-imx8m*-cfg.h``
+header files.
+
+.. code-block:: none
+
+ #include <mach/imx/flexspi-imx8mp-cfg.h>
+
+There are two different headers, one for the i.MX8MM and one for the i.MX8MP/N.
+It's important to use the correct one because the BootROM expects the IVT and
+flash configuration block (FCB) on different offsets.
+
+Barebox doesn't generate a separate FlexSPI image instead the same image used
+for SD/MMC/USB is extended to support FlexSPI boot. This is done by adding a 2nd
+IVT header and the required FCB at the required boot offsets.
+
+Barebox also support `High Assurance Boot`_ images for QSPI boot mediums. This
+feature must be enabled via the ``CONFIG_HABV4_QSPI`` option. The below figures
+show a fully featured MMC/SD/USB/FlexSPI image with enabled HAB support for the
+i.MX8M family.
+
+i.MX8MM layout::
+
+ 0x0 +------------------------------------------+
+ | Barebox Header |
+ header_gap +------------------------------------------+
+ | FlexSPI Flash Configuration Block (FCFB) |
+ header_gap + 0x400 +------------------------------------------+ ---
+ | i.MX MMC/SD/USB IVT Header | |
+ | Boot Data +--. |
+ | CSF Pointer +--|--. |
+ header_gap + 0x1000 +------------------------------------------+ | | --- |
+ | i.MX FlexSPI IVT Header | | | | | Signed Area
+ | Boot Data +--+ | | | MMC/SD/
+ | CSF Pointer +--|--|--. | Signed Area | USB
+ header_gap + 0x2000 +------------------------------------------+ | | | | FlexSPI |
+ | Barebox Prebootloader (PBL) |<-´ | | | |
+ | Piggydata Hash (SHA256) | | | | |
+ +------------------------------------------+ | | --- ---
+ | Command Sequence File (CSF) Slot-0 |<----´ |
+ +------------------------------------------+ |
+ | Command Sequence File (CSF) Slot-1 |<-------´
+ +------------------------------------------+ ---
+ | Piggydata (Main Barebox Binary) | | Hashed Area
+ +------------------------------------------+ ---
+
+i.MX8MP/N layout::
+
+ 0x0 +------------------------------------------+
+ | Barebox Header |
+ header_gap +------------------------------------------+ ---
+ | i.MX MMC/SD/USB IVT Header | |
+ | Boot Data +--. |
+ | CSF Pointer +--|--. |
+ header_gap + 0x400 +------------------------------------------+ | | |
+ | FlexSPI Flash Configuration Block (FCFB) | | | | Signed Area
+ header_gap + 0x1000 +------------------------------------------+ | | --- | MMC/SD/
+ | i.MX FlexSPI IVT Header | | | | | USB
+ | Boot Data +--+ | | |
+ | CSF Pointer +--|--|--. | Signed Area |
+ header_gap + 0x2000 +------------------------------------------+ | | | | FlexSPI |
+ | Barebox Prebootloader (PBL) |<-´ | | | |
+ | Piggydata Hash (SHA256) | | | | |
+ +------------------------------------------+ | | --- ---
+ | Command Sequence File (CSF) Slot-0 |<----´ |
+ +------------------------------------------+ |
+ | Command Sequence File (CSF) Slot-1 |<-------´
+ +------------------------------------------+ ---
+ | Piggydata (Main Barebox Binary) | | Hashed Area
+ +------------------------------------------+ ---
+
+At the moment ``header_gap`` is always 32K for all supported devices.
+
External Boot Mode
------------------