xref: /openbmc/qemu/include/hw/arm/max78000_soc.h (revision a670bb8a729945117fc0e8b357e02a311945cb74)
1 /*
2  * MAX78000 SOC
3  *
4  * Copyright (c) 2025 Jackson Donaldson <jcksn@duck.com>
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef HW_ARM_MAX78000_SOC_H
10 #define HW_ARM_MAX78000_SOC_H
11 
12 #include "hw/or-irq.h"
13 #include "hw/arm/armv7m.h"
14 #include "hw/misc/max78000_icc.h"
15 #include "hw/char/max78000_uart.h"
16 #include "qom/object.h"
17 
18 #define TYPE_MAX78000_SOC "max78000-soc"
19 OBJECT_DECLARE_SIMPLE_TYPE(MAX78000State, MAX78000_SOC)
20 
21 #define FLASH_BASE_ADDRESS 0x10000000
22 #define FLASH_SIZE (512 * 1024)
23 #define SRAM_BASE_ADDRESS 0x20000000
24 #define SRAM_SIZE (128 * 1024)
25 
26 /* The MAX78k has 2 instruction caches; only icc0 matters, icc1 is for RISC */
27 #define MAX78000_NUM_ICC 2
28 #define MAX78000_NUM_UART 3
29 
30 struct MAX78000State {
31     SysBusDevice parent_obj;
32 
33     ARMv7MState armv7m;
34 
35     MemoryRegion sram;
36     MemoryRegion flash;
37 
38     Max78000IccState icc[MAX78000_NUM_ICC];
39     Max78000UartState uart[MAX78000_NUM_UART];
40 
41     Clock *sysclk;
42 };
43 
44 #endif
45