]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/gpio/aspeed: Add AST2700 support
authorJamin Lin <jamin_lin@aspeedtech.com>
Tue, 1 Oct 2024 02:43:31 +0000 (10:43 +0800)
committerCédric Le Goater <clg@redhat.com>
Thu, 24 Oct 2024 05:57:47 +0000 (07:57 +0200)
commitbac698832de3160e3327a007a86958be08ecbd35
tree1e3fedad120315c7cbc066003c5106b5ff9059b4
parent7e22f6fafef951b336d1427d781d2e4a71f37d9f
hw/gpio/aspeed: Add AST2700 support

AST2700 integrates two set of Parallel GPIO Controller with maximum 212
control pins, which are 27 groups. (H, exclude pin: H7 H6 H5 H4)

In the previous design of ASPEED SOCs, one register is used for setting
one function for one set which are 32 pins and 4 groups.
ex: GPIO000 is used for setting data value for GPIO A, B, C and D in AST2600.
ex: GPIO004 is used for setting direction for GPIO A, B, C and D in AST2600.

However, the register set have a significant change since AST2700.
Each GPIO pin has their own individual control register.
In other words, users are able to set one GPIO pin’s direction,
interrupt enable, input mask and so on in the same one register.

Currently, aspeed_gpio_read and aspeed_gpio_write callback functions
are not compatible AST2700.

Introduce new aspeed_gpio_2700_read and aspeed_gpio_2700_write callback
functions and aspeed_gpio_2700_ops memory region operation for AST2700.
Introduce a new ast2700 class to support AST2700.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
hw/gpio/aspeed_gpio.c