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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD998C433F5 for ; Wed, 13 Oct 2021 13:06:40 +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 24211610CB for ; Wed, 13 Oct 2021 13:06:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 24211610CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 00D0E8356F; Wed, 13 Oct 2021 15:06:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="lgkmT9Jh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 331BE827C5; Wed, 13 Oct 2021 15:06:03 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 7CAD683576 for ; Wed, 13 Oct 2021 15:05:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=francois.ozog@linaro.org Received: by mail-ed1-x52d.google.com with SMTP id r18so9861222edv.12 for ; Wed, 13 Oct 2021 06:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fg9YN1hjKENr5ESe51qpIaroWFowdP9uPzMLMJz29Lc=; b=lgkmT9JhnDVz8/PlaSNaN0U+Ox3ZTy/xxRTYe9WdthJmisLKmiNqdpi5FxiJOjmwUT zIE8xNUFNnaPJgtX6tjnTpYFNbgPNyokKVQnnkpem08myAJZ63YW/XPMhK7PfQR3zDEh HzdVvzbWsSKC3Mpq9OkHvrttgUON3g773xyfmLpVEihqFihnBgQG0t3E/CwK9gx3JL1b L+SesSomHvF821S4jHse06nf07BRat3GSZe49znhVufK4IolRGbh8ScInQsn3VhhPWqN DVzicksQHJaAcIPkqxnrqvDtWUyJCxzOOsawZADjvipLg4mfFzdGbZefwX9Jo5dp30AY +3cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fg9YN1hjKENr5ESe51qpIaroWFowdP9uPzMLMJz29Lc=; b=NAs8hC3b+lS8sWQo8evPfQFRQwRPnx7csf/eoTEsLIA/RETm5bBAVRsW61bfZ3Cmcw cdvOEcIdC7cI7S3R6e7aW8KWaZBZuGDQeLsGBoHE0MP1svSoEhlPCcPf0+3pp/rHA16j Gg3HN2it1euoaWii3jzrzLvUbmNo8Y0QkYgEg/jQRCiqUne0Fv2H5M/uRt9bDfd/4aKm YjGQXUoIlj6IZaOVJumaearIL8SYKNEzCs6u07Mm1B4xXU1xFYYNhx83RIUh/dmH8vUN +KRR/MgWoe0Mxi8iB56OmFUEd6r8M+hDVsGfB/q7XqstsUvNeAarlo4K3aolZjDsiQc5 RkGQ== X-Gm-Message-State: AOAM532kFZv+iMBvnvrD4EP/NiK9jewg0UNOYk6NV97bys607KdA02CN YAl/EiftyacoSLJPMuh21bIIwFua4htY7noMrwRchQ== X-Google-Smtp-Source: ABdhPJyCdGsJZAqJQKTIioBZANDXyhMeDxY+YaOyVp0YAIjcIhIog8FevpE1T83xQJqA1YqajsNGNTc2jO98FgLRDyQ= X-Received: by 2002:a05:6402:34f:: with SMTP id r15mr8214299edw.111.1634130355513; Wed, 13 Oct 2021 06:05:55 -0700 (PDT) MIME-Version: 1.0 References: <20211013010120.96851-1-sjg@chromium.org> <20211013105005.4cf27c8b@donnerap.cambridge.arm.com> In-Reply-To: <20211013105005.4cf27c8b@donnerap.cambridge.arm.com> From: =?UTF-8?Q?Fran=C3=A7ois_Ozog?= Date: Wed, 13 Oct 2021 15:05:44 +0200 Message-ID: Subject: Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option To: Andre Przywara Cc: Aaron Williams , Albert Aribaud , Alexander Graf , Anastasiia Lukianenko , Ashok Reddy Soma , Atish Patra , Bin Meng , Bin Meng , Christian Hewitt , David Abdurachmanov , Dimitri John Ledkov , Fabio Estevam , Green Wan , Heiko Schocher , Heinrich Schuchardt , Heinrich Schuchardt , Ilias Apalodimas , Jagan Teki , Jerry Van Baren , Kever Yang , Leo , Linus Walleij , Liviu Dudau , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Matthias Brugger , Michal Simek , Michal Simek , Neil Armstrong , Niel Fourie , Oleksandr Andrushchenko , Padmarao Begari , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Peter Robinson , Priyanka Jain , Rainer Boschung , Ramon Fried , Rick Chen , Rob Herring , Sean Anderson , Simon Glass , Sinan Akman , Stefan Roese , Stephen Warren , Stephen Warren , T Karthik Reddy , Tero Kristo , Thomas Fitzsimmons , Tianrui Wei , Tim Harvey , Tom Rini , Tuomas Tynkkynen , U-Boot Mailing List , Valentin Longchamp , Vladimir Oltean , Wolfgang Denk , Zong Li , qemu-devel@nongnu.org X-Mailman-Approved-At: Wed, 13 Oct 2021 15:06:36 +0200 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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 Le mer. 13 oct. 2021 =C3=A0 14:41, Andre Przywara = a =C3=A9crit : > On Tue, 12 Oct 2021 19:01:04 -0600 > Simon Glass wrote: > > Hi, > > > With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so > > there are only three ways to obtain a devicetree: > > > > - OF_SEPARATE - the normal way, where the devicetree is built and > > appended to U-Boot > > - OF_EMBED - for development purposes, the devicetree is embedded in > > the ELF file (also used for EFI) > > - OF_BOARD - the board figures it out on its own > > > > The last one is currently set up so that no devicetree is needed at all > > in the U-Boot tree. Most boards do provide one, but some don't. Some > > don't even provide instructions on how to boot on the board. > > > > The problems with this approach are documented at [1]. > > > > In practice, OF_BOARD is not really distinct from OF_SEPARATE. Any boar= d > > can obtain its devicetree at runtime, even it is has a devicetree built > > in U-Boot. This is because U-Boot may be a second-stage bootloader and > its > > caller may have a better idea about the hardware available in the > machine. > > This is the case with a few QEMU boards, for example. > > > > So it makes no sense to have OF_BOARD as a 'choice'. It should be an > > option, available with either OF_SEPARATE or OF_EMBED. > > So I am possibly fine with that, but: > > > This series makes this change, adding various missing devicetree files > > (and placeholders) to make the build work. > > If we just need it to make the build work, we not just have pure stub DTs= , > as you do for highbank, everywhere? > Adding *some* DT files for those platforms that actually do the right > thing seems like the wrong direction to me. > Providing DTs in the source repositories of the actual consumers is more > of a bad habit that dragged on since Linux started this around 10 years > ago (for practical reasons). For *some* platforms U-Boot is the firmware > component that is in the best situation to provide the DTB (because it's > more than a mere bootloader), but for other it's just not. And this is no= t > even looking at really dynamic platforms like QEMU, where providing some > kind of fixed DT is just not working. > > I don't get the argument that people would need to see the DT in the tree > to develop code. The DT spec and binding documentation (currently living > in the Linux kernel source tree) provide the specification to code > against, and the platform specific selection of drivers in Kconfig and > _defconfig select the drivers for the devices that people are expected to > see. Why does one need actual DT files in the tree? > > I totally agree on adding more documentation, possibly *pointing* to > example > DTs or giving commands on how to obtain the actual copy (-dumpdtb, > /sys/firmware/devicetree), but don't think that adding some .dts files fo= r > platforms that don't need them is the right way. > > Cheers, > Andre. +1 > > > > > > It also provides a few qemu clean-ups discovered along the way. > > > > This series is based on Ilias' two series for OF_HOSTFILE and > > OF_PRIOR_STAGE removal. > > > > It is available at u-boot-dm/ofb-working > > > > [1] > > > https://patchwork.ozlabs.org/project/uboot/patch/20210919215111.3830278-3= -sjg@chromium.org/ > > > > > > Simon Glass (16): > > arm: qemu: Mention -nographic in the docs > > arm: qemu: Explain how to extract the generate devicetree > > riscv: qemu: Explain how to extract the generate devicetree > > arm: qemu: Add a devicetree file for qemu_arm > > arm: qemu: Add a devicetree file for qemu_arm64 > > riscv: qemu: Add devicetree files for qemu_riscv32/64 > > arm: rpi: Add a devicetree file for rpi_4 > > arm: vexpress: Add a devicetree file for juno > > arm: xenguest_arm64: Add a fake devicetree file > > arm: octeontx: Add a fake devicetree file > > arm: xilinx_versal_virt: Add a devicetree file > > arm: bcm7xxx: Add a devicetree file > > arm: qemu-ppce500: Add a devicetree file > > arm: highbank: Add a fake devicetree file > > fdt: Make OF_BOARD a bool option > > Drop CONFIG_BINMAN_STANDALONE_FDT > > > > Makefile | 3 +- > > arch/arm/dts/Makefile | 20 +- > > arch/arm/dts/bcm2711-rpi-4-b.dts | 1958 ++++++++++++++++++++++++ > > arch/arm/dts/bcm7xxx.dts | 15 + > > arch/arm/dts/highbank.dts | 14 + > > arch/arm/dts/juno-r2.dts | 1038 +++++++++++++ > > arch/arm/dts/octeontx.dts | 14 + > > arch/arm/dts/qemu-arm.dts | 402 +++++ > > arch/arm/dts/qemu-arm64.dts | 381 +++++ > > arch/arm/dts/xenguest-arm64.dts | 15 + > > arch/arm/dts/xilinx-versal-virt.dts | 307 ++++ > > arch/powerpc/dts/Makefile | 1 + > > arch/powerpc/dts/qemu-ppce500.dts | 264 ++++ > > arch/riscv/dts/Makefile | 2 +- > > arch/riscv/dts/qemu-virt.dts | 8 - > > arch/riscv/dts/qemu-virt32.dts | 217 +++ > > arch/riscv/dts/qemu-virt64.dts | 217 +++ > > configs/bcm7260_defconfig | 1 + > > configs/bcm7445_defconfig | 1 + > > configs/highbank_defconfig | 2 +- > > configs/octeontx2_95xx_defconfig | 1 + > > configs/octeontx2_96xx_defconfig | 1 + > > configs/octeontx_81xx_defconfig | 1 + > > configs/octeontx_83xx_defconfig | 1 + > > configs/qemu-ppce500_defconfig | 2 + > > configs/qemu-riscv32_defconfig | 1 + > > configs/qemu-riscv32_smode_defconfig | 1 + > > configs/qemu-riscv32_spl_defconfig | 4 +- > > configs/qemu-riscv64_defconfig | 1 + > > configs/qemu-riscv64_smode_defconfig | 1 + > > configs/qemu-riscv64_spl_defconfig | 3 +- > > configs/qemu_arm64_defconfig | 1 + > > configs/qemu_arm_defconfig | 1 + > > configs/rpi_4_32b_defconfig | 1 + > > configs/rpi_4_defconfig | 1 + > > configs/rpi_arm64_defconfig | 1 + > > configs/vexpress_aemv8a_juno_defconfig | 1 + > > configs/xenguest_arm64_defconfig | 1 + > > configs/xilinx_versal_virt_defconfig | 1 + > > doc/board/emulation/qemu-arm.rst | 19 +- > > doc/board/emulation/qemu-riscv.rst | 12 + > > dts/Kconfig | 27 +- > > tools/binman/binman.rst | 20 - > > 43 files changed, 4922 insertions(+), 61 deletions(-) > > create mode 100644 arch/arm/dts/bcm2711-rpi-4-b.dts > > create mode 100644 arch/arm/dts/bcm7xxx.dts > > create mode 100644 arch/arm/dts/highbank.dts > > create mode 100644 arch/arm/dts/juno-r2.dts > > create mode 100644 arch/arm/dts/octeontx.dts > > create mode 100644 arch/arm/dts/qemu-arm.dts > > create mode 100644 arch/arm/dts/qemu-arm64.dts > > create mode 100644 arch/arm/dts/xenguest-arm64.dts > > create mode 100644 arch/arm/dts/xilinx-versal-virt.dts > > create mode 100644 arch/powerpc/dts/qemu-ppce500.dts > > delete mode 100644 arch/riscv/dts/qemu-virt.dts > > create mode 100644 arch/riscv/dts/qemu-virt32.dts > > create mode 100644 arch/riscv/dts/qemu-virt64.dts > > > > -- Fran=C3=A7ois-Fr=C3=A9d=C3=A9ric Ozog | *Director Business Development* T: +33.67221.6485 francois.ozog@linaro.org | Skype: ffozog 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE71BC433F5 for ; Wed, 13 Oct 2021 13:11:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5128A610FC for ; Wed, 13 Oct 2021 13:11:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5128A610FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:49384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mae2h-0002EX-Du for qemu-devel@archiver.kernel.org; Wed, 13 Oct 2021 09:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1madxK-00037C-Po for qemu-devel@nongnu.org; Wed, 13 Oct 2021 09:06:04 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:33568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1madxH-0003d6-L5 for qemu-devel@nongnu.org; Wed, 13 Oct 2021 09:06:02 -0400 Received: by mail-ed1-x533.google.com with SMTP id p13so10224690edw.0 for ; Wed, 13 Oct 2021 06:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fg9YN1hjKENr5ESe51qpIaroWFowdP9uPzMLMJz29Lc=; b=lgkmT9JhnDVz8/PlaSNaN0U+Ox3ZTy/xxRTYe9WdthJmisLKmiNqdpi5FxiJOjmwUT zIE8xNUFNnaPJgtX6tjnTpYFNbgPNyokKVQnnkpem08myAJZ63YW/XPMhK7PfQR3zDEh HzdVvzbWsSKC3Mpq9OkHvrttgUON3g773xyfmLpVEihqFihnBgQG0t3E/CwK9gx3JL1b L+SesSomHvF821S4jHse06nf07BRat3GSZe49znhVufK4IolRGbh8ScInQsn3VhhPWqN DVzicksQHJaAcIPkqxnrqvDtWUyJCxzOOsawZADjvipLg4mfFzdGbZefwX9Jo5dp30AY +3cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fg9YN1hjKENr5ESe51qpIaroWFowdP9uPzMLMJz29Lc=; b=ByAneQNvPp3XA7FQQ1L0mP1mKaO34+DxlraRXGELckf6vNBdWFhbcO4joLX5JdSteR kl5U8qe1mwu0eblelLA5cxsz56n8IphfDIbo5Xnu/RdiUuWjtlVfVYEuWpsXC2nPer5k e3oOyyJ8VHC8fo6arfML4wbZPyXsb+/iEl3lRpQg0TxDj8EyPATN3lhgR5E0szw/bSch 7VfecE6TRJrY0w6u1Foc5ZbxWWGuMHdE3uHSZp7iAf3j1uRpp5yLTRLbPmrVUdDIPTG7 YoSWWfDxtLzK8+2Ac3ABLNh5h0a1bNX/A8YIfCuipx8eSbXX4y/G/KbXh6e5l4Tk4ciX T/vA== X-Gm-Message-State: AOAM5338aWotDERNfyE7ymSGbMXYqwxqoh2/hDblX67FtLJQ1zvnAviT 0zXSaC3IrV0baMXC2ah5p3PkPg65X4Sy8Ra/K5sA0w== X-Google-Smtp-Source: ABdhPJyCdGsJZAqJQKTIioBZANDXyhMeDxY+YaOyVp0YAIjcIhIog8FevpE1T83xQJqA1YqajsNGNTc2jO98FgLRDyQ= X-Received: by 2002:a05:6402:34f:: with SMTP id r15mr8214299edw.111.1634130355513; Wed, 13 Oct 2021 06:05:55 -0700 (PDT) MIME-Version: 1.0 References: <20211013010120.96851-1-sjg@chromium.org> <20211013105005.4cf27c8b@donnerap.cambridge.arm.com> In-Reply-To: <20211013105005.4cf27c8b@donnerap.cambridge.arm.com> From: =?UTF-8?Q?Fran=C3=A7ois_Ozog?= Date: Wed, 13 Oct 2021 15:05:44 +0200 Message-ID: Subject: Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option To: Andre Przywara Content-Type: multipart/alternative; boundary="0000000000005b827c05ce3b9f68" Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=francois.ozog@linaro.org; helo=mail-ed1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liviu Dudau , Neil Armstrong , Vladimir Oltean , Linus Walleij , Bin Meng , Kever Yang , Sean Anderson , Atish Patra , Zong Li , Stefan Roese , Fabio Estevam , Rainer Boschung , Rob Herring , Stephen Warren , Oleksandr Andrushchenko , Heinrich Schuchardt , Niel Fourie , Michal Simek , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Jerry Van Baren , Ramon Fried , Jagan Teki , Valentin Longchamp , Heiko Schocher , Peter Robinson , Sinan Akman , Thomas Fitzsimmons , Wolfgang Denk , Stephen Warren , qemu-devel@nongnu.org, Tim Harvey , Ashok Reddy Soma , Rick Chen , Alexander Graf , Green Wan , T Karthik Reddy , Anastasiia Lukianenko , Albert Aribaud , Michal Simek , Matthias Brugger , Leo , Tero Kristo , U-Boot Mailing List , David Abdurachmanov , Priyanka Jain , Simon Glass , Ilias Apalodimas , Christian Hewitt , Aaron Williams , Tuomas Tynkkynen , Heinrich Schuchardt , Tianrui Wei , Bin Meng , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Tom Rini , Dimitri John Ledkov , Padmarao Begari Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000005b827c05ce3b9f68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mer. 13 oct. 2021 =C3=A0 14:41, Andre Przywara = a =C3=A9crit : > On Tue, 12 Oct 2021 19:01:04 -0600 > Simon Glass wrote: > > Hi, > > > With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so > > there are only three ways to obtain a devicetree: > > > > - OF_SEPARATE - the normal way, where the devicetree is built and > > appended to U-Boot > > - OF_EMBED - for development purposes, the devicetree is embedded in > > the ELF file (also used for EFI) > > - OF_BOARD - the board figures it out on its own > > > > The last one is currently set up so that no devicetree is needed at all > > in the U-Boot tree. Most boards do provide one, but some don't. Some > > don't even provide instructions on how to boot on the board. > > > > The problems with this approach are documented at [1]. > > > > In practice, OF_BOARD is not really distinct from OF_SEPARATE. Any boar= d > > can obtain its devicetree at runtime, even it is has a devicetree built > > in U-Boot. This is because U-Boot may be a second-stage bootloader and > its > > caller may have a better idea about the hardware available in the > machine. > > This is the case with a few QEMU boards, for example. > > > > So it makes no sense to have OF_BOARD as a 'choice'. It should be an > > option, available with either OF_SEPARATE or OF_EMBED. > > So I am possibly fine with that, but: > > > This series makes this change, adding various missing devicetree files > > (and placeholders) to make the build work. > > If we just need it to make the build work, we not just have pure stub DTs= , > as you do for highbank, everywhere? > Adding *some* DT files for those platforms that actually do the right > thing seems like the wrong direction to me. > Providing DTs in the source repositories of the actual consumers is more > of a bad habit that dragged on since Linux started this around 10 years > ago (for practical reasons). For *some* platforms U-Boot is the firmware > component that is in the best situation to provide the DTB (because it's > more than a mere bootloader), but for other it's just not. And this is no= t > even looking at really dynamic platforms like QEMU, where providing some > kind of fixed DT is just not working. > > I don't get the argument that people would need to see the DT in the tree > to develop code. The DT spec and binding documentation (currently living > in the Linux kernel source tree) provide the specification to code > against, and the platform specific selection of drivers in Kconfig and > _defconfig select the drivers for the devices that people are expected to > see. Why does one need actual DT files in the tree? > > I totally agree on adding more documentation, possibly *pointing* to > example > DTs or giving commands on how to obtain the actual copy (-dumpdtb, > /sys/firmware/devicetree), but don't think that adding some .dts files fo= r > platforms that don't need them is the right way. > > Cheers, > Andre. +1 > > > > > > It also provides a few qemu clean-ups discovered along the way. > > > > This series is based on Ilias' two series for OF_HOSTFILE and > > OF_PRIOR_STAGE removal. > > > > It is available at u-boot-dm/ofb-working > > > > [1] > > > https://patchwork.ozlabs.org/project/uboot/patch/20210919215111.3830278-3= -sjg@chromium.org/ > > > > > > Simon Glass (16): > > arm: qemu: Mention -nographic in the docs > > arm: qemu: Explain how to extract the generate devicetree > > riscv: qemu: Explain how to extract the generate devicetree > > arm: qemu: Add a devicetree file for qemu_arm > > arm: qemu: Add a devicetree file for qemu_arm64 > > riscv: qemu: Add devicetree files for qemu_riscv32/64 > > arm: rpi: Add a devicetree file for rpi_4 > > arm: vexpress: Add a devicetree file for juno > > arm: xenguest_arm64: Add a fake devicetree file > > arm: octeontx: Add a fake devicetree file > > arm: xilinx_versal_virt: Add a devicetree file > > arm: bcm7xxx: Add a devicetree file > > arm: qemu-ppce500: Add a devicetree file > > arm: highbank: Add a fake devicetree file > > fdt: Make OF_BOARD a bool option > > Drop CONFIG_BINMAN_STANDALONE_FDT > > > > Makefile | 3 +- > > arch/arm/dts/Makefile | 20 +- > > arch/arm/dts/bcm2711-rpi-4-b.dts | 1958 ++++++++++++++++++++++++ > > arch/arm/dts/bcm7xxx.dts | 15 + > > arch/arm/dts/highbank.dts | 14 + > > arch/arm/dts/juno-r2.dts | 1038 +++++++++++++ > > arch/arm/dts/octeontx.dts | 14 + > > arch/arm/dts/qemu-arm.dts | 402 +++++ > > arch/arm/dts/qemu-arm64.dts | 381 +++++ > > arch/arm/dts/xenguest-arm64.dts | 15 + > > arch/arm/dts/xilinx-versal-virt.dts | 307 ++++ > > arch/powerpc/dts/Makefile | 1 + > > arch/powerpc/dts/qemu-ppce500.dts | 264 ++++ > > arch/riscv/dts/Makefile | 2 +- > > arch/riscv/dts/qemu-virt.dts | 8 - > > arch/riscv/dts/qemu-virt32.dts | 217 +++ > > arch/riscv/dts/qemu-virt64.dts | 217 +++ > > configs/bcm7260_defconfig | 1 + > > configs/bcm7445_defconfig | 1 + > > configs/highbank_defconfig | 2 +- > > configs/octeontx2_95xx_defconfig | 1 + > > configs/octeontx2_96xx_defconfig | 1 + > > configs/octeontx_81xx_defconfig | 1 + > > configs/octeontx_83xx_defconfig | 1 + > > configs/qemu-ppce500_defconfig | 2 + > > configs/qemu-riscv32_defconfig | 1 + > > configs/qemu-riscv32_smode_defconfig | 1 + > > configs/qemu-riscv32_spl_defconfig | 4 +- > > configs/qemu-riscv64_defconfig | 1 + > > configs/qemu-riscv64_smode_defconfig | 1 + > > configs/qemu-riscv64_spl_defconfig | 3 +- > > configs/qemu_arm64_defconfig | 1 + > > configs/qemu_arm_defconfig | 1 + > > configs/rpi_4_32b_defconfig | 1 + > > configs/rpi_4_defconfig | 1 + > > configs/rpi_arm64_defconfig | 1 + > > configs/vexpress_aemv8a_juno_defconfig | 1 + > > configs/xenguest_arm64_defconfig | 1 + > > configs/xilinx_versal_virt_defconfig | 1 + > > doc/board/emulation/qemu-arm.rst | 19 +- > > doc/board/emulation/qemu-riscv.rst | 12 + > > dts/Kconfig | 27 +- > > tools/binman/binman.rst | 20 - > > 43 files changed, 4922 insertions(+), 61 deletions(-) > > create mode 100644 arch/arm/dts/bcm2711-rpi-4-b.dts > > create mode 100644 arch/arm/dts/bcm7xxx.dts > > create mode 100644 arch/arm/dts/highbank.dts > > create mode 100644 arch/arm/dts/juno-r2.dts > > create mode 100644 arch/arm/dts/octeontx.dts > > create mode 100644 arch/arm/dts/qemu-arm.dts > > create mode 100644 arch/arm/dts/qemu-arm64.dts > > create mode 100644 arch/arm/dts/xenguest-arm64.dts > > create mode 100644 arch/arm/dts/xilinx-versal-virt.dts > > create mode 100644 arch/powerpc/dts/qemu-ppce500.dts > > delete mode 100644 arch/riscv/dts/qemu-virt.dts > > create mode 100644 arch/riscv/dts/qemu-virt32.dts > > create mode 100644 arch/riscv/dts/qemu-virt64.dts > > > > -- Fran=C3=A7ois-Fr=C3=A9d=C3=A9ric Ozog | *Director Business Development* T: +33.67221.6485 francois.ozog@linaro.org | Skype: ffozog --0000000000005b827c05ce3b9f68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Le=C2=A0mer. 13 oct. 2021 =C3=A0 14:41, Andre Przywara <= andre.przywara@arm.com> a = =C3=A9crit=C2=A0:
On Tue, 12 Oct 20= 21 19:01:04 -0600
Simon Glass <sjg@c= hromium.org> wrote:

