First commit
This commit is contained in:
2
boards/Mi_labs/phf000_board/Kconfig.phf000_board
Normal file
2
boards/Mi_labs/phf000_board/Kconfig.phf000_board
Normal file
@@ -0,0 +1,2 @@
|
||||
config BOARD_PHF000_BOARD
|
||||
select SOC_NRF52833_QDAA
|
||||
10
boards/Mi_labs/phf000_board/board.cmake
Normal file
10
boards/Mi_labs/phf000_board/board.cmake
Normal file
@@ -0,0 +1,10 @@
|
||||
board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000")
|
||||
|
||||
set(OPENOCD_NRF5_SUBFAMILY "nrf52")
|
||||
board_runner_args(pyocd "--target=nrf52833" "--frequency=4000000")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
|
||||
5
boards/Mi_labs/phf000_board/board.yml
Normal file
5
boards/Mi_labs/phf000_board/board.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
board:
|
||||
name: phf000_board
|
||||
vendor: Mi_labs
|
||||
socs:
|
||||
- name: nrf52833
|
||||
2
boards/Mi_labs/phf000_board/phf000_board-pinctrl.dtsi
Normal file
2
boards/Mi_labs/phf000_board/phf000_board-pinctrl.dtsi
Normal file
@@ -0,0 +1,2 @@
|
||||
&pinctrl {
|
||||
};
|
||||
161
boards/Mi_labs/phf000_board/phf000_board.dts
Normal file
161
boards/Mi_labs/phf000_board/phf000_board.dts
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52833_qdaa.dtsi>
|
||||
#include "phf000_board-pinctrl.dtsi"
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
model = "PHF000 RA Board";
|
||||
compatible = "arm,phf000_board";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &cdc_acm_uart0;
|
||||
zephyr,udc = &usbd;
|
||||
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 = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
label = "Red LED 0";
|
||||
};
|
||||
led1: led_1 {
|
||||
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||
label = "Green LED 1";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
button0: button_0 {
|
||||
gpios = <&gpio0 28 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
label = "Push button switch 0";
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* These aliases are provided for compatibility with samples */
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
sw0 = &button0;
|
||||
bootloader-led0 = &led0;
|
||||
mcuboot-button0 = &button0;
|
||||
mcuboot-led0 = &led0;
|
||||
watchdog0 = &wdt0;
|
||||
};
|
||||
|
||||
zephyr,user {
|
||||
hum_en-gpios = <&gpio0 2 0>;
|
||||
do2-gpios = <&gpio0 3 (1 << 9)>;
|
||||
do_en-gpios = <&gpio0 9 0>;
|
||||
do1-gpios = <&gpio0 10 0>;
|
||||
btt_meas_en-gpios = <&gpio0 29 0>;
|
||||
io-channels = <&adc 6>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
};
|
||||
};
|
||||
|
||||
®1 {
|
||||
regulator-initial-mode = <NRF5X_REG_MODE_LDO>;
|
||||
status = "okay";
|
||||
compatible = "nordic,nrf5x-regulator";
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
channel@6 {
|
||||
reg = <6>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
//zephyr,vref-mv = <750>;
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,input-positive = <NRF_SAADC_AIN6>;
|
||||
//zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 200)>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
||||
|
||||
&uicr {
|
||||
gpio-as-nreset;
|
||||
nfct-pins-as-gpios;
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 0xC000>;
|
||||
};
|
||||
slot0_partition: partition@c000 {
|
||||
label = "image-0";
|
||||
reg = <0x0000C000 0x37000>;
|
||||
};
|
||||
slot1_partition: partition@43000 {
|
||||
label = "image-1";
|
||||
reg = <0x00043000 0x37000>;
|
||||
};
|
||||
storage_partition: partition@7a000 {
|
||||
label = "storage";
|
||||
reg = <0x0007A000 0x00006000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbd {
|
||||
compatible = "nordic,nrf-usbd";
|
||||
status = "okay";
|
||||
cdc_acm_uart0: cdc_acm_uart0 {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
};
|
||||
|
||||
®0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&power {
|
||||
status = "okay";
|
||||
};
|
||||
&temp {
|
||||
compatible = "nordic,nrf-temp";
|
||||
status = "okay";
|
||||
};
|
||||
10
boards/Mi_labs/phf000_board/phf000_board.yml
Normal file
10
boards/Mi_labs/phf000_board/phf000_board.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
identifier: phf000_board/nrf52833
|
||||
name: Board for PHF, Rev A
|
||||
vendor: Mi_labs
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 128
|
||||
flash: 512
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported: []
|
||||
38
boards/Mi_labs/phf000_board/phf000_board_defconfig
Normal file
38
boards/Mi_labs/phf000_board/phf000_board_defconfig
Normal file
@@ -0,0 +1,38 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable hardware stack protection
|
||||
CONFIG_HW_STACK_PROTECTION=y
|
||||
|
||||
# Enable RTT
|
||||
CONFIG_USE_SEGGER_RTT=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_USB_DEVICE_STACK=y
|
||||
CONFIG_USB_CDC_ACM=y
|
||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample"
|
||||
CONFIG_USB_DEVICE_VID=0x2FE3
|
||||
CONFIG_USB_DEVICE_PID=0x0004
|
||||
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
|
||||
|
||||
CONFIG_ADC=y
|
||||
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=n
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
|
||||
CONFIG_SENSOR=y
|
||||
CONFIG_MULTITHREADING=y
|
||||
CONFIG_NRFX_TEMP=y
|
||||
2
boards/Mi_labs/phf000_board/pre_dt_board.cmake
Normal file
2
boards/Mi_labs/phf000_board/pre_dt_board.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
# Suppress "unique_unit_address_if_enabled" to handle some overlaps
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
||||
Reference in New Issue
Block a user