All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamin Lin <jamin_lin@aspeedtech.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Joel Stanley" <joel@jms.id.au>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>,
	"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: jamin_lin@aspeedtech.com, troy_lee@aspeedtech.com,
	steven_lee@aspeedtech.com
Subject: [PATCH v1 0/9] Add support for AST1030 SoC
Date: Tue, 22 Mar 2022 10:51:45 +0800	[thread overview]
Message-ID: <20220322025154.3989-1-jamin_lin@aspeedtech.com> (raw)

The patch series supports ADC, SCU, SMC, TIMER, and WDT for AST1030 SoC.
Add avocado test case for "ast1030-evb" machine.

Test steps:
1. Download image from
   https://github.com/AspeedTech-BMC/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip
2. Extract the zip file to obtain zephyr.elf
3. Run ./qemu-system-arm -M ast1030-evb -kernel $PATH/zephyr.elf -nographic
4. Test IO by Zephyr command line, commands are refer to Aspeed Zephyr
   SDK User Guide below
   https://github.com/AspeedTech-BMC/zephyr/releases/download/v00.01.04/Aspeed_Zephy_SDK_User_Guide_v00.01.04.pdf
   - ADC(channel 0):
       uart:~$ adc ADC0 resolution 10
       uart:~$ adc ADC0 calibrate 1
       uart:~$ adc ADC0 read_format 1
       uart:~$ adc ADC0 read 0
       [Result]
       read: 1416mv

   - SCU
       uart:~$ md 7e6e2040
       uart:~$ md 7e6e2080
       uart:~$ md 7e6e20d0
       uart:~$ md 7e6e2200
       uart:~$ md 7e6e2300
       uart:~$ md 7e6e25b0
       [Result]
       The register value should match the value of ast1030_a1_resets
       in aspeed_scu.c

   - Flash(fmc_cs0):
       uart:~$ flash write fmc_cs0 0 0x12345678 0x87654321 0x34127856 0x78563412
       uart:~$ flash read fmc_cs0 0 10
       [Result]
       00000000: 78 56 34 12 21 43 65 87  56 78 12 34 12 34 56 78 |xV4.!Ce. Vx.4.4Vx|

       uart:~$ flash erase fmc_cs0 0
       uart:~$ flash read fmc_cs0 0 10
       [Result]
       00000000: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|

   - Timer(TIMER0):
       uart:~$ timer start TIMER0 -p 2000 -t 0
       TIMER0: period 20000 ms, type 0
       [Result]
       timer expired after 2 seconds

   - Watchdog(WDT1):
       uart:~$ mw 7e785008 4755
       uart:~$ mw 7e78500c 1
       [Result]
       soc reset after 22 seconds

Please help to review.

Thanks

Based-on: 20220315075753.8591-3-steven_lee@aspeedtech.com
([v2,2/2] hw: aspeed_scu: Introduce clkin_25Mhz attribute)

Jamin Lin (1):
  test/avocado/machine_aspeed.py: Add ast1030 test case

Steven Lee (8):
  aspeed/adc: Add AST1030 support
  aspeed/smc: Add AST1030 support
  aspeed/wdt: Fix ast2500/ast2600 default reload value.
  aspeed/wdt: Add AST1030 support
  aspeed/timer: Add AST1030 support.
  aspeed/scu: Add AST1030 support
  aspeed/soc : Add AST1030 support
  aspeed: Add an AST1030 eval board

 hw/adc/aspeed_adc.c              |  16 ++
 hw/arm/aspeed.c                  |   2 +-
 hw/arm/aspeed_ast1030.c          | 301 +++++++++++++++++++++++++++++++
 hw/arm/aspeed_minibmc.c          | 129 +++++++++++++
 hw/arm/meson.build               |   8 +-
 hw/misc/aspeed_scu.c             |  63 +++++++
 hw/ssi/aspeed_smc.c              | 160 ++++++++++++++++
 hw/timer/aspeed_timer.c          |  17 ++
 hw/watchdog/wdt_aspeed.c         |  34 +++-
 include/hw/adc/aspeed_adc.h      |   1 +
 include/hw/arm/aspeed.h          |  25 +++
 include/hw/arm/aspeed_soc.h      |   3 +
 include/hw/misc/aspeed_scu.h     |  24 +++
 include/hw/timer/aspeed_timer.h  |   1 +
 include/hw/watchdog/wdt_aspeed.h |   3 +
 tests/avocado/machine_aspeed.py  |  36 ++++
 16 files changed, 819 insertions(+), 4 deletions(-)
 create mode 100644 hw/arm/aspeed_ast1030.c
 create mode 100644 hw/arm/aspeed_minibmc.c
 create mode 100644 tests/avocado/machine_aspeed.py

-- 
2.17.1


             reply	other threads:[~2022-03-22  2:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22  2:51 Jamin Lin [this message]
2022-03-22  2:51 ` [PATCH v1 1/9] aspeed/adc: Add AST1030 support Jamin Lin
2022-03-22  7:52   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 2/9] aspeed/smc: " Jamin Lin
2022-03-23  7:57   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 3/9] aspeed/wdt: Fix ast2500/ast2600 default reload value Jamin Lin
2022-03-22  7:23   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 4/9] aspeed/wdt: Add AST1030 support Jamin Lin
2022-03-22 17:32   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 5/9] aspeed/timer: " Jamin Lin
2022-03-22  7:53   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 6/9] aspeed/scu: " Jamin Lin
2022-03-23  8:07   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 7/9] aspeed/soc : " Jamin Lin
2022-03-24 17:37   ` Cédric Le Goater
2022-03-25  1:57     ` Jamin Lin
2022-03-28 13:02       ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 8/9] aspeed: Add an AST1030 eval board Jamin Lin
2022-03-23 20:12   ` Patrick Venture
2022-03-28 12:49   ` Cédric Le Goater
2022-03-22  2:51 ` [PATCH v1 9/9] test/avocado/machine_aspeed.py: Add ast1030 test case Jamin Lin
2022-03-28 14:20   ` Cédric Le Goater

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=20220322025154.3989-1-jamin_lin@aspeedtech.com \
    --to=jamin_lin@aspeedtech.com \
    --cc=alistair@alistair23.me \
    --cc=andrew@aj.id.au \
    --cc=bleal@redhat.com \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.com \
    --cc=troy_lee@aspeedtech.com \
    --cc=wainersm@redhat.com \
    /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.