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 6429EC636CC for ; Mon, 13 Feb 2023 07:49:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 260088562B; Mon, 13 Feb 2023 08:49:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (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 (2048-bit key; secure) header.d=gmx.de header.i=@gmx.de header.b="SjObPFBB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C5B888564B; Mon, 13 Feb 2023 08:49:39 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 E32E185347 for ; Mon, 13 Feb 2023 08:49:35 +0100 (CET) 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.de; s=s31663417; t=1676274575; bh=61nY2b1M+ejRai+NUVwXzDqqiRAamjtsMQkl5DgLXRg=; h=X-UI-Sender-Class:Date:Subject:To:References:Cc:From:In-Reply-To; b=SjObPFBBVps0WjVw9BUAezu8471QOOpxTL1HFIjnXBggxAVW+DZYVhXDgkZu4bqe3 LOIHCCtyPvZ7oHOHa5kqxum7N6TEzBqGl/oVeZ28BiOYMsckYCZM89KJWoJyuIIyVi 2270xOM8XqyyZQHRU09CxSdkn2h/hQU26TX5loZP5lspKgAvDBZKiFD4g7n9pZpobb tgciIZubeM/pxYGqJ1H1+hpaYe4vA6TzKgKDuZOtNclEdrsg7NIxKxbV1ZNClAb4hX CMXzTBarS1djRTDISnto9/gIToMAawMh6rxUirjtgMJIK5FCtTFL/CZhfGU1lMuO70 jIZ1m5QlEYoSg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.94] ([88.152.145.137]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8QWA-1pVtRX1qU4-004WsE; Mon, 13 Feb 2023 08:49:35 +0100 Message-ID: <25c61128-73f2-e291-829a-70cb92836b23@gmx.de> Date: Mon, 13 Feb 2023 08:49:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH] doc: board: bcm7xxx: Convert to reStructuredText format Content-Language: en-US To: Thomas Fitzsimmons References: <20230211002459.2161001-1-fitzsim@fitzsim.org> Cc: u-boot@lists.denx.de From: Heinrich Schuchardt In-Reply-To: <20230211002459.2161001-1-fitzsim@fitzsim.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:4qgdX2peUyK/IqsezbQmlRKY1hXhfevJV0MY/BTuWWcHv3zixTG hNsfX3pJQt1fv4aaF4HYnpAsFy5Av16JGDLLw3dhrQwLcuQ3vL4CwX0PLOS1p1Jl0Dhn0OI DNftKCI4OGOJZsTni4CsVkAkMSXzF6V61tKbDQv0JaiRAUU/1vbhsPKeUX3PCxfT3RA0+eV Kd5DQvs0wmP+T/JSck6fg== UI-OutboundReport: notjunk:1;M01:P0:F/lFbtvmRGo=;6RdCFLWphrIH6YDVroQC9Am7PbQ r04yn9AffDPDjpbSEyrJsHGi3VfyQdnesaGjYjoJZCKOQsunt+BT3gtbA2gIEAQiRL8WgXys4 rC6iGlv42+beJ5+QhEop8vMfv8SjGhHX70Vd3LDsz0tEJGD/11aiPwOQ+0bbYNvfQacrRMORw 2/wHjNu1cBPFz20ojYhjMEFGHsrMhtBi9Na7L0tZ/BcBFZgJ0LncAsM8Pccm26rGjz6nK0ml7 MCk/ZPqB2pM9PM7jlefSFEuB9FRQwL4K9MH3TQTjSWiRHRsfd9GuR5E97lKYOk+c4jiEUl1zk d+k87KhMicEktnR/PHXrxX7WFrOWuSriKQ133M2m1C+rMhZ3tsOuDW8/25GHAXzTbK+a78dkf jZm1EaZmU8y/THLvEhDzOqsHgKUxrbh7sEH0583Zo+0E33xFky5vgLZbU7AhnKBwW03tCZiFD YgW3Du+lvBGRWho2yjoPaBJdirTL8ekGNo5HgmGUJLxQRmmL0VMVplko5j2l+7CgOLDO23tlQ Xs1iwyHhXvYOJQKNm4gibuyZQ9kOJwZ+ql6VNNPgzVD5a8BLi1M/TnACWlT8KQamxeniFrKI1 ybseY5C1gv2J78CSO/ygorbSIr2OvKswG8RPwIUzdJ+EUiF5uo68o6FoKkeW3N+xdV5spMXow /UKtvJsGoT436oBogeiesheZO6geDu0CKfZZ69rme9DOPHDffcNrGAnVAwfgRAFbcNA4bqqpj k6eTiHgKA98CD1GqjE1hyjfgqbnp7enum8J1A4Yak+sPw5fmudaFi1AAzjOEg+0Lgi+XOaeXP EvNpdCSIuBdjOsi8NGmKt8gMKn5YIAGoQS6zoXS57BbZoN/95CFLkwgpCKo55r+tAu43AEXiT 4a+Y54Q3C8dDWDXiC4y13bNM2e/ROVWgkeQULDIMwf6G8ofZ8nL86PCHvWN7A4omqikQUwQSD +WqwMHLK9+AAJlHFWi8OTvUCU30= 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 2/11/23 01:24, Thomas Fitzsimmons wrote: > Convert the documentation for the Broadcom BCM7445 and BCM7260 boards > to reStructuredText format and add the new filename to > doc/board/broadcom/index.rst. > --- > doc/README.bcm7xxx | 156 --------------------------- > doc/board/broadcom/bcm7xxx.rst | 186 +++++++++++++++++++++++++++++++++ > doc/board/broadcom/index.rst | 1 + > 3 files changed, 187 insertions(+), 156 deletions(-) > delete mode 100644 doc/README.bcm7xxx > create mode 100644 doc/board/broadcom/bcm7xxx.rst > > diff --git a/doc/README.bcm7xxx b/doc/README.bcm7xxx > deleted file mode 100644 > index 6839da5f97..0000000000 > --- a/doc/README.bcm7xxx > +++ /dev/null > @@ -1,156 +0,0 @@ > -Summary > -=3D=3D=3D=3D=3D=3D=3D > - > -This document describes how to use U-Boot on the Broadcom 7445 SoC, as > -a third stage bootloader loaded by Broadcom's BOLT bootloader. > - > -BOLT loads U-Boot as a generic ELF binary. Some U-Boot features such > -as networking are not yet available but other important features are, > -including: > - > - - ext4 file system traversal > - > - - support for loading FIT images > - > - - advanced scripting > - > - - support for FIT-provided DTBs instead of relying on the > - BOLT-provided DTB > - > -A customized version of this port has been used in production. The > -same approach may work on other BCM7xxx boards, with some > -configuration adjustments and memory layout experimentation. > - > -Build > -=3D=3D=3D=3D=3D > - > -make bcm7445_defconfig > -make > -${CROSS_COMPILE}strip u-boot > - > -Run > -=3D=3D=3D > - > -To tell U-Boot which serial port to use for its console, set the > -"stdout-path" property in the "/chosen" node of the BOLT-generated > -device tree. For example: > - > -BOLT> dt add prop chosen stdout-path s serial0:115200n8 > - > -Flash the u-boot binary into board storage, then invoke it from BOLT. > -For example: > - > -BOLT> boot -bsu -elf flash0.u-boot1 > - > -This port assumes that I-cache and D-cache are already enabled when > -U-Boot is entered. > - > -Flattened Image Tree Support > -=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 > - > -What follows is an example FIT image source file. Build it with: > - > -mkimage -f image.its image.itb > - > -Booting the resulting image.itb was tested on BOLT v1.20, with the > -following kernels: > - > -https://github.com/Broadcom/stblinux-3.14 > -https://github.com/Broadcom/stblinux-4.1 > -https://github.com/Broadcom/stblinux-4.9 > - > -and with a generic ARMv7 root file system. > - > -image.its: > -/dts-v1/; > -/ { > - description =3D "BCM7445 FIT"; > - images { > - kernel@1 { > - description =3D "Linux kernel"; > - /* > - * This kernel image output format can be > - * generated with: > - * > - * make vmlinux > - * ${CROSS_COMPILE}objcopy -O binary -S vmlinux vmlinux.bin > - * gzip -9 vmlinux.bin > - * > - * For stblinux-3.14, the specific Broadcom > - * board type should be configured in the > - * kernel, for example CONFIG_BCM7445D0=3Dy. > - */ > - data =3D /incbin/(""); > - type =3D "kernel"; > - arch =3D "arm"; > - os =3D "linux"; > - compression =3D "gzip"; > - load =3D <0x8000>; > - entry =3D <0x8000>; > - hash@1 { > - algo =3D "sha256"; > - }; > - }; > - ramdisk@1 { > - description =3D "Initramfs root file system"; > - data =3D /incbin/(""); > - type =3D "ramdisk"; > - arch =3D "arm"; > - os =3D "linux"; > - compression =3D "gzip"; > - /* > - * Set the environment variable initrd_high to > - * 0xffffffff, and set "load" and "entry" here > - * to 0x0 to keep initramfs in-place and to > - * accommodate stblinux bmem/CMA reservations. > - */ > - load =3D <0x0>; > - entry =3D <0x0>; > - hash@1 { > - algo =3D "sha256"; > - }; > - }; > - fdt@1 { > - description =3D "Device tree dumped from BOLT"; > - /* > - * This DTB should be similar to the > - * BOLT-generated device tree, after BOLT has > - * done its runtime modifications to it. For > - * example, it can be dumped from within > - * U-Boot (at ${fdtcontroladdr}), after BOLT > - * has loaded U-Boot. The result can be added > - * to the Linux source tree as a .dts file. > - * > - * To support modifications to the device tree > - * in-place in U-Boot, add to Linux's > - * arch/arm/boot/dts/Makefile: > - * > - * DTC_FLAGS ?=3D -p 4096 > - * > - * This will leave some padding in the DTB and > - * thus reserve room for node additions. > - * > - * Also, set the environment variable fdt_high > - * to 0xffffffff to keep the DTB in-place and > - * to accommodate stblinux bmem/CMA > - * reservations. > - */ > - data =3D /incbin/(".dtb"); > - type =3D "flat_dt"; > - arch =3D "arm"; > - compression =3D "none"; > - hash@1 { > - algo =3D "sha256"; > - }; > - }; > - }; > - configurations { > - default =3D "conf@bcm7445"; > - conf@bcm7445 { > - description =3D "BCM7445 configuration"; > - kernel =3D "kernel@1"; > - ramdisk =3D "ramdisk@1"; > - fdt =3D "fdt@1"; > - }; > - }; > -}; > diff --git a/doc/board/broadcom/bcm7xxx.rst b/doc/board/broadcom/bcm7xxx= .rst > new file mode 100644 > index 0000000000..6231431a67 > --- /dev/null > +++ b/doc/board/broadcom/bcm7xxx.rst > @@ -0,0 +1,186 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > +.. Copyright (C) 2018, 2023 Thomas Fitzsimmons > + > +BCM7445 and BCM7260 > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +About this > +---------- Can we leave this as 'Summary'? Or better drop the heading as it is expected that an introduction follows. Acked-by: Heinrich Schuchardt > + > +This document describes how to use U-Boot on the Broadcom 7445 and > +Broadcom 7260 SoC, as a third stage bootloader loaded by Broadcom's > +BOLT bootloader. > + > +BOLT loads U-Boot as a generic ELF binary. Some U-Boot features such > +as networking are not implemented but other important features are, > +including: > + > +* ext4 file system traversal > +* support for loading FIT images > +* advanced scripting > +* support for FIT-provided DTBs instead of relying on the BOLT-provided= DTB > + > +A customized version of this port has been used in production. The > +same approach may work on other BCM7xxx boards, with some > +configuration adjustments and memory layout experimentation. > + > +Configure > +--------- > + > +BCM7445 > +^^^^^^^ > + > +.. code-block:: console > + > + $ make bcm7445_defconfig > + > +BCM7260 > +^^^^^^^ > + > +.. code-block:: console > + > + $ make bcm7260_defconfig > + > +Build > +----- > + > +.. code-block:: console > + > + $ make > + $ ${CROSS_COMPILE}strip u-boot > + > +Run > +--- > + > +To tell U-Boot which serial port to use for its console, set the > +``stdout-path`` property in the ``/chosen`` node of the BOLT-generated > +device tree. For example: > + > +:: > + > + BOLT> dt add prop chosen stdout-path s serial0:115200n8 > + > +Flash the ``u-boot`` binary into board storage, then invoke it from > +BOLT. For example: > + > +:: > + > + BOLT> boot -bsu -elf flash0.u-boot1 > + > +This port assumes that I-cache and D-cache are already enabled when > +U-Boot is entered. > + > +Flattened Image Tree Support > +---------------------------- > + > +What follows is an example FIT image source file. Build it with: > + > +.. code-block:: console > + > + $ mkimage -f image.its image.itb > + > +Booting the resulting ``image.itb`` was tested on BOLT v1.20, with the > +following kernels: > + > +* https://github.com/Broadcom/stblinux-3.14 > +* https://github.com/Broadcom/stblinux-4.1 > +* https://github.com/Broadcom/stblinux-4.9 > + > +and with a generic ARMv7 root file system. > + > +**image.its** > + > +:: > + > + /dts-v1/; > + / { > + description =3D "BCM7445 FIT"; > + images { > + kernel@1 { > + description =3D "Linux kernel"; > + /* > + * This kernel image output format can be > + * generated with: > + * > + * make vmlinux > + * ${CROSS_COMPILE}objcopy -O binary -S vmlinux vmlinux.bin > + * gzip -9 vmlinux.bin > + * > + * For stblinux-3.14, the specific Broadcom > + * board type should be configured in the > + * kernel, for example CONFIG_BCM7445D0=3Dy. > + */ > + data =3D /incbin/(""); > + type =3D "kernel"; > + arch =3D "arm"; > + os =3D "linux"; > + compression =3D "gzip"; > + load =3D <0x8000>; > + entry =3D <0x8000>; > + hash@1 { > + algo =3D "sha256"; > + }; > + }; > + ramdisk@1 { > + description =3D "Initramfs root file system"; > + data =3D /incbin/(""); > + type =3D "ramdisk"; > + arch =3D "arm"; > + os =3D "linux"; > + compression =3D "gzip"; > + /* > + * Set the environment variable initrd_high to > + * 0xffffffff, and set "load" and "entry" here > + * to 0x0 to keep initramfs in-place and to > + * accommodate stblinux bmem/CMA reservations. > + */ > + load =3D <0x0>; > + entry =3D <0x0>; > + hash@1 { > + algo =3D "sha256"; > + }; > + }; > + fdt@1 { > + description =3D "Device tree dumped from BOLT"; > + /* > + * This DTB should be similar to the > + * BOLT-generated device tree, after BOLT has > + * done its runtime modifications to it. For > + * example, it can be dumped from within > + * U-Boot (at ${fdtcontroladdr}), after BOLT > + * has loaded U-Boot. The result can be added > + * to the Linux source tree as a .dts file. > + * > + * To support modifications to the device tree > + * in-place in U-Boot, add to Linux's > + * arch/arm/boot/dts/Makefile: > + * > + * DTC_FLAGS ?=3D -p 4096 > + * > + * This will leave some padding in the DTB and > + * thus reserve room for node additions. > + * > + * Also, set the environment variable fdt_high > + * to 0xffffffff to keep the DTB in-place and > + * to accommodate stblinux bmem/CMA > + * reservations. > + */ > + data =3D /incbin/(".dtb"); > + type =3D "flat_dt"; > + arch =3D "arm"; > + compression =3D "none"; > + hash@1 { > + algo =3D "sha256"; > + }; > + }; > + }; > + configurations { > + default =3D "conf@bcm7445"; > + conf@bcm7445 { > + description =3D "BCM7445 configuration"; > + kernel =3D "kernel@1"; > + ramdisk =3D "ramdisk@1"; > + fdt =3D "fdt@1"; > + }; > + }; > + }; > diff --git a/doc/board/broadcom/index.rst b/doc/board/broadcom/index.rst > index 4f0e825fef..a56bd1f069 100644 > --- a/doc/board/broadcom/index.rst > +++ b/doc/board/broadcom/index.rst > @@ -7,4 +7,5 @@ Broadcom > .. toctree:: > :maxdepth: 2 > > + bcm7xxx > raspberrypi