Hello Cédric, How stupid of me. I overlooked that the SPI is for the host flash device.
The remainder of the solution was clear and understood. Best regards and thanks for the quick response, Wim -----Original Message----- From: Cédric Le Goater [mailto:c...@kaod.org] Sent: Thursday, May 23, 2019 1:14 PM To: Wim Vervoorn <wvervo...@eltan.com>; qemu-devel@nongnu.org; qemu-...@nongnu.org; Joel Stanley <j...@jms.id.au>; Andrew Jeffery <and...@aj.id.au>; Peter Maydell <peter.mayd...@linaro.org> Subject: Re: aspeed qemu question On 5/23/19 12:05 PM, Wim Vervoorn wrote: > Hello Cédric, > > I have another question regarding the ASPEED Qemu support. This is regarding > the SPI support. > > I noticed that in general the fmc_model and the spi_model for the > flash device are different even though there is only one flash device > connected. The flash devices are created but not attached to a file backend unless you define it on the command line with -drive options : -drive file=$flashfile,format=raw,if=mtd The first mtd drive corresponds to the flash chip attached to the FMC controller (BMC Firmware), the second is the flash attached to the SPI1 controller (Host Firmware) > I would expect that in this case the models used would be identical. The flash device models are defined at the machine level in hw/arm/aspeed.c: }, { .name = MACHINE_TYPE_NAME("witherspoon-bmc"), .desc = "OpenPOWER Witherspoon BMC (ARM1176)", .soc_name = "ast2500-a1", .hw_strap1 = WITHERSPOON_BMC_HW_STRAP1, .fmc_model = "mx25l25635e", .spi_model = "mx66l1g45g", .num_cs = 2, .i2c_init = witherspoon_bmc_i2c_init, .ram = 512 * MiB, }, > Can you explain how this is works and how I select the correct model > for the fmc and for the spi controller. You need to define a new machine (board) if you want different flash models. C.