[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] hw/arm/nrf51_soc: Mark some peripherals as unimplemented
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 2/4] hw/arm/nrf51_soc: Mark some peripherals as unimplemented |
Date: |
Mon, 4 May 2020 09:28:20 +0200 |
Map some peripherals used by Zephyr Project:
https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-v2.2.0/dts/arm/nordic/nrf51822.dtsi
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/hw/arm/nrf51.h | 4 ++++
hw/arm/nrf51_soc.c | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/include/hw/arm/nrf51.h b/include/hw/arm/nrf51.h
index de836beaa4..46d0cfc7a1 100644
--- a/include/hw/arm/nrf51.h
+++ b/include/hw/arm/nrf51.h
@@ -25,11 +25,15 @@
#define NRF51_IOMEM_SIZE 0x20000000
#define NRF51_PERIPHERAL_SIZE 0x00001000
+#define NRF51_RADIO_BASE 0x40001000
#define NRF51_UART_BASE 0x40002000
#define NRF51_TWI_BASE 0x40003000
+#define NRF51_GPIOTE_BASE 0x40006000
#define NRF51_TIMER_BASE 0x40008000
+#define NRF51_TEMP_BASE 0x4000c000
#define NRF51_RNG_BASE 0x4000D000
#define NRF51_NVMC_BASE 0x4001E000
+#define NRF51_PPI_BASE 0x4001f000
#define NRF51_GPIO_BASE 0x50000000
#define NRF51_PRIVATE_BASE 0xF0000000
diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
index e50473fd19..6212c5cb53 100644
--- a/hw/arm/nrf51_soc.c
+++ b/hw/arm/nrf51_soc.c
@@ -170,6 +170,17 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error
**errp)
memory_region_add_subregion_overlap(&s->container,
NRF51_IOMEM_BASE, &s->clock, -1);
+ create_unimplemented_device("nrf51_soc.radio", NRF51_RADIO_BASE,
+ NRF51_PERIPHERAL_SIZE);
+ create_unimplemented_device("nrf51_soc.uarte", NRF51_UART_BASE,
+ NRF51_PERIPHERAL_SIZE);
+ create_unimplemented_device("nrf51_soc.gpiote", NRF51_GPIOTE_BASE,
+ NRF51_PERIPHERAL_SIZE);
+ create_unimplemented_device("nrf51_soc.temp", NRF51_TEMP_BASE,
+ NRF51_PERIPHERAL_SIZE);
+ create_unimplemented_device("nrf51_soc.ppi", NRF51_PPI_BASE,
+ NRF51_PERIPHERAL_SIZE);
+
create_unimplemented_device("nrf51_soc.io", NRF51_IOMEM_BASE,
NRF51_IOMEM_SIZE);
create_unimplemented_device("nrf51_soc.private",
--
2.21.3