Hi,

> With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE= so
> there are only three ways to obtain a devicetree:
>
>=C2=A0 =C2=A0 - OF_SEPARATE - the normal way, where the devicetree is b= uilt and
>=C2=A0 =C2=A0 =C2=A0 =C2=A0appended to U-Boot
>=C2=A0 =C2=A0 - OF_EMBED - for development purposes, the devicetree is = embedded in
>=C2=A0 =C2=A0 =C2=A0 =C2=A0the ELF file (also used for EFI)
>=C2=A0 =C2=A0 - OF_BOARD - the board figures it out on its own
>
> The last one is currently set up so that no devicetree is needed at al= l
> in the U-Boot tree. Most boards do provide one, but some don't. So= me
> don't even provide instructions on how to boot on the board.
>
> The problems with this approach are documented at [1].
>
> In practice, OF_BOARD is not really distinct from OF_SEPARATE. Any boa= rd
> can obtain its devicetree at runtime, even it is has a devicetree buil= t
> in U-Boot. This is because U-Boot may be a second-stage bootloader and= its
> caller may have a better idea about the hardware available in the mach= ine.
> This is the case with a few QEMU boards, for example.
>
> So it makes no sense to have OF_BOARD as a 'choice'. It should= be an
> option, available with either OF_SEPARATE or OF_EMBED.

