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
17 changes: 17 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

if BOARD_XG23_PK2504A

config LOG_BACKEND_SWO_FREQ_HZ
default 875000
depends on LOG_BACKEND_SWO

if SOC_GECKO_USE_RAIL

config FPU
default y

endif # SOC_GECKO_USE_RAIL

endif # BOARD_XG23_PK2504A
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/Kconfig.xg23_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_XG23_PK2504A
select SOC_PART_NUMBER_EFM32PG23B310F512IM48
10 changes: 10 additions & 0 deletions boards/silabs/dev_kits/xg23_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/xg23_pk2504a/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: xg23_pk2504a
full_name: PG28 Pro Kit PK2504A Rev. A03
vendor: silabs
socs:
- name: efm32pg23b310f512im48

Check warning on line 6 in boards/silabs/dev_kits/xg23_pk2504a/board.yml

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

YAMLLint (new-line-at-end-of-file)

boards/silabs/dev_kits/xg23_pk2504a/board.yml:6 no new line character at the end of file
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/pre_dt_board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2021 Linaro Limited
# 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")
45 changes: 45 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix as per https://docs.zephyrproject.org/latest/contribute/style/devicetree.html there are multiple issues in all files in this PR, fix them all

Copy link
Author

@janchri janchri Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the missing empty line between blocks. I use tab for idents. Am I missing more? Can I somehow start the code checking action by myself? I am really suprised that this ending issue/ms problem appeard.

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

eusart1_default: eusart1_default {
group0 {
pins = <EUSART1_TX_PC1>; //<EUSART1_TX_PB5>;
drive-push-pull;
output-high;
};

group1 {
pins = <EUSART1_RX_PC2>; //<EUSART1_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;
};
};
};

Check warning on line 45 in boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a-pinctrl.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

MISSING_EOF_NEWLINE

boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a-pinctrl.dtsi:45 adding a line without newline at end of file
218 changes: 218 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
/*
* 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/regulator/silabs_dcdc.h>
#include "xg23_pk2504a-pinctrl.dtsi"

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

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

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

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";
};
};

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>;
};
};
};

&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-n = <3839>;
dpll-m = <1919>;
dpll-edge = "fall";
dpll-lock = "phase";
dpll-autorecover;
};

&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";
};

&eusart1 {
compatible = "silabs,eusart-uart";
current-speed = <115200>;
pinctrl-0 = <&eusart1_default>;
pinctrl-names = "default";
status = "disabled";
};

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

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

&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 {
status = "okay";
regulator-boot-on;
regulator-initial-mode = <SILABS_DCDC_MODE_BUCK>;
silabs,pfmx-peak-current-milliamp = <80>;
};

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

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

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

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

/* Reserve 32 kB for the scratch partition */
scratch_partition: partition@74000 {
label = "image-scratch";
reg = <0x00074000 DT_SIZE_K(32)>;
};
};
};

Check warning on line 218 in boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a.dts

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

MISSING_EOF_NEWLINE

boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a.dts:218 adding a line without newline at end of file
27 changes: 27 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
identifier: xg23_pk2504a
name: PG23 Pro Kit PK2504A Rev. A03
type: mcu
arch: arm
ram: 64
flash: 512
toolchain:
- zephyr
- gnuarmemb
supported:
- clock_control
- counter
- entropy
- flash
- gpio
- i2c
- led
- pinctrl
- spi
- uart
- dma
- watchdog
- comparator
testing:
ignore_tags:
- pm
vendor: silabs
12 changes: 12 additions & 0 deletions boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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
CONFIG_SOC_GECKO_EMU_DCDC=y
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
17 changes: 17 additions & 0 deletions boards/silabs/dev_kits/xg28_pk2506a/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2025 Christoph Jans
# SPDX-License-Identifier: Apache-2.0

if BOARD_XG28_PK2506A

config LOG_BACKEND_SWO_FREQ_HZ
default 875000
depends on LOG_BACKEND_SWO

if SOC_GECKO_USE_RAIL

config FPU
default y

endif # SOC_GECKO_USE_RAIL

endif # BOARD_XG28_PK2506A
5 changes: 5 additions & 0 deletions boards/silabs/dev_kits/xg28_pk2506a/Kconfig.xg28_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_XG28_PK2506A
select SOC_PART_NUMBER_EFM32PG28B310F1024IM68
11 changes: 11 additions & 0 deletions boards/silabs/dev_kits/xg28_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)
Loading
Loading