xref: /openbmc/qemu/include/hw/arm/nrf51_soc.h (revision c5a4829c080866c78b6e04b6e8198aa58e185878)
1 /*
2  * Nordic Semiconductor nRF51  SoC
3  *
4  * Copyright 2018 Joel Stanley <joel@jms.id.au>
5  *
6  * This code is licensed under the GPL version 2 or later.  See
7  * the COPYING file in the top-level directory.
8  */
9 
10 #ifndef NRF51_SOC_H
11 #define NRF51_SOC_H
12 
13 #include "hw/sysbus.h"
14 #include "hw/arm/armv7m.h"
15 #include "hw/char/nrf51_uart.h"
16 #include "hw/misc/nrf51_rng.h"
17 #include "hw/gpio/nrf51_gpio.h"
18 
19 #define TYPE_NRF51_SOC "nrf51-soc"
20 #define NRF51_SOC(obj) \
21     OBJECT_CHECK(NRF51State, (obj), TYPE_NRF51_SOC)
22 
23 typedef struct NRF51State {
24     /*< private >*/
25     SysBusDevice parent_obj;
26 
27     /*< public >*/
28     ARMv7MState cpu;
29 
30     NRF51UARTState uart;
31     NRF51RNGState rng;
32     NRF51GPIOState gpio;
33 
34     MemoryRegion iomem;
35     MemoryRegion sram;
36     MemoryRegion flash;
37 
38     uint32_t sram_size;
39     uint32_t flash_size;
40 
41     MemoryRegion *board_memory;
42 
43     MemoryRegion container;
44 
45 } NRF51State;
46 
47 #endif
48 
49