Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9D963C433EF for ; Sat, 12 Mar 2022 02:43:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C421283AF9; Sat, 12 Mar 2022 03:43:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gzv4S7jQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8FF283AEF; Sat, 12 Mar 2022 03:43:32 +0100 (CET) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EDC9F83AF5 for ; Sat, 12 Mar 2022 03:43:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.bossman075@gmail.com Received: by mail-qt1-x831.google.com with SMTP id j21so2507625qta.0 for ; Fri, 11 Mar 2022 18:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UjP0/j4NkIiAA2s99i+Oi2b2bEouAeREZ1DW/x8hVFs=; b=gzv4S7jQ7nxM7CT6v/MROMOnMJdw2Jxrs1ItMT6TXZXz1E+HiMFXB2rcKZ6CQxU+fc Awf25BEjwEFS2dXsqiiBU+leAghBH0WkjMHydw8VwFna9NNrR/PT9usbFRycckICeTSk bbQZ2JgIwOIjevCGDGaBTNFOGAFpjIfpK2CFNKS1XozNfbXu+4Cki6TEtMnk7kW/nYTP 2i2qBRJ4916f0T7FSjeabd7cYr80GrLyWqr9uVIu9HvaJYHiTl1KQnAQr4+l4RmSAFrK 7fK+IB2tcScgr21ATbW/tDW96i3qjg0rdwaFIzhCxdchu6qJ1ZDUyo9yRPLTktxjbVFV r/ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UjP0/j4NkIiAA2s99i+Oi2b2bEouAeREZ1DW/x8hVFs=; b=XABnVaXZuCme/26WWCOeHESO9WGqk89e9O/qclYW+kd7yeiu+Lr88ig4rd/4Bl77tD rn44jFOmcg7TFRfENmdFe0y/li/W11NXuHffcYt1Eu97KV79jEbgarKvWIWJc/eGvyGv Ox/B/LB3oEDQWmkRiAdmcyqBUjDihJWCSElZuYfnH0Mo5hzhG8o1FBKgXNy4p7cjueJq S8IQzjyfxZhDR1ZX7MdS4O/dICq+y6wxJQVglWwIv5AoeF3pQJOUxOk+BaSiTKXtcln6 L782Ou9q4FgXhuKvfOut/m0R9yeedblm3UK7+FcTS1En+t0Xo23NewkpFqqbm+zMAUoX AXFw== X-Gm-Message-State: AOAM5300Bs2bmWi0G0XpQKYI/oTPnNuXRkUFPf2XbSjVyxXoiBpeRs1N EEzViazJMHMNx6P6vQtxqtOpVDqevwY= X-Google-Smtp-Source: ABdhPJyFkY0AdTcUEkeFjPO/cav1thwMTFxRBtlaW/J5QLEdaE+FBzpwLrfn5nkG3+zfvwgT7OXb7g== X-Received: by 2002:ac8:5b8e:0:b0:2e1:c6b2:4226 with SMTP id a14-20020ac85b8e000000b002e1c6b24226mr2240319qta.67.1647053003459; Fri, 11 Mar 2022 18:43:23 -0800 (PST) Received: from jesse-desktop.jtp-bos.lab (146-115-144-188.s4282.c3-0.nwt-cbr1.sbo-nwt.ma.cable.rcncustomer.com. [146.115.144.188]) by smtp.gmail.com with ESMTPSA id n9-20020a05622a11c900b002e1c508ba41sm1743538qtk.19.2022.03.11.18.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 18:43:22 -0800 (PST) From: Jesse Taube X-Google-Original-From: Jesse Taube To: u-boot@lists.denx.de Cc: sbabic@denx.de, festevam@gmail.com, xypron.glpk@gmx.de, uboot-imx@nxp.com, lukma@denx.de, seanga2@gmail.com, giulio.benetti@benettiengineering.com, Mr.Bossman075@gmail.com, andre.przywara@arm.com Subject: [PATCH v1 2/2] imx: imxrt1050-evk: Add documentation for SPI boot Date: Fri, 11 Mar 2022 21:43:19 -0500 Message-Id: <20220312024319.3224937-2-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220312024319.3224937-1-Mr.Bossman075@gmail.com> References: <20220312024319.3224937-1-Mr.Bossman075@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean Adds documentation for SPI boot. Signed-off-by: Jesse Taube --- doc/board/nxp/imxrt1050-evk.rst | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/board/nxp/imxrt1050-evk.rst b/doc/board/nxp/imxrt1050-evk.rst index c1fb48f0cd..0838a04871 100644 --- a/doc/board/nxp/imxrt1050-evk.rst +++ b/doc/board/nxp/imxrt1050-evk.rst @@ -39,3 +39,44 @@ switch label numbers reference). The USB console connector is the one close the ethernet connector - Insert the micro SD card in the board, power it up and U-Boot messages should come up. + + +How to use U-Boot with SPI flash on NXP i.MXRT1050 EVK +------------------------------------------------------ + +- Build U-Boot for i.MXRT1050 EVK: + +First you will need to enable the following option: +CONFIG_IMX_CONFIG="board/freescale/imxrt1050-evk/imximage-nor.cfg" + +.. code-block:: bash + + $ make mrproper + $ make imxrt1050-evk_defconfig + $ make + +This will generate the SPL image called SPL and the u-boot.img. + +To boot from SPI flash you will need to provide a flash configuration block that is specific to your flash chip. +The flash config is 4K in size and is documented on page 217 of the imxrt1050RM. + +I took my FLASH config from a binary made from MCUexpresso IDE. +The truncate command should pad the spl with zeros till the value from CONFIG_SYS_UBOOT_BASE. + +.. code-block:: bash + + $ cp FLASH nor.bin + $ cat SPL >> nor.bin + $ truncate -s $((0x10000)) nor.bin + $ cat u-boot.img >> nor.bin + +- Jumper settings:: + + SW7: 0 1 1 0 + +where 0 means bottom position and 1 means top position (from the +switch label numbers reference). + +- Connect the USB cable between the EVK and the PC for the console. + +- Use either JTAG or SWD to flash the flash I used Mcuexpresso IDEs GUI flash tool -- 2.34.1