All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niek Linnenbank <nieklinnenbank@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, alex.bennee@linaro.org,
	jasowang@redhat.com, b.galvani@gmail.com,
	Niek Linnenbank <nieklinnenbank@gmail.com>,
	qemu-arm@nongnu.org, imammedo@redhat.com, philmd@redhat.com
Subject: [PATCH v5 00/18] Add Allwinner H3 SoC and Orange Pi PC Machine
Date: Tue, 18 Feb 2020 00:23:53 +0100	[thread overview]
Message-ID: <20200217232411.30096-1-nieklinnenbank@gmail.com> (raw)

Dear QEMU developers,

Hereby I would like to contribute the following set of patches to QEMU
which add support for the Allwinner H3 System on Chip and the
Orange Pi PC machine. The following features and devices are supported:

 * SMP (Quad Core Cortex A7)
 * Generic Interrupt Controller configuration
 * SRAM mappings
 * SDRAM controller
 * Real Time Clock
 * Timer device (re-used from Allwinner A10)
 * UART
 * SD/MMC storage controller
 * EMAC ethernet connectivity
 * USB 2.0 interfaces
 * Clock Control Unit
 * System Control module
 * Security Identifier device

Functionality related to graphical output such as HDMI, GPU,
Display Engine and audio are not included. Recently released
mainline Linux kernels (4.19 up to latest master), mainline U-Boot
and NetBSD 9.0 are known to work.

For full details on how to use the Orange Pi PC machine, see the file
docs/orangepi.rst which is included as a patch in this series.

The contents of this patch series is available on Github at:

  https://github.com/nieklinnenbank/qemu/tree/allwinner-h3-v5

The followings are currently known issues in this series:

  - RTC date & time is not persistent
  - boot0 custom Allwinner bootloader not yet working
  - Watchdog not yet implemented, affects U-Boot 'reset' and shutdown/reboot
     -> This is part of the existing A10 timer that needs to be generalized first

Looking forward to your review comments. I will do my best
to update the patches where needed.

