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=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 23F05C4338F for ; Sat, 14 Aug 2021 07:02:11 +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 651FD61028 for ; Sat, 14 Aug 2021 07:02:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 651FD61028 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de 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 E77B382DF6; Sat, 14 Aug 2021 09:02:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="I6Ifdne0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D98EF82DF7; Sat, 14 Aug 2021 09:02:05 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 550D582DE4 for ; Sat, 14 Aug 2021 09:02:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1628924518; bh=yU7Kvr/eYy8ZwIUj+c5Tl5Pc5WEEkeA+Dg2dcTgEZo0=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=I6Ifdne0VRKbeWKsieIWxc9SjVWtrN2+X6QoPLlmDBRwnUxnLUrCKRcpU5uLsSAP0 /G/OWB3EjTJ1KDqtm4HimRGAR1QoZ+M9uIhGypKqH+h1/NTY1A5iW1r6gpuc67sQod XugST8M0DNyC/tCgyMDQexouL777TzouYEFVM0Y0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.35] ([88.152.144.157]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdvmY-1mmUKm1mNy-00b6B8; Sat, 14 Aug 2021 09:01:58 +0200 Subject: Re: [PATCH v2 1/3] doc: Move devicetree control doc to rST To: Simon Glass , U-Boot Mailing List Cc: Tom Rini , Bin Meng References: <20210802005713.2268145-1-sjg@chromium.org> From: Heinrich Schuchardt Message-ID: <4550866e-e9c4-a440-e4a8-a4763647e841@gmx.de> Date: Sat, 14 Aug 2021 09:01:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210802005713.2268145-1-sjg@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1: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h 6XkDGx7JV3eK61pfVXCUGTcr/tojNzfIywg9uj5MVWQ41iF7A0tZVluIvSI6NvdoFiuBo73Kk kiHM+v9BKBM/wLIqBbSiiNWMSA300nJj3e1OLWBjMCsNTFCmIjxXCqUwWHiFXD13M+e/8VDwb TEA5N5qsUmVuY4VYGmSmcH4o4tsScSKR3Mzh7szudQ1SpaNkUS2o6Gwv1dlUKLYIxW5pYndFm UFIUtW/Va5HTPPXwilUsbwFmn8koiVqxiphwFmH7nghuMOLlP/DRwlvzSU+hG9FpCNDRA1PIy WM/GVV7ItPHP4ZbEvo0QMBta50lVNZZkgkoQakGZ/8ix7JkNuhHYAbcig== 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 8/2/21 2:57 AM, Simon Glass wrote: > Move this to rST format, largely unchanged to start with. Add an index > for this topic, as well as an empty intro. > > Note this patch does not include updates! Is it just a conversion to the > new format. See the next patch. > > Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt > --- > > Changes in v2: > - Add a comment about updates > > .../devicetree/control.rst} | 50 +++++++++---------- > doc/develop/devicetree/index.rst | 13 +++++ > doc/develop/devicetree/intro.rst | 4 ++ > doc/develop/index.rst | 1 + > 4 files changed, 43 insertions(+), 25 deletions(-) > rename doc/{README.fdt-control =3D> develop/devicetree/control.rst} (8= 9%) > create mode 100644 doc/develop/devicetree/index.rst > create mode 100644 doc/develop/devicetree/intro.rst > > diff --git a/doc/README.fdt-control b/doc/develop/devicetree/control.rst > similarity index 89% > rename from doc/README.fdt-control > rename to doc/develop/devicetree/control.rst > index 424d13fc5b1..1289b6156fe 100644 > --- a/doc/README.fdt-control > +++ b/doc/develop/devicetree/control.rst > @@ -1,6 +1,5 @@ > -# SPDX-License-Identifier: GPL-2.0+ > -# > -# Copyright (c) 2011 The Chromium OS Authors. > +.. SPDX-License-Identifier: GPL-2.0+ > +.. sectionauthor:: Copyright 2011 The Chromium OS Authors > > Device Tree Control in U-Boot > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > @@ -37,9 +36,7 @@ What is a Flat Device Tree? > --------------------------- > > An fdt can be specified in source format as a text file. To read about > -the fdt syntax, take a look at the specification here: > - > -https://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf > +the fdt syntax, take a look at the specification (dtspec_). > > You also might find this section of the Linux kernel documentation > useful: (access this in the Linux kernel source code) > @@ -60,18 +57,18 @@ To use this feature you will need to get the device = tree compiler. This is > provided by U-Boot automatically. If you have a system version of dtc > (typically in the 'device-tree-compiler' package), it is currently not= used. > > -If you want to build your own dtc, it is kept here: > +If you want to build your own dtc, it is kept here:: > > git://git.kernel.org/pub/scm/utils/dtc/dtc.git > > -For example: > +For example:: > > $ git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git > $ cd dtc > $ make > $ sudo make install > > -Then run the compiler (your version will vary): > +Then run the compiler (your version will vary):: > > $ dtc -v > Version: DTC 1.2.0-g2cb4b51f > @@ -105,14 +102,14 @@ Failing that, you could write one from scratch you= rself! > Configuration > ------------- > > -Use: > +Use:: > > -#define CONFIG_DEFAULT_DEVICE_TREE "" > + #define CONFIG_DEFAULT_DEVICE_TREE "" > > to set the filename of the device tree source. Then put your device tr= ee > -file into > +file into:: > > - board//dts/.dts > + board//dts/.dts > > This should include your CPU or SOC's device tree file, placed in > arch//dts, and then make any adjustments required. > @@ -123,9 +120,9 @@ and development only and is not recommended for prod= uction devices. > > If CONFIG_OF_SEPARATE is defined, then it will be built and placed in > a u-boot.dtb file alongside u-boot-nodtb.bin. A common approach is the= n to > -join the two: > +join the two:: > > - cat u-boot-nodtb.bin u-boot.dtb >image.bin > + cat u-boot-nodtb.bin u-boot.dtb >image.bin > > and then flash image.bin onto your board. Note that U-Boot creates > u-boot-dtb.bin which does the above step for you also. Resulting > @@ -144,9 +141,9 @@ specify the file to read. > You cannot use more than one of these options at the same time. > > To use a device tree file that you have compiled yourself, pass > -EXT_DTB=3D to 'make', as in: > +EXT_DTB=3D to 'make', as in:: > > - make EXT_DTB=3Dboot/am335x-boneblack-pubkey.dtb > + make EXT_DTB=3Dboot/am335x-boneblack-pubkey.dtb > > Then U-Boot will copy that file to u-boot.dtb, put it in the .img file > if used, and u-boot-dtb.bin. > @@ -162,16 +159,21 @@ variable will be set to the address of the newly r= elocated fdt blob. > It is read-only and cannot be changed. It can optionally be used to > control the boot process of Linux with bootm/bootz commands. > > -To use this, put something like this in your board header file: > +To use this, put something like this in your board header file:: > > -#define CONFIG_EXTRA_ENV_SETTINGS "fdtcontroladdr=3D10000\0" > + #define CONFIG_EXTRA_ENV_SETTINGS "fdtcontroladdr=3D10000\0" > > Build: > > -After board configuration is done, fdt supported u-boot can be build in= two ways: > -1) build the default dts which is defined from CONFIG_DEFAULT_DEVICE_T= REE > +After board configuration is done, fdt supported u-boot can be build in= two > +ways: > + > +# build the default dts which is defined from CONFIG_DEFAULT_DEVICE_TR= EE:: > + > $ make > -2) build the user specified dts file > + > +# build the user specified dts file:: > + > $ make DEVICE_TREE=3D > > > @@ -225,6 +227,4 @@ but can use the fdt to specific the UART clock, peri= pheral address, etc. > In very broad terms, the CONFIG options in general control *what* driv= er > files are pulled in, and the fdt controls *how* those files work. > > --- > -Simon Glass > -1-Sep-11 > +.. _dtspec: https://www.power.org/resources/downloads/Power_ePAPR_APPRO= VED_v1.0.pdf > diff --git a/doc/develop/devicetree/index.rst b/doc/develop/devicetree/i= ndex.rst > new file mode 100644 > index 00000000000..fa5db3eb76e > --- /dev/null > +++ b/doc/develop/devicetree/index.rst > @@ -0,0 +1,13 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Devicetree in U-Boot > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +The following holds information on how U-Boot makes use of devicetree f= or > +build-time and runtime configuration. > + > +.. toctree:: > + :maxdepth: 2 > + > + intro > + control > diff --git a/doc/develop/devicetree/intro.rst b/doc/develop/devicetree/i= ntro.rst > new file mode 100644 > index 00000000000..344851327c7 > --- /dev/null > +++ b/doc/develop/devicetree/intro.rst > @@ -0,0 +1,4 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > + > +Devicetree Introduction > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > diff --git a/doc/develop/index.rst b/doc/develop/index.rst > index 3ead7bda8fd..3230ff9cf0e 100644 > --- a/doc/develop/index.rst > +++ b/doc/develop/index.rst > @@ -10,6 +10,7 @@ Implementation > :maxdepth: 1 > > commands > + devicetree/index > driver-model/index > global_data > logging >