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 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 577CCC43334 for ; Wed, 22 Jun 2022 18:18:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 788A6840DF; Wed, 22 Jun 2022 20:18:31 +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="b1hBbEj4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8222E84265; Wed, 22 Jun 2022 20:18:30 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 5FB2C8406B for ; Wed, 22 Jun 2022 20:18:26 +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=alpernebiyasak@gmail.com Received: by mail-ej1-x62d.google.com with SMTP id pk21so12896360ejb.2 for ; Wed, 22 Jun 2022 11:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=RU36OQo7s1rASE0ihVQII4Wyi5Qar/77SKE1qvnRjUw=; b=b1hBbEj4rh6Mk2X7MmJXc2X2qdS7bN+4AjaRuFdaXkt3gKABqmpYNVI5P7aFhy/YG7 KsNKABo1lPostccnw1jmLQUIt3uWMkQ4AwuwbkKHbDL6oD8p7SiUkD1nBcJmGfItdQTM EJ6UTqlXO259Dvp8KPq/8HE1tUpbXOi9twdsgUGP9LZXMRtINXun8jkNh1FRvp5sm9qJ fGIvjGEqkr5YCU4ELVzBawc1IklwEdb6SUhhaCOWor9fKQRco9sx9CrAVfoR4iW1FZWX 6rWBYsqBNFrV0oRU+4jk6SWQbAnkPcXbVWh4nfmpgf2kmwM3vOJMe4LbIjTxZGULaSNj 0LOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=RU36OQo7s1rASE0ihVQII4Wyi5Qar/77SKE1qvnRjUw=; b=vwDrSgyRwjcYaLSrszJDoABXFJq4wMLWq0id2UQQ3bO+EStrD8JnutNXbFyA9WrwKZ zuxY0MrB5unJPLsF7k17h4c8OeYRxgstXyHsdg2/zuBrNYX0VMcE+leQOktw14itqwih t4b/MDx//sHMM9bFXiDOyq0/XUGcuFrx26EiUGFT9Of7blFfUlPhg/G95mraoN99o58I Iz3zk0Ih99ec9efSXbmcRbCbxLCsNEvUDWzvUKQXYdJLmmEms6MMTB+t/Hs8fboJAEl1 6PaoVD8WI2caS18NOVVIZar4XZwP1IeZYqC29m3fQN0hQcmFx3fao7UYJd8lzyOcmDnL IeHw== X-Gm-Message-State: AJIora9JdH2RwgAY4GP4HdkGuqqrN5dRy/PlO3tmJzzfl8WZCuVvy3SO /IcjKb1FFq0UOM2dYl7qkNs= X-Google-Smtp-Source: AGRyM1uSdOswZW3eY5T32ZvpCXlSlHs7Hy/V7f0q9ICF1sYkglxb7jZt96HNuQahMiid8NiLoRVxGg== X-Received: by 2002:a17:906:3589:b0:723:fe13:e981 with SMTP id o9-20020a170906358900b00723fe13e981mr22596ejb.446.1655921905966; Wed, 22 Jun 2022 11:18:25 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id la12-20020a170907780c00b006f3ef214dc7sm9831802ejc.45.2022.06.22.11.18.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jun 2022 11:18:25 -0700 (PDT) Message-ID: <241c0c55-cb8a-3845-e874-0413954d3dc7@gmail.com> Date: Wed, 22 Jun 2022 21:16:43 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 From: Alper Nebi Yasak Subject: Re: [PATCH v2 2/2] ARM: imx: imx8mn-evk: use one common u-boot.dtsi for the evk boards To: Heiko Thiery Cc: Ying-Chun Liu , Fabio Estevam , Marek Vasut , Marcel Ziswiler , Tim Harvey , Sean Anderson , =?UTF-8?Q?Thomas_Sch=c3=a4fer?= , Stefano Babic , u-boot@lists.denx.de, Peng Fan References: <20220609204926.26580-1-heiko.thiery@gmail.com> <20220609204926.26580-2-heiko.thiery@gmail.com> Content-Language: en-US In-Reply-To: <20220609204926.26580-2-heiko.thiery@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.6 at phobos.denx.de X-Virus-Status: Clean On 09/06/2022 23:49, Heiko Thiery wrote: > To have only one place to describe the binman images us the > imx8mn-u-boot.dtsi. To have support for different DDR firmwares this > nodes are included dependent on the used DDR config option. > > Signed-off-by: Heiko Thiery > Reviewed-by: Fabio Estevam > --- > v2: sync with current master and fix merge conflict > > arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 125 +----------------- > arch/arm/dts/imx8mn-evk-u-boot.dtsi | 120 +---------------- > arch/arm/dts/imx8mn-u-boot.dtsi | 156 +++++++++++++++++++++++ I see most of this is moving existing definitions, but I'm adding comments in a general sense, partially for future reference. > 3 files changed, 159 insertions(+), 242 deletions(-) > create mode 100644 arch/arm/dts/imx8mn-u-boot.dtsi > > diff --git a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi > index 4d0ecb07d4..3d0e817313 100644 > --- a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi > +++ b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi > @@ -3,11 +3,9 @@ > * Copyright 2019, 2021 NXP > */ > > -/ { > - binman: binman { > - multiple-images; > - }; > +#include "imx8mn-u-boot.dtsi" > > +/ { > wdt-reboot { > compatible = "wdt-reboot"; > wdt = <&wdog1>; > @@ -143,122 +141,3 @@ > [...] > diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi > index d1427941eb..339c3dd681 100644 > --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi > +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi > @@ -3,6 +3,7 @@ > * Copyright 2019 NXP > */ > > +#include "imx8mn-u-boot.dtsi" > #include "imx8mn-ddr4-evk-u-boot.dtsi" "imx8mn-ddr4-evk-u-boot.dtsi" already includes "imx8mn-u-boot.dtsi". I think it should only be included once. I don't know why these are structured this way, but I think common parts of the two boards should've been in a "imx8mn-evk-common-u-boot.dtsi" or something which the board -u-boot.dtsi files would include. > > &i2c1 { > @@ -24,122 +25,3 @@ > [...] > diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi > new file mode 100644 > index 0000000000..7b591085a0 > --- /dev/null > +++ b/arch/arm/dts/imx8mn-u-boot.dtsi > @@ -0,0 +1,156 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2019 NXP > + */ > + > +/ { > + binman: binman { > + multiple-images; > + }; > +}; > + > +&binman { > + u_boot_spl_ddr: u-boot-spl-ddr { > + filename = "u-boot-spl-ddr.bin"; > + pad-byte = <0xff>; > + align-size = <4>; > + align = <4>; > + > + u-boot-spl { > + align-end = <4>; > + }; Maybe it's better to add an empty 'ddr-fw' section here, and populate that below. > + }; > + > + spl { > + filename = "spl.bin"; > + > + 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"; > + }; > + }; These three 'blob-ext's would normally be 'u-boot-nodtb', 'atf-bl31', and 'u-boot-dtb' entries respectively. > + }; > + > + configurations { > + default = "conf"; > + > + conf { > + description = "NAME"; This 'NAME' (and the fdt one) shows up in `mkimage -l u-boot.itb` output. Perhaps they were originally copied from a @fdt-SEQ version (which replaces it with the actual dtb filename). > + 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 = <0x58000>; > + filename = "u-boot.itb"; > + }; > + }; I dislike having 'blob-ext's as names, they should be descriptive. 'imx8mm-u-boot.dtsi' has these labels as node names which is slightly better. > +}; > + > +#ifdef CONFIG_IMX8M_DDR4 > +&u_boot_spl_ddr { > + blob_1: blob-ext@1 { > + filename = "ddr4_imem_1d_201810.bin"; > + size = <0x8000>; > + }; > + > + blob_2: blob-ext@2 { > + filename = "ddr4_dmem_1d_201810.bin"; > + size = <0x4000>; > + }; > + > + blob_3: blob-ext@3 { > + filename = "ddr4_imem_2d_201810.bin"; > + size = <0x8000>; > + }; > + > + blob_4: blob-ext@4 { > + filename = "ddr4_dmem_2d_201810.bin"; > + size = <0x4000>; > + }; > +}; > +#elif CONFIG_IMX8M_LPDDR4 > +&u_boot_spl_ddr { > + 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>; > + }; > +}; These conflict a bit with one of Peng's series which changes the names and removes the size for these blobs, see [1] [2]. [1] arm: dts: imx8m: update binman ddr firmware node name https://lore.kernel.org/u-boot/20220603071715.15212-4-peng.fan@oss.nxp.com/ [2] arm: dts: imx8m: shrink ddr firmware size to actual file size https://lore.kernel.org/u-boot/20220603071715.15212-7-peng.fan@oss.nxp.com/ > +#else > + #error "no valid ddr config selected" There's also IMX8M_DDR3L, see imx8mn-bsh-smm-s2-u-boot-common.dtsi > +#endif