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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 0EDF0C432BE for ; Thu, 26 Aug 2021 14:57:49 +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 4D29660F11 for ; Thu, 26 Aug 2021 14:57:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D29660F11 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gateworks.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 22AC283146; Thu, 26 Aug 2021 16:57:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.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=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b="JFHwP+MC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B94D083163; Thu, 26 Aug 2021 16:57:43 +0200 (CEST) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 B066183146 for ; Thu, 26 Aug 2021 16:57:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: by mail-pj1-x102b.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so6759915pjr.1 for ; Thu, 26 Aug 2021 07:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DFSNDn2MHG/BwCVyYvFKXRefDtGqhVaZqI6JNk7w2Hg=; b=JFHwP+MC1lsIDu1IfWSKdFRKTetPuuahKKiPHmJ8jcZrAeA0fn3T1pYhTubmHxBAeK /DrF97O2Zsof0KpigsTDZqnOB0nSxcSUSFG3UX6ygSYmMleMdFVoPkgb4XGDjK8cGsM4 zH4pp6ZmJ1A67Q3Yqn9iSbdfMlgYwxQx9bRM/pkoFUhNw4gN4VRLO4MBYjpVln6vx/zR G1LX/RLr2qyZwMakJ7AUHWiEL6ydojDnayT59VC1zjdTwHz9O3YNnCIFUbyjW5Heein/ hLGb147BeTLJqLZ8wvGt8YX4wmfD8CMs3NBMLna185COkDAy5lbY+oIfmD0MZhUKFBfF GDIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DFSNDn2MHG/BwCVyYvFKXRefDtGqhVaZqI6JNk7w2Hg=; b=aTwwU0l9wbzLTmkmMFqjzHNPTCU97Nvj3XeBjP6wZMqzJSyIJd5mWxYWf4HKhRIfMT igxqu4ffCYpsnVbQg+4N3sgzmMaxmX6+LHfwIYMo+hFoMKvwLZVHR4u1Ag+SrLGV6MKE F8JAiWsechLmpG6eUX2UOuYf/EHTVVXi8+7qyHkIF4XVC9HLLgHwYbtq6JJf0Ac/6wxX y7b/MHriJFnbmdgJR06d6cmZpRFN7x6e3SdKaomYiP7kY278I/8wyj+stineb6WCHohf pJybMc7R6ZfLnLrtMuEX2ptQ/Uqz/Av9qj8UkxvM55tMfk7I0TMfIlRuNvvax0skuJ0R YFOA== X-Gm-Message-State: AOAM533ZeRkkjs3326tn9VHByBfQSldUus8FrMn3B4y3WunzHOrSuEFc LYrzd0VeJwU1G6zBPbgBhYjxN/iw0F5epAUBRlz1aQ== X-Google-Smtp-Source: ABdhPJxldTJ/GBlhrWb5pYci5anCW9YAqcEqDX+BJt+6sAdNCI7sax+e3ZRWc9YMdEwId8wouYo0XlaO7afDXWOS1oU= X-Received: by 2002:a17:90a:4409:: with SMTP id s9mr4859539pjg.125.1629989856711; Thu, 26 Aug 2021 07:57:36 -0700 (PDT) MIME-Version: 1.0 References: <20210826121409.220124-1-marcel@ziswiler.com> <20210826121409.220124-3-marcel@ziswiler.com> In-Reply-To: <20210826121409.220124-3-marcel@ziswiler.com> From: Tim Harvey Date: Thu, 26 Aug 2021 07:57:25 -0700 Message-ID: Subject: Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi To: Marcel Ziswiler Cc: u-boot , Fabio Estevam , Simon Glass , Frieder Schrempf , Stefano Babic , Marcel Ziswiler , "NXP i.MX U-Boot Team" , Tom Rini Content-Type: text/plain; charset="UTF-8" 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 On Thu, Aug 26, 2021 at 5:14 AM Marcel Ziswiler wrote: > > From: Marcel Ziswiler > > With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and > U-Boot proper aka u-boot.itb every board now covers such configuration > in its own U-Boot specific device tree include. Introduce a new common > imx8mm-binman.dtsi which covers the common part of that configuration. > > Signed-off-by: Marcel Ziswiler > > --- > > arch/arm/dts/imx8mm-binman.dtsi | 136 ++++++++++++++++++ > arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 126 ++-------------- > arch/arm/dts/imx8mm-evk-u-boot.dtsi | 124 +--------------- > .../dts/imx8mm-kontron-n801x-s-u-boot.dtsi | 123 +--------------- > arch/arm/dts/imx8mm-venice-u-boot.dtsi | 120 +--------------- > arch/arm/dts/imx8mm-verdin-u-boot.dtsi | 123 +--------------- > 6 files changed, 156 insertions(+), 596 deletions(-) > create mode 100644 arch/arm/dts/imx8mm-binman.dtsi > > diff --git a/arch/arm/dts/imx8mm-binman.dtsi b/arch/arm/dts/imx8mm-binman.dtsi > new file mode 100644 > index 00000000000..2d98c1ef577 > --- /dev/null > +++ b/arch/arm/dts/imx8mm-binman.dtsi > @@ -0,0 +1,136 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2021 Toradex > + */ > + > +/ { > + binman: binman { > + multiple-images; > + }; > +}; > + > +&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"; > + }; > + }; > + > + binman_fip: fip { > + description = "Trusted Firmware FIP"; > + type = "firmware"; > + arch = "arm64"; > + compression = "none"; > + load = <0x40310000>; > + }; > + > + fdt { > + description = "NAME"; > + type = "flat_dt"; > + compression = "none"; > + > + uboot_fdt_blob: blob-ext { > + filename = "u-boot.dtb"; > + }; > + }; > + }; > + > + configurations { > + default = "conf"; > + > + binman_configuration: 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"; > + }; > + > + binman_uboot: blob-ext@2 { > + offset = <0x57c00>; > + filename = "u-boot.itb"; > + }; > + }; > +}; > diff --git a/arch/arm/dts/imx8mm-venice-u-boot.dtsi b/arch/arm/dts/imx8mm-venice-u-boot.dtsi > index e0fa9ff4bfc..1bef06da562 100644 > --- a/arch/arm/dts/imx8mm-venice-u-boot.dtsi > +++ b/arch/arm/dts/imx8mm-venice-u-boot.dtsi > @@ -3,13 +3,10 @@ > * Copyright 2021 Gateworks Corporation > */ > > +#include "imx8mm-binman.dtsi" > #include "imx8mm-u-boot.dtsi" > > / { > - binman: binman { > - multiple-images; > - }; > - > wdt-reboot { > compatible = "wdt-reboot"; > wdt = <&wdog1>; > @@ -72,118 +69,3 @@ > &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 = ; > - fit,fdt-list = "of-list"; > - > - 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-SEQ { > - description = "NAME"; > - type = "flat_dt"; > - compression = "none"; > - }; > - }; > - > - configurations { > - default = "@config-DEFAULT-SEQ"; > - > - @config-SEQ { > - description = "NAME"; > - firmware = "uboot"; > - loadables = "atf"; > - fdt = "fdt-SEQ"; > - }; > - }; > - }; > - }; > - Marcel, This would break imx8mm-venice. The of-list, @fdt-SEQ and @config-SEQ are required to support automatic generation of fdt and config nodes when you have multiple device-trees. See tools/binman/entries.rst for details. Currently, imx8mm-venice is the only board that uses multiple dtbs in CONFIG_OF_LIST so this would be the only board broken by your patch. I'm curious if just using the of-list, @fdt-SEQ and @config-SEQ as above works fine for boards with a single dtb? Otherwise I suppose boards like mine can include your common "imx8mm-binman.dtsi" but will have to leave the &binman node override. Best regards, Tim