xref: /qemu/docs/system/arm/aspeed.rst (revision b3e8223e48f4a8981232a17ebf48c198829ce191)
1*b3e8223eSJamin LinAspeed family boards (``*-bmc``, ``ast2500-evb``, ``ast2600-evb``, ``ast2700-evb``)
2*b3e8223eSJamin Lin===================================================================================
37a1e049aSCédric Le Goater
47a1e049aSCédric Le GoaterThe QEMU Aspeed machines model BMCs of various OpenPOWER systems and
57a1e049aSCédric Le GoaterAspeed evaluation boards. They are based on different releases of the
67a1e049aSCédric Le GoaterAspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the
7*b3e8223eSJamin LinAST2500 with an ARM1176JZS CPU (800MHz), the AST2600
8*b3e8223eSJamin Linwith dual cores ARM Cortex-A7 CPUs (1.2GHz) and more recently the AST2700
9*b3e8223eSJamin Linwith quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz)
107a1e049aSCédric Le Goater
117a1e049aSCédric Le GoaterThe SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C,
127a1e049aSCédric Le Goateretc.
137a1e049aSCédric Le Goater
147a1e049aSCédric Le GoaterAST2400 SoC based machines :
157a1e049aSCédric Le Goater
167a1e049aSCédric Le Goater- ``palmetto-bmc``         OpenPOWER Palmetto POWER8 BMC
1771f5027fSPatrick Venture- ``quanta-q71l-bmc``      OpenBMC Quanta BMC
180b052414SJoel Stanley- ``supermicrox11-bmc``    Supermicro X11 BMC
197a1e049aSCédric Le Goater
207a1e049aSCédric Le GoaterAST2500 SoC based machines :
217a1e049aSCédric Le Goater
227a1e049aSCédric Le Goater- ``ast2500-evb``          Aspeed AST2500 Evaluation board
237a1e049aSCédric Le Goater- ``romulus-bmc``          OpenPOWER Romulus POWER9 BMC
247a1e049aSCédric Le Goater- ``witherspoon-bmc``      OpenPOWER Witherspoon POWER9 BMC
257a1e049aSCédric Le Goater- ``sonorapass-bmc``       OCP SonoraPass BMC
260b052414SJoel Stanley- ``fp5280g2-bmc``         Inspur FP5280G2 BMC
270b052414SJoel Stanley- ``g220a-bmc``            Bytedance G220A BMC
2834f73a81SKarthikeyan Pasupathi- ``yosemitev2-bmc``       Facebook YosemiteV2 BMC
296c323abaSKarthikeyan Pasupathi- ``tiogapass-bmc``        Facebook Tiogapass BMC
307a1e049aSCédric Le Goater
317a1e049aSCédric Le GoaterAST2600 SoC based machines :
327a1e049aSCédric Le Goater
33f548f201SPeter Maydell- ``ast2600-evb``          Aspeed AST2600 Evaluation board (Cortex-A7)
347a1e049aSCédric Le Goater- ``tacoma-bmc``           OpenPOWER Witherspoon POWER9 AST2600 BMC
350b052414SJoel Stanley- ``rainier-bmc``          IBM Rainier POWER10 BMC
360b052414SJoel Stanley- ``fuji-bmc``             Facebook Fuji BMC
371d6fb3d0SCédric Le Goater- ``bletchley-bmc``        Facebook Bletchley BMC
38264a360aSPeter Delevoryas- ``fby35-bmc``            Facebook fby35 BMC
391d6fb3d0SCédric Le Goater- ``qcom-dc-scm-v1-bmc``   Qualcomm DC-SCM V1 BMC
401d6fb3d0SCédric Le Goater- ``qcom-firework-bmc``    Qualcomm Firework BMC
417a1e049aSCédric Le Goater
42*b3e8223eSJamin LinAST2700 SoC based machines :
43*b3e8223eSJamin Lin
44*b3e8223eSJamin Lin- ``ast2700-evb``          Aspeed AST2700 Evaluation board (Cortex-A35)
45*b3e8223eSJamin Lin
467a1e049aSCédric Le GoaterSupported devices
477a1e049aSCédric Le Goater-----------------
487a1e049aSCédric Le Goater
497a1e049aSCédric Le Goater * SMP (for the AST2600 Cortex-A7)
507a1e049aSCédric Le Goater * Interrupt Controller (VIC)
517a1e049aSCédric Le Goater * Timer Controller
527a1e049aSCédric Le Goater * RTC Controller
531d6fb3d0SCédric Le Goater * I2C Controller, including the new register interface of the AST2600
547a1e049aSCédric Le Goater * System Control Unit (SCU)
557a1e049aSCédric Le Goater * SRAM mapping
567a1e049aSCédric Le Goater * X-DMA Controller (basic interface)
577a1e049aSCédric Le Goater * Static Memory Controller (SMC or FMC) - Only SPI Flash support
587a1e049aSCédric Le Goater * SPI Memory Controller
597a1e049aSCédric Le Goater * USB 2.0 Controller
607a1e049aSCédric Le Goater * SD/MMC storage controllers
617a1e049aSCédric Le Goater * SDRAM controller (dummy interface for basic settings and training)
627a1e049aSCédric Le Goater * Watchdog Controller
637a1e049aSCédric Le Goater * GPIO Controller (Master only)
647a1e049aSCédric Le Goater * UART
657a1e049aSCédric Le Goater * Ethernet controllers
6612bff81bSPhilippe Mathieu-Daudé * Front LEDs (PCA9552 on I2C bus)
672ecf1726SCédric Le Goater * LPC Peripheral Controller (a subset of subdevices are supported)
68c5475b3fSJoel Stanley * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
69b662fac6SJoel Stanley * ADC
701d6fb3d0SCédric Le Goater * Secure Boot Controller (AST2600)
711d6fb3d0SCédric Le Goater * eMMC Boot Controller (dummy)
721d6fb3d0SCédric Le Goater * PECI Controller (minimal)
731d6fb3d0SCédric Le Goater * I3C Controller
74*b3e8223eSJamin Lin * Internal Bridge Controller (SLI dummy)
757a1e049aSCédric Le Goater
767a1e049aSCédric Le Goater
777a1e049aSCédric Le GoaterMissing devices
787a1e049aSCédric Le Goater---------------
797a1e049aSCédric Le Goater
807a1e049aSCédric Le Goater * Coprocessor support
817a1e049aSCédric Le Goater * PWM and Fan Controller
827a1e049aSCédric Le Goater * Slave GPIO Controller
837a1e049aSCédric Le Goater * Super I/O Controller
847a1e049aSCédric Le Goater * PCI-Express 1 Controller
857a1e049aSCédric Le Goater * Graphic Display Controller
867a1e049aSCédric Le Goater * MCTP Controller
877a1e049aSCédric Le Goater * Mailbox Controller
887a1e049aSCédric Le Goater * Virtual UART
897a1e049aSCédric Le Goater * eSPI Controller
907a1e049aSCédric Le Goater
917a1e049aSCédric Le GoaterBoot options
927a1e049aSCédric Le Goater------------
937a1e049aSCédric Le Goater
949d5dcb85SJoel StanleyThe Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options
959d5dcb85SJoel Stanleyto load a Linux kernel or from a firmware. Images can be downloaded from the
969d5dcb85SJoel StanleyOpenBMC jenkins :
977a1e049aSCédric Le Goater
9838b1ed6cSJoel Stanley   https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/
99d029c729SCédric Le Goater
100d029c729SCédric Le Goateror directly from the OpenBMC GitHub release repository :
101d029c729SCédric Le Goater
102d029c729SCédric Le Goater   https://github.com/openbmc/openbmc/releases
1037a1e049aSCédric Le Goater
104*b3e8223eSJamin Linor directly from the ASPEED Forked OpenBMC GitHub release repository :
105*b3e8223eSJamin Lin
106*b3e8223eSJamin Lin   https://github.com/AspeedTech-BMC/openbmc/releases
107*b3e8223eSJamin Lin
1089d5dcb85SJoel StanleyTo boot a kernel directly from a Linux build tree:
1099d5dcb85SJoel Stanley
1109d5dcb85SJoel Stanley.. code-block:: bash
1119d5dcb85SJoel Stanley
1129d5dcb85SJoel Stanley  $ qemu-system-arm -M ast2600-evb -nographic \
1139d5dcb85SJoel Stanley        -kernel arch/arm/boot/zImage \
1149d5dcb85SJoel Stanley        -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
1159d5dcb85SJoel Stanley        -initrd rootfs.cpio
1169d5dcb85SJoel Stanley
117c7e313aeSCédric Le GoaterTo boot the machine from the flash image, use an MTD drive :
1187a1e049aSCédric Le Goater
1197a1e049aSCédric Le Goater.. code-block:: bash
1207a1e049aSCédric Le Goater
1217a1e049aSCédric Le Goater  $ qemu-system-arm -M romulus-bmc -nic user \
122d029c729SCédric Le Goater	-drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd -nographic
1239820e52fSCédric Le Goater
1249820e52fSCédric Le GoaterOptions specific to Aspeed machines are :
1259820e52fSCédric Le Goater
1269820e52fSCédric Le Goater * ``execute-in-place`` which emulates the boot from the CE0 flash
1279820e52fSCédric Le Goater   device by using the FMC controller to load the instructions, and
1289820e52fSCédric Le Goater   not simply from RAM. This takes a little longer.
1299820e52fSCédric Le Goater
130c7e313aeSCédric Le Goater * ``fmc-model`` to change the default FMC Flash model. FW needs
131c7e313aeSCédric Le Goater   support for the chip model to boot.
1329820e52fSCédric Le Goater
133c7e313aeSCédric Le Goater * ``spi-model`` to change the default SPI Flash model.
1349820e52fSCédric Le Goater
135f65f6ad5SCédric Le Goater * ``bmc-console`` to change the default console device. Most of the
136f65f6ad5SCédric Le Goater   machines use the ``UART5`` device for a boot console, which is
137f65f6ad5SCédric Le Goater   mapped on ``/dev/ttyS4`` under Linux, but it is not always the
138f65f6ad5SCédric Le Goater   case.
139f65f6ad5SCédric Le Goater
140c7e313aeSCédric Le GoaterTo use other flash models, for instance a different FMC chip and a
141c7e313aeSCédric Le Goaterbigger (64M) SPI for the ``ast2500-evb`` machine, run :
1429820e52fSCédric Le Goater
1439820e52fSCédric Le Goater.. code-block:: bash
1449820e52fSCédric Le Goater
1459820e52fSCédric Le Goater  -M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f
1463d393bb7SJamin Lin
147c7e313aeSCédric Le GoaterWhen more flexibility is needed to define the flash devices, to use
148c7e313aeSCédric Le Goaterdifferent flash models or define all flash devices (up to 8), the
149c7e313aeSCédric Le Goater``-nodefaults`` QEMU option can be used to avoid creating the default
150c7e313aeSCédric Le Goaterflash devices.
151c7e313aeSCédric Le Goater
152c7e313aeSCédric Le GoaterFlash devices should then be created from the command line and attached
153c7e313aeSCédric Le Goaterto a block device :
154c7e313aeSCédric Le Goater
155c7e313aeSCédric Le Goater.. code-block:: bash
156c7e313aeSCédric Le Goater
157c7e313aeSCédric Le Goater  $ qemu-system-arm -M ast2600-evb \
158c7e313aeSCédric Le Goater        -blockdev node-name=fmc0,driver=file,filename=/path/to/fmc0.img \
159c7e313aeSCédric Le Goater	-device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \
160c7e313aeSCédric Le Goater	-blockdev node-name=fmc1,driver=file,filename=/path/to/fmc1.img \
161c7e313aeSCédric Le Goater	-device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \
162c7e313aeSCédric Le Goater	-blockdev node-name=spi1,driver=file,filename=/path/to/spi1.img \
163c7e313aeSCédric Le Goater	-device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \
164c7e313aeSCédric Le Goater	-nographic -nodefaults
165c7e313aeSCédric Le Goater
166c7e313aeSCédric Le GoaterIn that case, the machine boots fetching instructions from the FMC0
167c7e313aeSCédric Le Goaterdevice. It is slower to start but closer to what HW does. Using the
168c7e313aeSCédric Le Goatermachine option ``execute-in-place`` has a similar effect.
169c7e313aeSCédric Le Goater
170f65f6ad5SCédric Le GoaterTo change the boot console and use device ``UART3`` (``/dev/ttyS2``
171f65f6ad5SCédric Le Goaterunder Linux), use :
172f65f6ad5SCédric Le Goater
173f65f6ad5SCédric Le Goater.. code-block:: bash
174f65f6ad5SCédric Le Goater
175f65f6ad5SCédric Le Goater  -M ast2500-evb,bmc-console=uart3
1763d393bb7SJamin Lin
177*b3e8223eSJamin Lin
178*b3e8223eSJamin LinBoot the AST2700 machine from the flash image, use an MTD drive :
179*b3e8223eSJamin Lin
180*b3e8223eSJamin Lin.. code-block:: bash
181*b3e8223eSJamin Lin
182*b3e8223eSJamin Lin  IMGDIR=ast2700-default
183*b3e8223eSJamin Lin  UBOOT_SIZE=$(stat --format=%s -L ${IMGDIR}/u-boot-nodtb.bin)
184*b3e8223eSJamin Lin
185*b3e8223eSJamin Lin  $ qemu-system-aarch64 -M ast2700-evb \
186*b3e8223eSJamin Lin       -device loader,force-raw=on,addr=0x400000000,file=${IMGDIR}/u-boot-nodtb.bin \
187*b3e8223eSJamin Lin       -device loader,force-raw=on,addr=$((0x400000000 + ${UBOOT_SIZE})),file=${IMGDIR}/u-boot.dtb \
188*b3e8223eSJamin Lin       -device loader,force-raw=on,addr=0x430000000,file=${IMGDIR}/bl31.bin \
189*b3e8223eSJamin Lin       -device loader,force-raw=on,addr=0x430080000,file=${IMGDIR}/optee/tee-raw.bin \
190*b3e8223eSJamin Lin       -device loader,cpu-num=0,addr=0x430000000 \
191*b3e8223eSJamin Lin       -device loader,cpu-num=1,addr=0x430000000 \
192*b3e8223eSJamin Lin       -device loader,cpu-num=2,addr=0x430000000 \
193*b3e8223eSJamin Lin       -device loader,cpu-num=3,addr=0x430000000 \
194*b3e8223eSJamin Lin       -smp 4 \
195*b3e8223eSJamin Lin       -drive file=${IMGDIR}/image-bmc,format=raw,if=mtd \
196*b3e8223eSJamin Lin       -nographic
197*b3e8223eSJamin Lin
1983d393bb7SJamin LinAspeed minibmc family boards (``ast1030-evb``)
1993d393bb7SJamin Lin==================================================================
2003d393bb7SJamin Lin
2013d393bb7SJamin LinThe QEMU Aspeed machines model mini BMCs of various Aspeed evaluation
2023d393bb7SJamin Linboards. They are based on different releases of the
2033d393bb7SJamin LinAspeed SoC : the AST1030 integrating an ARM Cortex M4F CPU (200MHz).
2043d393bb7SJamin Lin
2053d393bb7SJamin LinThe SoC comes with SRAM, SPI, I2C, etc.
2063d393bb7SJamin Lin
2073d393bb7SJamin LinAST1030 SoC based machines :
2083d393bb7SJamin Lin
2093d393bb7SJamin Lin- ``ast1030-evb``          Aspeed AST1030 Evaluation board (Cortex-M4F)
2103d393bb7SJamin Lin
2113d393bb7SJamin LinSupported devices
2123d393bb7SJamin Lin-----------------
2133d393bb7SJamin Lin
2143d393bb7SJamin Lin * SMP (for the AST1030 Cortex-M4F)
2153d393bb7SJamin Lin * Interrupt Controller (VIC)
2163d393bb7SJamin Lin * Timer Controller
2173d393bb7SJamin Lin * I2C Controller
2183d393bb7SJamin Lin * System Control Unit (SCU)
2193d393bb7SJamin Lin * SRAM mapping
2203d393bb7SJamin Lin * Static Memory Controller (SMC or FMC) - Only SPI Flash support
2213d393bb7SJamin Lin * SPI Memory Controller
2223d393bb7SJamin Lin * USB 2.0 Controller
2233d393bb7SJamin Lin * Watchdog Controller
2243d393bb7SJamin Lin * GPIO Controller (Master only)
2253d393bb7SJamin Lin * UART
2263d393bb7SJamin Lin * LPC Peripheral Controller (a subset of subdevices are supported)
2273d393bb7SJamin Lin * Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
2283d393bb7SJamin Lin * ADC
2291d6fb3d0SCédric Le Goater * Secure Boot Controller
2301d6fb3d0SCédric Le Goater * PECI Controller (minimal)
2313d393bb7SJamin Lin
2323d393bb7SJamin Lin
2333d393bb7SJamin LinMissing devices
2343d393bb7SJamin Lin---------------
2353d393bb7SJamin Lin
2363d393bb7SJamin Lin * PWM and Fan Controller
2373d393bb7SJamin Lin * Slave GPIO Controller
2383d393bb7SJamin Lin * Mailbox Controller
2393d393bb7SJamin Lin * Virtual UART
2403d393bb7SJamin Lin * eSPI Controller
2413d393bb7SJamin Lin * I3C Controller
2423d393bb7SJamin Lin
2433d393bb7SJamin LinBoot options
2443d393bb7SJamin Lin------------
2453d393bb7SJamin Lin
2463d393bb7SJamin LinThe Aspeed machines can be started using the ``-kernel`` to load a
2473d393bb7SJamin LinZephyr OS or from a firmware. Images can be downloaded from the
2483d393bb7SJamin LinASPEED GitHub release repository :
2493d393bb7SJamin Lin
2503d393bb7SJamin Lin   https://github.com/AspeedTech-BMC/zephyr/releases
2513d393bb7SJamin Lin
2523d393bb7SJamin LinTo boot a kernel directly from a Zephyr build tree:
2533d393bb7SJamin Lin
2543d393bb7SJamin Lin.. code-block:: bash
2553d393bb7SJamin Lin
2563d393bb7SJamin Lin  $ qemu-system-arm -M ast1030-evb -nographic \
2573d393bb7SJamin Lin        -kernel zephyr.elf
25819d7c0d4SPeter Delevoryas
25919d7c0d4SPeter DelevoryasFacebook Yosemite v3.5 Platform and CraterLake Server (``fby35``)
26019d7c0d4SPeter Delevoryas==================================================================
26119d7c0d4SPeter Delevoryas
26219d7c0d4SPeter DelevoryasFacebook has a series of multi-node compute server designs named
26319d7c0d4SPeter DelevoryasYosemite. The most recent version released was
26419d7c0d4SPeter Delevoryas`Yosemite v3 <https://www.opencompute.org/documents/ocp-yosemite-v3-platform-design-specification-1v16-pdf>`__.
26519d7c0d4SPeter Delevoryas
26619d7c0d4SPeter DelevoryasYosemite v3.5 is an iteration on this design, and is very similar: there's a
26719d7c0d4SPeter Delevoryasbaseboard with a BMC, and 4 server slots. The new server board design termed
26819d7c0d4SPeter Delevoryas"CraterLake" includes a Bridge IC (BIC), with room for expansion boards to
26919d7c0d4SPeter Delevoryasinclude various compute accelerators (video, inferencing, etc). At the moment,
27019d7c0d4SPeter Delevoryasonly the first server slot's BIC is included.
27119d7c0d4SPeter Delevoryas
27219d7c0d4SPeter DelevoryasYosemite v3.5 is itself a sled which fits into a 40U chassis, and 3 sleds
27319d7c0d4SPeter Delevoryascan be fit into a chassis. See `here <https://www.opencompute.org/products/423/wiwynn-yosemite-v3-server>`__
27419d7c0d4SPeter Delevoryasfor an example.
27519d7c0d4SPeter Delevoryas
27619d7c0d4SPeter DelevoryasIn this generation, the BMC is an AST2600 and each BIC is an AST1030. The BMC
27719d7c0d4SPeter Delevoryasruns `OpenBMC <https://github.com/facebook/openbmc>`__, and the BIC runs
27819d7c0d4SPeter Delevoryas`OpenBIC <https://github.com/facebook/openbic>`__.
27919d7c0d4SPeter Delevoryas
28019d7c0d4SPeter DelevoryasFirmware images can be retrieved from the Github releases or built from the
28119d7c0d4SPeter Delevoryassource code, see the README's for instructions on that. This image uses the
28219d7c0d4SPeter Delevoryas"fby35" machine recipe from OpenBMC, and the "yv35-cl" target from OpenBIC.
28319d7c0d4SPeter DelevoryasSome reference images can also be found here:
28419d7c0d4SPeter Delevoryas
28519d7c0d4SPeter Delevoryas.. code-block:: bash
28619d7c0d4SPeter Delevoryas
28719d7c0d4SPeter Delevoryas    $ wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd
28819d7c0d4SPeter Delevoryas    $ wget https://github.com/peterdelevoryas/OpenBIC/releases/download/oby35-cl-2022.13.01/Y35BCL.elf
28919d7c0d4SPeter Delevoryas
29019d7c0d4SPeter DelevoryasSince this machine has multiple SoC's, each with their own serial console, the
29119d7c0d4SPeter Delevoryasrecommended way to run it is to allocate a pseudoterminal for each serial
29219d7c0d4SPeter Delevoryasconsole and let the monitor use stdio. Also, starting in a paused state is
29319d7c0d4SPeter Delevoryasuseful because it allows you to attach to the pseudoterminals before the boot
29419d7c0d4SPeter Delevoryasprocess starts.
29519d7c0d4SPeter Delevoryas
29619d7c0d4SPeter Delevoryas.. code-block:: bash
29719d7c0d4SPeter Delevoryas
29819d7c0d4SPeter Delevoryas    $ qemu-system-arm -machine fby35 \
29919d7c0d4SPeter Delevoryas        -drive file=fby35.mtd,format=raw,if=mtd \
30019d7c0d4SPeter Delevoryas        -device loader,file=Y35BCL.elf,addr=0,cpu-num=2 \
30119d7c0d4SPeter Delevoryas        -serial pty -serial pty -serial mon:stdio \
30219d7c0d4SPeter Delevoryas        -display none -S
30319d7c0d4SPeter Delevoryas    $ screen /dev/tty0 # In a separate TMUX pane, terminal window, etc.
30419d7c0d4SPeter Delevoryas    $ screen /dev/tty1
30519d7c0d4SPeter Delevoryas    $ (qemu) c		   # Start the boot process once screen is setup.
306