arm: dts: nrf: Add Device Tree Support for nRF51822 SoC & boards
Add device tree support for nRF51822 SoCs and Arduino 101-BLE, Curie-BLE, BLE Nano, PCA10028-DK, and Quark-SE BLE boards. This is minimal support for memory, flash, and UART. Change-Id: I7e572bea537e384b6d66e520462f023ace0c9b35 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
b09f63ac54
commit
ca3c7ec0a9
24 changed files with 234 additions and 4 deletions
|
@ -12,11 +12,13 @@ config SOC
|
|||
string
|
||||
default nRF51822_QFAA
|
||||
|
||||
if !HAS_DTS
|
||||
config SRAM_SIZE
|
||||
default 16
|
||||
|
||||
config FLASH_SIZE
|
||||
default 256
|
||||
endif
|
||||
|
||||
config ISR_STACK_SIZE
|
||||
default 640
|
||||
|
|
|
@ -12,11 +12,13 @@ config SOC
|
|||
string
|
||||
default nRF51822_QFAB
|
||||
|
||||
if !HAS_DTS
|
||||
config SRAM_SIZE
|
||||
default 16
|
||||
|
||||
config FLASH_SIZE
|
||||
default 128
|
||||
endif
|
||||
|
||||
config ISR_STACK_SIZE
|
||||
default 640
|
||||
|
|
|
@ -12,10 +12,12 @@ config SOC
|
|||
string
|
||||
default nRF51822_QFAC
|
||||
|
||||
if !HAS_DTS
|
||||
config SRAM_SIZE
|
||||
default 32
|
||||
|
||||
config FLASH_SIZE
|
||||
default 256
|
||||
endif
|
||||
|
||||
endif # SOC_NRF51822_QFAC
|
||||
|
|
|
@ -19,19 +19,21 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
|||
config SYS_POWER_MANAGEMENT
|
||||
default y
|
||||
|
||||
if !HAS_DTS
|
||||
config SRAM_BASE_ADDRESS
|
||||
default 0x20000000
|
||||
|
||||
config FLASH_BASE_ADDRESS
|
||||
default 0x00000000
|
||||
|
||||
config NUM_IRQS
|
||||
int
|
||||
default 26
|
||||
|
||||
config NUM_IRQ_PRIO_BITS
|
||||
int
|
||||
default 2
|
||||
endif
|
||||
|
||||
config NUM_IRQS
|
||||
int
|
||||
default 26
|
||||
|
||||
if SENSOR
|
||||
|
||||
|
|
|
@ -11,3 +11,6 @@ CONFIG_UART_NRF5=y
|
|||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
||||
|
||||
#enable DTS
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -19,3 +19,6 @@ CONFIG_UART_CONSOLE=y
|
|||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
||||
|
||||
#enable DTS
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -11,3 +11,6 @@ CONFIG_UART_NRF5=y
|
|||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
||||
|
||||
#enable DTS
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -15,3 +15,6 @@ CONFIG_UART_CONSOLE=y
|
|||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
||||
|
||||
#enable DTS
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -15,3 +15,6 @@ CONFIG_UART_CONSOLE=y
|
|||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
||||
|
||||
#enable DTS
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -11,3 +11,6 @@ CONFIG_UART_NRF5=y
|
|||
# bluetooth
|
||||
CONFIG_BLUETOOTH=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER=y
|
||||
|
||||
#enable DTS
|
||||
CONFIG_HAS_DTS=y
|
||||
|
|
|
@ -22,6 +22,12 @@ 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
|
||||
dtb-$(CONFIG_BOARD_ARDUINO_101_BLE) = arduino_101_ble.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_BBC_MICROBIT) = bbc_microbit.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_CURIE_BLE) = curie_ble.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF51_BLENANO) = nrf51_blenano.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_NRF51_PCA10028) = nrf51_pca10028.dts_compiled
|
||||
dtb-$(CONFIG_BOARD_QUARK_SE_C1000_BLE) = quark_se_c1000_ble.dts_compiled
|
||||
|
||||
always := $(dtb-y)
|
||||
endif
|
||||
|
|
25
dts/arm/arduino_101_ble.dts
Normal file
25
dts/arm/arduino_101_ble.dts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Arduino 101-BLE";
|
||||
compatible = "arduino,101-ble", "nordic,nrf51822-qfaa",
|
||||
"nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <1000000>;
|
||||
status = "ok";
|
||||
};
|
3
dts/arm/arduino_101_ble.fixup
Normal file
3
dts/arm/arduino_101_ble.fixup
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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
|
24
dts/arm/bbc_microbit.dts
Normal file
24
dts/arm/bbc_microbit.dts
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "BBC Micro:bit";
|
||||
compatible = "bbc,microbit", "nordic,nrf51822-qfaa", "nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "ok";
|
||||
current-speed = <115200>;
|
||||
};
|
3
dts/arm/bbc_microbit.fixup
Normal file
3
dts/arm/bbc_microbit.fixup
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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
|
25
dts/arm/curie_ble.dts
Normal file
25
dts/arm/curie_ble.dts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Intel Curie BLE";
|
||||
compatible = "intel,curie-ble", "nordic,nrf51822-qfaa",
|
||||
"nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <1000000>;
|
||||
status = "ok";
|
||||
};
|
3
dts/arm/curie_ble.fixup
Normal file
3
dts/arm/curie_ble.fixup
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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
|
31
dts/arm/nordic/nrf51822.dtsi
Normal file
31
dts/arm/nordic/nrf51822.dtsi
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <arm/armv6-m.dtsi>
|
||||
#include <nordic/mem.h>
|
||||
|
||||
/ {
|
||||
cpus {
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-m0";
|
||||
};
|
||||
};
|
||||
|
||||
flash0: flash {
|
||||
reg = <0x00000000 DT_FLASH_SIZE>;
|
||||
};
|
||||
|
||||
sram0: memory {
|
||||
reg = <0x20000000 DT_SRAM_SIZE>;
|
||||
};
|
||||
|
||||
soc {
|
||||
uart0: uart@40002000 {
|
||||
compatible = "nordic,nrf-uart";
|
||||
reg = <0x40002000 0x1000>;
|
||||
interrupts = <2 1>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nvic {
|
||||
arm,num-irq-priority-bits = <2>;
|
||||
};
|
25
dts/arm/nrf51_blenano.dts
Normal file
25
dts/arm/nrf51_blenano.dts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Redbear BLE Nano";
|
||||
compatible = "redbear,blenano", "nordic,nrf51822-qfaa",
|
||||
"nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <115200>;
|
||||
status = "ok";
|
||||
};
|
3
dts/arm/nrf51_blenano.fixup
Normal file
3
dts/arm/nrf51_blenano.fixup
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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
|
25
dts/arm/nrf51_pca10028.dts
Normal file
25
dts/arm/nrf51_pca10028.dts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Nordic PCA10028 Dev Kit";
|
||||
compatible = "nordic,pca10028-dk", "nordic,nrf51822-qfac",
|
||||
"nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
current-speed = <115200>;
|
||||
status = "ok";
|
||||
};
|
3
dts/arm/nrf51_pca10028.fixup
Normal file
3
dts/arm/nrf51_pca10028.fixup
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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
|
25
dts/arm/quark_se_c1000_ble.dts
Normal file
25
dts/arm/quark_se_c1000_ble.dts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf51822.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Intel Quark SE C1000 BLE";
|
||||
compatible = "intel,quark-se-c1000-ble", "nordic,nrf51822-qfaa",
|
||||
"nordic,nrf51822";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "ok";
|
||||
current-speed = <1000000>;
|
||||
};
|
3
dts/arm/quark_se_c1000_ble.fixup
Normal file
3
dts/arm/quark_se_c1000_ble.fixup
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_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
|
Loading…
Add table
Add a link
Reference in a new issue