Skip to content

Commit 228a539

Browse files
committed
boards: coredevices: add pebble time 2
Add board for Pebble Time 2. Just a subset of the peripherals is supported right now. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 8f79025 commit 228a539

File tree

10 files changed

+267
-0
lines changed

10 files changed

+267
-0
lines changed

boards/coredevices/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _boards-coredevices:
2+
3+
Core Devices LLC
4+
################
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:glob:
9+
10+
**/*

boards/coredevices/pt2/Kconfig.pt2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Core Devices LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_PT2
5+
select SOC_SF32LB52JUD6

boards/coredevices/pt2/board.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2025 Core Devices LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(sftool "--chip=SF32LB52")
5+
6+
include(${ZEPHYR_BASE}/boards/common/sftool.board.cmake)

boards/coredevices/pt2/board.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2025 Core Devices LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board:
5+
name: pt2
6+
vendor: coredevices
7+
socs:
8+
- name: sf32lb52jud6
26.6 KB
Loading
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.. zephyr:board:: pt2
2+
3+
Overview
4+
********
5+
6+
Pebble Time 2 is a smart watch based on the SF32LB52x series chip SoC.
7+
8+
More information about the watch can be found at the `RePebble website`_.
9+
10+
Hardware
11+
********
12+
13+
Pebble Time 2 provides the following hardware components:
14+
15+
- SiFli SF32LB52JUD6
16+
- nPM1300 PMIC for power supply and battery charging
17+
- 256 Mb GD25Q256E QSPI NOR
18+
- Memory-in-Pixel (MiP) 64-color display JDI LPM015M135A
19+
- 4 physical buttons
20+
- LSM6DSOW IMU (accelerometer/gyroscope)
21+
- LIS2DW12 low-power accelerometer
22+
- MMC5603NJ magnetometer
23+
- Dual PDM microphone
24+
- Speaker driven by AW8155BFCR amplifier
25+
- LRA driven by AW86225CSR
26+
- GH3026 hear-rate monitor sensor
27+
28+
Supported Features
29+
==================
30+
31+
.. zephyr:board-supported-hw::
32+
33+
Programming and Debugging
34+
*************************
35+
36+
.. zephyr:board-supported-runners::
37+
38+
Refer to `sftool website`_ for more information.
39+
40+
References
41+
**********
42+
43+
.. target-notes::
44+
45+
.. _RePebble website:
46+
https://repebble.com/
47+
48+
.. _sftool website:
49+
https://github.com/OpenSiFli/sftool
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 Core Devices LLC
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/dt-bindings/pinctrl/sf32lb52x-pinctrl.h>
7+
8+
&pinctrl {
9+
usart1_default: usart1_default {
10+
group1 {
11+
pinmux = <PA19_USART1_TXD>;
12+
};
13+
14+
group2 {
15+
pinmux = <PA18_USART1_RXD>;
16+
input-enable;
17+
bias-pull-up;
18+
};
19+
};
20+
};

boards/coredevices/pt2/pt2.dts

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/*
2+
* Copyright (c) 2025 Core Devices LLC
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include <sifli/sf32lb52x.dtsi>
9+
#include <sifli/sf32lb52x-ram012.dtsi>
10+
#include <zephyr/dt-bindings/dma/sf32lb52x-dma.h>
11+
#include <zephyr/dt-bindings/gpio/gpio.h>
12+
#include <zephyr/dt-bindings/input/input-event-codes.h>
13+
14+
#include "pt2-pinctrl.dtsi"
15+
16+
/ {
17+
model = "Core Devices Pebble Time 2";
18+
compatible = "coredevices,pt2";
19+
20+
#address-cells = <1>;
21+
#size-cells = <1>;
22+
23+
chosen {
24+
zephyr,flash = &gd25q256e;
25+
zephyr,flash-controller = &mpi2;
26+
zephyr,code-partition = &code;
27+
zephyr,console = &usart1;
28+
zephyr,shell-uart = &usart1;
29+
};
30+
31+
buttons {
32+
compatible = "gpio-keys";
33+
34+
btn_back: button-back {
35+
label = "BACK";
36+
gpios = <&gpioa_32_44 2 GPIO_ACTIVE_HIGH>;
37+
zephyr,code = <INPUT_KEY_BACK>;
38+
};
39+
40+
btn_up: button-up {
41+
label = "UP";
42+
gpios = <&gpioa_32_44 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
43+
zephyr,code = <INPUT_KEY_UP>;
44+
};
45+
46+
btn_center: button-center {
47+
label = "CENTER";
48+
gpios = <&gpioa_32_44 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
49+
zephyr,code = <INPUT_KEY_ENTER>;
50+
};
51+
52+
btn_down: button-down {
53+
label = "DOWN";
54+
gpios = <&gpioa_32_44 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
55+
zephyr,code = <INPUT_KEY_DOWN>;
56+
};
57+
};
58+
59+
alias {
60+
sw0 = &btn_back;
61+
sw1 = &btn_up;
62+
watchdog0 = &wdt;
63+
};
64+
};
65+
66+
&cpu0 {
67+
clock-frequency = <DT_FREQ_M(240)>;
68+
};
69+
70+
&dmac {
71+
status = "okay";
72+
};
73+
74+
&gpioa_32_44 {
75+
status = "okay";
76+
};
77+
78+
&hxt48 {
79+
status = "okay";
80+
};
81+
82+
&mpi2 {
83+
compatible = "sifli,sf32lb-mpi-qspi-nor";
84+
dmas = <&dmac 0 SF32LB52X_DMA_REQ_MPI2 SF32LB_DMA_PL_MEDIUM>;
85+
sifli,lines = <4>;
86+
sifli,psclr = <0>;
87+
status = "okay";
88+
89+
gd25q256e: flash@0 {
90+
compatible = "gd,gd25q256e", "jedec,qspi-nor";
91+
reg = <0x0>;
92+
size = <DT_SIZE_M(256)>;
93+
quad-enable-requirements = "S2B1v6";
94+
95+
partitions {
96+
compatible = "fixed-partitions";
97+
#address-cells = <1>;
98+
#size-cells = <1>;
99+
100+
ptable: partition@0 {
101+
label = "ptable";
102+
reg = <0x0 DT_SIZE_K(64)>;
103+
};
104+
105+
code: partition@10000 {
106+
label = "code";
107+
reg = <0x10000 DT_SIZE_K(32704)>;
108+
};
109+
};
110+
};
111+
};
112+
113+
&pinctrl {
114+
status = "okay";
115+
};
116+
117+
&rcc_clk {
118+
status = "okay";
119+
120+
sifli,hdiv = <1>;
121+
sifli,pdiv1 = <1>;
122+
sifli,pdiv2 = <6>;
123+
124+
dll1 {
125+
status = "okay";
126+
clock-frequency = <DT_FREQ_M(240)>;
127+
};
128+
};
129+
130+
&usart1 {
131+
status = "okay";
132+
current-speed = <1000000>;
133+
pinctrl-0 = <&usart1_default>;
134+
pinctrl-names = "default";
135+
};
136+
137+
&wdt {
138+
status = "okay";
139+
};

boards/coredevices/pt2/pt2.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2025 Core Devices LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
identifier: pt2
5+
name: Pebble-Time-2
6+
vendor: coredevices
7+
type: mcu
8+
arch: arm
9+
ram: 512
10+
flash: 32704
11+
toolchain:
12+
- zephyr
13+
supported:
14+
- uart
15+
- gpio
16+
- watchdog
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2025 Core Devices LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_ARM_MPU=y
5+
CONFIG_HW_STACK_PROTECTION=y
6+
7+
CONFIG_SERIAL=y
8+
CONFIG_GPIO=y
9+
10+
CONFIG_CONSOLE=y
11+
CONFIG_UART_CONSOLE=y
12+
13+
CONFIG_SF32LB52X_BOOTROM_FLASH_ON_DELAY_MS=100
14+
CONFIG_SF32LB52X_BOOTROM_FLASH_OFF_DELAY_MS=100

0 commit comments

Comments
 (0)