Skip to content

Add i.MX 8M Plus EVK machine

Bernhard Beschow qemu-arm qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/218 patches 20 repliesIn review
  2. v2 posting 1/218 patches 31 repliesSuperseded
  3. v121 patches 28 repliesSuperseded

Changes in v2 from the cover letter

* Rebase onto master, eliminating some patches from the series
* Initialize ROM with memory_region_init_rom() (Zoltan)
* Mark the machine as "Maintained" (Peter)
* Do not select TEST_DEVICES (Peter)
* Have separate sources for the two clock tree modules (Peter)
* Make PCI devices attach to the correct bus (Peter)
* Avoid adding documentation that is removed later (Zoltan) Instead, document Buildroot process in the first place and change it slightly.
* Drop TCA6416 device model (Phil, Dmitrii)
* Add pca955* Kconfig cleanup patch

[1] https://www.nxp.com/design/design-center/development-boards-and-designs/8MPLUSLPD4-EVK
[2] https://archlinuxarm.org/platforms/armv8/generic

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18hw/usb/hcd-dwc3: Align global registers size with Linuxhw/usb/hcd-dwc3.c include/hw/usb/hcd-dwc3.h+6 -10 replies
2/18hw/pci-host/designware: Prevent device attachment on internal PCIe root bushw/pci-host/designware.c include/hw/pci-host/designware.h+24 -10 replies
3/18hw/gpio/pca955*: Move Kconfig switches next to implementationshw/gpio/Kconfig hw/misc/Kconfig+8 -81 reply
4/18hw/arm: Add i.MX 8M Plus EVK boardMAINTAINERS docs/system/arm/imx8mp-evk.rst docs/system/target-arm.rst +5 more+689 -06 replies
5/18hw/arm/fsl-imx8mp: Implement clock treeMAINTAINERS docs/system/arm/imx8mp-evk.rst hw/arm/Kconfig +8 more+483 -01 reply
6/18hw/arm/fsl-imx8mp: Add SNVSdocs/system/arm/imx8mp-evk.rst hw/arm/fsl-imx8mp.c include/hw/arm/fsl-imx8mp.h+13 -00 replies
7/18hw/arm/fsl-imx8mp: Add USDHC storage controllersdocs/system/arm/imx8mp-evk.rst hw/arm/Kconfig hw/arm/fsl-imx8mp.c +2 more+66 -60 replies
8/18hw/arm/fsl-imx8mp: Add PCIe supportMAINTAINERS docs/system/arm/imx8mp-evk.rst hw/arm/Kconfig +6 more+176 -01 reply
9/18hw/arm/fsl-imx8mp: Add GPIO controllersdocs/system/arm/imx8mp-evk.rst hw/arm/fsl-imx8mp.c include/hw/arm/fsl-imx8mp.h+70 -00 replies
10/18hw/arm/fsl-imx8mp: Add I2C controllersdocs/system/arm/imx8mp-evk.rst hw/arm/Kconfig hw/arm/fsl-imx8mp.c +1 more+43 -00 replies
11/18hw/arm/fsl-imx8mp: Add SPI controllersdocs/system/arm/imx8mp-evk.rst hw/arm/fsl-imx8mp.c include/hw/arm/fsl-imx8mp.h+35 -00 replies
12/18hw/arm/fsl-imx8mp: Add watchdog supportdocs/system/arm/imx8mp-evk.rst hw/arm/Kconfig hw/arm/fsl-imx8mp.c +1 more+37 -00 replies
13/18hw/arm/fsl-imx8mp: Implement general purpose timersdocs/system/arm/imx8mp-evk.rst hw/arm/Kconfig hw/arm/fsl-imx8mp.c +3 more+92 -00 replies
14/18hw/arm/fsl-imx8mp: Add Ethernet controllerdocs/system/arm/imx8mp-evk.rst hw/arm/Kconfig hw/arm/fsl-imx8mp.c +2 more+35 -00 replies
15/18hw/arm/fsl-imx8mp: Add USB supportdocs/system/arm/imx8mp-evk.rst hw/arm/Kconfig hw/arm/fsl-imx8mp.c +1 more+49 -20 replies
16/18hw/arm/fsl-imx8mp: Add boot ROMMAINTAINERS hw/arm/fsl-imx8mp.c include/hw/arm/fsl-imx8mp.h +2 more+21 -02 replies
17/18hw/arm/fsl-imx8mp: Add on-chip RAMhw/arm/fsl-imx8mp.c include/hw/arm/fsl-imx8mp.h+12 -00 replies
18/18hw/rtc: Add Ricoh RS5C372 RTC emulationMAINTAINERS hw/rtc/Kconfig hw/rtc/meson.build +4 more+292 -07 replies

