From: Kane-Chen-AS <[email protected]>
Hi all,
This series adds support for AST1700-based IO expander boards on the
ASPEED AST27x0 family and wires them into the machine models. It
introduces an LTPI controller, adds a machine property to select how
many expanders are present, and connects the expander-provided UART,
interrupt controller, and I2C blocks.
What this series does
- Add a new `ioexps-num` machine property (range 0-2; default 0) so
boards can declare how many expanders are attached without changing
defaults.
- Add an LTPI controller device used by the expander/board glue.
- Add the AST1700 IO expander device model.
- Wire up the expander UART, interrupt controllers, and I2C on AST27x0
machines.
Example usage:
./qemu-system-aarch64 -M ast2700a1-evb,ioexps-num=2 \
-drive file=image-bmc,format=raw,if=mtd \
...
Verification:
U-Boot:
=> ltpi
LTPI0:
link partner : ast1700
link mode : DDR
link bandwidth : 25Mbps
LTPI1:
link partner : ast1700
link mode : DDR
link bandwidth : 25Mbps
=>
Linux (BMC):
root@ast2700-default:~# i2cdetect -y 16
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
With `ioexps-num` left at 0, existing behavior is unchanged.
Any feedback or suggestions are appreciated.
Best Regards,
Kane
---
Kane-Chen-AS (6):
hw/arm/aspeed: Add 'ioexps-num' property for AST27x0
hw/arm/aspeed: Add LTPI controller
hw/arm/aspeed: Add AST1700 IO expander
hw/arm/aspeed: Model AST1700 IO expander UART on AST27x0
hw/arm/aspeed: Model AST1700 IO expander interrupt controllers on
AST27x0
hw/arm/aspeed: Model AST1700 IO expander I2C on AST27x0
include/hw/arm/aspeed_soc.h | 32 +++++-
include/hw/intc/aspeed_intc.h | 2 +
include/hw/misc/aspeed_ltpi.h | 25 +++++
hw/arm/aspeed.c | 49 +++++++++
hw/arm/aspeed_ast27x0.c | 184 ++++++++++++++++++++++++++++++++--
hw/intc/aspeed_intc.c | 60 +++++++++++
hw/misc/aspeed_ltpi.c | 111 ++++++++++++++++++++
hw/misc/meson.build | 1 +
8 files changed, 452 insertions(+), 12 deletions(-)
create mode 100644 include/hw/misc/aspeed_ltpi.h
create mode 100644 hw/misc/aspeed_ltpi.c
--
2.43.0