So I am possibly fine with that, but:

> This series makes this change, adding various missing devicetree files=
> (and placeholders) to make the build work.

If we just need it to make the build work, we not just have pure stub DTs,<= br> as you do for highbank, everywhere?
Adding *some* DT files for those platforms that actually do the right
thing seems like the wrong direction to me.
Providing DTs in the source repositories of the actual consumers is more of a bad habit that dragged on since Linux started this around 10 years
ago (for practical reasons). For *some* platforms U-Boot is the firmware component that is in the best situation to provide the DTB (because it'= s
more than a mere bootloader), but for other it's just not. And this is = not
even looking at really dynamic platforms like QEMU, where providing some kind of fixed DT is just not working.

I don't get the argument that people would need to see the DT in the tr= ee
to develop code. The DT spec and binding documentation (currently living in the Linux kernel source tree) provide the specification to code
against, and the platform specific selection of drivers in Kconfig and
_defconfig select the drivers for the devices that people are expected to see. Why does one need actual DT files in the tree?

I totally agree on adding more documentation, possibly *pointing* to exampl= e
DTs or giving commands on how to obtain the actual copy (-dumpdtb,
/sys/firmware/devicetree), but don't think that adding some .dts files = for
platforms that don't need them is the right way.

Cheers,
Andre.
+1


