aspeed: Create flash devices only when defaults are enabled
[qemu/kevin.git] / docs / system / arm / aspeed.rst
blobb2dea54eedad3a16ba32974ef0ad4c0d916d53bb
1 Aspeed family boards (``*-bmc``, ``ast2500-evb``, ``ast2600-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) and more recently the AST2600
8 with dual cores ARM Cortex-A7 CPUs (1.2GHz).
10 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
11 etc.
13 AST2400 SoC based machines :
15 - ``palmetto-bmc``         OpenPOWER Palmetto POWER8 BMC
16 - ``quanta-q71l-bmc``      OpenBMC Quanta BMC
17 - ``supermicrox11-bmc``    Supermicro X11 BMC
19 AST2500 SoC based machines :
21 - ``ast2500-evb``          Aspeed AST2500 Evaluation board
22 - ``romulus-bmc``          OpenPOWER Romulus POWER9 BMC
23 - ``witherspoon-bmc``      OpenPOWER Witherspoon POWER9 BMC
24 - ``sonorapass-bmc``       OCP SonoraPass BMC
25 - ``fp5280g2-bmc``         Inspur FP5280G2 BMC
26 - ``g220a-bmc``            Bytedance G220A BMC
27 - ``yosemitev2-bmc``       Facebook YosemiteV2 BMC
28 - ``tiogapass-bmc``        Facebook Tiogapass BMC
30 AST2600 SoC based machines :
32 - ``ast2600-evb``          Aspeed AST2600 Evaluation board (Cortex-A7)
33 - ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
34 - ``rainier-bmc``          IBM Rainier POWER10 BMC
35 - ``fuji-bmc``             Facebook Fuji BMC
36 - ``bletchley-bmc``        Facebook Bletchley BMC
37 - ``fby35-bmc``            Facebook fby35 BMC
38 - ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
39 - ``qcom-firework-bmc``    Qualcomm Firework BMC
41 Supported devices
42 -----------------
44  * SMP (for the AST2600 Cortex-A7)
45  * Interrupt Controller (VIC)
46  * Timer Controller
47  * RTC Controller
48  * I2C Controller, including the new register interface of the AST2600
49  * System Control Unit (SCU)
50  * SRAM mapping
51  * X-DMA Controller (basic interface)
52  * Static Memory Controller (SMC or FMC) - Only SPI Flash support
53  * SPI Memory Controller
54  * USB 2.0 Controller
55  * SD/MMC storage controllers
56  * SDRAM controller (dummy interface for basic settings and training)
57  * Watchdog Controller
58  * GPIO Controller (Master only)
59  * UART
60  * Ethernet controllers
61  * Front LEDs (PCA9552 on I2C bus)
62  * LPC Peripheral Controller (a subset of subdevices are supported)
63  * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
64  * ADC
65  * Secure Boot Controller (AST2600)
66  * eMMC Boot Controller (dummy)
67  * PECI Controller (minimal)
68  * I3C Controller
71 Missing devices
72 ---------------
74  * Coprocessor support
75  * PWM and Fan Controller
76  * Slave GPIO Controller
77  * Super I/O Controller
78  * PCI-Express 1 Controller
79  * Graphic Display Controller
80  * MCTP Controller
81  * Mailbox Controller
82  * Virtual UART
83  * eSPI Controller
85 Boot options
86 ------------
88 The Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options
89 to load a Linux kernel or from a firmware. Images can be downloaded from the
90 OpenBMC jenkins :
92    https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/
94 or directly from the OpenBMC GitHub release repository :
96    https://github.com/openbmc/openbmc/releases
98 To boot a kernel directly from a Linux build tree:
100 .. code-block:: bash
102   $ qemu-system-arm -M ast2600-evb -nographic \
103         -kernel arch/arm/boot/zImage \
104         -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
105         -initrd rootfs.cpio
107 To boot the machine from the flash image, use an MTD drive :
109 .. code-block:: bash
111   $ qemu-system-arm -M romulus-bmc -nic user \
112         -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd -nographic
114 Options specific to Aspeed machines are :
116  * ``execute-in-place`` which emulates the boot from the CE0 flash
117    device by using the FMC controller to load the instructions, and
118    not simply from RAM. This takes a little longer.
120  * ``fmc-model`` to change the default FMC Flash model. FW needs
121    support for the chip model to boot.
123  * ``spi-model`` to change the default SPI Flash model.
125  * ``bmc-console`` to change the default console device. Most of the
126    machines use the ``UART5`` device for a boot console, which is
127    mapped on ``/dev/ttyS4`` under Linux, but it is not always the
128    case.
130 To use other flash models, for instance a different FMC chip and a
131 bigger (64M) SPI for the ``ast2500-evb`` machine, run :
133 .. code-block:: bash
135   -M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f
137 When more flexibility is needed to define the flash devices, to use
138 different flash models or define all flash devices (up to 8), the
139 ``-nodefaults`` QEMU option can be used to avoid creating the default
140 flash devices.
142 Flash devices should then be created from the command line and attached
143 to a block device :
145 .. code-block:: bash
147   $ qemu-system-arm -M ast2600-evb \
148         -blockdev node-name=fmc0,driver=file,filename=/path/to/fmc0.img \
149         -device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \
150         -blockdev node-name=fmc1,driver=file,filename=/path/to/fmc1.img \
151         -device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \
152         -blockdev node-name=spi1,driver=file,filename=/path/to/spi1.img \
153         -device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \
154         -nographic -nodefaults
156 In that case, the machine boots fetching instructions from the FMC0
157 device. It is slower to start but closer to what HW does. Using the
158 machine option ``execute-in-place`` has a similar effect.
160 To change the boot console and use device ``UART3`` (``/dev/ttyS2``
161 under Linux), use :
163 .. code-block:: bash
165   -M ast2500-evb,bmc-console=uart3
167 Aspeed minibmc family boards (``ast1030-evb``)
168 ==================================================================
170 The QEMU Aspeed machines model mini BMCs of various Aspeed evaluation
171 boards. They are based on different releases of the
172 Aspeed SoC : the AST1030 integrating an ARM Cortex M4F CPU (200MHz).
174 The SoC comes with SRAM, SPI, I2C, etc.
176 AST1030 SoC based machines :
178 - ``ast1030-evb``          Aspeed AST1030 Evaluation board (Cortex-M4F)
180 Supported devices
181 -----------------
183  * SMP (for the AST1030 Cortex-M4F)
184  * Interrupt Controller (VIC)
185  * Timer Controller
186  * I2C Controller
187  * System Control Unit (SCU)
188  * SRAM mapping
189  * Static Memory Controller (SMC or FMC) - Only SPI Flash support
190  * SPI Memory Controller
191  * USB 2.0 Controller
192  * Watchdog Controller
193  * GPIO Controller (Master only)
194  * UART
195  * LPC Peripheral Controller (a subset of subdevices are supported)
196  * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
197  * ADC
198  * Secure Boot Controller
199  * PECI Controller (minimal)
202 Missing devices
203 ---------------
205  * PWM and Fan Controller
206  * Slave GPIO Controller
207  * Mailbox Controller
208  * Virtual UART
209  * eSPI Controller
210  * I3C Controller
212 Boot options
213 ------------
215 The Aspeed machines can be started using the ``-kernel`` to load a
216 Zephyr OS or from a firmware. Images can be downloaded from the
217 ASPEED GitHub release repository :
219    https://github.com/AspeedTech-BMC/zephyr/releases
221 To boot a kernel directly from a Zephyr build tree:
223 .. code-block:: bash
225   $ qemu-system-arm -M ast1030-evb -nographic \
226         -kernel zephyr.elf
228 Facebook Yosemite v3.5 Platform and CraterLake Server (``fby35``)
229 ==================================================================
231 Facebook has a series of multi-node compute server designs named
232 Yosemite. The most recent version released was
233 `Yosemite v3 <https://www.opencompute.org/documents/ocp-yosemite-v3-platform-design-specification-1v16-pdf>`__.
235 Yosemite v3.5 is an iteration on this design, and is very similar: there's a
236 baseboard with a BMC, and 4 server slots. The new server board design termed
237 "CraterLake" includes a Bridge IC (BIC), with room for expansion boards to
238 include various compute accelerators (video, inferencing, etc). At the moment,
239 only the first server slot's BIC is included.
241 Yosemite v3.5 is itself a sled which fits into a 40U chassis, and 3 sleds
242 can be fit into a chassis. See `here <https://www.opencompute.org/products/423/wiwynn-yosemite-v3-server>`__
243 for an example.
245 In this generation, the BMC is an AST2600 and each BIC is an AST1030. The BMC
246 runs `OpenBMC <https://github.com/facebook/openbmc>`__, and the BIC runs
247 `OpenBIC <https://github.com/facebook/openbic>`__.
249 Firmware images can be retrieved from the Github releases or built from the
250 source code, see the README's for instructions on that. This image uses the
251 "fby35" machine recipe from OpenBMC, and the "yv35-cl" target from OpenBIC.
252 Some reference images can also be found here:
254 .. code-block:: bash
256     $ wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd
257     $ wget https://github.com/peterdelevoryas/OpenBIC/releases/download/oby35-cl-2022.13.01/Y35BCL.elf
259 Since this machine has multiple SoC's, each with their own serial console, the
260 recommended way to run it is to allocate a pseudoterminal for each serial
261 console and let the monitor use stdio. Also, starting in a paused state is
262 useful because it allows you to attach to the pseudoterminals before the boot
263 process starts.
265 .. code-block:: bash
267     $ qemu-system-arm -machine fby35 \
268         -drive file=fby35.mtd,format=raw,if=mtd \
269         -device loader,file=Y35BCL.elf,addr=0,cpu-num=2 \
270         -serial pty -serial pty -serial mon:stdio \
271         -display none -S
272     $ screen /dev/tty0 # In a separate TMUX pane, terminal window, etc.
273     $ screen /dev/tty1
274     $ (qemu) c             # Start the boot process once screen is setup.