[PATCH v1 0/6] hw/arm/aspeed: AST1700 IO expander support for AST27x0 (LTPI, UART, IRQ, I2C)

Kane Chen via posted 6 patches 1 month, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250917013143.1600377-1-kane._5Fchen@aspeedtech.com
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>
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
[PATCH v1 0/6] hw/arm/aspeed: AST1700 IO expander support for AST27x0 (LTPI, UART, IRQ, I2C)
Posted by Kane Chen via 1 month, 4 weeks ago
From: Kane-Chen-AS <kane_chen@aspeedtech.com>

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
Re: [SPAM] [PATCH v1 0/6] hw/arm/aspeed: AST1700 IO expander support for AST27x0 (LTPI, UART, IRQ, I2C)
Posted by Cédric Le Goater 1 month, 4 weeks ago
Hi,

On 9/17/25 03:31, Kane Chen wrote:
> From: Kane-Chen-AS <kane_chen@aspeedtech.com>
> 
> 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.

Please resend in 2 distinct series : LTPI and AST1700 IO expander


Thanks,

C.


> - 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
>