[PATCH qemu 0/3] hw/arm: Add STM32L496G-DISCO QuadSPI support

~mohammadodeh posted 3 patches 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/179449578952.8382.2790865629085512841-0@git.sr.ht
Maintainers: Alexandre Iooss <erdnaxe@crans.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Mohammad Odeh <zephyr@exalt.ps>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Samuel Tardieu <sam@rfc1149.net>, Alistair Francis <alistair@alistair23.me>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
MAINTAINERS                          |   9 +
docs/system/arm/stm32.rst            |   1 +
docs/system/arm/stm32l496g-disco.rst |  43 ++
docs/system/target-arm.rst           |   1 +
hw/arm/Kconfig                       |   8 +
hw/arm/meson.build                   |   1 +
hw/arm/stm32l496g-disco.c            |  95 ++++
hw/arm/stm32l4x5_soc.c               |  42 +-
hw/block/m25p80.c                    |   5 +
hw/block/m25p80_sfdp.c               |  20 +
hw/block/m25p80_sfdp.h               |   1 +
hw/ssi/Kconfig                       |   4 +
hw/ssi/meson.build                   |   1 +
hw/ssi/stm32l4x5_quadspi.c           | 680 ++++++++++++++++++++++++++
include/hw/arm/stm32l4x5_soc.h       |   5 +
include/hw/ssi/stm32l4x5_quadspi.h   |  51 ++
tests/qtest/meson.build              |   1 +
tests/qtest/stm32l496g-disco-test.c  | 693 +++++++++++++++++++++++++++
18 files changed, 1657 insertions(+), 4 deletions(-)
create mode 100644 docs/system/arm/stm32l496g-disco.rst
create mode 100644 hw/arm/stm32l496g-disco.c
create mode 100644 hw/ssi/stm32l4x5_quadspi.c
create mode 100644 include/hw/ssi/stm32l4x5_quadspi.h
create mode 100644 tests/qtest/stm32l496g-disco-test.c
[PATCH qemu 0/3] hw/arm: Add STM32L496G-DISCO QuadSPI support
Posted by ~mohammadodeh 1 week, 3 days ago
Add initial QEMU support for the STM32L496G-DISCO Discovery kit and
its MX25R6435F QuadSPI flash.

The series adds the flash model, the shared STM32L4x5 QuadSPI
controller, and the STM32L496xG SoC and board definitions.

The controller supports indirect reads and writes with a 16-byte FIFO,
enable and abort handling, address bounds checks, undefined-length
transfers, partial register accesses, and migration state restoration.

The board qtest has 21 passing cases covering identification, SFDP,
program/read transfers, FIFO behavior, single/dual/quad read frames,
error handling, and migration.

Transfer timing, automatic polling, memory-mapped mode, DMA, DDR,
SIOO, and dual-flash operation are not implemented.

Mohammad Odeh (3):
  hw/block: Add Macronix MX25R6435F flash
  hw/ssi: Add STM32L4x5 QuadSPI controller
  hw/arm: Add STM32L496G-DISCO machine

 MAINTAINERS                          |   9 +
 docs/system/arm/stm32.rst            |   1 +
 docs/system/arm/stm32l496g-disco.rst |  43 ++
 docs/system/target-arm.rst           |   1 +
 hw/arm/Kconfig                       |   8 +
 hw/arm/meson.build                   |   1 +
 hw/arm/stm32l496g-disco.c            |  95 ++++
 hw/arm/stm32l4x5_soc.c               |  42 +-
 hw/block/m25p80.c                    |   5 +
 hw/block/m25p80_sfdp.c               |  20 +
 hw/block/m25p80_sfdp.h               |   1 +
 hw/ssi/Kconfig                       |   4 +
 hw/ssi/meson.build                   |   1 +
 hw/ssi/stm32l4x5_quadspi.c           | 680 ++++++++++++++++++++++++++
 include/hw/arm/stm32l4x5_soc.h       |   5 +
 include/hw/ssi/stm32l4x5_quadspi.h   |  51 ++
 tests/qtest/meson.build              |   1 +
 tests/qtest/stm32l496g-disco-test.c  | 693 +++++++++++++++++++++++++++
 18 files changed, 1657 insertions(+), 4 deletions(-)
 create mode 100644 docs/system/arm/stm32l496g-disco.rst
 create mode 100644 hw/arm/stm32l496g-disco.c
 create mode 100644 hw/ssi/stm32l4x5_quadspi.c
 create mode 100644 include/hw/ssi/stm32l4x5_quadspi.h
 create mode 100644 tests/qtest/stm32l496g-disco-test.c

-- 
2.49.1
Re: [PATCH qemu 0/3] hw/arm: Add STM32L496G-DISCO QuadSPI support
Posted by Samuel Tardieu 1 week, 1 day ago
~mohammadodeh <mohammadodeh@git.sr.ht> writes:

> Add initial QEMU support for the STM32L496G-DISCO Discovery kit and
> its MX25R6435F QuadSPI flash.

This flash is also present on the B-L475E-IOT01A board which is supported by QEMU. You should probably also wire it there as well.

Best.

  Sam
-- 
Samuel Tardieu