-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
janchri
wants to merge
3
commits into
zephyrproject-rtos:main
Choose a base branch
from
janchri:tmp_rebase
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,564
−1
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
45
boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a-pinctrl.dtsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
12
boards/silabs/dev_kits/xg23_pk2504a/xg23_pk2504a_defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.