diff --git a/boards/coredevices/index.rst b/boards/coredevices/index.rst new file mode 100644 index 0000000000000..1a55b5c4a9b2e --- /dev/null +++ b/boards/coredevices/index.rst @@ -0,0 +1,10 @@ +.. _boards-coredevices: + +Core Devices LLC +################ + +.. toctree:: + :maxdepth: 1 + :glob: + + **/* diff --git a/boards/coredevices/pt2/Kconfig.pt2 b/boards/coredevices/pt2/Kconfig.pt2 new file mode 100644 index 0000000000000..2578077f31e08 --- /dev/null +++ b/boards/coredevices/pt2/Kconfig.pt2 @@ -0,0 +1,5 @@ +# Copyright (c) 2025 Core Devices LLC +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_PT2 + select SOC_SF32LB52JUD6 diff --git a/boards/coredevices/pt2/board.cmake b/boards/coredevices/pt2/board.cmake new file mode 100644 index 0000000000000..66466b3bf73ec --- /dev/null +++ b/boards/coredevices/pt2/board.cmake @@ -0,0 +1,6 @@ +# Copyright (c) 2025 Core Devices LLC +# SPDX-License-Identifier: Apache-2.0 + +board_runner_args(sftool "--chip=SF32LB52") + +include(${ZEPHYR_BASE}/boards/common/sftool.board.cmake) diff --git a/boards/coredevices/pt2/board.yml b/boards/coredevices/pt2/board.yml new file mode 100644 index 0000000000000..bc95a21640e46 --- /dev/null +++ b/boards/coredevices/pt2/board.yml @@ -0,0 +1,9 @@ +# Copyright (c) 2025 Core Devices LLC +# SPDX-License-Identifier: Apache-2.0 + +board: + name: pt2 + full_name: Pebble Time 2 + vendor: coredevices + socs: + - name: sf32lb52jud6 diff --git a/boards/coredevices/pt2/doc/img/pt2.webp b/boards/coredevices/pt2/doc/img/pt2.webp new file mode 100644 index 0000000000000..a343dfef0d1cf Binary files /dev/null and b/boards/coredevices/pt2/doc/img/pt2.webp differ diff --git a/boards/coredevices/pt2/doc/index.rst b/boards/coredevices/pt2/doc/index.rst new file mode 100644 index 0000000000000..4f643d42ed799 --- /dev/null +++ b/boards/coredevices/pt2/doc/index.rst @@ -0,0 +1,53 @@ +.. zephyr:board:: pt2 + +Overview +******** + +Pebble Time 2 is a smart watch based on the SF32LB52x series chip SoC. + +More information about the watch can be found at the `RePebble website`_. + +Hardware +******** + +Pebble Time 2 provides the following hardware components: + +- SiFli SF32LB52JUD6 +- nPM1300 PMIC for power supply and battery charging +- GD25Q256E 256 Mb QSPI NOR +- JDI LPM015M135A Memory-in-Pixel (MiP) 64-color display +- CST816D capacitive touch display driver +- RGB backlight driven by AW2016 +- W1160 ambient light sensor +- 4 physical buttons +- LSM6DSOW IMU (accelerometer/gyroscope) +- LIS2DW12 low-power accelerometer +- MMC5603NJ magnetometer +- Dual PDM microphone +- Speaker driven by AW8155BFCR amplifier +- LRA driven by AW86225CSR +- GH3026 heart-rate monitor sensor +- Programming connector + +Supported Features +================== + +.. zephyr:board-supported-hw:: + +Programming and Debugging +************************* + +.. zephyr:board-supported-runners:: + +Refer to `sftool website`_ for more information. + +References +********** + +.. target-notes:: + +.. _RePebble website: + https://repebble.com/ + +.. _sftool website: + https://github.com/OpenSiFli/sftool diff --git a/boards/coredevices/pt2/pt2-pinctrl.dtsi b/boards/coredevices/pt2/pt2-pinctrl.dtsi new file mode 100644 index 0000000000000..ecc75626dad03 --- /dev/null +++ b/boards/coredevices/pt2/pt2-pinctrl.dtsi @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Core Devices LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +&pinctrl { + usart1_default: usart1_default { + group1 { + pinmux = ; + }; + + group2 { + pinmux = ; + input-enable; + bias-pull-up; + }; + }; +}; diff --git a/boards/coredevices/pt2/pt2.dts b/boards/coredevices/pt2/pt2.dts new file mode 100644 index 0000000000000..7fc0163788ce1 --- /dev/null +++ b/boards/coredevices/pt2/pt2.dts @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 Core Devices LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include +#include +#include +#include +#include + +#include "pt2-pinctrl.dtsi" + +/ { + model = "Core Devices Pebble Time 2"; + compatible = "coredevices,pt2"; + + #address-cells = <1>; + #size-cells = <1>; + + chosen { + zephyr,flash = &gd25q256e; + zephyr,flash-controller = &mpi2; + zephyr,code-partition = &code; + zephyr,console = &usart1; + zephyr,shell-uart = &usart1; + }; + + buttons { + compatible = "gpio-keys"; + + btn_back: button-back { + label = "BACK"; + gpios = <&gpioa_32_44 2 GPIO_ACTIVE_HIGH>; + zephyr,code = ; + }; + + btn_up: button-up { + label = "UP"; + gpios = <&gpioa_32_44 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + zephyr,code = ; + }; + + btn_center: button-center { + label = "CENTER"; + gpios = <&gpioa_32_44 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + zephyr,code = ; + }; + + btn_down: button-down { + label = "DOWN"; + gpios = <&gpioa_32_44 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + zephyr,code = ; + }; + }; + + aliases { + sw0 = &btn_back; + sw1 = &btn_up; + watchdog0 = &wdt; + }; +}; + +&cpu0 { + clock-frequency = ; +}; + +&dmac { + status = "okay"; +}; + +&gpioa_32_44 { + status = "okay"; +}; + +&hxt48 { + status = "okay"; +}; + +&mpi2 { + compatible = "sifli,sf32lb-mpi-qspi-nor"; + dmas = <&dmac 0 SF32LB52X_DMA_REQ_MPI2 SF32LB_DMA_PL_MEDIUM>; + sifli,lines = <4>; + sifli,psclr = <0>; + status = "okay"; + + gd25q256e: flash@0 { + compatible = "gd,gd25q256e", "jedec,qspi-nor"; + reg = <0x0>; + size = ; + quad-enable-requirements = "S2B1v6"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + ptable: partition@0 { + label = "ptable"; + reg = <0x0 DT_SIZE_K(64)>; + }; + + code: partition@10000 { + label = "code"; + reg = <0x10000 DT_SIZE_K(32704)>; + }; + }; + }; +}; + +&pinctrl { + status = "okay"; +}; + +&rcc_clk { + status = "okay"; + + sifli,hdiv = <1>; + sifli,pdiv1 = <1>; + sifli,pdiv2 = <6>; + + dll1 { + status = "okay"; + clock-frequency = ; + }; +}; + +&usart1 { + status = "okay"; + current-speed = <1000000>; + pinctrl-0 = <&usart1_default>; + pinctrl-names = "default"; +}; + +&wdt { + status = "okay"; +}; diff --git a/boards/coredevices/pt2/pt2.yaml b/boards/coredevices/pt2/pt2.yaml new file mode 100644 index 0000000000000..48befd61d589f --- /dev/null +++ b/boards/coredevices/pt2/pt2.yaml @@ -0,0 +1,16 @@ +# Copyright (c) 2025 Core Devices LLC +# SPDX-License-Identifier: Apache-2.0 + +identifier: pt2 +name: Pebble-Time-2 +vendor: coredevices +type: mcu +arch: arm +ram: 512 +flash: 32704 +toolchain: + - zephyr +supported: + - uart + - gpio + - watchdog diff --git a/boards/coredevices/pt2/pt2_defconfig b/boards/coredevices/pt2/pt2_defconfig new file mode 100644 index 0000000000000..2ce05d9f3c73b --- /dev/null +++ b/boards/coredevices/pt2/pt2_defconfig @@ -0,0 +1,14 @@ +# Copyright (c) 2025 Core Devices LLC +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_ARM_MPU=y +CONFIG_HW_STACK_PROTECTION=y + +CONFIG_SERIAL=y +CONFIG_GPIO=y + +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y + +CONFIG_SF32LB52X_BOOTROM_FLASH_ON_DELAY_MS=100 +CONFIG_SF32LB52X_BOOTROM_FLASH_OFF_DELAY_MS=100 diff --git a/dts/bindings/vendor-prefixes.txt b/dts/bindings/vendor-prefixes.txt index f9b987895f8c0..b0391a42dfa29 100644 --- a/dts/bindings/vendor-prefixes.txt +++ b/dts/bindings/vendor-prefixes.txt @@ -151,6 +151,7 @@ cnxt Conexant Systems, Inc. colorfly Colorful GRP, Shenzhen Xueyushi Technology Ltd. compulab CompuLab Ltd. contextualelectronics Contextual Electronics +coredevices Core Devices LLC coreriver CORERIVER Semiconductor Co.,Ltd. corpro Chengdu Corpro Technology Co., Ltd. cortina Cortina Systems, Inc.