arm: dts: nrf: Add Device Tree Support for nRF52840 SoC & boards

Add device tree support for nRF52840 SoC and PCA10056-DK board.  This
is minimal support for memory, flash, and UART.

For the nRF52840 we select between "nordic,nrf-uarte", "nordic,nrf-uart"
support for each board.

Change-Id: I1c377e0cb97ff4716ea5489fffaa7c0e2b34d18a
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-04-11 12:55:16 -05:00
commit b09f63ac54
5 changed files with 71 additions and 0 deletions

View file

@ -18,3 +18,6 @@ CONFIG_GPIO_AS_PINRESET=y
# bluetooth
CONFIG_BLUETOOTH=y
CONFIG_BLUETOOTH_CONTROLLER=y
#enable DTS
CONFIG_HAS_DTS=y

View file

@ -21,6 +21,7 @@ dtb-$(CONFIG_BOARD_STM32373C_EVAL) = stm32373c_eval.dts_compiled
dtb-$(CONFIG_BOARD_96B_NITROGEN) = 96b_nitrogen.dts_compiled
dtb-$(CONFIG_BOARD_NRF52_PCA10040) = nrf52_pca10040.dts_compiled
dtb-$(CONFIG_BOARD_NRF52_BLENANO2) = nrf52_blenano2.dts_compiled
dtb-$(CONFIG_BOARD_NRF52840_PCA10056) = nrf52840_pca10056.dts_compiled
always := $(dtb-y)
endif

View file

@ -0,0 +1,38 @@
#include <arm/armv7-m.dtsi>
#include <nordic/mem.h>
/ {
cpus {
cpu@0 {
compatible = "arm,cortex-m4f";
};
};
flash0: flash {
reg = <0x00000000 DT_FLASH_SIZE>;
};
sram0: memory {
reg = <0x20000000 DT_SRAM_SIZE>;
};
soc {
uart0: uart@40002000 {
compatible = "nordic,nrf-uarte", "nordic,nrf-uart";
reg = <0x40002000 0x1000>;
interrupts = <2 1>;
status = "disabled";
};
uart1: uart@40028000 {
compatible = "nordic,nrf-uarte";
reg = <0x40028000 0x1000>;
interrupts = <40 1>;
status = "disabled";
};
};
};
&nvic {
arm,num-irq-priority-bits = <3>;
};

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2017 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <nordic/nrf52840.dtsi>
/ {
model = "Nordic PCA10056 Dev Kit";
compatible = "nordic,pca10056-dk", "nordic,nrf52840-qiaa",
"nordic,nrf52840";
chosen {
zephyr,console = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
};
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <115200>;
status = "ok";
};

View file

@ -0,0 +1,3 @@
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED