Merge tag 'i2c-updates-for-v2023.04' of https://source.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / doc / README.bcm7xxx
1 Summary
2 =======
3
4 This document describes how to use U-Boot on the Broadcom 7445 SoC, as
5 a third stage bootloader loaded by Broadcom's BOLT bootloader.
6
7 BOLT loads U-Boot as a generic ELF binary.  Some U-Boot features such
8 as networking are not yet available but other important features are,
9 including:
10
11    - ext4 file system traversal
12
13    - support for loading FIT images
14
15    - advanced scripting
16
17    - support for FIT-provided DTBs instead of relying on the
18      BOLT-provided DTB
19
20 A customized version of this port has been used in production.  The
21 same approach may work on other BCM7xxx boards, with some
22 configuration adjustments and memory layout experimentation.
23
24 Build
25 =====
26
27 make bcm7445_defconfig
28 make
29 ${CROSS_COMPILE}strip u-boot
30
31 Run
32 ===
33
34 To tell U-Boot which serial port to use for its console, set the
35 "stdout-path" property in the "/chosen" node of the BOLT-generated
36 device tree.  For example:
37
38 BOLT> dt add prop chosen stdout-path s serial0:115200n8
39
40 Flash the u-boot binary into board storage, then invoke it from BOLT.
41 For example:
42
43 BOLT> boot -bsu -elf flash0.u-boot1
44
45 This port assumes that I-cache and D-cache are already enabled when
46 U-Boot is entered.
47
48 Flattened Image Tree Support
49 ============================
50
51 What follows is an example FIT image source file.  Build it with:
52
53 mkimage -f image.its image.itb
54
55 Booting the resulting image.itb was tested on BOLT v1.20, with the
56 following kernels:
57
58 https://github.com/Broadcom/stblinux-3.14
59 https://github.com/Broadcom/stblinux-4.1
60 https://github.com/Broadcom/stblinux-4.9
61
62 and with a generic ARMv7 root file system.
63
64 image.its:
65 /dts-v1/;
66 / {
67         description = "BCM7445 FIT";
68         images {
69                 kernel@1 {
70                         description = "Linux kernel";
71                         /*
72                          * This kernel image output format can be
73                          * generated with:
74                          *
75                          * make vmlinux
76                          * ${CROSS_COMPILE}objcopy -O binary -S vmlinux vmlinux.bin
77                          * gzip -9 vmlinux.bin
78                          *
79                          * For stblinux-3.14, the specific Broadcom
80                          * board type should be configured in the
81                          * kernel, for example CONFIG_BCM7445D0=y.
82                          */
83                         data = /incbin/("<vmlinux.bin.gz>");
84                         type = "kernel";
85                         arch = "arm";
86                         os = "linux";
87                         compression = "gzip";
88                         load = <0x8000>;
89                         entry = <0x8000>;
90                         hash@1 {
91                                 algo = "sha256";
92                         };
93                 };
94                 ramdisk@1 {
95                         description = "Initramfs root file system";
96                         data = /incbin/("<initramfs.cpio.gz>");
97                         type = "ramdisk";
98                         arch = "arm";
99                         os = "linux";
100                         compression = "gzip";
101                         /*
102                          * Set the environment variable initrd_high to
103                          * 0xffffffff, and set "load" and "entry" here
104                          * to 0x0 to keep initramfs in-place and to
105                          * accommodate stblinux bmem/CMA reservations.
106                          */
107                         load = <0x0>;
108                         entry = <0x0>;
109                         hash@1 {
110                                 algo = "sha256";
111                         };
112                 };
113                 fdt@1 {
114                         description = "Device tree dumped from BOLT";
115                         /*
116                          * This DTB should be similar to the
117                          * BOLT-generated device tree, after BOLT has
118                          * done its runtime modifications to it.  For
119                          * example, it can be dumped from within
120                          * U-Boot (at ${fdtcontroladdr}), after BOLT
121                          * has loaded U-Boot.  The result can be added
122                          * to the Linux source tree as a .dts file.
123                          *
124                          * To support modifications to the device tree
125                          * in-place in U-Boot, add to Linux's
126                          * arch/arm/boot/dts/Makefile:
127                          *
128                          * DTC_FLAGS ?= -p 4096
129                          *
130                          * This will leave some padding in the DTB and
131                          * thus reserve room for node additions.
132                          *
133                          * Also, set the environment variable fdt_high
134                          * to 0xffffffff to keep the DTB in-place and
135                          * to accommodate stblinux bmem/CMA
136                          * reservations.
137                          */
138                         data = /incbin/("<bolt-<version>.dtb");
139                         type = "flat_dt";
140                         arch = "arm";
141                         compression = "none";
142                         hash@1 {
143                                 algo = "sha256";
144                         };
145                 };
146         };
147         configurations {
148                 default = "conf@bcm7445";
149                 conf@bcm7445 {
150                         description = "BCM7445 configuration";
151                         kernel = "kernel@1";
152                         ramdisk = "ramdisk@1";
153                         fdt = "fdt@1";
154                 };
155         };
156 };