Skip to content

Commit d1e9aff

Browse files
committed
boards: Add support for PG23 Pro Kit and PG28 Pro Kit
add xg23_pk2504a and xg28_pk2506a Silab board Signed-off-by: Christoph Jans <[email protected]>
1 parent defe9ec commit d1e9aff

18 files changed

+688
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2025 Christoph Jans
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_XG23_PK2504A
5+
6+
config LOG_BACKEND_SWO_FREQ_HZ
7+
default 875000
8+
depends on LOG_BACKEND_SWO
9+
10+
if SOC_GECKO_USE_RAIL
11+
12+
config FPU
13+
default y
14+
15+
endif # SOC_GECKO_USE_RAIL
16+
17+
endif # BOARD_XG23_PK2504A
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Christoph Jans
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_XG23_PK2504A
5+
select SOC_PART_NUMBER_EFM32PG23B310F512IM48
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(jlink "--device=EFM32PG23BxxxF512")
4+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
5+
6+
board_runner_args(openocd)
7+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
8+
9+
board_runner_args(silabs_commander "--device=EFM32PG23BxxxF512")
10+
include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: xg23_pk2504a
3+
full_name: PG28 Pro Kit PK2504A Rev. A03
4+
vendor: silabs
5+
socs:
6+
- name: efm32pg23b310f512im48
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2021 Linaro Limited
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# SPI is implemented via usart so node name isn't spi@...
5+
list(APPEND EXTRA_DTC_FLAGS "-Wno-spi_bus_bridge")
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2025 Christoph Jans
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <dt-bindings/pinctrl/silabs/xg23-pinctrl.h>
8+
9+
&pinctrl {
10+
eusart0_default: eusart0_default {
11+
group0 {
12+
pins = <EUSART0_TX_PB5>;
13+
drive-push-pull;
14+
output-high;
15+
};
16+
group1 {
17+
pins = <EUSART0_RX_PB6>;
18+
input-enable;
19+
silabs,input-filter;
20+
};
21+
};
22+
23+
eusart1_default: eusart1_default {
24+
group0 {
25+
pins = <EUSART1_TX_PC1>; //<EUSART1_TX_PB5>;
26+
drive-push-pull;
27+
output-high;
28+
};
29+
group1 {
30+
pins = <EUSART1_RX_PC2>; //<EUSART1_RX_PB6>;
31+
input-enable;
32+
silabs,input-filter;
33+
};
34+
};
35+
36+
i2c0_default: i2c0_default {
37+
group0 {
38+
pins = <I2C0_SCL_PA8>, <I2C0_SDA_PA7>;
39+
drive-open-drain;
40+
bias-pull-up;
41+
};
42+
};
43+
};
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
/*
2+
* Copyright (c) 2025 Christoph Jans
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <silabs/xg23/efm32pg23b310f512im48.dtsi>
9+
#include <zephyr/dt-bindings/input/input-event-codes.h>
10+
#include <zephyr/dt-bindings/regulator/silabs_dcdc.h>
11+
#include "xg23_pk2504a-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Silicon Labs PG23 Pro Kit";
15+
compatible = "silabs,xg23_pk2504a", "silabs,efm32pg23";
16+
17+
chosen {
18+
zephyr,console = &eusart0;
19+
zephyr,shell-uart = &eusart0;
20+
zephyr,uart-pipe = &eusart0;
21+
zephyr,sram = &sram0;
22+
zephyr,flash = &flash0;
23+
zephyr,code-partition = &slot0_partition;
24+
};
25+
26+
aliases {
27+
led0 = &led0;
28+
led1 = &led1;
29+
sw0 = &button0;
30+
sw1 = &button1;
31+
watchdog0 = &wdog0;
32+
dht0 = &si7021;
33+
};
34+
35+
leds {
36+
compatible = "gpio-leds";
37+
led0: led_0 {
38+
gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
39+
label = "LED 0";
40+
};
41+
led1: led_1 {
42+
gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>;
43+
label = "LED 1";
44+
};
45+
};
46+
47+
buttons {
48+
compatible = "gpio-keys";
49+
button0: button_0 {
50+
gpios = <&gpioa 5 GPIO_ACTIVE_LOW>;
51+
label = "User Push Button 0";
52+
zephyr,code = <INPUT_KEY_0>;
53+
};
54+
button1: button_1 {
55+
gpios = <&gpiob 4 GPIO_ACTIVE_LOW>;
56+
label = "User Push Button 1";
57+
zephyr,code = <INPUT_KEY_1>;
58+
};
59+
};
60+
};
61+
62+
&cpu0 {
63+
clock-frequency = <78000000>;
64+
};
65+
66+
&pstate_em3 {
67+
status = "disabled";
68+
};
69+
70+
&hfxo {
71+
status = "okay";
72+
ctune = <106>;
73+
precision = <50>;
74+
};
75+
76+
&lfxo {
77+
status = "okay";
78+
ctune = <38>;
79+
precision = <50>;
80+
};
81+
82+
&hfrcodpll {
83+
clock-frequency = <DT_FREQ_M(78)>;
84+
clocks = <&hfxo>;
85+
dpll-n = <3839>;
86+
dpll-m = <1919>;
87+
dpll-edge = "fall";
88+
dpll-lock = "phase";
89+
dpll-autorecover;
90+
};
91+
92+
&em23grpaclk {
93+
clocks = <&lfxo>;
94+
};
95+
96+
&em4grpaclk {
97+
clocks = <&lfxo>;
98+
};
99+
100+
&sysrtcclk {
101+
clocks = <&lfxo>;
102+
};
103+
104+
&wdog0clk {
105+
clocks = <&lfxo>;
106+
};
107+
108+
&wdog1clk {
109+
clocks = <&lfxo>;
110+
};
111+
112+
&eusart0 {
113+
compatible = "silabs,eusart-uart";
114+
current-speed = <115200>;
115+
pinctrl-0 = <&eusart0_default>;
116+
pinctrl-names = "default";
117+
status = "okay";
118+
};
119+
120+
&eusart1 {
121+
compatible = "silabs,eusart-uart";
122+
current-speed = <115200>;
123+
pinctrl-0 = <&eusart1_default>;
124+
pinctrl-names = "default";
125+
status = "disabled";
126+
};
127+
128+
&i2c0 {
129+
pinctrl-0 = <&i2c0_default>;
130+
pinctrl-names = "default";
131+
status = "okay";
132+
133+
si7021: si7021@40 {
134+
compatible = "silabs,si7006";
135+
reg = <0x40>;
136+
status = "okay";
137+
};
138+
};
139+
140+
&gpio {
141+
status = "okay";
142+
};
143+
144+
&gpioa {
145+
status = "okay";
146+
};
147+
148+
&gpiob {
149+
status = "okay";
150+
// VCOM Isolation. Set PB1 to HIGH to enable VCOM_{RX,TX}.
151+
board-controller-enable {
152+
gpio-hog;
153+
gpios = <1 GPIO_ACTIVE_HIGH>;
154+
output-high;
155+
};
156+
};
157+
158+
&gpioc {
159+
status = "okay";
160+
};
161+
162+
&gpiod {
163+
status = "okay";
164+
};
165+
166+
&wdog0 {
167+
status = "okay";
168+
};
169+
170+
&sysrtc0 {
171+
status = "okay";
172+
};
173+
174+
&se {
175+
status = "okay";
176+
};
177+
178+
&dcdc {
179+
status = "okay";
180+
regulator-boot-on;
181+
regulator-initial-mode = <SILABS_DCDC_MODE_BUCK>;
182+
silabs,pfmx-peak-current-milliamp = <80>;
183+
};
184+
185+
&flash0 {
186+
partitions {
187+
compatible = "fixed-partitions";
188+
#address-cells = <1>;
189+
#size-cells = <1>;
190+
191+
/* Reserve 48 kB for the bootloader */
192+
boot_partition: partition@0 {
193+
label = "mcuboot";
194+
reg = <0x0 DT_SIZE_K(48)>;
195+
read-only;
196+
};
197+
198+
/* Reserve 208 kB for the application in slot 0 */
199+
slot0_partition: partition@c000 {
200+
label = "image-0";
201+
reg = <0x0000c000 DT_SIZE_K(208)>;
202+
};
203+
204+
/* Reserve 208 kB for the application in slot 1 */
205+
slot1_partition: partition@40000 {
206+
label = "image-1";
207+
reg = <0x00040000 DT_SIZE_K(208)>;
208+
};
209+
210+
/* Reserve 32 kB for the scratch partition */
211+
scratch_partition: partition@74000 {
212+
label = "image-scratch";
213+
reg = <0x00074000 DT_SIZE_K(32)>;
214+
};
215+
};
216+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
identifier: xg23_pk2504a
2+
name: PG23 Pro Kit PK2504A Rev. A03
3+
type: mcu
4+
arch: arm
5+
ram: 64
6+
flash: 512
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- clock_control
12+
- counter
13+
- entropy
14+
- flash
15+
- gpio
16+
- i2c
17+
- led
18+
- pinctrl
19+
- spi
20+
- uart
21+
- dma
22+
- watchdog
23+
- comparator
24+
testing:
25+
ignore_tags:
26+
- pm
27+
vendor: silabs
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_ARM_MPU=y
4+
CONFIG_CONSOLE=y
5+
CONFIG_UART_CONSOLE=y
6+
CONFIG_SERIAL=y
7+
CONFIG_GPIO=y
8+
CONFIG_HW_STACK_PROTECTION=y
9+
CONFIG_REGULATOR=y
10+
CONFIG_SOC_GECKO_EMU_DCDC=y
11+
CONFIG_SOC_GECKO_EMU_DCDC_MODE_ON=y
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2025 Christoph Jans
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_XG28_PK2506A
5+
6+
config LOG_BACKEND_SWO_FREQ_HZ
7+
default 875000
8+
depends on LOG_BACKEND_SWO
9+
10+
if SOC_GECKO_USE_RAIL
11+
12+
config FPU
13+
default y
14+
15+
endif # SOC_GECKO_USE_RAIL
16+
17+
endif # BOARD_XG28_PK2506A

0 commit comments

Comments
 (0)