Skip to content

boards: Add support for PG23/PG28 Pro Kit #93285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

if BOARD_PG23_PK2504A

config LOG_BACKEND_SWO_FREQ_HZ
default 875000
depends on LOG_BACKEND_SWO

endif # BOARD_PG23_PK2504A
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/Kconfig.pg23_pk2504a
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

config BOARD_PG23_PK2504A
select SOC_PART_NUMBER_EFM32PG23B310F512IM48
10 changes: 10 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=EFM32PG23BxxxF512")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

board_runner_args(openocd)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

board_runner_args(silabs_commander "--device=EFM32PG23BxxxF512")
include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake)
6 changes: 6 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: pg23_pk2504a
full_name: PG23 Pro Kit PK2504A Rev. A03
vendor: silabs
socs:
- name: efm32pg23b310f512im48
39 changes: 39 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/pg23_pk2504a-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2025 Christoph Jans
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/silabs/xg23-pinctrl.h>

&pinctrl {
eusart0_default: eusart0_default {
group0 {
pins = <EUSART0_TX_PB5>;
drive-push-pull;
output-high;
};

group1 {
pins = <EUSART0_RX_PB6>;
input-enable;
silabs,input-filter;
};
};

i2c0_default: i2c0_default {
group0 {
pins = <I2C0_SCL_PA8>, <I2C0_SDA_PA7>;
drive-open-drain;
bias-pull-up;
};
};

timer0_default: timer0_default {
group0 {
pins = <TIMER0_CC0_PC8>, <TIMER0_CC1_PC9>;
drive-push-pull;
output-high;
};
};
};
238 changes: 238 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/pg23_pk2504a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
/*
* Copyright (c) 2025 Christoph Jans
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <silabs/xg23/efm32pg23b310f512im48.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/pwm/pwm.h>
#include <zephyr/dt-bindings/regulator/silabs_dcdc.h>
#include "pg23_pk2504a-pinctrl.dtsi"

/ {
model = "Silicon Labs PG23 Pro Kit";
compatible = "silabs,pg23_pk2504a", "silabs,efm32pg23";

chosen {
zephyr,code-partition = &slot0_partition;
zephyr,console = &eusart0;
zephyr,flash = &flash0;
zephyr,shell-uart = &eusart0;
zephyr,sram = &sram0;
zephyr,uart-pipe = &eusart0;
};

aliases {
dht0 = &si7021;
led0 = &led0;
led1 = &led1;
pwm-led0 = &pwm_led0;
pwm-led1 = &pwm_led1;
sw0 = &button0;
sw1 = &button1;
watchdog0 = &wdog0;
};

leds {
compatible = "gpio-leds";

led0: led_0 {
gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
label = "LED 0";
};

led1: led_1 {
gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>;
label = "LED 1";
};
};

pwmleds {
compatible = "pwm-leds";

pwm_led0: pwm_led_0 {
pwms = <&timer0_pwm 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM LED 0";
};

pwm_led1: pwm_led_1 {
pwms = <&timer0_pwm 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM LED 1";
};
};

buttons {
compatible = "gpio-keys";

button0: button_0 {
gpios = <&gpioa 5 GPIO_ACTIVE_LOW>;
label = "User Push Button 0";
zephyr,code = <INPUT_KEY_0>;
};

button1: button_1 {
gpios = <&gpiob 4 GPIO_ACTIVE_LOW>;
label = "User Push Button 1";
zephyr,code = <INPUT_KEY_1>;
};
};
};

&timer0 {
status = "okay";

timer0_pwm: pwm {
pinctrl-0 = <&timer0_default>;
pinctrl-names = "default";
status = "okay";
};
};

&cpu0 {
clock-frequency = <78000000>;
};

&pstate_em3 {
status = "disabled";
};

&hfxo {
status = "okay";
ctune = <106>;
precision = <50>;
};

&lfxo {
status = "okay";
ctune = <38>;
precision = <50>;
};

&hfrcodpll {
clock-frequency = <DT_FREQ_M(78)>;
clocks = <&hfxo>;
dpll-autorecover;
dpll-edge = "fall";
dpll-lock = "phase";
dpll-m = <1919>;
dpll-n = <3839>;
};

&em23grpaclk {
clocks = <&lfxo>;
};

&em4grpaclk {
clocks = <&lfxo>;
};

&sysrtcclk {
clocks = <&lfxo>;
};

&wdog0clk {
clocks = <&lfxo>;
};

&wdog1clk {
clocks = <&lfxo>;
};

&eusart0 {
compatible = "silabs,eusart-uart";
current-speed = <115200>;
pinctrl-0 = <&eusart0_default>;
pinctrl-names = "default";
status = "okay";
};

&i2c0 {
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";

si7021: si7021@40 {
compatible = "silabs,si7006";
reg = <0x40>;
};
};

&gpio {
status = "okay";
};

&gpioa {
status = "okay";
};

&gpiob {
status = "okay";

/* VCOM Isolation. Set PB1 to HIGH to enable VCOM_{RX,TX}. */
board-controller-enable {
gpio-hog;
gpios = <1 GPIO_ACTIVE_HIGH>;
output-high;
};
};

