Merge remote-tracking branch 'qemu-project/master'
[qemu/ar7.git] / docs / system / arm / aspeed.rst
blobcd9559e3e2912bc68bfbe7b38909a30a6ac34bcf
1 Aspeed family boards (``*-bmc``, ``ast2500-evb``, ``ast2600-evb``, ``ast2700-evb``)
2 ===================================================================================
4 The QEMU Aspeed machines model BMCs of various OpenPOWER systems and
5 Aspeed evaluation boards. They are based on different releases of the
6 Aspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the
7 AST2500 with an ARM1176JZS CPU (800MHz), the AST2600
8 with dual cores ARM Cortex-A7 CPUs (1.2GHz) and more recently the AST2700
9 with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz)
11 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
12 etc.
14 AST2400 SoC based machines :
16 - ``palmetto-bmc``         OpenPOWER Palmetto POWER8 BMC
17 - ``quanta-q71l-bmc``      OpenBMC Quanta BMC
18 - ``supermicrox11-bmc``    Supermicro X11 BMC
20 AST2500 SoC based machines :
22 - ``ast2500-evb``          Aspeed AST2500 Evaluation board
23 - ``romulus-bmc``          OpenPOWER Romulus POWER9 BMC
24 - ``witherspoon-bmc``      OpenPOWER Witherspoon POWER9 BMC
25 - ``sonorapass-bmc``       OCP SonoraPass BMC
26 - ``fp5280g2-bmc``         Inspur FP5280G2 BMC
27 - ``g220a-bmc``            Bytedance G220A BMC
28 - ``yosemitev2-bmc``       Facebook YosemiteV2 BMC
29 - ``tiogapass-bmc``        Facebook Tiogapass BMC
31 AST2600 SoC based machines :
33 - ``ast2600-evb``          Aspeed AST2600 Evaluation board (Cortex-A7)
34 - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
35 - ``rainier-bmc``          IBM Rainier POWER10 BMC
36 - ``fuji-bmc``             Facebook Fuji BMC
37 - ``bletchley-bmc``        Facebook Bletchley BMC
38 - ``fby35-bmc``            Facebook fby35 BMC
39 - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
40 - ``qcom-firework-bmc``    Qualcomm Firework BMC
42 AST2700 SoC based machines :
44 - ``ast2700-evb``          Aspeed AST2700 Evaluation board (Cortex-A35)
46 Supported devices
47 -----------------
49  * SMP (for the AST2600 Cortex-A7)
50  * Interrupt Controller (VIC)
51  * Timer Controller
52  * RTC Controller
53  * I2C Controller, including the new register interface of the AST2600
54  * System Control Unit (SCU)
55  * SRAM mapping
56  * X-DMA Controller (basic interface)
57  * Static Memory Controller (SMC or FMC) - Only SPI Flash support
58  * SPI Memory Controller
59  * USB 2.0 Controller
60  * SD/MMC storage controllers
61  * SDRAM controller (dummy interface for basic settings and training)
62  * Watchdog Controller
63  * GPIO Controller (Master only)
64  * UART
65  * Ethernet controllers
66  * Front LEDs (PCA9552 on I2C bus)
67  * LPC Peripheral Controller (a subset of subdevices are supported)
68  * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
69  * ADC
70  * Secure Boot Controller (AST2600)
71  * eMMC Boot Controller (dummy)
72  * PECI Controller (minimal)
73  * I3C Controller
74  * Internal Bridge Controller (SLI dummy)
77 Missing devices
78 ---------------
80  * Coprocessor support
81  * PWM and Fan Controller
82  * Slave GPIO Controller
83  * Super I/O Controller
84  * PCI-Express 1 Controller
85  * Graphic Display Controller
86  * MCTP Controller
87  * Mailbox Controller
88  * Virtual UART
89  * eSPI Controller
91 Boot options
92 ------------
94 The Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options
95 to load a Linux kernel or from a firmware. Images can be downloaded from the
96 OpenBMC jenkins :
98    https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/
100 or directly from the OpenBMC GitHub release repository :
102    https://github.com/openbmc/openbmc/releases
104 or directly from the ASPEED Forked OpenBMC GitHub release repository :
106    https://github.com/AspeedTech-BMC/openbmc/releases
108 To boot a kernel directly from a Linux build tree:
110 .. code-block:: bash
112   $ qemu-system-arm -M ast2600-evb -nographic \
113         -kernel arch/arm/boot/zImage \
114         -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
115         -initrd rootfs.cpio
117 To boot the machine from the flash image, use an MTD drive :
119 .. code-block:: bash
121   $ qemu-system-arm -M romulus-bmc -nic user \
122         -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd -nographic
124 Options specific to Aspeed machines are :
126  * ``execute-in-place`` which emulates the boot from the CE0 flash
127    device by using the FMC controller to load the instructions, and
128    not simply from RAM. This takes a little longer.
130  * ``fmc-model`` to change the default FMC Flash model. FW needs
131    support for the chip model to boot.
133  * ``spi-model`` to change the default SPI Flash model.
135  * ``bmc-console`` to change the default console device. Most of the
136    machines use the ``UART5`` device for a boot console, which is
137    mapped on ``/dev/ttyS4`` under Linux, but it is not always the
138    case.
140 To use other flash models, for instance a different FMC chip and a
141 bigger (64M) SPI for the ``ast2500-evb`` machine, run :
143 .. code-block:: bash
145   -M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f
147 When more flexibility is needed to define the flash devices, to use
148 different flash models or define all flash devices (up to 8), the
149 ``-nodefaults`` QEMU option can be used to avoid creating the default
150 flash devices.
152 Flash devices should then be created from the command line and attached
153 to a block device :
155 .. code-block:: bash
157   $ qemu-system-arm -M ast2600-evb \
158         -blockdev node-name=fmc0,driver=file,filename=/path/to/fmc0.img \
159         -device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \
160         -blockdev node-name=fmc1,driver=file,filename=/path/to/fmc1.img \
161         -device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \
162         -blockdev node-name=spi1,driver=file,filename=/path/to/spi1.img \
163         -device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \
164         -nographic -nodefaults
166 In that case, the machine boots fetching instructions from the FMC0
167 device. It is slower to start but closer to what HW does. Using the
168 machine option ``execute-in-place`` has a similar effect.
170 To change the boot console and use device ``UART3`` (``/dev/ttyS2``
171 under Linux), use :
173 .. code-block:: bash
175   -M ast2500-evb,bmc-console=uart3
178 Boot the AST2700 machine from the flash image, use an MTD drive :
180 .. code-block:: bash
182   IMGDIR=ast2700-default
183   UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin)
185   $ qemu-system-aarch64 -M ast2700-evb \
186        -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \
187        -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \
188        -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \
189        -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/optee/tee-raw.bin \
190        -device loader,cpu-num=0,addr=0x430000000 \
191        -device loader,cpu-num=1,addr=0x430000000 \
192        -device loader,cpu-num=2,addr=0x430000000 \
193        -device loader,cpu-num=3,addr=0x430000000 \
194        -smp 4 \
195        -drive file=${IMGDIR}/image-bmc,format=raw,if=mtd \
196        -nographic
198 Aspeed minibmc family boards (``ast1030-evb``)
199 ==================================================================
201 The QEMU Aspeed machines model mini BMCs of various Aspeed evaluation
202 boards. They are based on different releases of the
203 Aspeed SoC : the AST1030 integrating an ARM Cortex M4F CPU (200MHz).
205 The SoC comes with SRAM, SPI, I2C, etc.
207 AST1030 SoC based machines :
209 - ``ast1030-evb``          Aspeed AST1030 Evaluation board (Cortex-M4F)
211 Supported devices
212 -----------------
214  * SMP (for the AST1030 Cortex-M4F)
215  * Interrupt Controller (VIC)
216  * Timer Controller
217  * I2C Controller
218  * System Control Unit (SCU)
219  * SRAM mapping
220  * Static Memory Controller (SMC or FMC) - Only SPI Flash support
221  * SPI Memory Controller
222  * USB 2.0 Controller
223  * Watchdog Controller
224  * GPIO Controller (Master only)
225  * UART
226  * LPC Peripheral Controller (a subset of subdevices are supported)
227  * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
228  * ADC
229  * Secure Boot Controller
230  * PECI Controller (minimal)
233 Missing devices
234 ---------------
236  * PWM and Fan Controller
237  * Slave GPIO Controller
238  * Mailbox Controller
239  * Virtual UART
240  * eSPI Controller
241  * I3C Controller
243 Boot options
244 ------------
246 The Aspeed machines can be started using the ``-kernel`` to load a
247 Zephyr OS or from a firmware. Images can be downloaded from the
248 ASPEED GitHub release repository :
250    https://github.com/AspeedTech-BMC/zephyr/releases
252 To boot a kernel directly from a Zephyr build tree:
254 .. code-block:: bash
256   $ qemu-system-arm -M ast1030-evb -nographic \
257         -kernel zephyr.elf
259 Facebook Yosemite v3.5 Platform and CraterLake Server (``fby35``)
260 ==================================================================
262 Facebook has a series of multi-node compute server designs named
263 Yosemite. The most recent version released was
264 `Yosemite v3 <https://www.opencompute.org/documents/ocp-yosemite-v3-platform-design-specification-1v16-pdf>`__.
266 Yosemite v3.5 is an iteration on this design, and is very similar: there's a
267 baseboard with a BMC, and 4 server slots. The new server board design termed
268 "CraterLake" includes a Bridge IC (BIC), with room for expansion boards to
269 include various compute accelerators (video, inferencing, etc). At the moment,
270 only the first server slot's BIC is included.
272 Yosemite v3.5 is itself a sled which fits into a 40U chassis, and 3 sleds
273 can be fit into a chassis. See `here <https://www.opencompute.org/products/423/wiwynn-yosemite-v3-server>`__
274 for an example.
276 In this generation, the BMC is an AST2600 and each BIC is an AST1030. The BMC
277 runs `OpenBMC <https://github.com/facebook/openbmc>`__, and the BIC runs
278 `OpenBIC <https://github.com/facebook/openbic>`__.
280 Firmware images can be retrieved from the Github releases or built from the
281 source code, see the README's for instructions on that. This image uses the
282 "fby35" machine recipe from OpenBMC, and the "yv35-cl" target from OpenBIC.
283 Some reference images can also be found here:
285 .. code-block:: bash
287     $ wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd
288     $ wget https://github.com/peterdelevoryas/OpenBIC/releases/download/oby35-cl-2022.13.01/Y35BCL.elf
290 Since this machine has multiple SoC's, each with their own serial console, the
291 recommended way to run it is to allocate a pseudoterminal for each serial
292 console and let the monitor use stdio. Also, starting in a paused state is
293 useful because it allows you to attach to the pseudoterminals before the boot
294 process starts.
296 .. code-block:: bash
298     $ qemu-system-arm -machine fby35 \
299         -drive file=fby35.mtd,format=raw,if=mtd \
300         -device loader,file=Y35BCL.elf,addr=0,cpu-num=2 \
301         -serial pty -serial pty -serial mon:stdio \
302         -display none -S
303     $ screen /dev/tty0 # In a separate TMUX pane, terminal window, etc.
304     $ screen /dev/tty1
305     $ (qemu) c             # Start the boot process once screen is setup.