All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@denx.de>
To: sbabic@denx.de
Cc: paul.liu@linaro.org, kirill.kapranov@compulab.co.il,
	uri.mashiach@compulab.co.il, valentin@compulab.co.il,
	u-boot@lists.denx.de, Fabio Estevam <festevam@denx.de>
Subject: [PATCH 2/2] imx8mm-cl-iot-gate: Add documentation
Date: Thu, 12 Aug 2021 21:59:01 -0300	[thread overview]
Message-ID: <20210813005901.16839-2-festevam@denx.de> (raw)
In-Reply-To: <20210813005901.16839-1-festevam@denx.de>

Add documentation for building and flashing mainline U-Boot
in the IOT-GATE-iMX8 board.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 doc/board/compulab/imx8mm-cl-iot-gate.rst | 84 +++++++++++++++++++++++
 doc/board/index.rst                       |  1 +
 2 files changed, 85 insertions(+)
 create mode 100644 doc/board/compulab/imx8mm-cl-iot-gate.rst

diff --git a/doc/board/compulab/imx8mm-cl-iot-gate.rst b/doc/board/compulab/imx8mm-cl-iot-gate.rst
new file mode 100644
index 000000000000..b63b8d61f13f
--- /dev/null
+++ b/doc/board/compulab/imx8mm-cl-iot-gate.rst
@@ -0,0 +1,83 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+IOT-GATE-iMX8
+=============
+
+U-Boot for Compulab i.MX8MM IoT Gateway board.
+
+Quick Start
+-----------
+
+- Build the ARM Trusted firmware binary
+- Get the DDR firmwares
+- Build U-Boot
+- Flash U-Boot into the eMMC
+
+Get and build the ARM Trusted firmware
+--------------------------------------
+
+Note: builddir is U-Boot build directory (source directory for in-tree builds).
+
+Get mainline ATF:
+
+.. code-block:: bash
+
+   $ git clone https://github.com/ARM-software/arm-trusted-firmware.git
+   $ cd arm-trusted-firmware
+   $ git checkout v2.5
+
+Generate the bl31.bin ATF binary:
+
+.. code-block:: bash
+
+   $ export CROSS_COMPILE=aarch64-poky-linux-
+   $ make PLAT=imx8mm IMX_BOOT_UART_BASE=0x30880000 bl31
+   $ cp build/imx8mm/release/bl31.bin $(builddir)
+
+Get the DDR firmwares
+---------------------
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin
+   $ chmod +x firmware-imx-8.9.bin
+   $ ./firmware-imx-8.9
+   $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin $(builddir)
+
+Build U-Boot
+------------
+
+.. code-block:: bash
+
+   $ export CROSS_COMPILE=aarch64-poky-linux-
+   $ make imx8mm-cl-iot-gate_defconfig
+   $ export ATF_LOAD_ADDR=0x920000
+   $ make
+
+This will result in two binaries: flash.bin and u-boot.itb.
+
+Flash U-Boot into the eMMC
+--------------------------
+
+Make sure to have access to the IOTG-ACC-M2SD adapter to recover
+the board in case something goes wrong. More details at:
+https://mediawiki.compulab.com/w/index.php?title=IOT-GATE-iMX8_and_SBC-IOT-iMX8:_U-Boot:_Recovery
+
+The flash.bin and u-boot.itb binaries need to be flashed into the eMMC at
+offset 33K and 384K, respectively.
+
+These binaries can be transferred from the host PC to the board running
+U-Boot via TFTP:
+
+.. code-block:: bash
+
+   => mmc dev 2
+   => mmc partconf 2 1 7 0 (This is only needed to be done for the first time)
+
+   => tftp $loadaddr flash.bin
+   => setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt $blkcnt / 0x200
+   => mmc write $loadaddr 0x42 $blkcnt
+
+   => tftp $loadaddr u-boot.itb
+   => setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt $blkcnt / 0x200
+   => mmc write $loadaddr 0x300 $blkcnt
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 9e9097889161..5c5420f3d75a 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -11,6 +11,7 @@ Board-specific doc
    AndesTech/index
    amlogic/index
    atmel/index
+   compulab/index
    congatec/index
    coreboot/index
    emulation/index
-- 
2.25.1


  reply	other threads:[~2021-08-13  0:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13  0:59 [PATCH 1/2] imx8mm-cl-iot-gate: Do not build fip.bin by default Fabio Estevam
2021-08-13  0:59 ` Fabio Estevam [this message]
2021-08-13 10:07   ` [PATCH 2/2] imx8mm-cl-iot-gate: Add documentation Paul Liu
2021-08-13  9:59 ` [PATCH 1/2] imx8mm-cl-iot-gate: Do not build fip.bin by default Paul Liu
2021-08-13 12:15   ` Fabio Estevam
2021-08-15 19:26     ` Paul Liu
2021-08-16 21:09       ` Fabio Estevam
2021-08-16 21:29         ` Tom Rini
2021-08-16 22:41         ` Fabio Estevam
2021-08-17  0:50           ` Paul Liu
2021-08-17 18:32             ` Fabio Estevam
2021-08-18  0:08               ` Paul Liu
2021-08-18 12:24                 ` Fabio Estevam
2021-08-18 21:32                   ` Paul Liu
2021-08-18 21:39                     ` Fabio Estevam
2021-08-19  0:27                       ` Fabio Estevam
2021-08-19  7:14                         ` Frieder Schrempf
2021-08-19 20:51                           ` Paul Liu
2021-08-20  2:06                             ` Paul Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210813005901.16839-2-festevam@denx.de \
    --to=festevam@denx.de \
    --cc=kirill.kapranov@compulab.co.il \
    --cc=paul.liu@linaro.org \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uri.mashiach@compulab.co.il \
    --cc=valentin@compulab.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.