From patchwork Tue Apr 6 03:59:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 415863 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp4195875jai; Mon, 5 Apr 2021 20:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzlOb1dkoXMVOQW3H9P//PjBwB5oP3SXLCO67OdqH2cfcTXIhFFCMZKZuBsN3di+q6c5RP X-Received: by 2002:a17:906:aad9:: with SMTP id kt25mr4884284ejb.364.1617679696260; Mon, 05 Apr 2021 20:28:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1617679696; cv=pass; d=google.com; s=arc-20160816; b=FVMU+sghI3Rv/JQqrRgrP/Y0H+0lJM8q7F7jhaqKah7HD7vEsd4BwS1J+eOlMMe4Sh fSLLM0atSxFIcNocQkAyLDJA3QjijBtiD0a3JeNbndJgOSHQjdirbmrLu8atmKIxo1ss tY8CTpDM2yLJZPtl2VZSXQlpfxJ/p96uMjCh/yHp6wGouJdsduAW8H2+xkv0ALJlrhmM a2N1fbsBvaIVn8gCDgSMBq9q9Wkyrmaf3vzaptDZa8xDTC8qFZ0PJtisRtpUnFeOe5Ze UL5xDTnQfGa9ZYRLNfPT70WQLcVICO0AiUeoOyYjKGPSojLqvNoLDvp5sv/MTGlZy5ts kP5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Glr22sT1UG1QzUNeR8KxXVq1w121zm+jsZZOzQ7q63M=; b=QjWz7BKIGIw7iKgC+FIJ2Rwar3d+vSyS3o+1Bv3ZKiMKL5PocZNqFnNGPm7N7ekT5V y8bxiThPIk+XVs0Ap9q4Vd2e9STxYswVUzE1Cj8tjkrhL6oYaHdB81VWrAfPuFVHG2wi 9DQsqV2S85R08D4aaDWA4reJNnhAHTBJWeOohpSQmuzgFXfOTXnxs1zQ7JDo1d90OuSR OKlcTQ0hwgPcQXpfotC6WF/Z2jzMdpIDKD9/aqcL9buf3FhyyDAzvl0qthLkA7T1qA2F HNXEnziLIX6uPTH1pNUbNteVrr2grrOmhgHtvGrX3E7H22OU6sFEpc0jXluBy9nWM1rj 6L7A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=cZdmlc+Q; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id za11si15072312ejb.190.2021.04.05.20.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 20:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=cZdmlc+Q; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35BBB81CC9; Tue, 6 Apr 2021 05:27:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="cZdmlc+Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 34E5D81C84; Tue, 6 Apr 2021 05:27:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0629.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::629]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0616C81693 for ; Tue, 6 Apr 2021 05:27:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GNWYLoO4DenoJ6GQR6ePkNFI+ibjIQHIwQ/AnpaXYivVgyHM9K9crTou+yc6VLPZC6l2/yGbEkUK5kTCGvhbs3/RkWm9/GNCxxyxJe/6QY12Xjrg6ZhLDO/UhDYlV7AiHrw/C/zWPshKj4m877xBJd5fjUSttOjW5bkGf0R6C1Bn2uZqPp50pZ46KsjZe35Amg2k3AyM6hTfO///q6QcQfwoI0IM0efrxrwt3VRN0gLmAr684TW+rDfBVxegf/ODtgkX7hCgzdTeOfkeJds8B4eL3wBMJizFQjmA/ds4asEjxPYu34gRmFjYKZY+jy/Y4yXlrqozUhvTcWn8s3RIKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Glr22sT1UG1QzUNeR8KxXVq1w121zm+jsZZOzQ7q63M=; b=Ass3rPyDkX3/b4T/zi31TYxXnTTQWD10hSe8jMRd14EoJ4Qh+Ufvn2+JpjylbSgW8dS15f2Q4Qis6CLi9QAbEwLql9mzEXO1QtqTXu2t2oRd07lXzLKxz8K2TPVEdrp+Zx+IhR1o5gsuAam2UcjGqu69HOLl3feDsEzmEOSMT0I2gYPLcELuox4JpdH3lPEj5AYTeRu1KDaayPcRtMiRiqAnIzGXjbxeHAaYzN8gjXJDUjK93MxkK1KbYIrK7BIY7f1Kg69sc1GW9Pz/st/6zC1R9M0e546Gp2DJj5Ooay8OTJX8mktDNG1tqEslXaFXVrtMFYPN7BAa1XPXjDIdEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Glr22sT1UG1QzUNeR8KxXVq1w121zm+jsZZOzQ7q63M=; b=cZdmlc+QXli5XlG1rToL++g2BnN3J76pqdpVc70hDqDEM2a50kidFW6Uo1D57tfJq1vfiviN6wmeRwbCiw91rnIfewywkLCLyBWEio62MCyccaQxFawRVxvMgKlNL9FqCw3/9cbBrxu4H6m8Z2s90l+46IPXqJFPgA+X/L9bzWM= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6715.eurprd04.prod.outlook.com (2603:10a6:10:10d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.32; Tue, 6 Apr 2021 03:27:40 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf%11]) with mapi id 15.20.3999.032; Tue, 6 Apr 2021 03:27:40 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH 4/7] imx8mn-evk: switch to use binman Date: Tue, 6 Apr 2021 11:59:00 +0800 Message-Id: <20210406035904.26598-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210406035904.26598-1-peng.fan@oss.nxp.com> References: <20210406035904.26598-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR02CA0176.apcprd02.prod.outlook.com (2603:1096:201:21::12) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by HK2PR02CA0176.apcprd02.prod.outlook.com (2603:1096:201:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.26 via Frontend Transport; Tue, 6 Apr 2021 03:27:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2eb214a8-d7be-4997-1f17-08d8f8abeed1 X-MS-TrafficTypeDiagnostic: DB8PR04MB6715: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:57; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DhAs1fAvqQnhjGmGBJYwDNGXSZOKTADLnW2gO0h/lUGdgLjD/AQoeh0FIEss6ieYFwvq7vl8PsRJ+muoU/xmgUd7WpT4+Tvw5YgkiZklL3XMYTp2FthPblV0yvmsrZlJJLy5s92doSzbZZ1Cofsruks3glXt0wqRivXzCUHwLjparakrnlrAIbfaz+0iPTvYAbW1yZ72UMP6RHZ+C8TnHriWXHzN76ylQOFGnS/EiYQRJccTyqIYlswlc4hCVWp0IGhDYqtDRWfgPrZL9tZdndAbJS4R8B+zjFTRtpTUENuefnKN0bORKZncgZahtJopQDz9R+X5rJD617+4JW65Czcbkc4J9QPZ7zXFiND28OmtXbaTE9ZFUkuuqbcsyH0SWzsqWYBVsLmLg9ELSl2uxO4duk1MBxSbpiN2v/EmtQ8fCNZir2COOs+wN47yMETbiOi4ywwqc/AE5l0opwR3EVfRi0otPQ8cNvEld6I6tnKMHunObnLy+stKH4ciEXX0yOm0IsmnAbGOhGo5fYvfYEtpumG1p8ma4yQ0G2rBd/zJFi+ITqfN2y12tCI/7fP+ox2LPiW1z1DaNFeIBqZLO5Md9DdhpVbRfh2SujTSarRAUEANP96MqJ5DT6Zdd8WynBObwlq7Bud6ddKKzKdNJpUGAEP8mDy/jGzmhFgNOMVTTOO+8GRjXIapOYN8iiIVj9ZT5fzJbKjR2ReHEMse4g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(366004)(376002)(39860400002)(136003)(26005)(38100700001)(6666004)(6506007)(2906002)(66946007)(66556008)(66476007)(1076003)(38350700001)(83380400001)(6512007)(16526019)(478600001)(956004)(8676002)(2616005)(6486002)(4326008)(86362001)(5660300002)(52116002)(186003)(8936002)(316002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: fY9szE6lcxNs3Ilcvd8zClhQILfSaBdCzJCS68KfCaAsmlUZTfJDTZTyPMwqbJ3FDmY+hsYfCdHohIrE66bJyCVans9q7JHrrTqYZAqhtxvCoCjqn/2sWoRTuksFYDyB12mWPXeH20EALVyhD0Aor9ncVqB4S2zDzZhsJoCsYHnUdqVwK7awGtxd+qTDwk8rzVTQ9kzQ1kHUtRYN0mptqzmWCGV/oWyJqhvmA66ixb6zLrRjFYEIuwHavPkdawOtZU+dFoJ8slKEiT31CYWobXRxShZE8hg+BbdAaBw789VYmarZUDUnfZAAUxAGjKVIf1ksuSbYPQ81Yf0uGf4X71vlE/7HGzF7cvMsXzKTrIc22P2cYBgDP/NMZaRE/0qZpUbvhMatEhTU9U91eDRfsJs8hiOJvpbm3DQVf+WQ8OQqe4h+LMjbgRXngOSU2eN4lplcbHtPiBiX9sOPbYDiUBqh1ARTCzB+IS61JqVGO0DkaKPPa8vP0i1KCpHZOA7Vqwu+XSjQgXkRgsj+/R/u2n+YXjkWZPxrI7+rpfG+ybaqCQNr0Gmb5ruZk0JngN9ZB1dZPRWLUzOyb0jK5YE7Nqm6m56YHETuq214peOV+bCucfi/5DhITVokEVomyLtW1BnhnOp7vkdCKGz6cFFofpgQBgNk8lOuqWvulJiw9dsSIjOhAwP59bHy3v7imgrxnwGSTbcylI3shnWGarej+X4wR83sfflFH7vQsBTeVJmoCWdoZHXMGoRZBjU5fXx6NFjSNosTczyqxTN17tA2skvR69Lo2lbyg3ZTNp/DfMAf/9H/63C2Oi6lfrhn2XrCb1a4/yyXftMCXr63pfl/b6wbL9DeEO/Y7IwKX6XEqtuu1+def/XfTHr8Xnff0kCZB+SysVqT68K9Z9I8EISGuTLre/XxzRkyauxU8ATM2KVIAO4QKxkq3TwdjcGT3wNGwwc4gh1iqI0+oVzi4X10jTgDnr7skThTOSFyVqkv4sFBm2ITNb9slGinbiDikxgTyo4vZVlNX1dljfP7ifVcP5w/njwu85BemWZIiTQOxBrSUS6jiESDpv4v9LpDl3L2xGKKEwZMKGeZicAWskpODKat6Us/Uhsuy4Mz7JLVVoFuEyv/F9zgWUvKTpHdJR0Iwuq//PcbPzsXAoXsGnJW0er8hKz6HktIqts4g0ArQOtdUhD3LhyHFdLd5fVTZRgFMStu1Zen7wILn2l3Il0eY+fP5s+PK7iU/Sg58zBJuk28djtOfT6mulHdrYrhcEb9+w/EdyhFsV0ycCGvrDP03rcvyGAE3LHI+4UO/rtzyhA8M3XSTGEYVXX+Ipj2HEln X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2eb214a8-d7be-4997-1f17-08d8f8abeed1 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2021 03:27:40.4292 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KA9sxSuisUYsK02NA6oEnk3PBOheBSggQydyDZbyq77lKrVszXX2842M+2u6r95TECfMiQF3cfE8YQHW3ysW2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6715 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.102.4 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan Use binman to pack images. Signed-off-by: Peng Fan --- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 102 ++++++++++++++++++++++++++++ arch/arm/mach-imx/imx8m/Kconfig | 1 + configs/imx8mn_evk_defconfig | 4 +- 3 files changed, 105 insertions(+), 2 deletions(-) -- 2.30.0 diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index 2730ff6a81..3db46d4cbc 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -24,3 +24,105 @@ &pinctrl_pmic { 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>; + }; + }; + + + flash { + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000"; + + 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 = <0x960000>; + entry = <0x960000>; + + 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"; + }; + }; + }; + }; +}; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index be697bddfa..390ead9444 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -53,6 +53,7 @@ config TARGET_IMX8MM_VENICE config TARGET_IMX8MN_EVK bool "imx8mn LPDDR4 EVK board" + select BINMAN select IMX8MN select SUPPORT_SPL select IMX8M_LPDDR4 diff --git a/configs/imx8mn_evk_defconfig b/configs/imx8mn_evk_defconfig index c53dc968c8..d0e5b58902 100644 --- a/configs/imx8mn_evk_defconfig +++ b/configs/imx8mn_evk_defconfig @@ -25,9 +25,9 @@ CONFIG_DEFAULT_DEVICE_TREE="imx8mn-evk" 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_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mn-lpddr4.cfg" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8mn_evk/imximage-8mn-ddr4.cfg" CONFIG_DEFAULT_FDT_FILE="imx8mn-evk.dtb" CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y