diff --git a/dts/arm/nordic/nrf9160_common.dtsi b/dts/arm/nordic/nrf9160_common.dtsi index 6d1d6ecb204..42471f1598e 100644 --- a/dts/arm/nordic/nrf9160_common.dtsi +++ b/dts/arm/nordic/nrf9160_common.dtsi @@ -29,6 +29,13 @@ adc: adc@e000 { label = "ADC_0"; }; +dppic: dppic@17000 { + compatible = "nordic,nrf-dppic"; + reg = <0x17000 0x1000>; + status = "ok"; + label = "DPPIC"; +}; + uart0: uart@8000 { compatible = "nordic,nrf-uarte"; reg = <0x8000 0x1000>; diff --git a/dts/bindings/arm/nordic,nrf-dppic.yaml b/dts/bindings/arm/nordic,nrf-dppic.yaml new file mode 100644 index 00000000000..85ec63e9a79 --- /dev/null +++ b/dts/bindings/arm/nordic,nrf-dppic.yaml @@ -0,0 +1,27 @@ +# +# Copyright (c) 2019 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: Apache-2.0 +# +--- +title: Nordic DPPIC +version: 0.1 + +description: > + Binding for the Nordic DPPIC + Distributed Programmable Peripheral Interconnect Controller + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "nordic,nrf-dppic" + generation: define + + reg: + type: array + category: required + description: mmio register space + generation: define +... diff --git a/ext/hal/nordic/CMakeLists.txt b/ext/hal/nordic/CMakeLists.txt index 6f149e01c30..7f320010b0c 100644 --- a/ext/hal/nordic/CMakeLists.txt +++ b/ext/hal/nordic/CMakeLists.txt @@ -31,6 +31,7 @@ if(CONFIG_HAS_NRFX) zephyr_sources_ifdef(CONFIG_NRFX_ADC nrfx/drivers/src/nrfx_adc.c) zephyr_sources_ifdef(CONFIG_NRFX_CLOCK nrfx/drivers/src/nrfx_clock.c) + zephyr_sources_ifdef(CONFIG_NRFX_DPPI nrfx/drivers/src/nrfx_dppi.c) zephyr_sources_ifdef(CONFIG_NRFX_GPIOTE nrfx/drivers/src/nrfx_gpiote.c) zephyr_sources_ifdef(CONFIG_NRFX_NFCT nrfx/drivers/src/nrfx_nfct.c) zephyr_sources_ifdef(CONFIG_NRFX_PPI nrfx/drivers/src/nrfx_ppi.c) diff --git a/ext/hal/nordic/Kconfig b/ext/hal/nordic/Kconfig index b4e680c712d..3093982646b 100644 --- a/ext/hal/nordic/Kconfig +++ b/ext/hal/nordic/Kconfig @@ -19,6 +19,9 @@ config NRFX_ADC config NRFX_CLOCK bool +config NRFX_DPPI + bool + config NRFX_GPIOTE bool diff --git a/ext/hal/nordic/nrfx_config_nrf9160.h b/ext/hal/nordic/nrfx_config_nrf9160.h index d84808db355..0b7818c0eda 100644 --- a/ext/hal/nordic/nrfx_config_nrf9160.h +++ b/ext/hal/nordic/nrfx_config_nrf9160.h @@ -46,6 +46,11 @@ ((NRF_CLOCK_Type *)DT_NORDIC_NRF_CLOCK_CLOCK_BASE_ADDRESS) #endif +#ifdef DT_NORDIC_NRF_DPPIC_0_BASE_ADDRESS +#define NRF_DPPIC \ + ((NRF_DPPIC_Type *)DT_NORDIC_NRF_DPPIC_0_BASE_ADDRESS) +#endif + #ifdef DT_NORDIC_NRF_FICR_FICR_BASE_ADDRESS #define NRF_FICR \ ((FICR_INFO_Type *)DT_NORDIC_NRF_FICR_FICR_BASE_ADDRESS) @@ -284,8 +289,8 @@ // NRFX_DPPI_ENABLED - nrfx_dppi - DPPI allocator. //========================================================== -#ifndef NRFX_DPPI_ENABLED -#define NRFX_DPPI_ENABLED 0 +#ifdef CONFIG_NRFX_DPPI +#define NRFX_DPPI_ENABLED 1 #endif // NRFX_DPPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== diff --git a/soc/arm/nordic_nrf/Kconfig.peripherals b/soc/arm/nordic_nrf/Kconfig.peripherals index 5cfb419d471..5c748429c1c 100644 --- a/soc/arm/nordic_nrf/Kconfig.peripherals +++ b/soc/arm/nordic_nrf/Kconfig.peripherals @@ -26,6 +26,9 @@ config HAS_HW_NRF_CLOCK config HAS_HW_NRF_COMP bool +config HAS_HW_NRF_DPPIC + bool + config HAS_HW_NRF_ECB bool diff --git a/soc/arm/nordic_nrf/nrf91/Kconfig.soc b/soc/arm/nordic_nrf/nrf91/Kconfig.soc index 5a87d2828cb..8f9ddb57041 100644 --- a/soc/arm/nordic_nrf/nrf91/Kconfig.soc +++ b/soc/arm/nordic_nrf/nrf91/Kconfig.soc @@ -10,6 +10,7 @@ config SOC_NRF9160 bool select HAS_HW_NRF_CC310 select HAS_HW_NRF_CLOCK + select HAS_HW_NRF_DPPIC select HAS_HW_NRF_EGU0 select HAS_HW_NRF_EGU1 select HAS_HW_NRF_EGU2