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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 7AAFBC433EF for ; Thu, 9 Sep 2021 17:07:55 +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 500B0604D2 for ; Thu, 9 Sep 2021 17:07:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 500B0604D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 76518834E3; Thu, 9 Sep 2021 19:07:51 +0200 (CEST) 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="Wy3x/18n"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 90E52834F0; Thu, 9 Sep 2021 19:07:49 +0200 (CEST) Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (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 2E3E9834EC for ; Thu, 9 Sep 2021 19:07:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aford173@gmail.com Received: by mail-il1-x133.google.com with SMTP id i13so2653825ilm.4 for ; Thu, 09 Sep 2021 10:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=Z9dWRb+Lm9cGKZGsONZKnLoTcpqSBKB8OlmP+ljjNjg=; b=Wy3x/18nFxMwiEVCRfC/mhIf/SXvpbxeRW3bXjTGN8elsg8Zl7jprg1zvV/V/CXsBX 1Nbua7NLMtrqx1kZXkNbaQQxp0toe/jyiA2sgR/mHJnbqBvWGzsqxlaghV7sSk+1jzaW ajb9wGmpEwzy3WM0v0pCi4mhZUijvM78iwEWVDNKJg4DKpLtSXle9YHzI9M5jYV788l5 0srlYoE+ZTwXsS7YXUYo4YGhrtQVVmvxaoeQHnSv6RRqyx9iR82IN19A4MMuMD0B7ByG DzeknpwRibqLD9cI4kAR+KQWC0gnMng0VOp0gNoTiNQFER0uCS7MDWZeH7QFOAD/u4mq Cg5w== 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; bh=Z9dWRb+Lm9cGKZGsONZKnLoTcpqSBKB8OlmP+ljjNjg=; b=1yQNkkqAOcxTsAEMdZ0BdkXBGZ4uw6TZTgwM/8P9pguoqCuLZxvCqNdm2dV3AwaHmS jYCOcj+XpNbv94gpMF0gW4wYFO/GWMsBLmTOOuzgxmF3LmSUDEvYZgM0W/CwnlKdqLEu CMjVSdzWw+W7BOPRlScgjkwTDApmAURuanF1vOeGkrxV9xenwPUpRnvkZwzcdD04dGw1 uWx01jr08lI725fRfQqGOxZHOZtI+BPEWR4+v1kds+rFpeKcHYhZz/xvAD95MURTgp/B uptL9X/wNuwkVzlgr0qUDlnsdqxG9ZqRqNedwVZvl5I9VHrVqPFp1dmQ5flhG9eokalc uBjQ== X-Gm-Message-State: AOAM533hyguQQTceDn+D1Fpn+x4TFnpXRzcFXFaq72tc+igZWf7CxoZu 03pbAQSd75SPcovAi/1ARbCDoG6TmnM= X-Google-Smtp-Source: ABdhPJyFKrokLZ+iOscCxcQbuP6khdNd1dAvzl+PW9KBD0gFutnbQ7kr4q+BvAm4zM8xHu7d0TD4fQ== X-Received: by 2002:a05:6e02:ee1:: with SMTP id j1mr3079568ilk.61.1631207263180; Thu, 09 Sep 2021 10:07:43 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id r13sm1232538ilh.80.2021.09.09.10.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 10:07:42 -0700 (PDT) From: Adam Ford To: u-boot@lists.denx.de Cc: uboot-imx@nxp.com, sbabic@denx.de, festevam@gmail.com, aford@beaconembedded.com, Adam Ford Subject: [PATCH] imx8mm_beacon: Switch to binman for generating image Date: Thu, 9 Sep 2021 12:07:29 -0500 Message-Id: <20210909170729.21976-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 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 To eliminate a warning when using custom imx tools for generating a binary, use binman to generate flash.bin. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi b/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi index 73ddfdade6..3c034a85e3 100644 --- a/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi @@ -6,6 +6,10 @@ #include "imx8mm-u-boot.dtsi" / { + binman: binman { + multiple-images; + }; + wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -100,3 +104,121 @@ &wdog1 { u-boot,dm-spl; }; + +&binman { + u-boot-spl-ddr { + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + align-size = <4>; + align = <4>; + + u-boot-spl { + align-end = <4>; + }; + + blob_1: blob-ext@1 { + filename = "lpddr4_pmu_train_1d_imem.bin"; + size = <0x8000>; + }; + + blob_2: blob-ext@2 { + filename = "lpddr4_pmu_train_1d_dmem.bin"; + size = <0x4000>; + }; + + blob_3: blob-ext@3 { + filename = "lpddr4_pmu_train_2d_imem.bin"; + size = <0x8000>; + }; + + blob_4: blob-ext@4 { + filename = "lpddr4_pmu_train_2d_dmem.bin"; + size = <0x4000>; + }; + }; + + spl { + filename = "spl.bin"; + + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000"; + + blob { + filename = "u-boot-spl-ddr.bin"; + }; + }; + }; + + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load ATF before U-Boot"; + #address-cells = <1>; + fit,external-offset = ; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = ; + + uboot_blob: blob-ext { + filename = "u-boot-nodtb.bin"; + }; + }; + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <0x920000>; + entry = <0x920000>; + + atf_blob: blob-ext { + filename = "bl31.bin"; + }; + }; + + fdt { + description = "NAME"; + type = "flat_dt"; + compression = "none"; + + uboot_fdt_blob: blob-ext { + filename = "u-boot.dtb"; + }; + }; + }; + + configurations { + default = "conf"; + + conf { + description = "NAME"; + firmware = "uboot"; + loadables = "atf"; + fdt = "fdt"; + }; + }; + }; + }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "spl.bin"; + }; + + uboot: blob-ext@2 { + offset = <0x57c00>; + filename = "u-boot.itb"; + }; + }; +}; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index ccaf106be5..8fedf45987 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -109,6 +109,7 @@ config TARGET_VERDIN_IMX8MM config TARGET_IMX8MM_BEACON bool "imx8mm Beacon Embedded devkit" + select BINMAN select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4 diff --git a/board/beacon/imx8mm/README b/board/beacon/imx8mm/README index dce176fa0b..03d9412f0d 100644 --- a/board/beacon/imx8mm/README +++ b/board/beacon/imx8mm/README @@ -12,8 +12,8 @@ Get and Build the ARM Trusted firmware Note: $(srctree) is U-Boot source directory $ git clone https://source.codeaurora.org/external/imx/imx-atf -$ git checkout imx_4.19.35_1.0.0 -$ make PLAT=imx8mm bl31 ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- +$ git checkout imx_5.4.70_2.3.0 +$ make PLAT=imx8mm bl31 CROSS_COMPILE=aarch64-linux-gnu- $ cp build/imx8mm/release/bl31.bin $(srctree) Get the DDR firmware @@ -26,7 +26,7 @@ $ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin $(srctree) Build U-Boot ============ $ make imx8mm_beacon_defconfig -$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000 +$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- Burn U-Boot to microSD Card =========================== diff --git a/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg b/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg new file mode 100644 index 0000000000..90573be5fd --- /dev/null +++ b/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +BOOT_FROM sd +LOADER u-boot-spl-ddr.bin 0x7E1000 diff --git a/configs/imx8mm_beacon_defconfig b/configs/imx8mm_beacon_defconfig index 78334c45e7..4f44ab7c1e 100644 --- a/configs/imx8mm_beacon_defconfig +++ b/configs/imx8mm_beacon_defconfig @@ -22,9 +22,8 @@ CONFIG_LTO=y CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y -CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" CONFIG_OF_SYSTEM_SETUP=y -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8mm_evk/imximage-8mm-lpddr4.cfg" CONFIG_DEFAULT_FDT_FILE="imx8mm-beacon-kit.dtb" CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SEPARATE_BSS=y -- 2.17.1