>
> It also provides a few qemu clean-ups discovered along the way.
>
> This series is based on Ilias' two series for OF_HOSTFILE and
> OF_PRIOR_STAGE removal.
>
> It is available at u-boot-dm/ofb-working
>
> [1]
> http= s://patchwork.ozlabs.org/project/uboot/patch/20210919215111.3830278-3-sjg@c= hromium.org/
>
>
> Simon Glass (16):
>=C2=A0 =C2=A0arm: qemu: Mention -nographic in the docs
>=C2=A0 =C2=A0arm: qemu: Explain how to extract the generate devicetree<= br> >=C2=A0 =C2=A0riscv: qemu: Explain how to extract the generate devicetre= e
>=C2=A0 =C2=A0arm: qemu: Add a devicetree file for qemu_arm
>=C2=A0 =C2=A0arm: qemu: Add a devicetree file for qemu_arm64
>=C2=A0 =C2=A0riscv: qemu: Add devicetree files for qemu_riscv32/64
>=C2=A0 =C2=A0arm: rpi: Add a devicetree file for rpi_4
>=C2=A0 =C2=A0arm: vexpress: Add a devicetree file for juno
>=C2=A0 =C2=A0arm: xenguest_arm64: Add a fake devicetree file
>=C2=A0 =C2=A0arm: octeontx: Add a fake devicetree file
>=C2=A0 =C2=A0arm: xilinx_versal_virt: Add a devicetree file
>=C2=A0 =C2=A0arm: bcm7xxx: Add a devicetree file
>=C2=A0 =C2=A0arm: qemu-ppce500: Add a devicetree file
>=C2=A0 =C2=A0arm: highbank: Add a fake devicetree file
>=C2=A0 =C2=A0fdt: Make OF_BOARD a bool option
>=C2=A0 =C2=A0Drop CONFIG_BINMAN_STANDALONE_FDT
>
>=C2=A0 Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0 3 +-<= br> >=C2=A0 arch/arm/dts/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A020 +-
>=C2=A0 arch/arm/dts/bcm2711-rpi-4-b.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0| 195= 8 ++++++++++++++++++++++++
>=C2=A0 arch/arm/dts/bcm7xxx.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0|=C2=A0 =C2=A015 +
>=C2=A0 arch/arm/dts/highbank.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 =C2=A014 +
>=C2=A0 arch/arm/dts/juno-r2.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 1038 +++++++++++++
>=C2=A0 arch/arm/dts/octeontx.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 =C2=A014 +
>=C2=A0 arch/arm/dts/qemu-arm.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 402 +++++
>=C2=A0 arch/arm/dts/qemu-arm64.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 381 +++++
>=C2=A0 arch/arm/dts/xenguest-arm64.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A015 +
>=C2=A0 arch/arm/dts/xilinx-versal-virt.dts=C2=A0 =C2=A0 |=C2=A0 307 +++= +
>=C2=A0 arch/powerpc/dts/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 =C2=A0 1 +
>=C2=A0 arch/powerpc/dts/qemu-ppce500.dts=C2=A0 =C2=A0 =C2=A0 |=C2=A0 26= 4 ++++
>=C2=A0 arch/riscv/dts/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 |=C2=A0 =C2=A0 2 +-
>=C2=A0 arch/riscv/dts/qemu-virt.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 =C2=A0 8 -
>=C2=A0 arch/riscv/dts/qemu-virt32.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 217 +++
>=C2=A0 arch/riscv/dts/qemu-virt64.dts=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 217 +++
>=C2=A0 configs/bcm7260_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/bcm7445_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/highbank_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0|=C2=A0 =C2=A0 2 +-
>=C2=A0 configs/octeontx2_95xx_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A0 1 +
>=C2=A0 configs/octeontx2_96xx_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A0 1 +
>=C2=A0 configs/octeontx_81xx_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A0 1 +
>=C2=A0 configs/octeontx_83xx_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2= =A0 =C2=A0 1 +
>=C2=A0 configs/qemu-ppce500_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A0 2 +
>=C2=A0 configs/qemu-riscv32_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/qemu-riscv32_smode_defconfig=C2=A0 =C2=A0|=C2=A0 =C2=A0 = 1 +
>=C2=A0 configs/qemu-riscv32_spl_defconfig=C2=A0 =C2=A0 =C2=A0|=C2=A0 = =C2=A0 4 +-
>=C2=A0 configs/qemu-riscv64_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/qemu-riscv64_smode_defconfig=C2=A0 =C2=A0|=C2=A0 =C2=A0 = 1 +
>=C2=A0 configs/qemu-riscv64_spl_defconfig=C2=A0 =C2=A0 =C2=A0|=C2=A0 = =C2=A0 3 +-
>=C2=A0 configs/qemu_arm64_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0|=C2=A0 =C2=A0 1 +
>=C2=A0 configs/qemu_arm_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0|=C2=A0 =C2=A0 1 +
>=C2=A0 configs/rpi_4_32b_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/rpi_4_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/rpi_arm64_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/vexpress_aemv8a_juno_defconfig |=C2=A0 =C2=A0 1 +
>=C2=A0 configs/xenguest_arm64_defconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A0 1 +
>=C2=A0 configs/xilinx_versal_virt_defconfig=C2=A0 =C2=A0|=C2=A0 =C2=A0 = 1 +
>=C2=A0 doc/board/emulation/qemu-arm.rst=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 =C2=A019 +-
>=C2=A0 doc/board/emulation/qemu-riscv.rst=C2=A0 =C2=A0 =C2=A0|=C2=A0 = =C2=A012 +
>=C2=A0 dts/Kconfig=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A027 +-
>=C2=A0 tools/binman/binman.rst=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 |=C2=A0 =C2=A020 -
>=C2=A0 43 files changed, 4922 insertions(+), 61 deletions(-)
>=C2=A0 create mode 100644 arch/arm/dts/bcm2711-rpi-4-b.dts
>=C2=A0 create mode 100644 arch/arm/dts/bcm7xxx.dts
>=C2=A0 create mode 100644 arch/arm/dts/highbank.dts
>=C2=A0 create mode 100644 arch/arm/dts/juno-r2.dts
>=C2=A0 create mode 100644 arch/arm/dts/octeontx.dts
>=C2=A0 create mode 100644 arch/arm/dts/qemu-arm.dts
>=C2=A0 create mode 100644 arch/arm/dts/qemu-arm64.dts
>=C2=A0 create mode 100644 arch/arm/dts/xenguest-arm64.dts
>=C2=A0 create mode 100644 arch/arm/dts/xilinx-versal-virt.dts
>=C2=A0 create mode 100644 arch/powerpc/dts/qemu-ppce500.dts
>=C2=A0 delete mode 100644 arch/riscv/dts/qemu-virt.dts
>=C2=A0 create mode 100644 arch/riscv/dts/qemu-virt32.dts
>=C2=A0 create mode 100644 arch/riscv/dts/qemu-virt64.dts
>

--
<= div>
Fran=C3=A7oi= s-Fr=C3=A9d=C3=A9ric Ozog=C2=A0|=C2=A0Director Business Development
T:=C2=A0+33.67221.6485<= br>francois.ozog@linaro.org=C2=A0= |=C2=A0Skype:=C2=A0ffozog

--0000000000005b827c05ce3b9f68--