Skip to content

Commit 48826b9

Browse files
soburidkalowsk
authored andcommitted
boards: raspberrypi: rpi5: Add configuration for using SWD connector
Add a configuration to use UART0 for the console and make able to use the connector shared by SWD and UART10 for SWD purposes. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent bfe4291 commit 48826b9

5 files changed

Lines changed: 70 additions & 0 deletions

File tree

boards/raspberrypi/rpi_5/board.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ board:
44
vendor: raspberrypi
55
socs:
66
- name: bcm2712
7+
variants:
8+
- name: swd
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "rpi_5-pinctrl.dtsi"
8+
9+
&rp1_pinctrl {
10+
rp1_uart0_default: rp1_uart0_default {
11+
group1 {
12+
pinmux = <RP1_UART0_TX_P14>;
13+
};
14+
15+
group2 {
16+
pinmux = <RP1_UART0_RX_P15>;
17+
input-enable;
18+
input-schmitt-enable;
19+
bias-pull-up;
20+
};
21+
};
22+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "rpi_5_bcm2712.dts"
8+
#include "rpi_5_bcm2712_swd-pinctrl.dtsi"
9+
10+
/ {
11+
chosen {
12+
zephyr,console = &rp1_uart0;
13+
zephyr,shell-uart = &rp1_uart0;
14+
};
15+
};
16+
17+
&rp1_uart0 {
18+
status = "okay";
19+
current-speed = <115200>;
20+
pinctrl-0 = <&rp1_uart0_default>;
21+
pinctrl-names = "default";
22+
};
23+
24+
&uart10 {
25+
status = "disabled";
26+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
identifier: rpi_5/bcm2712/swd
2+
name: Raspberry Pi 5 SWD-enabled
3+
type: mcu
4+
arch: arm64
5+
toolchain:
6+
- zephyr
7+
- cross-compile
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_ARM64_VA_BITS_40=y
4+
CONFIG_ARM64_PA_BITS_40=y
5+
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y
6+
7+
# Enable serial console.
8+
CONFIG_SERIAL=y
9+
CONFIG_CONSOLE=y
10+
CONFIG_UART_CONSOLE=y
11+
CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN=n
12+
13+
CONFIG_PCIE=y

0 commit comments

Comments
 (0)