Reviews trailers per patch

17 of 18 patches have a Reviewed-by or Acked-by.

PatchPeter MaydellPhilippe Mathieu-DaudéFabiano RosasCorey Minyard
1/18R-b
2/18R-b
3/18R-b
4/18R-b
5/18R-b
6/18R-b
7/18R-b
8/18R-b
9/18R-b
10/18R-b
11/18R-b
12/18R-b
13/18R-b
14/18R-b
15/18R-b
16/18
17/18R-b
18/18R-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/18] Add i.MX 8M Plus EVK machine

This series adds a new aarch64 machine to QEMU: i.MX 8M Plus EVK [1]. It allows for running Linux distributions such as Buildroot (freescale_imx8mpevk_defconfig) and Arch Linux [2] via direct kernel boot. U-Boot does not work yet. I plan to use this machine in CI and I also want to make it available to a bigger audience, so I propose to add it to QEMU. My goal would be to have it added for 10.0. For this, a Changelog entry could be added under https://wiki.qemu.org/ChangeLog/10.0 such as:
* New board model "imx8mp-evk": i.MX 8M Plus Evaluation Kit

The series is structured as follows: The first three patches fix some issues in device models reused by the new machine. Patches 4-17 add the machine step by step which includes documentation. The last patch adds an I²C RTC which I'd like to use along with the new machine.

I've based some code on existing one (see "Based on" in file headers) and I'm unsure how to handle the licensing and attribution correctly -- advice welcome.

v3:
* Pick up R-b tags
* Add QTest testcase for the RS5C372 RTC (Phil)
* Rephrase machine description (Peter)
* Fix typos and confused sentence in machine documentation (Peter)
* Use g_autofree for object names (Peter)
* Clarify source of "cntfrq" CPU property (Peter)
* Fix typo "g[e]neral purpose timers" in commit message (Peter)
* Don't default y if I2C_DEVICES for hw/gpio/pca955* (Peter)
* TYPE_FSL_IMX8M_PCIE_PHY:
* Implement reset method (Peter)
* Use named constant rather than risking undefined behavior (Peter)
* Fix copy'n'paste typo in imx8mp_analog.c
Open questions:
* How to generate all zero boot rom file in a portable way (Peter)

v2:
* Rebase onto master, eliminating some patches from the series
* Initialize ROM with memory_region_init_rom() (Zoltan)
* Mark the machine as "Maintained" (Peter)
* Do not select TEST_DEVICES (Peter)
* Have separate sources for the two clock tree modules (Peter)
* Make PCI devices attach to the correct bus (Peter)
* Avoid adding documentation that is removed later (Zoltan) Instead, document Buildroot process in the first place and change it slightly.
* Drop TCA6416 device model (Phil, Dmitrii)
* Add pca955* Kconfig cleanup patch

[1] https://www.nxp.com/design/design-center/development-boards-and-designs/8MPLUSLPD4-EVK
[2] https://archlinuxarm.org/platforms/armv8/generic

