qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v1 00/12] *** Add allwinner R40 device support ***


From: Niek Linnenbank
Subject: Re: [RFC PATCH v1 00/12] *** Add allwinner R40 device support ***
Date: Wed, 8 Mar 2023 21:47:04 +0100

Hello Qianfan Zhao,

Thanks for contributing this work to Qemu! With your contribution, we would get yet another Allwinner SoC supported, making it three in total (A10/H3/R40). That's great.
My thoughts are that maybe we should try to re-use commonality between these SoCs where we can. Ofcourse, that may be difficult as the internals/peripherals of these SoCs often really are different.

Your patches look good already, and I saw patches 02 and 03 are already merged too. I did a quick regression test with
avocado for cubieboard/orangepi-pc with your patches applied and that went OK:

$ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes ./build/tests/venv/bin/avocado --show=app,console run -t machine:orangepi-pc -t machine:cubieboard tests/avocado/boot_linux_console.py
...
PASS (22.09 s)
RESULTS    : PASS 8 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 169.73 s

For now, I have only two suggestions for you to consider:
1) You could add a new acceptance test for the new bananapi board to ./tests/avocado/boot_linux_console.py.
This helps in your current work to (re)test your code quickly, and after the code is merged it helps to keep to board working when other changes are done.
2) If time permits, it may be interesting to document your board for example in a new file at ./docs/system/arm/bananapi.rst
   If you do this, it will make the board a lot more valuable for other people to use, since you can add some basic instructions on how to use the board with qemu there.
   Additionally, it also helps yourself to store this information somewhere, since it can be easy to forget all the specific commands/flags/arguments and links to board specific images.

Once you have progressed with your patches beyond the RFC stage, I'll try to find some time for a more detailed review of your patches.

Kind regards,
Niek Linnenbank

On Thu, Mar 2, 2023 at 12:41 PM <qianfanguijin@163.com> wrote:
From: qianfan Zhao <qianfanguijin@163.com>

v1: 2023-03-02

The first three patches try fix allwinner i2c driver and I already send them
as a standalone PR and can read it from:

https://patchwork.kernel.org/project/qemu-devel/patch/20230220081252.25348-3-qianfanguijin@163.com/

Hope that patch can merged first before this.

The next patches will add allwinner R40 device support, including ccu, mmc, i2c,
axp221 pmic, sdram controller, emac and gmac. Now the mainline u-boot and
kernel can work fine (It doesn't support booting allwinner bsp code and there
are no plans to support it now).

qianfan Zhao (12):
  hw: allwinner-i2c: Make the trace message more readable
  hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs
  hw: arm: allwinner-h3: Fix and complete H3 i2c devices
  hw: arm: Add bananapi M2-Ultra and allwinner-r40 support
  hw/arm/allwinner-r40: add Clock Control Unit
  hw: allwinner-r40: Complete uart devices
  hw: arm: allwinner-r40: Add 5 TWI controllers
  hw/misc: AXP221 PMU Emulation
  hw/arm/allwinner-r40: add SDRAM controller device
  hw: sd: allwinner-sdhost: Add sun50i-a64 SoC support
  hw: arm: allwinner-r40: Fix the mmc controller's type
  hw: arm: allwinner-r40: Add emac and gmac support

 configs/devices/arm-softmmu/default.mak |   1 +
 hw/arm/Kconfig                          |  10 +
 hw/arm/allwinner-h3.c                   |  29 +-
 hw/arm/allwinner-r40.c                  | 555 ++++++++++++++++++++++++
 hw/arm/bananapi_m2u.c                   | 128 ++++++
 hw/arm/meson.build                      |   1 +
 hw/i2c/allwinner-i2c.c                  | 136 +++++-
 hw/i2c/trace-events                     |   5 +-
 hw/misc/Kconfig                         |   4 +
 hw/misc/allwinner-r40-ccu.c             | 207 +++++++++
 hw/misc/allwinner-r40-dramc.c           | 499 +++++++++++++++++++++
 hw/misc/axp221.c                        | 196 +++++++++
 hw/misc/meson.build                     |   3 +
 hw/misc/trace-events                    |  19 +
 hw/sd/allwinner-sdhost.c                |  70 ++-
 include/hw/arm/allwinner-h3.h           |   6 +
 include/hw/arm/allwinner-r40.h          | 148 +++++++
 include/hw/i2c/allwinner-i2c.h          |   6 +
 include/hw/misc/allwinner-r40-ccu.h     |  65 +++
 include/hw/misc/allwinner-r40-dramc.h   | 108 +++++
 include/hw/sd/allwinner-sdhost.h        |   9 +
 21 files changed, 2191 insertions(+), 14 deletions(-)
 create mode 100644 hw/arm/allwinner-r40.c
 create mode 100644 hw/arm/bananapi_m2u.c
 create mode 100644 hw/misc/allwinner-r40-ccu.c
 create mode 100644 hw/misc/allwinner-r40-dramc.c
 create mode 100644 hw/misc/axp221.c
 create mode 100644 include/hw/arm/allwinner-r40.h
 create mode 100644 include/hw/misc/allwinner-r40-ccu.h
 create mode 100644 include/hw/misc/allwinner-r40-dramc.h

--
2.25.1



--
Niek Linnenbank


reply via email to

[Prev in Thread] Current Thread [Next in Thread]