===== CHANGELOG =====
v5:
 * hw/arm/allwinner-h3.c: correct comment for dc->user_creatable = false
 * hw/arm/allwinner-h3.c: rename usb[0-3] to usb[0-3]-phy in unimplemented array
 * hw/arm/allwinner-h3.c: remove unneeded check for rom_size > blk_size in bootrom_setup()
 * hw/arm/allwinner-h3.c: remove errp parameter and directl use error_fatal in bootrom_setup()
 * hw/arm/Kconfig: add USB_OHCI, USB_EHCI_SYSBUS, SD to ALLWINNER_H3 item (for --without-default-devices)
 * hw/misc/allwinner-cpucfg.c: add entry_addr to VMState for migration
 * hw/misc/allwinner-sid.c: add identifier to VMState for migration
 * hw/misc/allwinner-sid.c: use ldl_be_p() to set rdkey value
 * hw/arm/orangepi.c: add comment about always using a default fixed SID identifier
 * hw/arm/orangepi.c: add check for SID identifier override, to allow -global override by the user
 * hw/arm/orangepi.c: print warning if SID identifier does not include H3 prefix
 * hw/arm/orangepi.c: move 1GiB RAM check between checks for BIOS and CPU type
 * include/hw/misc/allwinner-h3-ccu.h: rename AW_H3_CCU_REGS_MAXADDR to AW_H3_CCU_IOSIZE with value 0x400
 * hw/misc/allwinner-h3-ccu.c: use AW_H3_CCU_IOSIZE with range in switch(offset) in read/write
 * hw/rtc/allwinner-rtc.c: add 'base-year' property in AwRtcState (replaces previous year_offset)
 * hw/sd/allwinner-sdhost.c: set AUTOCMD interrupt flag in auto_stop() function only
 * hw/sd/allwinner-sdhost.c: set SDIO_INTR and INT_SUMMARY interrupt flags in dma() function
 * docs/orangepi.rst: add machine options section, which documents available machine/device specific properties
 * docs/orangepi.rst: updated NetBSD 9 instructions with new image URL, -global options and extend SD image command
 * hw/*/allwinner*.c: use device_class_set_props() to set DeviceClass properties
 * tests/acceptance/boot_linux_console.py: add check for 7z program using avocado's find_command()
 * tests/acceptance/boot_linux_console.py: adapt NetBSD test to use NetBSD 9.0 final release
 * tests/acceptance/boot_linux_console.py: adapt NetBSD test to use -global allwinner-rtc.base-year=2000

v4: https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg03960.html
    https://github.com/nieklinnenbank/qemu/tree/allwinner-h3-v4

v3: https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg01534.html
    https://github.com/nieklinnenbank/qemu/tree/allwinner-h3-v3

v2: https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg03265.html
    https://github.com/nieklinnenbank/qemu/tree/allwinner-h3-v2

v1: https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg00320.html
    https://github.com/nieklinnenbank/qemu/tree/allwinner-h3-v1

With kind regards,

Niek Linnenbank

Niek Linnenbank (13):
  hw/arm: add Allwinner H3 System-on-Chip
  hw/arm: add Xunlong Orange Pi PC machine
  hw/arm/allwinner-h3: add Clock Control Unit
  hw/arm/allwinner-h3: add USB host controller
  hw/arm/allwinner-h3: add System Control module
  hw/arm/allwinner: add CPU Configuration module
  hw/arm/allwinner: add Security Identifier device
  hw/arm/allwinner: add SD/MMC host controller
  hw/arm/allwinner-h3: add EMAC ethernet device
  hw/arm/allwinner-h3: add Boot ROM support
  hw/arm/allwinner-h3: add SDRAM controller device
  hw/arm/allwinner: add RTC device support
  docs: add Orange Pi PC document

Philippe Mathieu-Daudé (5):
  tests/boot_linux_console: Add a quick test for the OrangePi PC board
  tests/boot_linux_console: Add initrd test for the Orange Pi PC board
  tests/boot_linux_console: Add a SD card test for the OrangePi PC board
  tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi
    PC
  tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi
    PC

 docs/orangepi.rst                      | 226 +++++++
 default-configs/arm-softmmu.mak        |   1 +
 hw/usb/hcd-ehci.h                      |   1 +
 include/hw/arm/allwinner-a10.h         |   4 +
 include/hw/arm/allwinner-h3.h          | 161 +++++
 include/hw/misc/allwinner-cpucfg.h     |  52 ++
 include/hw/misc/allwinner-h3-ccu.h     |  66 ++
 include/hw/misc/allwinner-h3-dramc.h   | 106 +++
 include/hw/misc/allwinner-h3-sysctrl.h |  67 ++
 include/hw/misc/allwinner-sid.h        |  60 ++
 include/hw/net/allwinner-sun8i-emac.h  |  99 +++
 include/hw/rtc/allwinner-rtc.h         | 134 ++++
 include/hw/sd/allwinner-sdhost.h       | 135 ++++
 hw/arm/allwinner-a10.c                 |  19 +
 hw/arm/allwinner-h3.c                  | 466 +++++++++++++
 hw/arm/cubieboard.c                    |  15 +
 hw/arm/orangepi.c                      | 134 ++++
 hw/misc/allwinner-cpucfg.c             | 270 ++++++++
 hw/misc/allwinner-h3-ccu.c             | 242 +++++++
 hw/misc/allwinner-h3-dramc.c           | 358 ++++++++++
 hw/misc/allwinner-h3-sysctrl.c         | 140 ++++
 hw/misc/allwinner-sid.c                | 168 +++++
 hw/net/allwinner-sun8i-emac.c          | 871 +++++++++++++++++++++++++
 hw/rtc/allwinner-rtc.c                 | 411 ++++++++++++
 hw/sd/allwinner-sdhost.c               | 854 ++++++++++++++++++++++++
 hw/usb/hcd-ehci-sysbus.c               |  17 +
 MAINTAINERS                            |   9 +
 hw/arm/Kconfig                         |  12 +
 hw/arm/Makefile.objs                   |   1 +
 hw/misc/Makefile.objs                  |   5 +
 hw/misc/trace-events                   |  19 +
 hw/net/Kconfig                         |   3 +
 hw/net/Makefile.objs                   |   1 +
 hw/net/trace-events                    |  10 +
 hw/rtc/Makefile.objs                   |   1 +
 hw/rtc/trace-events                    |   4 +
 hw/sd/Makefile.objs                    |   1 +
 hw/sd/trace-events                     |   7 +
 tests/acceptance/boot_linux_console.py | 224 +++++++
 39 files changed, 5374 insertions(+)
 create mode 100644 docs/orangepi.rst
 create mode 100644 include/hw/arm/allwinner-h3.h
 create mode 100644 include/hw/misc/allwinner-cpucfg.h
 create mode 100644 include/hw/misc/allwinner-h3-ccu.h
 create mode 100644 include/hw/misc/allwinner-h3-dramc.h
 create mode 100644 include/hw/misc/allwinner-h3-sysctrl.h
 create mode 100644 include/hw/misc/allwinner-sid.h
 create mode 100644 include/hw/net/allwinner-sun8i-emac.h
 create mode 100644 include/hw/rtc/allwinner-rtc.h
 create mode 100644 include/hw/sd/allwinner-sdhost.h
 create mode 100644 hw/arm/allwinner-h3.c
 create mode 100644 hw/arm/orangepi.c
 create mode 100644 hw/misc/allwinner-cpucfg.c
 create mode 100644 hw/misc/allwinner-h3-ccu.c
 create mode 100644 hw/misc/allwinner-h3-dramc.c
 create mode 100644 hw/misc/allwinner-h3-sysctrl.c
 create mode 100644 hw/misc/allwinner-sid.c
 create mode 100644 hw/net/allwinner-sun8i-emac.c
 create mode 100644 hw/rtc/allwinner-rtc.c
 create mode 100644 hw/sd/allwinner-sdhost.c

-- 
2.17.1


             reply	other threads:[~2020-02-17 23:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 23:23 Niek Linnenbank [this message]
2020-02-17 23:23 ` [PATCH v5 01/18] hw/arm: add Allwinner H3 System-on-Chip Niek Linnenbank
2020-02-17 23:23 ` [PATCH v5 02/18] hw/arm: add Xunlong Orange Pi PC machine Niek Linnenbank
2020-02-17 23:23 ` [PATCH v5 03/18] hw/arm/allwinner-h3: add Clock Control Unit Niek Linnenbank
2020-02-17 23:23 ` [PATCH v5 04/18] hw/arm/allwinner-h3: add USB host controller Niek Linnenbank
2020-02-17 23:23 ` [PATCH v5 05/18] hw/arm/allwinner-h3: add System Control module Niek Linnenbank
2020-02-17 23:23 ` [PATCH v5 06/18] hw/arm/allwinner: add CPU Configuration module Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 07/18] hw/arm/allwinner: add Security Identifier device Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 08/18] hw/arm/allwinner: add SD/MMC host controller Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 09/18] hw/arm/allwinner-h3: add EMAC ethernet device Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 10/18] hw/arm/allwinner-h3: add Boot ROM support Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 11/18] hw/arm/allwinner-h3: add SDRAM controller device Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 12/18] hw/arm/allwinner: add RTC device support Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 13/18] tests/boot_linux_console: Add a quick test for the OrangePi PC board Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 14/18] tests/boot_linux_console: Add initrd test for the Orange Pi " Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 15/18] tests/boot_linux_console: Add a SD card test for the OrangePi " Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 16/18] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 17/18] tests/boot_linux_console: Test booting NetBSD via U-Boot " Niek Linnenbank
2020-02-17 23:24 ` [PATCH v5 18/18] docs: add Orange Pi PC document Niek Linnenbank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217232411.30096-1-nieklinnenbank@gmail.com \
    --to=nieklinnenbank@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=b.galvani@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.