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_gcr.h" 15 #include "hw/misc/max78000_icc.h" 16 #include "hw/char/max78000_uart.h" 17 #include "hw/misc/max78000_trng.h" 18 #include "qom/object.h" 19 20 #define TYPE_MAX78000_SOC "max78000-soc" 21 OBJECT_DECLARE_SIMPLE_TYPE(MAX78000State, MAX78000_SOC) 22 23 #define FLASH_BASE_ADDRESS 0x10000000 24 #define FLASH_SIZE (512 * 1024) 25 #define SRAM_BASE_ADDRESS 0x20000000 26 #define SRAM_SIZE (128 * 1024) 27 28 /* The MAX78k has 2 instruction caches; only icc0 matters, icc1 is for RISC */ 29 #define MAX78000_NUM_ICC 2 30 #define MAX78000_NUM_UART 3 31 32 struct MAX78000State { 33 SysBusDevice parent_obj; 34 35 ARMv7MState armv7m; 36 37 MemoryRegion sram; 38 MemoryRegion flash; 39 40 Max78000GcrState gcr; 41 Max78000IccState icc[MAX78000_NUM_ICC]; 42 Max78000UartState uart[MAX78000_NUM_UART]; 43 Max78000TrngState trng; 44 45 Clock *sysclk; 46 }; 47 48 #endif 49