From 9582ec9b5cd3aac05cfcdf3cc2b5faa9d0f43e70 Mon Sep 17 00:00:00 2001 From: Dylan Laduranty Date: Fri, 16 Jul 2021 13:20:30 +0200 Subject: [PATCH] kconfig: add Kconfig support for nRF9160 cpu and nRF9160DK board --- boards/nrf9160dk/Kconfig | 15 +++++++++++++++ cpu/nrf9160/Kconfig | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 boards/nrf9160dk/Kconfig create mode 100644 cpu/nrf9160/Kconfig diff --git a/boards/nrf9160dk/Kconfig b/boards/nrf9160dk/Kconfig new file mode 100644 index 0000000000..055ce2813f --- /dev/null +++ b/boards/nrf9160dk/Kconfig @@ -0,0 +1,15 @@ +# Copyright (c) 2021 Mesotic SAS +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "nrf9160dk" if BOARD_NRF9160DK + +config BOARD_NRF9160DK + bool + default y + select CPU_MODEL_NRF9160 + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART diff --git a/cpu/nrf9160/Kconfig b/cpu/nrf9160/Kconfig new file mode 100644 index 0000000000..e2caa06192 --- /dev/null +++ b/cpu/nrf9160/Kconfig @@ -0,0 +1,38 @@ +# Copyright (c) 2021 Mesotic SAS +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config CPU_FAM_NRF9160 + bool + select HAS_CPU_NRF9160 + select HAS_PERIPH_CPUID + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_TIMER_PERIODIC + select HAS_PERIPH_UART_MODECFG + +## CPU Models +config CPU_MODEL_NRF9160 + bool + select CPU_CORE_CORTEX_M33 + select CPU_FAM_NRF9160 + +## CPU common symbols +config CPU_FAM + default "nrf9160" if CPU_FAM_NRF9160 + +config CPU_MODEL + default "nrf9160" if CPU_MODEL_NRF9160 + +config CPU + default "nrf9160" if CPU_FAM_NRF9160 + +## Definition of specific features +config HAS_CPU_NRF9160 + bool + help + Indicates that the current cpu is 'nrf9160'. + +source "$(RIOTCPU)/cortexm_common/Kconfig"