* [PATCH] arm: bcm7xxx: Convert to DM_SERIAL @ 2023-02-05 1:36 Thomas Fitzsimmons 2023-02-10 18:42 ` Tom Rini 0 siblings, 1 reply; 5+ messages in thread From: Thomas Fitzsimmons @ 2023-02-05 1:36 UTC (permalink / raw) To: u-boot Remove ns16550 configuration from header files. Document DM_SERIAL-required prior stage device tree configuration. --- configs/bcm7260_defconfig | 4 ++-- configs/bcm7445_defconfig | 4 ++-- doc/README.bcm7xxx | 6 ++++++ include/configs/bcm7260.h | 2 -- include/configs/bcm7445.h | 2 -- include/configs/bcmstb.h | 13 ------------- 6 files changed, 10 insertions(+), 21 deletions(-) diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig index f8e0327d8f..51e0a5ddd7 100644 --- a/configs/bcm7260_defconfig +++ b/configs/bcm7260_defconfig @@ -40,6 +40,6 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y CONFIG_MTD=y -CONFIG_SYS_NS16550_SERIAL=y -CONFIG_SYS_NS16550_REG_SIZE=-4 +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y # CONFIG_EFI_LOADER is not set diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig index 81433b02cb..f5f1e8d397 100644 --- a/configs/bcm7445_defconfig +++ b/configs/bcm7445_defconfig @@ -44,8 +44,8 @@ CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SYS_NS16550_SERIAL=y -CONFIG_SYS_NS16550_REG_SIZE=-4 +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_BCMSTB_SPI=y diff --git a/doc/README.bcm7xxx b/doc/README.bcm7xxx index 9b5eae4741..6839da5f97 100644 --- a/doc/README.bcm7xxx +++ b/doc/README.bcm7xxx @@ -31,6 +31,12 @@ ${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: diff --git a/include/configs/bcm7260.h b/include/configs/bcm7260.h index 43edc91b10..dbe545c175 100644 --- a/include/configs/bcm7260.h +++ b/include/configs/bcm7260.h @@ -10,8 +10,6 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CFG_SYS_NS16550_COM1 0xf040c000 - #define CFG_SYS_INIT_RAM_ADDR 0x10200000 #include "bcmstb.h" diff --git a/include/configs/bcm7445.h b/include/configs/bcm7445.h index 114337294e..b59048d175 100644 --- a/include/configs/bcm7445.h +++ b/include/configs/bcm7445.h @@ -10,8 +10,6 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CFG_SYS_NS16550_COM1 0xf040ab00 - #define CFG_SYS_INIT_RAM_ADDR 0x80200000 #include "bcmstb.h" diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h index d1de3561af..c9280927b3 100644 --- a/include/configs/bcmstb.h +++ b/include/configs/bcmstb.h @@ -92,19 +92,6 @@ extern phys_addr_t prior_stage_fdt_address; * Large kernel image bootm configuration. */ -/* - * NS16550 configuration. - */ -#define V_NS16550_CLK 81000000 - -#define CFG_SYS_NS16550_CLK V_NS16550_CLK - -/* - * Serial console configuration. - */ -#define CFG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, \ - 115200} - /* * Informational display configuration. */ -- 2.33.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm: bcm7xxx: Convert to DM_SERIAL 2023-02-05 1:36 [PATCH] arm: bcm7xxx: Convert to DM_SERIAL Thomas Fitzsimmons @ 2023-02-10 18:42 ` Tom Rini 2023-02-11 0:24 ` [PATCH] doc: board: bcm7xxx: Convert to reStructuredText format Thomas Fitzsimmons 0 siblings, 1 reply; 5+ messages in thread From: Tom Rini @ 2023-02-10 18:42 UTC (permalink / raw) To: Thomas Fitzsimmons; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 414 bytes --] On Sat, Feb 04, 2023 at 08:36:57PM -0500, Thomas Fitzsimmons wrote: > Remove ns16550 configuration from header files. Document > DM_SERIAL-required prior stage device tree configuration. As a follow-up, can you please migrate README.bcm7xxx to doc/board/broadcom/bcm7xxx.rst, or whatever you think makes the most sense for a name? That said, I've now applied this to u-boot/master, thanks! -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] doc: board: bcm7xxx: Convert to reStructuredText format 2023-02-10 18:42 ` Tom Rini @ 2023-02-11 0:24 ` Thomas Fitzsimmons 2023-02-13 7:49 ` Heinrich Schuchardt 0 siblings, 1 reply; 5+ messages in thread From: Thomas Fitzsimmons @ 2023-02-11 0:24 UTC (permalink / raw) To: u-boot 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 -======= - -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 -===== - -make bcm7445_defconfig -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: - -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 = "BCM7445 FIT"; - images { - kernel@1 { - description = "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=y. - */ - data = /incbin/("<vmlinux.bin.gz>"); - type = "kernel"; - arch = "arm"; - os = "linux"; - compression = "gzip"; - load = <0x8000>; - entry = <0x8000>; - hash@1 { - algo = "sha256"; - }; - }; - ramdisk@1 { - description = "Initramfs root file system"; - data = /incbin/("<initramfs.cpio.gz>"); - type = "ramdisk"; - arch = "arm"; - os = "linux"; - compression = "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 = <0x0>; - entry = <0x0>; - hash@1 { - algo = "sha256"; - }; - }; - fdt@1 { - description = "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 ?= -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 = /incbin/("<bolt-<version>.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha256"; - }; - }; - }; - configurations { - default = "conf@bcm7445"; - conf@bcm7445 { - description = "BCM7445 configuration"; - kernel = "kernel@1"; - ramdisk = "ramdisk@1"; - fdt = "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 <fitzsim@fitzsim.org> + +BCM7445 and BCM7260 +=================== + +About this +---------- + +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 = "BCM7445 FIT"; + images { + kernel@1 { + description = "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=y. + */ + data = /incbin/("<vmlinux.bin.gz>"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "gzip"; + load = <0x8000>; + entry = <0x8000>; + hash@1 { + algo = "sha256"; + }; + }; + ramdisk@1 { + description = "Initramfs root file system"; + data = /incbin/("<initramfs.cpio.gz>"); + type = "ramdisk"; + arch = "arm"; + os = "linux"; + compression = "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 = <0x0>; + entry = <0x0>; + hash@1 { + algo = "sha256"; + }; + }; + fdt@1 { + description = "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 ?= -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 = /incbin/("<bolt-<version>.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + hash@1 { + algo = "sha256"; + }; + }; + }; + configurations { + default = "conf@bcm7445"; + conf@bcm7445 { + description = "BCM7445 configuration"; + kernel = "kernel@1"; + ramdisk = "ramdisk@1"; + fdt = "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 -- 2.33.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] doc: board: bcm7xxx: Convert to reStructuredText format 2023-02-11 0:24 ` [PATCH] doc: board: bcm7xxx: Convert to reStructuredText format Thomas Fitzsimmons @ 2023-02-13 7:49 ` Heinrich Schuchardt 2023-02-13 16:21 ` [PATCH v2] " Thomas Fitzsimmons 0 siblings, 1 reply; 5+ messages in thread From: Heinrich Schuchardt @ 2023-02-13 7:49 UTC (permalink / raw) To: Thomas Fitzsimmons; +Cc: u-boot 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 > -======= > - > -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 > -===== > - > -make bcm7445_defconfig > -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: > - > -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 = "BCM7445 FIT"; > - images { > - kernel@1 { > - description = "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=y. > - */ > - data = /incbin/("<vmlinux.bin.gz>"); > - type = "kernel"; > - arch = "arm"; > - os = "linux"; > - compression = "gzip"; > - load = <0x8000>; > - entry = <0x8000>; > - hash@1 { > - algo = "sha256"; > - }; > - }; > - ramdisk@1 { > - description = "Initramfs root file system"; > - data = /incbin/("<initramfs.cpio.gz>"); > - type = "ramdisk"; > - arch = "arm"; > - os = "linux"; > - compression = "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 = <0x0>; > - entry = <0x0>; > - hash@1 { > - algo = "sha256"; > - }; > - }; > - fdt@1 { > - description = "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 ?= -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 = /incbin/("<bolt-<version>.dtb"); > - type = "flat_dt"; > - arch = "arm"; > - compression = "none"; > - hash@1 { > - algo = "sha256"; > - }; > - }; > - }; > - configurations { > - default = "conf@bcm7445"; > - conf@bcm7445 { > - description = "BCM7445 configuration"; > - kernel = "kernel@1"; > - ramdisk = "ramdisk@1"; > - fdt = "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 <fitzsim@fitzsim.org> > + > +BCM7445 and BCM7260 > +=================== > + > +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 <xypron.glpk@gmx.de> > + > +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 = "BCM7445 FIT"; > + images { > + kernel@1 { > + description = "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=y. > + */ > + data = /incbin/("<vmlinux.bin.gz>"); > + type = "kernel"; > + arch = "arm"; > + os = "linux"; > + compression = "gzip"; > + load = <0x8000>; > + entry = <0x8000>; > + hash@1 { > + algo = "sha256"; > + }; > + }; > + ramdisk@1 { > + description = "Initramfs root file system"; > + data = /incbin/("<initramfs.cpio.gz>"); > + type = "ramdisk"; > + arch = "arm"; > + os = "linux"; > + compression = "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 = <0x0>; > + entry = <0x0>; > + hash@1 { > + algo = "sha256"; > + }; > + }; > + fdt@1 { > + description = "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 ?= -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 = /incbin/("<bolt-<version>.dtb"); > + type = "flat_dt"; > + arch = "arm"; > + compression = "none"; > + hash@1 { > + algo = "sha256"; > + }; > + }; > + }; > + configurations { > + default = "conf@bcm7445"; > + conf@bcm7445 { > + description = "BCM7445 configuration"; > + kernel = "kernel@1"; > + ramdisk = "ramdisk@1"; > + fdt = "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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] doc: board: bcm7xxx: Convert to reStructuredText format 2023-02-13 7:49 ` Heinrich Schuchardt @ 2023-02-13 16:21 ` Thomas Fitzsimmons 0 siblings, 0 replies; 5+ messages in thread From: Thomas Fitzsimmons @ 2023-02-13 16:21 UTC (permalink / raw) To: u-boot Convert the documentation for the Broadcom BCM7445 and BCM7260 boards to reStructuredText format and add the new filename to doc/board/broadcom/index.rst. --- Changes in v2: - Remove "About this" heading doc/README.bcm7xxx | 156 ---------------------------- doc/board/broadcom/bcm7xxx.rst | 183 +++++++++++++++++++++++++++++++++ doc/board/broadcom/index.rst | 1 + 3 files changed, 184 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 -======= - -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 -===== - -make bcm7445_defconfig -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: - -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 = "BCM7445 FIT"; - images { - kernel@1 { - description = "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=y. - */ - data = /incbin/("<vmlinux.bin.gz>"); - type = "kernel"; - arch = "arm"; - os = "linux"; - compression = "gzip"; - load = <0x8000>; - entry = <0x8000>; - hash@1 { - algo = "sha256"; - }; - }; - ramdisk@1 { - description = "Initramfs root file system"; - data = /incbin/("<initramfs.cpio.gz>"); - type = "ramdisk"; - arch = "arm"; - os = "linux"; - compression = "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 = <0x0>; - entry = <0x0>; - hash@1 { - algo = "sha256"; - }; - }; - fdt@1 { - description = "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 ?= -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 = /incbin/("<bolt-<version>.dtb"); - type = "flat_dt"; - arch = "arm"; - compression = "none"; - hash@1 { - algo = "sha256"; - }; - }; - }; - configurations { - default = "conf@bcm7445"; - conf@bcm7445 { - description = "BCM7445 configuration"; - kernel = "kernel@1"; - ramdisk = "ramdisk@1"; - fdt = "fdt@1"; - }; - }; -}; diff --git a/doc/board/broadcom/bcm7xxx.rst b/doc/board/broadcom/bcm7xxx.rst new file mode 100644 index 0000000000..f1994d9f97 --- /dev/null +++ b/doc/board/broadcom/bcm7xxx.rst @@ -0,0 +1,183 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2018, 2023 Thomas Fitzsimmons <fitzsim@fitzsim.org> + +BCM7445 and BCM7260 +=================== + +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 = "BCM7445 FIT"; + images { + kernel@1 { + description = "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=y. + */ + data = /incbin/("<vmlinux.bin.gz>"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "gzip"; + load = <0x8000>; + entry = <0x8000>; + hash@1 { + algo = "sha256"; + }; + }; + ramdisk@1 { + description = "Initramfs root file system"; + data = /incbin/("<initramfs.cpio.gz>"); + type = "ramdisk"; + arch = "arm"; + os = "linux"; + compression = "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 = <0x0>; + entry = <0x0>; + hash@1 { + algo = "sha256"; + }; + }; + fdt@1 { + description = "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 ?= -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 = /incbin/("<bolt-<version>.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + hash@1 { + algo = "sha256"; + }; + }; + }; + configurations { + default = "conf@bcm7445"; + conf@bcm7445 { + description = "BCM7445 configuration"; + kernel = "kernel@1"; + ramdisk = "ramdisk@1"; + fdt = "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 -- 2.33.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-13 16:21 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-02-05 1:36 [PATCH] arm: bcm7xxx: Convert to DM_SERIAL Thomas Fitzsimmons 2023-02-10 18:42 ` Tom Rini 2023-02-11 0:24 ` [PATCH] doc: board: bcm7xxx: Convert to reStructuredText format Thomas Fitzsimmons 2023-02-13 7:49 ` Heinrich Schuchardt 2023-02-13 16:21 ` [PATCH v2] " Thomas Fitzsimmons
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox