-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: arm: Add board definition for Adafruit Feather nrf52840 Sense
Add support for adafruit_feather_nrf52840_sense board; mostly copies the adafruit_feather_nrf52840 (Express variant) configuration since these boards are similarly constructed. Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
- Loading branch information
Showing
12 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Adafruit Feather nRF52840 Sense board configuration | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ENABLE_DCDC | ||
bool "DCDC mode" | ||
select SOC_DCDC_NRF52X | ||
default y | ||
depends on BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Adafruit Feather nRF52840 Sense board configuration | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE | ||
bool "Adafruit Feather nRF52840 Sense" | ||
depends on SOC_NRF52840_QIAA |
13 changes: 13 additions & 0 deletions
13
boards/arm/adafruit_feather_nrf52840_sense/Kconfig.defconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Adafruit Feather nRF52840 Sense board configuration | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE | ||
|
||
config BOARD | ||
default "adafruit_feather_nrf52840_sense" | ||
|
||
config BT_CTLR | ||
default BT | ||
|
||
endif # BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE |
77 changes: 77 additions & 0 deletions
77
boards/arm/adafruit_feather_nrf52840_sense/adafruit_feather_nrf52840_sense-pinctrl.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright (c) 2022 Nordic Semiconductor | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
psels = <NRF_PSEL(UART_TX, 0, 25)>, | ||
<NRF_PSEL(UART_RX, 0, 24)>; | ||
}; | ||
}; | ||
|
||
uart0_sleep: uart0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(UART_TX, 0, 25)>, | ||
<NRF_PSEL(UART_RX, 0, 24)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
i2c0_default: i2c0_default { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 12)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 11)>; | ||
}; | ||
}; | ||
|
||
i2c0_sleep: i2c0_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(TWIM_SDA, 0, 12)>, | ||
<NRF_PSEL(TWIM_SCL, 0, 11)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
spi1_default: spi1_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 14)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 13)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 15)>; | ||
}; | ||
}; | ||
|
||
spi1_sleep: spi1_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 0, 14)>, | ||
<NRF_PSEL(SPIM_MOSI, 0, 13)>, | ||
<NRF_PSEL(SPIM_MISO, 0, 15)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
qspi_default: qspi_default { | ||
group1 { | ||
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>, | ||
<NRF_PSEL(QSPI_IO0, 0, 17)>, | ||
<NRF_PSEL(QSPI_IO1, 0, 22)>, | ||
<NRF_PSEL(QSPI_IO2, 0, 23)>, | ||
<NRF_PSEL(QSPI_IO3, 0, 21)>, | ||
<NRF_PSEL(QSPI_CSN, 0, 20)>; | ||
}; | ||
}; | ||
|
||
qspi_sleep: qspi_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>, | ||
<NRF_PSEL(QSPI_IO0, 0, 17)>, | ||
<NRF_PSEL(QSPI_IO1, 0, 22)>, | ||
<NRF_PSEL(QSPI_IO2, 0, 23)>, | ||
<NRF_PSEL(QSPI_IO3, 0, 21)>, | ||
<NRF_PSEL(QSPI_CSN, 0, 20)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
|
||
}; |
167 changes: 167 additions & 0 deletions
167
boards/arm/adafruit_feather_nrf52840_sense/adafruit_feather_nrf52840_sense.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <nordic/nrf52840_qiaa.dtsi> | ||
#include "feather_connector.dtsi" | ||
#include "adafruit_feather_nrf52840_sense-pinctrl.dtsi" | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
model = "Adafruit Feather nRF52840 Sense"; | ||
compatible = "adafruit,feather-nrf52840"; | ||
|
||
chosen { | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
zephyr,uart-mcumgr = &uart0; | ||
zephyr,bt-mon-uart = &uart0; | ||
zephyr,bt-c2h-uart = &uart0; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_partition; | ||
zephyr,ieee802154 = &ieee802154; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
led0: led_0 { | ||
gpios = <&gpio1 9 0>; | ||
label = "Red LED"; | ||
}; | ||
led1: led_1 { | ||
gpios = <&gpio1 10 0>; | ||
label = "Blue LED"; | ||
}; | ||
}; | ||
|
||
buttons { | ||
compatible = "gpio-keys"; | ||
button0: button_0 { | ||
gpios = <&gpio1 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
label = "Push button switch"; | ||
zephyr,code = <INPUT_KEY_0>; | ||
}; | ||
}; | ||
|
||
/* These aliases are provided for compatibility with samples */ | ||
aliases { | ||
led0 = &led0; | ||
led1 = &led1; | ||
sw0 = &button0; | ||
watchdog0 = &wdt0; | ||
spi-flash0 = &gd25q16; | ||
}; | ||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
}; | ||
|
||
&uicr { | ||
gpio-as-nreset; | ||
}; | ||
|
||
&gpiote { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio1 { | ||
status = "okay"; | ||
}; | ||
|
||
&uart0 { | ||
compatible = "nordic,nrf-uart"; | ||
current-speed = <115200>; | ||
status = "okay"; | ||
pinctrl-0 = <&uart0_default>; | ||
pinctrl-1 = <&uart0_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
&i2c0 { | ||
compatible = "nordic,nrf-twi"; | ||
status = "okay"; | ||
pinctrl-0 = <&i2c0_default>; | ||
pinctrl-1 = <&i2c0_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
&spi1 { | ||
compatible = "nordic,nrf-spi"; | ||
status = "okay"; | ||
pinctrl-0 = <&spi1_default>; | ||
pinctrl-1 = <&spi1_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
}; | ||
|
||
&qspi { | ||
status = "okay"; | ||
pinctrl-0 = <&qspi_default>; | ||
pinctrl-1 = <&qspi_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
gd25q16: gd25q16@0 { | ||
compatible = "nordic,qspi-nor"; | ||
reg = <0>; | ||
writeoc = "pp4o"; | ||
readoc = "read4io"; | ||
sck-frequency = <16000000>; | ||
jedec-id = [c8 40 15]; | ||
size = <16777216>; | ||
has-dpd; | ||
t-enter-dpd = <20000>; | ||
t-exit-dpd = <20000>; | ||
quad-enable-requirements = "S2B1v1"; | ||
}; | ||
}; | ||
|
||
&ieee802154 { | ||
status = "okay"; | ||
}; | ||
|
||
&flash0 { | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
boot_partition: partition@0 { | ||
label = "mcuboot"; | ||
reg = <0x00000000 0x0000C000>; | ||
}; | ||
slot0_partition: partition@c000 { | ||
label = "image-0"; | ||
reg = <0x0000C000 0x00067000>; | ||
}; | ||
slot1_partition: partition@73000 { | ||
label = "image-1"; | ||
reg = <0x00073000 0x00067000>; | ||
}; | ||
scratch_partition: partition@da000 { | ||
label = "image-scratch"; | ||
reg = <0x000da000 0x0001e000>; | ||
}; | ||
|
||
/* | ||
* The flash starting at 0x000f8000 and ending at | ||
* 0x000fffff is reserved for use by the application. | ||
*/ | ||
|
||
/* Storage partition will be used by FCB/NFFS/NVS if enabled. */ | ||
storage_partition: partition@f8000 { | ||
label = "storage"; | ||
reg = <0x000f8000 0x00008000>; | ||
}; | ||
}; | ||
}; | ||
|
||
zephyr_udc0: &usbd { | ||
compatible = "nordic,nrf-usbd"; | ||
status = "okay"; | ||
}; |
19 changes: 19 additions & 0 deletions
19
boards/arm/adafruit_feather_nrf52840_sense/adafruit_feather_nrf52840_sense.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
identifier: adafruit_feather_nrf52840_sense | ||
name: Adafruit Feather nRF52840 Sense | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
- xtools | ||
supported: | ||
- adc | ||
- usb_device | ||
- usb_cdc | ||
- ble | ||
- watchdog | ||
- counter | ||
- feather_serial | ||
- feather_i2c | ||
- feather_spi | ||
vendor: adafruit |
26 changes: 26 additions & 0 deletions
26
boards/arm/adafruit_feather_nrf52840_sense/adafruit_feather_nrf52840_sense_defconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_SOC_SERIES_NRF52X=y | ||
CONFIG_SOC_NRF52840_QIAA=y | ||
CONFIG_BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE=y | ||
|
||
# Enable MPU | ||
CONFIG_ARM_MPU=y | ||
|
||
# enable GPIO | ||
CONFIG_GPIO=y | ||
|
||
# enable uart driver | ||
CONFIG_SERIAL=y | ||
|
||
# enable console | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
|
||
# 32kHz clock source | ||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y | ||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y | ||
|
||
# enable bossac | ||
CONFIG_BOOTLOADER_BOSSA=y | ||
CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000") | ||
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") | ||
include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) |
Binary file added
BIN
+264 KB
...arm/adafruit_feather_nrf52840_sense/doc/img/adafruit_feather_nrf52840_sense.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.