boards: coredevices: add pebble 2 duo
Add board for Pebble 2 Duo. Most peripherals are supported, however, some upstream changes are needed to take full benefit of some. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
committed by
Johan Hedberg
parent
c01f86481f
commit
a115cb3847
5
boards/coredevices/p2d/Kconfig.p2d
Normal file
5
boards/coredevices/p2d/Kconfig.p2d
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright (c) 2025 Core Devices LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_P2D
|
||||
select SOC_NRF52840_QIAA
|
||||
11
boards/coredevices/p2d/board.cmake
Normal file
11
boards/coredevices/p2d/board.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2025 Core Devices LLC
|
||||
# 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/nrfutil.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.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)
|
||||
9
boards/coredevices/p2d/board.yml
Normal file
9
boards/coredevices/p2d/board.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2025 Core Devices LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
boards:
|
||||
- name: p2d
|
||||
full_name: Pebble 2 Duo
|
||||
vendor: coredevices
|
||||
socs:
|
||||
- name: nrf52840
|
||||
BIN
boards/coredevices/p2d/doc/img/p2d.webp
Normal file
BIN
boards/coredevices/p2d/doc/img/p2d.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
45
boards/coredevices/p2d/doc/index.rst
Normal file
45
boards/coredevices/p2d/doc/index.rst
Normal file
@@ -0,0 +1,45 @@
|
||||
.. zephyr:board:: p2d
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
Pebble 2 Duo is a smart watch based on the nRF52840 series chip SoC.
|
||||
|
||||
More information about the watch can be found at the `RePebble website`_.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
Pebble 2 Duo provides the following hardware components:
|
||||
|
||||
- Nordic nRF52840
|
||||
- nPM1300 PMIC for power supply and battery charging
|
||||
- GD25LE255E 256 Mb QSPI NOR
|
||||
- Sharp LS013B7DH05 Memory-in-Pixel (MiP) monochrome display
|
||||
- PWM backlight control using TPS22916 driver
|
||||
- OPT3001 ambient light sensor
|
||||
- 4 physical buttons
|
||||
- LSM6DSOW IMU (accelerometer/gyroscope)
|
||||
- MMC5603NJ magnetometer
|
||||
- MSM261DDB020 PDM microphone
|
||||
- Speaker driven by DA7212 audio codec
|
||||
- LRA driven by TI DRV2604 haptic driver
|
||||
- Programming connector
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
.. zephyr:board-supported-hw::
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
.. zephyr:board-supported-runners::
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _RePebble website:
|
||||
https://repebble.com/
|
||||
138
boards/coredevices/p2d/p2d-pinctrl.dtsi
Normal file
138
boards/coredevices/p2d/p2d-pinctrl.dtsi
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Core Devices LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 14)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 14)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_default: i2c1_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 11)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 25)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_sleep: i2c1_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 11)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 25)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2s0_default: i2s0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(I2S_MCK, 1, 9)>,
|
||||
<NRF_PSEL(I2S_SCK_M, 0, 12)>,
|
||||
<NRF_PSEL(I2S_LRCK_M, 0, 7)>,
|
||||
<NRF_PSEL(I2S_SDOUT, 0, 13)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2s0_sleep: i2s0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(I2S_MCK, 1, 9)>,
|
||||
<NRF_PSEL(I2S_SCK_M, 0, 12)>,
|
||||
<NRF_PSEL(I2S_LRCK_M, 0, 7)>,
|
||||
<NRF_PSEL(I2S_SDOUT, 0, 13)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
pdm0_default: pdm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PDM_CLK, 1, 0)>,
|
||||
<NRF_PSEL(PDM_DIN, 0, 24)>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_default: pwm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 26)>;
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_sleep: pwm0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 26)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_default: qspi_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
|
||||
<NRF_PSEL(QSPI_IO0, 0, 20)>,
|
||||
<NRF_PSEL(QSPI_IO1, 0, 21)>,
|
||||
<NRF_PSEL(QSPI_IO2, 0, 22)>,
|
||||
<NRF_PSEL(QSPI_IO3, 0, 23)>,
|
||||
<NRF_PSEL(QSPI_CSN, 0, 17)>;
|
||||
nordic,drive-mode = <NRF_DRIVE_H0H1>;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_sleep: qspi_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(QSPI_SCK, 0, 19)>,
|
||||
<NRF_PSEL(QSPI_IO0, 0, 20)>,
|
||||
<NRF_PSEL(QSPI_IO1, 0, 21)>,
|
||||
<NRF_PSEL(QSPI_IO2, 0, 22)>,
|
||||
<NRF_PSEL(QSPI_IO3, 0, 23)>;
|
||||
low-power-enable;
|
||||
};
|
||||
|
||||
group2 {
|
||||
psels = <NRF_PSEL(QSPI_CSN, 0, 17)>;
|
||||
low-power-enable;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 6)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 6)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 27)>;
|
||||
};
|
||||
|
||||
group2 {
|
||||
psels = <NRF_PSEL(UART_RX, 0, 5)>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 27)>,
|
||||
<NRF_PSEL(UART_RX, 0, 5)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
261
boards/coredevices/p2d/p2d.dts
Normal file
261
boards/coredevices/p2d/p2d.dts
Normal file
@@ -0,0 +1,261 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Core Devices LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include <nordic/nrf52840_partition.dtsi>
|
||||
#include "p2d-pinctrl.dtsi"
|
||||
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
#include <zephyr/dt-bindings/regulator/npm13xx.h>
|
||||
#include <zephyr/dt-bindings/sensor/lsm6dso.h>
|
||||
|
||||
/ {
|
||||
model = "Core Devices Pebble 2 Duo";
|
||||
compatible = "coredevices,p2d";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,bt-mon-uart = &uart0;
|
||||
zephyr,bt-c2h-uart = &uart0;
|
||||
zephyr,display = &ls013b7dh05;
|
||||
zephyr,ieee802154 = &ieee802154;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,uart-mcumgr = &uart0;
|
||||
};
|
||||
|
||||
buttons: buttons {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
btn_back: button-back {
|
||||
gpios = <&gpio0 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "BACK";
|
||||
zephyr,code = <INPUT_KEY_BACK>;
|
||||
};
|
||||
|
||||
btn_up: button-up {
|
||||
gpios = <&gpio0 29 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "UP";
|
||||
zephyr,code = <INPUT_KEY_UP>;
|
||||
};
|
||||
|
||||
btn_center: button-center {
|
||||
gpios = <&gpio0 30 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "CENTER";
|
||||
zephyr,code = <INPUT_KEY_ENTER>;
|
||||
};
|
||||
|
||||
btn_down: button-down {
|
||||
gpios = <&gpio0 31 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "DOWN";
|
||||
zephyr,code = <INPUT_KEY_DOWN>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
accel0 = &lsm6dso;
|
||||
sw0 = &btn_back;
|
||||
sw1 = &btn_up;
|
||||
sw2 = &btn_center;
|
||||
sw3 = &btn_down;
|
||||
magn0 = &mmc5603;
|
||||
mcuboot-button0 = &btn_back;
|
||||
pressure-sensor = &bmp390;
|
||||
watchdog0 = &wdt0;
|
||||
};
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
npm1300: pmic@6b {
|
||||
compatible = "nordic,npm1300";
|
||||
reg = <0x6b>;
|
||||
pmic-int-pin = <1>;
|
||||
host-int-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
regulators {
|
||||
compatible = "nordic,npm1300-regulator";
|
||||
|
||||
buck1: BUCK1 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldo1: LDO1 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-allowed-modes = <NPM13XX_LDSW_MODE_LDO>;
|
||||
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;
|
||||
regulator-init-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldo2: LDO2 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-allowed-modes = <NPM13XX_LDSW_MODE_LDO>;
|
||||
regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;
|
||||
regulator-init-microvolt = <1800000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
};
|
||||
|
||||
charger: charger {
|
||||
compatible = "nordic,npm1300-charger";
|
||||
term-microvolt = <4150000>;
|
||||
term-warm-microvolt = <4000000>;
|
||||
current-microamp = <150000>;
|
||||
dischg-limit-microamp = <1000000>;
|
||||
vbus-limit-microamp = <500000>;
|
||||
thermistor-ohms = <10000>;
|
||||
thermistor-beta = <3380>;
|
||||
charging-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
compatible = "nordic,nrf-twim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c1_default>;
|
||||
pinctrl-1 = <&i2c1_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
mmc5603: magnetic-sensor@30 {
|
||||
compatible = "memsic,mmc56x3";
|
||||
reg = <0x30>;
|
||||
magn-odr = <0>;
|
||||
};
|
||||
|
||||
opt3001: light-sensor@44 {
|
||||
compatible = "ti,opt3001";
|
||||
reg = <0x44>;
|
||||
int-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lsm6dso: imu-sensor@6a {
|
||||
compatible = "st,lsm6dso";
|
||||
reg = <0x6a>;
|
||||
irq-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
|
||||
accel-pm = <LSM6DSO_DT_XL_ULP_MODE>;
|
||||
gyro-pm = <LSM6DSO_DT_GY_NORMAL_MODE>;
|
||||
};
|
||||
|
||||
bmp390: pressure-sensor@76 {
|
||||
compatible = "bosch,bmp390";
|
||||
reg = <0x76>;
|
||||
odr = "50";
|
||||
int-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2s0 {
|
||||
compatible = "nordic,nrf-i2s";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2s0_default>;
|
||||
pinctrl-1 = <&i2s0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&ieee802154 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pdm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pdm0_default>;
|
||||
pinctrl-names = "default";
|
||||
clock-source = "PCLK32M_HFXO";
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&qspi {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&qspi_default>;
|
||||
pinctrl-1 = <&qspi_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
gd25le255e: memory@0 {
|
||||
compatible = "nordic,qspi-nor";
|
||||
reg = <0>;
|
||||
writeoc = "pp4o";
|
||||
readoc = "read4io";
|
||||
sck-frequency = <8000000>;
|
||||
quad-enable-requirements = "S2B1v1";
|
||||
address-size-32;
|
||||
enter-4byte-addr = <0xb7>;
|
||||
jedec-id = [c8 60 19];
|
||||
sfdp-bfp = [e5 20 f3 ff ff ff ff 0f 44 eb 08 6b 08 3b 42 bb
|
||||
fe ff ff ff ff ff 00 ff ff ff 42 eb 0c 20 0f 52
|
||||
10 d8 00 ff d4 31 a5 fe 84 df 14 4f ec 62 16 33
|
||||
7a 75 7a 75 04 b3 d5 5c 19 06 14 00 08 50 00 01];
|
||||
size = <DT_SIZE_M(256)>;
|
||||
has-dpd;
|
||||
t-enter-dpd = <3000>;
|
||||
t-exit-dpd = <20000>;
|
||||
};
|
||||
};
|
||||
|
||||
®1 {
|
||||
regulator-initial-mode = <NRF5X_REG_MODE_LDO>;
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
cs-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&spi3_default>;
|
||||
pinctrl-1 = <&spi3_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
zephyr,pm-device-runtime-auto;
|
||||
|
||||
ls013b7dh05: display@0 {
|
||||
compatible = "sharp,ls0xx";
|
||||
reg = <0x0>;
|
||||
disp-en-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
|
||||
extcomin-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
||||
extcomin-frequency = <60>;
|
||||
spi-max-frequency = <DT_FREQ_M(1)>;
|
||||
height = <168>;
|
||||
width = <144>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&uicr {
|
||||
gpio-as-nreset;
|
||||
};
|
||||
21
boards/coredevices/p2d/p2d.yaml
Normal file
21
boards/coredevices/p2d/p2d.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2025 Core Devices LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
identifier: p2d
|
||||
name: Pebble-2-Duo
|
||||
vendor: coredevices
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
ram: 256
|
||||
flash: 1024
|
||||
supported:
|
||||
- ble
|
||||
- counter
|
||||
- gpio
|
||||
- i2c
|
||||
- i2s
|
||||
- pwm
|
||||
- uart
|
||||
- watchdog
|
||||
11
boards/coredevices/p2d/p2d_defconfig
Normal file
11
boards/coredevices/p2d/p2d_defconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2025 Core Devices LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_HW_STACK_PROTECTION=y
|
||||
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
4
boards/coredevices/p2d/pre_dt_board.cmake
Normal file
4
boards/coredevices/p2d/pre_dt_board.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
# Copyright (c) 2025 Core Devices LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
||||
Reference in New Issue
Block a user