| 1 | /* |
| 2 | * ASPEED AST1700 IO Expander |
| 3 | * |
| 4 | * Copyright (C) 2025 ASPEED Technology Inc. |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | #ifndef ASPEED_AST1700_H |
| 9 | #define ASPEED_AST1700_H |
| 10 | |
| 11 | #include "hw/core/sysbus.h" |
| 12 | #include "hw/misc/aspeed_scu.h" |
| 13 | #include "hw/adc/aspeed_adc.h" |
| 14 | #include "hw/gpio/aspeed_gpio.h" |
| 15 | #include "hw/gpio/aspeed_sgpio.h" |
| 16 | #include "hw/i2c/aspeed_i2c.h" |
| 17 | #include "hw/misc/aspeed_ltpi.h" |
| 18 | #include "hw/misc/aspeed_pwm.h" |
| 19 | #include "hw/ssi/aspeed_smc.h" |
| 20 | #include "hw/watchdog/wdt_aspeed.h" |
| 21 | #include "hw/char/serial-mm.h" |
| 22 | #include "hw/misc/unimp.h" |
| 23 | |
| 24 | #define AST1700_SGPIO_NUM 2 |
| 25 | #define AST1700_WDT_NUM 9 |
| 26 | |
| 27 | #define TYPE_ASPEED_AST1700 "aspeed.ast1700" |
| 28 | |
| 29 | OBJECT_DECLARE_SIMPLE_TYPE(AspeedAST1700SoCState, ASPEED_AST1700) |
| 30 | |
| 31 | struct AspeedAST1700SoCState { |
| 32 | SysBusDevice parent_obj; |
| 33 | |
| 34 | MemoryRegion iomem; |
| 35 | MemoryRegion *dram_mr; |
| 36 | uint8_t board_idx; |
| 37 | uint32_t silicon_rev; |
| 38 | |
| 39 | AspeedLTPIState ltpi; |
| 40 | SerialMM uart; |
| 41 | MemoryRegion sram; |
| 42 | AspeedSMCState spi; |
| 43 | AspeedADCState adc; |
| 44 | Aspeed2700SCUState scu; |
| 45 | AspeedGPIOState gpio; |
| 46 | AspeedSGPIOState sgpiom[AST1700_SGPIO_NUM]; |
| 47 | AspeedI2CState i2c; |
| 48 | AspeedPWMState pwm; |
| 49 | AspeedWDTState wdt[AST1700_WDT_NUM]; |
| 50 | |
| 51 | UnimplementedDeviceState i3c; |
| 52 | }; |
| 53 | |
| 54 | #endif /* ASPEED_AST1700_H */ |