From 75135e87d965820dc99a675a5fa9ad37c157653c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82=C4=85bek?= Date: Tue, 26 Jan 2021 11:10:27 +0100 Subject: [PATCH] boards: nrf9160dk: Add support for newer revisions (0.14.0+) of the DK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the multiple board revisions feature to provide support for the new hardware possibilities available in nRF9160 DK starting from v0.14.0. Signed-off-by: Andrzej Głąbek --- boards/arm/nrf9160dk_nrf52840/board.c | 44 +++++++++++++++- boards/arm/nrf9160dk_nrf52840/doc/index.rst | 19 ++++++- .../nordic,nrf9160dk-nrf52840-interface.yaml | 27 ++++++---- .../dts/nrf9160dk_nrf52840_reset_on_if9.dtsi | 16 ++++++ .../nrf9160dk_nrf52840_0_14_0.conf | 4 ++ .../nrf9160dk_nrf52840_0_14_0.overlay | 51 +++++++++++++++++++ .../nrf9160dk_nrf52840_0_7_0.conf | 4 ++ boards/arm/nrf9160dk_nrf52840/revision.cmake | 7 +++ boards/arm/nrf9160dk_nrf9160/doc/index.rst | 25 +++++++++ .../nordic,nrf9160dk-nrf52840-interface.yaml | 27 ++++++---- .../dts/nrf9160dk_nrf52840_reset_on_if9.dtsi | 12 +++++ .../nrf9160dk_nrf9160_0_14_0.conf | 4 ++ .../nrf9160dk_nrf9160_0_14_0.overlay | 7 +++ .../nrf9160dk_nrf9160_0_7_0.conf | 4 ++ .../nrf9160dk_nrf9160_common_0_14_0.dtsi | 47 +++++++++++++++++ .../nrf9160dk_nrf9160ns_0_14_0.conf | 4 ++ .../nrf9160dk_nrf9160ns_0_14_0.overlay | 7 +++ .../nrf9160dk_nrf9160ns_0_7_0.conf | 4 ++ boards/arm/nrf9160dk_nrf9160/revision.cmake | 7 +++ .../boards/nrf9160dk_nrf52840_0_14_0.overlay | 8 +++ 20 files changed, 305 insertions(+), 23 deletions(-) create mode 100644 boards/arm/nrf9160dk_nrf52840/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi create mode 100644 boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.conf create mode 100644 boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay create mode 100644 boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_7_0.conf create mode 100644 boards/arm/nrf9160dk_nrf52840/revision.cmake create mode 100644 boards/arm/nrf9160dk_nrf9160/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.conf create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.overlay create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_7_0.conf create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common_0_14_0.dtsi create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.conf create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.overlay create mode 100644 boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_7_0.conf create mode 100644 boards/arm/nrf9160dk_nrf9160/revision.cmake create mode 100644 samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840_0_14_0.overlay diff --git a/boards/arm/nrf9160dk_nrf52840/board.c b/boards/arm/nrf9160dk_nrf52840/board.c index eb54138a1d1..9c62c095db8 100644 --- a/boards/arm/nrf9160dk_nrf52840/board.c +++ b/boards/arm/nrf9160dk_nrf52840/board.c @@ -9,6 +9,7 @@ #include #include #include +#include LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_NRF9160DK_LOG_LEVEL); @@ -22,7 +23,16 @@ LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_NRF9160DK_LOG_LEVEL); DT_GPIO_FLAGS_BY_IDX(DT_NODELABEL(name), prop, idx) #define GET_DEV(name, prop, idx) DEVICE_DT_GET(GET_CTLR(name, prop, idx)) -#define USE_RESET_GPIO DT_NODE_HAS_STATUS(DT_NODELABEL(reset_input), okay) +/* If the GPIO pin selected to be the reset line is actually the pin that + * exposes the nRESET function (P0.18 in nRF52840), there is no need to + * provide any additional GPIO configuration for it. + */ +#define RESET_INPUT_IS_PINRESET (IS_ENABLED(CONFIG_GPIO_AS_PINRESET) && \ + GET_PORT(reset_input, gpios, 0) == 0 && \ + GET_PIN(reset_input, gpios, 0) == 18) +#define USE_RESET_GPIO \ + (DT_NODE_HAS_STATUS(DT_NODELABEL(reset_input), okay) && \ + !RESET_INPUT_IS_PINRESET) struct switch_cfg { const struct device *gpio; @@ -77,6 +87,9 @@ static const struct switch_cfg routing_switches[] = { ROUTING_SWITCH(nrf_interface_pins_0_2_routing) ROUTING_SWITCH(nrf_interface_pins_3_5_routing) ROUTING_SWITCH(nrf_interface_pins_6_8_routing) + ROUTING_SWITCH(nrf_interface_pin_9_routing) + ROUTING_SWITCH(io_expander_pins_routing) + ROUTING_SWITCH(external_flash_pins_routing) }; #if USE_RESET_GPIO @@ -197,3 +210,32 @@ static int init(const struct device *dev) } SYS_INIT(init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); + +#define EXT_MEM_CTRL DT_NODELABEL(external_flash_pins_routing) +#if DT_NODE_EXISTS(EXT_MEM_CTRL) + +static int early_init(const struct device *dev) +{ + /* As soon as possible after the system starts up, enable the analog + * switch that routes signals to the external flash. Otherwise, the + * HOLD line in the flash chip may not be properly pulled up internally + * and consequently the chip will not respond to any command. + * Later on, during the normal initialization performed above, this + * analog switch will get configured according to what is selected + * in devicetree. + */ + uint32_t psel = NRF_DT_GPIOS_TO_PSEL(EXT_MEM_CTRL, control_gpios); + gpio_dt_flags_t flags = DT_GPIO_FLAGS(EXT_MEM_CTRL, control_gpios); + + if (flags & GPIO_ACTIVE_LOW) { + nrf_gpio_pin_clear(psel); + } else { + nrf_gpio_pin_set(psel); + } + nrf_gpio_cfg_output(psel); + + return 0; +} + +SYS_INIT(early_init, PRE_KERNEL_1, 0); +#endif diff --git a/boards/arm/nrf9160dk_nrf52840/doc/index.rst b/boards/arm/nrf9160dk_nrf52840/doc/index.rst index 399999cbca3..752eee4c6fa 100644 --- a/boards/arm/nrf9160dk_nrf52840/doc/index.rst +++ b/boards/arm/nrf9160dk_nrf52840/doc/index.rst @@ -130,8 +130,9 @@ such as LEDs and buttons, UART interfaces (VCOMx) of the interface MCU, and specific nRF52840 SoC pins. .. note:: - nRF9160 signals routed to other components on the DK are not simultaneously - available on the DK connectors. + In nRF9160 DK revisions earlier than v0.14.0, nRF9160 signals routed to + other components on the DK are not simultaneously available on the DK + connectors. When compiling a project for nrf9160dk_nrf52840, the board controller firmware will be compiled and run automatically after the Kernel has been initialized. @@ -208,6 +209,20 @@ on the nRF9160 DK: | ``nrf_interface_pins_6_8_routing`` | nRF_IF6-8_CTRL (nRF91_COEX) | +------------------------------------+------------------------------+ +When building for the DK revision 0.14.0 or later, you can use the following +additional nodes (see :ref:`application_board_version` for information how to +build for specific revisions of the board): + ++------------------------------------+------------------------------+ +| Devicetree node label | Analog switch name | ++====================================+==============================+ +| ``nrf_interface_pin_9_routing`` | nRF_IF9_CTRL | ++------------------------------------+------------------------------+ +| ``io_expander_pins_routing`` | IO_EXP_EN | ++------------------------------------+------------------------------+ +| ``external_flash_pins_routing`` | EXT_MEM_CTRL | ++------------------------------------+------------------------------+ + For example, if you want to enable the optional routing for the nRF9160 pins P0.17, P0.18, and P0.19 so that they are routed to nRF52840 pins P0.17, P0.20, and P0.15, respectively, add the following in the devicetree overlay in your diff --git a/boards/arm/nrf9160dk_nrf52840/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml b/boards/arm/nrf9160dk_nrf52840/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml index 47416167ea0..4b58b15317a 100644 --- a/boards/arm/nrf9160dk_nrf52840/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml +++ b/boards/arm/nrf9160dk_nrf52840/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml @@ -10,16 +10,17 @@ description: | This interface can be used for inter-SoC communication on the DK. The connections are as follows: - | nRF9160 | | nRF52840 | - | P0.17 | -- nRF interface line 0 -- | P0.17 | - | P0.18 | -- nRF interface line 1 -- | P0.20 | - | P0.19 | -- nRF interface line 2 -- | P0.15 | - | P0.21 | -- nRF interface line 3 -- | P0.22 | - | P0.22 | -- nRF interface line 4 -- | P1.04 | - | P0.23 | -- nRF interface line 5 -- | P1.02 | - | COEX0 | -- nRF interface line 6 -- | P1.13 | - | COEX1 | -- nRF interface line 7 -- | P1.11 | - | COEX2 | -- nRF interface line 8 -- | P1.15 | + | nRF9160 | | nRF52840 | + | P0.17 | -- nRF interface line 0 -- | P0.17 | + | P0.18 | -- nRF interface line 1 -- | P0.20 | + | P0.19 | -- nRF interface line 2 -- | P0.15 | + | P0.21 | -- nRF interface line 3 -- | P0.22 | + | P0.22 | -- nRF interface line 4 -- | P1.04 | + | P0.23 | -- nRF interface line 5 -- | P1.02 | + | COEX0 | -- nRF interface line 6 -- | P1.13 | + | COEX1 | -- nRF interface line 7 -- | P1.11 | + | COEX2 | -- nRF interface line 8 -- | P1.15 | + | P0.24 | -- nRF interface line 9 -- | P0.18 (nRESET) | (in v0.14.0 or later) Before particular lines of this interface can be used, the corresponding analog switches that control the routing of involved nRF9160 pins must be @@ -29,6 +30,12 @@ description: | - `nrf_interface_pins_0_2_routing` to enable lines 0-2 - `nrf_interface_pins_3_5_routing` to enable lines 3-5 - `nrf_interface_pins_6_8_routing` to enable lines 6-8 + - `nrf_interface_pin_9_routing` to enable line 9 (this line is only + available in nRF9160 DK v0.14.0 or later) + + NOTE: In nRF9160 DK revisions earlier than v0.14.0, when the above signals + from nRF9160 are routed to nRF52840, they are not available on the DK + connectors. compatible: "nordic,nrf9160dk-nrf52840-interface" diff --git a/boards/arm/nrf9160dk_nrf52840/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi b/boards/arm/nrf9160dk_nrf52840/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi new file mode 100644 index 00000000000..9b62748c6e8 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf52840/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* NOTE: this feature is only available in nRF9160 DK v0.14.0 or later. */ + +&nrf_interface_pin_9_routing { + status = "okay"; +}; + +&reset_input { + status = "okay"; + gpios = <&interface_to_nrf9160 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; +}; diff --git a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.conf b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.conf new file mode 100644 index 00000000000..0e22297a6a0 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is required by the multiple board revisions mechanism. diff --git a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay new file mode 100644 index 00000000000..ddd73df4c1a --- /dev/null +++ b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_14_0.overlay @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + board-control { + nrf_interface_pin_9_routing: switch-nrf-if9-ctrl { + compatible = "nordic,nrf9160dk-optional-routing"; + control-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; + + io_expander_pins_routing: switch-io-exp-en { + compatible = "nordic,nrf9160dk-optional-routing"; + control-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; + + external_flash_pins_routing: switch-ext-mem-ctrl { + compatible = "nordic,nrf9160dk-optional-routing"; + control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; + }; +}; + +&interface_to_nrf9160 { + gpio-map = <0 0 &gpio0 17 0>, + <1 0 &gpio0 20 0>, + <2 0 &gpio0 15 0>, + <3 0 &gpio0 22 0>, + <4 0 &gpio1 4 0>, + <5 0 &gpio1 2 0>, + <6 0 &gpio1 13 0>, + <7 0 &gpio1 11 0>, + <8 0 &gpio1 15 0>, + /* New signal added in this revision (0.14.0). */ + <9 0 &gpio0 18 0>; /* nReset */ +}; + +&vcom2_pins_routing { + /* No need to drive P0.12 together with P1.12 in this board revision. */ + control-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; +}; + +&reset_input { + /* By default use the dedicated connection to the nRESET (P0.18) pin. */ + gpios = <&interface_to_nrf9160 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; +}; diff --git a/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_7_0.conf b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_7_0.conf new file mode 100644 index 00000000000..0e22297a6a0 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_0_7_0.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is required by the multiple board revisions mechanism. diff --git a/boards/arm/nrf9160dk_nrf52840/revision.cmake b/boards/arm/nrf9160dk_nrf52840/revision.cmake new file mode 100644 index 00000000000..983c96c7e9e --- /dev/null +++ b/boards/arm/nrf9160dk_nrf52840/revision.cmake @@ -0,0 +1,7 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +board_check_revision( + FORMAT MAJOR.MINOR.PATCH + DEFAULT_REVISION 0.7.0 +) diff --git a/boards/arm/nrf9160dk_nrf9160/doc/index.rst b/boards/arm/nrf9160dk_nrf9160/doc/index.rst index d7a5fcefffb..6da7dd22a96 100644 --- a/boards/arm/nrf9160dk_nrf9160/doc/index.rst +++ b/boards/arm/nrf9160dk_nrf9160/doc/index.rst @@ -83,6 +83,31 @@ hardware features: | WDT | on-chip | watchdog | +-----------+------------+----------------------+ +.. _nrf9160dk_additional_hardware: + +Additional hardware in v0.14.0+ +------------------------------- + +Starting from v0.14.0, additional hardware is available on the DK: + +* External flash memory (MX25R6435F, 64 Mb) +* I/O expander (PCAL6408A) that can be used to interface LEDs, slide switches, + and buttons + +To use this additional hardware, specify the revision of the board that +should be used when building your application (for more information, see +:ref:`application_board_version`). For example, to build for nRF9160 DK v1.0.0: + +.. zephyr-app-commands:: + :tool: all + :cd-into: + :board: nrf9160dk_nrf9160@1.0.0 + :goals: build + :compact: + +Remember to also enable routing for this additional hardware in the firmware for +:ref:`nrf9160dk_nrf52840` (see :ref:`nrf9160dk_board_controller_firmware`). + Other hardware features are not supported by the Zephyr kernel. See `nRF9160 DK website`_ and `Nordic Semiconductor Infocenter`_ for a complete list of nRF9160 DK board hardware features. diff --git a/boards/arm/nrf9160dk_nrf9160/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml b/boards/arm/nrf9160dk_nrf9160/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml index 47416167ea0..4b58b15317a 100644 --- a/boards/arm/nrf9160dk_nrf9160/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml +++ b/boards/arm/nrf9160dk_nrf9160/dts/bindings/nordic,nrf9160dk-nrf52840-interface.yaml @@ -10,16 +10,17 @@ description: | This interface can be used for inter-SoC communication on the DK. The connections are as follows: - | nRF9160 | | nRF52840 | - | P0.17 | -- nRF interface line 0 -- | P0.17 | - | P0.18 | -- nRF interface line 1 -- | P0.20 | - | P0.19 | -- nRF interface line 2 -- | P0.15 | - | P0.21 | -- nRF interface line 3 -- | P0.22 | - | P0.22 | -- nRF interface line 4 -- | P1.04 | - | P0.23 | -- nRF interface line 5 -- | P1.02 | - | COEX0 | -- nRF interface line 6 -- | P1.13 | - | COEX1 | -- nRF interface line 7 -- | P1.11 | - | COEX2 | -- nRF interface line 8 -- | P1.15 | + | nRF9160 | | nRF52840 | + | P0.17 | -- nRF interface line 0 -- | P0.17 | + | P0.18 | -- nRF interface line 1 -- | P0.20 | + | P0.19 | -- nRF interface line 2 -- | P0.15 | + | P0.21 | -- nRF interface line 3 -- | P0.22 | + | P0.22 | -- nRF interface line 4 -- | P1.04 | + | P0.23 | -- nRF interface line 5 -- | P1.02 | + | COEX0 | -- nRF interface line 6 -- | P1.13 | + | COEX1 | -- nRF interface line 7 -- | P1.11 | + | COEX2 | -- nRF interface line 8 -- | P1.15 | + | P0.24 | -- nRF interface line 9 -- | P0.18 (nRESET) | (in v0.14.0 or later) Before particular lines of this interface can be used, the corresponding analog switches that control the routing of involved nRF9160 pins must be @@ -29,6 +30,12 @@ description: | - `nrf_interface_pins_0_2_routing` to enable lines 0-2 - `nrf_interface_pins_3_5_routing` to enable lines 3-5 - `nrf_interface_pins_6_8_routing` to enable lines 6-8 + - `nrf_interface_pin_9_routing` to enable line 9 (this line is only + available in nRF9160 DK v0.14.0 or later) + + NOTE: In nRF9160 DK revisions earlier than v0.14.0, when the above signals + from nRF9160 are routed to nRF52840, they are not available on the DK + connectors. compatible: "nordic,nrf9160dk-nrf52840-interface" diff --git a/boards/arm/nrf9160dk_nrf9160/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi b/boards/arm/nrf9160dk_nrf9160/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi new file mode 100644 index 00000000000..35e386cd286 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/dts/nrf9160dk_nrf52840_reset_on_if9.dtsi @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* NOTE: this feature is only available in nRF9160 DK v0.14.0 or later. */ + +&nrf52840_reset { + status = "okay"; + gpios = <&interface_to_nrf52840 9 GPIO_ACTIVE_LOW>; +}; diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.conf b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.conf new file mode 100644 index 00000000000..0e22297a6a0 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is required by the multiple board revisions mechanism. diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.overlay b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.overlay new file mode 100644 index 00000000000..41bf4abd221 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_14_0.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf9160dk_nrf9160_common_0_14_0.dtsi" diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_7_0.conf b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_7_0.conf new file mode 100644 index 00000000000..0e22297a6a0 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_0_7_0.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is required by the multiple board revisions mechanism. diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common_0_14_0.dtsi b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common_0_14_0.dtsi new file mode 100644 index 00000000000..45f9b4ccbbe --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common_0_14_0.dtsi @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&interface_to_nrf52840 { + gpio-map = <0 0 &gpio0 17 0>, + <1 0 &gpio0 18 0>, + <2 0 &gpio0 19 0>, + <3 0 &gpio0 21 0>, + <4 0 &gpio0 22 0>, + <5 0 &gpio0 23 0>, + /* 6: COEX0 */ + /* 7: COEX1 */ + /* 8: COEX2 */ + <9 0 &gpio0 24 0>; +}; + +&nrf52840_reset { + gpios = <&interface_to_nrf52840 9 GPIO_ACTIVE_LOW>; +}; + +&spi3 { + status = "okay"; + sck-pin = <13>; + mosi-pin = <11>; + miso-pin = <12>; + cs-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + mx25r64: mx25r6435f@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <8000000>; + label = "MX25R64"; + jedec-id = [c2 28 17]; + sfdp-bfp = [ + e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb + ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 + 10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44 + 30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff + ]; + size = <67108864>; + has-dpd; + t-enter-dpd = <10000>; + t-exit-dpd = <35000>; + }; +}; diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.conf b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.conf new file mode 100644 index 00000000000..0e22297a6a0 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is required by the multiple board revisions mechanism. diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.overlay b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.overlay new file mode 100644 index 00000000000..41bf4abd221 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_14_0.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf9160dk_nrf9160_common_0_14_0.dtsi" diff --git a/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_7_0.conf b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_7_0.conf new file mode 100644 index 00000000000..0e22297a6a0 --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_0_7_0.conf @@ -0,0 +1,4 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# This file is required by the multiple board revisions mechanism. diff --git a/boards/arm/nrf9160dk_nrf9160/revision.cmake b/boards/arm/nrf9160dk_nrf9160/revision.cmake new file mode 100644 index 00000000000..983c96c7e9e --- /dev/null +++ b/boards/arm/nrf9160dk_nrf9160/revision.cmake @@ -0,0 +1,7 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +board_check_revision( + FORMAT MAJOR.MINOR.PATCH + DEFAULT_REVISION 0.7.0 +) diff --git a/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840_0_14_0.overlay b/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840_0_14_0.overlay new file mode 100644 index 00000000000..409d3bada63 --- /dev/null +++ b/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840_0_14_0.overlay @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* Use the reset line that is available starting from v0.14.0 of the DK. */ +#include