From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDBAEC4338F for ; Fri, 13 Aug 2021 00:59:36 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F07FB61077 for ; Fri, 13 Aug 2021 00:59:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F07FB61077 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2CC1782DC8; Fri, 13 Aug 2021 02:59:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628816367; bh=bOd9qZWbGhAY8sH+64nTtyCfChZF8RKv2kweoGTn5R0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K0AaAje/NYWdcAk/tEIz4kMuv6uuR7XcvhdNlqU7xpvaBzVk1JJ8cL9L/KR9jQVcM sIMCG7CsllyNXgB2vyyIif9lu1TE1jCfhJBw3kqJ7YNE6kjD16/EOfCgcG2U1Gl3L/ rOy8kW0HH7hRjOCvuEZFHWrHq4Q+lmQ+LGa8T8n8U9jhvnYLWEjsA3XwPzsq5AVMX6 b0ihH8ZBdzpe8G3kXUNJN5TCiTA/pfIbjvppDPLb92VT6MFcPOMamSEhR/luTKcUMI 5LRxVNZvwgmFZwyemquNUm/XMK+xqB8j0OQB66TFOeH6UbEJP1x4+pAaG+ILn7n0QW XC1O4c/60pf2A== Received: from localhost.localdomain (unknown [IPv6:2804:14c:485:504a:9fa:d883:57a0:4885]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: festevam@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 833C082DC8; Fri, 13 Aug 2021 02:59:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628816363; bh=bOd9qZWbGhAY8sH+64nTtyCfChZF8RKv2kweoGTn5R0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g+eYGAcK/WWxLKSDzhJ9NeBiJsF1YL7MyeUBCJyeewGKrbjskiG0xAoFOyyxCucWB CTD96uD0lLJ/YMty5UirZqt7cKibEzhsS1V6fra1KJ84rCq0HE2B6JQav3du0OWipD h351gjL/HIzO45AQFpgHBp2NBtTlrLrymsSuT3T+9hArZL1NnAKslVRwf+nlmXM75U LTpPTCmmiWLy0avaiY1zjcNCGE8f48UgJ0AzdXyButRnGEXGxvAyeuvsefNYOefK73 fixR631G9fFZAqjmqGWQ6rc4ZcDkwURc5eWon4TznKe+leMBtOYpSowuQh7LHI6NwW RqUHR7zvJggAg== From: Fabio Estevam 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 Subject: [PATCH 2/2] imx8mm-cl-iot-gate: Add documentation Date: Thu, 12 Aug 2021 21:59:01 -0300 Message-Id: <20210813005901.16839-2-festevam@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210813005901.16839-1-festevam@denx.de> References: <20210813005901.16839-1-festevam@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Add documentation for building and flashing mainline U-Boot in the IOT-GATE-iMX8 board. Signed-off-by: Fabio Estevam --- 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