&gpioc {
status = "okay";
};

&gpiod {
status = "okay";
};

&wdog0 {
status = "okay";
};

&sysrtc0 {
status = "okay";
};

&se {
status = "okay";
};

&dcdc {
regulator-boot-on;
silabs,pfmx-peak-current-milliamp = <80>;
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* Reserve 48 kB for the bootloader */
boot_partition: partition@0 {
reg = <0x0 DT_SIZE_K(48)>;
label = "mcuboot";
read-only;
};

/* Reserve 208 kB for the application in slot 0 */
slot0_partition: partition@c000 {
reg = <0x0000c000 DT_SIZE_K(208)>;
label = "image-0";
};

/* Reserve 208 kB for the application in slot 1 */
slot1_partition: partition@40000 {
reg = <0x00040000 DT_SIZE_K(208)>;
label = "image-1";
};

/* Reserve 32 kB for the scratch partition */
scratch_partition: partition@74000 {
reg = <0x00074000 DT_SIZE_K(32)>;
label = "image-scratch";
};
};
};
27 changes: 27 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/pg23_pk2504a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
identifier: pg23_pk2504a
name: PG23 Pro Kit PK2504A Rev. A03
type: mcu
arch: arm
ram: 64
flash: 512
toolchain:
- zephyr
- gnuarmemb
supported:
- clock_control
- comparator
- counter
- dma
- entropy
- flash
- gpio
- i2c
- led
- pinctrl
- spi
- uart
- watchdog
testing:
ignore_tags:
- pm
vendor: silabs
10 changes: 10 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/pg23_pk2504a_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

CONFIG_ARM_MPU=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_GPIO=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_REGULATOR=y
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/pg23_pk2504a/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

# SPI is implemented via usart so node name isn't spi@...
list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge")
10 changes: 10 additions & 0 deletions boards/silabs/dev_kits/pg28_pk2506a/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

if BOARD_PG28_PK2506A

config LOG_BACKEND_SWO_FREQ_HZ
default 875000
depends on LOG_BACKEND_SWO

endif # BOARD_PG28_PK2506A
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/pg28_pk2506a/Kconfig.pg28_pk2506a
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

config BOARD_PG28_PK2506A
select SOC_PART_NUMBER_EFM32PG28B310F1024IM68
11 changes: 11 additions & 0 deletions boards/silabs/dev_kits/pg28_pk2506a/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=EFM32PG28BxxxF1024")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

board_runner_args(openocd)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

board_runner_args(silabs_commander "--device=EFM32PG28BxxxF1024")
include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake)
6 changes: 6 additions & 0 deletions boards/silabs/dev_kits/pg28_pk2506a/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: pg28_pk2506a
full_name: PG28 Pro Kit PK2506A Rev. A03
vendor: silabs
socs:
- name: efm32pg28b310f1024im68
Loading