qemu-e2k/hw
Bin Meng 145b299139 hw/riscv: sifive_u: Add QSPI0 controller and connect a flash
This adds the QSPI0 controller to the SoC, and connects an ISSI
25WP256 flash to it. The generation of corresponding device tree
source fragment is also added.

Since the direct memory-mapped mode is not supported by the SiFive
SPI model, the <reg> property does not populate the second group
which represents the memory mapped address of the SPI flash.

With this commit, upstream U-Boot for the SiFive HiFive Unleashed
board can boot on QEMU 'sifive_u' out of the box. This allows users
to develop and test the recommended RISC-V boot flow with a real
world use case: ZSBL (in QEMU) loads U-Boot SPL from SPI flash to
L2LIM, then U-Boot SPL loads the payload from SPI flash that is
combined with OpenSBI fw_dynamic firmware and U-Boot proper.

Specify machine property `msel` to 6 to allow booting from the SPI
flash. U-Boot spl is directly loaded via `-bios`, and subsequent
payload is stored in the SPI flash image. Example command line:

$ qemu-system-riscv64 -nographic -M sifive_u,msel=6 -smp 5 -m 8G \
    -bios u-boot-spl.bin -drive file=spi-nor.img,if=mtd

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20210126060007.12904-5-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2021-03-04 09:43:29 -05:00
..
9pfs
acpi acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
adc
alpha
arm hw/arm: Add I2C sensors and EEPROM for GSJ machine 2021-02-16 13:50:38 +00:00
audio
avr
block hw/block: m25p80: Add various ISSI flash information 2021-03-04 09:43:29 -05:00
char
core acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
cpu
cris
display
dma
gpio
hppa
hyperv
i2c hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode 2021-02-16 14:12:54 +00:00
i386 i386/acpi: restore device paths for pre-5.1 vms 2021-03-02 05:40:35 -05:00
ide hw/ide/ahci: map cmd_fis as DMA_DIRECTION_TO_DEVICE 2021-02-15 15:10:14 +01:00
input
intc hw/intc/loongson_liointc: Fix per core ISR handling 2021-02-21 18:41:46 +01:00
ipack
ipmi
isa acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
lm32
m68k m68k: import bootinfo headers from linux 2021-02-11 21:56:42 +01:00
mem nvdimm: put it into the 'storage' category 2021-02-20 12:36:19 +01:00
microblaze
mips vt82c686: Move creation of ISA devices to the ISA bridge 2021-02-21 19:42:34 +01:00
misc hw/misc: sifive_u_otp: Use error_report() when block operation fails 2021-03-04 09:43:29 -05:00
moxie
net virtio-net: handle zero mac for a vdpa peer 2021-03-02 06:09:54 -05:00
nios2
nubus
nvram nvram: add nrf51_soc flash read method 2021-02-08 15:15:32 +01:00
openrisc
pci hw/pci: Have safer pcie_bus_realize() by checking error path 2021-03-02 09:16:18 -05:00
pci-bridge
pci-host acpi/gpex: Fix cca attribute check for pxb device 2021-02-23 10:06:55 -05:00
pcmcia
ppc hw/ppc: e500: Fill in correct <clock-frequency> for the serial nodes 2021-02-10 14:50:11 +11:00
rdma
remote multi-process: perform device reset in the remote process 2021-02-10 09:23:28 +00:00
riscv hw/riscv: sifive_u: Add QSPI0 controller and connect a flash 2021-03-04 09:43:29 -05:00
rtc
rx
s390x s390: Recognize confidential-guest-support option 2021-02-08 16:57:38 +11:00
scsi scsi: drop 'result' argument from command_complete callback 2021-02-25 14:14:32 +01:00
sd Pull request trivial patches 20210220 2021-02-21 12:12:18 +00:00
semihosting
sh4
smbios
sparc
sparc64
ssi hw/ssi: Add SiFive SPI controller support 2021-03-04 09:43:29 -05:00
timer arm: Update infocenter.arm.com URLs 2021-02-11 11:50:14 +00:00
tpm tpm: put some tpm devices into the correct category 2021-02-20 12:36:19 +01:00
tricore
unicore32
usb scsi: drop 'result' argument from command_complete callback 2021-02-25 14:14:32 +01:00
vfio vfio: add quirk device write method 2021-02-08 15:15:32 +01:00
virtio vhost: simplify vhost_dev_init() fail_busyloop label 2021-03-02 09:16:18 -05:00
watchdog
xen pci: add romsize property 2021-02-05 08:52:58 -05:00
xenpv
xtensa
Kconfig multi-process: Add config option for multi-process QEMU 2021-02-09 20:53:56 +00:00
meson.build multi-process: setup a machine object for remote device process 2021-02-10 09:23:28 +00:00