Bernhard Beschow (18):
hw/usb/hcd-dwc3: Align global registers size with Linux hw/pci-host/designware: Prevent device attachment on internal PCIe
root bus
hw/gpio/pca955*: Move Kconfig switches next to implementations hw/arm: Add i.MX 8M Plus EVK board
hw/arm/fsl-imx8mp: Implement clock tree hw/arm/fsl-imx8mp: Add SNVS
hw/arm/fsl-imx8mp: Add USDHC storage controllers hw/arm/fsl-imx8mp: Add PCIe support
hw/arm/fsl-imx8mp: Add GPIO controllers hw/arm/fsl-imx8mp: Add I2C controllers hw/arm/fsl-imx8mp: Add SPI controllers hw/arm/fsl-imx8mp: Add watchdog support hw/arm/fsl-imx8mp: Implement general purpose timers hw/arm/fsl-imx8mp: Add Ethernet controller hw/arm/fsl-imx8mp: Add USB support
hw/arm/fsl-imx8mp: Add boot ROM
hw/arm/fsl-imx8mp: Add on-chip RAM
hw/rtc: Add Ricoh RS5C372 RTC emulation

 MAINTAINERS                         |  16 +
 docs/system/arm/imx8mp-evk.rst      |  70 +++
 docs/system/target-arm.rst          |   1 +
 include/hw/arm/fsl-imx8mp.h         | 285 +++++++++++
 include/hw/misc/imx8mp_analog.h     |  81 +++
 include/hw/misc/imx8mp_ccm.h        |  30 ++
 include/hw/pci-host/designware.h    |   7 +
 include/hw/pci-host/fsl_imx8m_phy.h |  28 ++
 include/hw/timer/imx_gpt.h          |   1 +
 include/hw/usb/hcd-dwc3.h           |   2 +-
 hw/arm/fsl-imx8mp.c                 | 732 ++++++++++++++++++++++++++++
 hw/arm/imx8mp-evk.c                 |  74 +++
 hw/misc/imx8mp_analog.c             | 160 ++++++
 hw/misc/imx8mp_ccm.c                | 175 +++++++
 hw/pci-host/designware.c            |  18 +-
 hw/pci-host/fsl_imx8m_phy.c         |  98 ++++
 hw/rtc/rs5c372.c                    | 236 +++++++++
 hw/timer/imx_gpt.c                  |  25 +
 hw/usb/hcd-dwc3.c                   |   5 +
 tests/qtest/rs5c372-test.c          |  43 ++
 hw/arm/Kconfig                      |  24 +
 hw/arm/meson.build                  |   2 +
 hw/gpio/Kconfig                     |   8 +
 hw/misc/Kconfig                     |  14 +-
 hw/misc/meson.build                 |   2 +
 hw/pci-host/Kconfig                 |   3 +
 hw/pci-host/meson.build             |   1 +
 hw/rtc/Kconfig                      |   5 +
 hw/rtc/meson.build                  |   1 +
 hw/rtc/trace-events                 |   4 +
 pc-bios/imx8mp-boot.rom             | Bin 0 -> 258048 bytes
 pc-bios/meson.build                 |   1 +
 tests/qtest/meson.build             |   1 +
 33 files changed, 2143 insertions(+), 10 deletions(-)
 create mode 100644 docs/system/arm/imx8mp-evk.rst
 create mode 100644 include/hw/arm/fsl-imx8mp.h
 create mode 100644 include/hw/misc/imx8mp_analog.h
 create mode 100644 include/hw/misc/imx8mp_ccm.h
 create mode 100644 include/hw/pci-host/fsl_imx8m_phy.h
 create mode 100644 hw/arm/fsl-imx8mp.c
 create mode 100644 hw/arm/imx8mp-evk.c
 create mode 100644 hw/misc/imx8mp_analog.c
 create mode 100644 hw/misc/imx8mp_ccm.c
 create mode 100644 hw/pci-host/fsl_imx8m_phy.c
 create mode 100644 hw/rtc/rs5c372.c
 create mode 100644 tests/qtest/rs5c372-test.c
 create mode 100644 pc-bios/imx8mp-boot.rom
Signature · 1 line
2.48.1