dts: nordic: add binding and macro mapping for SPU
This commit contributes a binding .yaml file for Nordic nRF
SPU peripheral and defines the macro for the peripheral base
register address in file ext/hal/nordic/nrfx_config_nrf9160.h.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
diff --git a/dts/bindings/arm/nordic,nrf-spu.yaml b/dts/bindings/arm/nordic,nrf-spu.yaml
new file mode 100644
index 0000000..2ff8d3c
--- /dev/null
+++ b/dts/bindings/arm/nordic,nrf-spu.yaml
@@ -0,0 +1,28 @@
+---
+title: Nordic SPU (System Protection Unit)
+version: 0.1
+
+description: >
+ Binding for the Nordic SPU (System Protection Unit)
+
+properties:
+ compatible:
+ type: string
+ category: required
+ description: compatible strings
+ constraint: "nordic,nrf-spu"
+ generation: define
+
+ reg:
+ type: array
+ description: mmio register space
+ generation: define
+ category: required
+
+ interrupts:
+ type: array
+ category: required
+ description: required interrupts
+ generation: define
+
+...
diff --git a/ext/hal/nordic/nrfx_config_nrf9160.h b/ext/hal/nordic/nrfx_config_nrf9160.h
index ebaa33f..967c0c9 100644
--- a/ext/hal/nordic/nrfx_config_nrf9160.h
+++ b/ext/hal/nordic/nrfx_config_nrf9160.h
@@ -114,6 +114,11 @@
((NRF_SPIM_Type *)DT_NORDIC_NRF_SPI_SPI_3_BASE_ADDRESS)
#endif
+#ifdef DT_NORDIC_NRF_SPU_SPU_BASE_ADDRESS
+#define NRF_SPU \
+ ((NRF_SPU_Type *)DT_NORDIC_NRF_SPU_SPU_BASE_ADDRESS)
+#endif
+
#ifdef DT_NORDIC_NRF_TIMER_TIMER_0_BASE_ADDRESS
#define NRF_TIMER0 \
((NRF_TIMER_Type *)DT_NORDIC_NRF_TIMER_TIMER_0_BASE_ADDRESS)