Skip to content

Commit

Permalink
boards: amd: Add board support for the versalnet rpu on Versal net SOC
Browse files Browse the repository at this point in the history
Add generic board support for the RPU, real-time processing
unit on Versal NET SoC. It is based on Cortext-R52 processor.

Signed-off-by: Mubin Sayyed <[email protected]>
Signed-off-by: Appana Durga Kedareswara rao <[email protected]>
  • Loading branch information
Appana Durga Kedareswara rao committed Feb 27, 2025
1 parent 8506e3b commit 2c7862a
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 0 deletions.
8 changes: 8 additions & 0 deletions boards/amd/versalnet_rpu/Kconfig.versalnet_rpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Copyright (c) 2025 Advanced Micro Devices, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#

config BOARD_VERSALNET_RPU
select SOC_AMD_VERSALNET_RPU
7 changes: 7 additions & 0 deletions boards/amd/versalnet_rpu/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) 2025 Advanced Micro Devices, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#

include(${ZEPHYR_BASE}/boards/common/xsdb.board.cmake)
5 changes: 5 additions & 0 deletions boards/amd/versalnet_rpu/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: versalnet_rpu
vendor: amd
socs:
- name: versalnet_rpu
44 changes: 44 additions & 0 deletions boards/amd/versalnet_rpu/support/xsdb.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2025 Advanced Micro Devices, Inc.
#
# SPDX-License-Identifier: Apache-2.0

proc load_image args {
set elf_file [lindex $args 0]

if { [info exists ::env(HW_SERVER_URL)] } {
connect -url $::env(HW_SERVER_URL)
} else {
connect
}

after 100
targets -set -nocase -filter {name =~ "Versal*"}
after 100
rst -system
after 100

if { [info exists ::env(PDI_FILE_PATH)] } {
device program $::env(PDI_FILE_PATH)
} else {
puts "Error: env variable PDI_FILE_PATH is not set"
exit
}

after 100
targets -set -nocase -filter {name =~ "DPC"}
after 100
# Configure timestamp generator to run global timer gracefully
# Ideally these registers should be set from bootloader (cdo)
mwr -force 0xeb5b0000 0x1
mwr -force 0xeb5b0020 100000000
after 100

targets -set -nocase -filter {name =~ "*Cortex-R52 #0.0"}
rst -proc
after 100
dow -force $elf_file
con
exit
}

load_image {*}$argv
45 changes: 45 additions & 0 deletions boards/amd/versalnet_rpu/versalnet_rpu.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// SPDX-License-Identifier: GPL-2.0
/*
* (C) Copyright 2025, Advanced Micro Devices, Inc.
*
* Mubin Sayyed <[email protected]>
*/

/dts-v1/;
#include <arm/xilinx/versalnet_r52.dtsi>

/ {
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,ocm = &ocm;
};
};

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

&soc {
sram0: memory@0 {
compatible = "mmio-sram";
reg = <0x00000 DT_SIZE_M(2048)>;
};
};

&ocm {
status = "okay";
};

&uart1 {
status = "okay";
current-speed = <115200>;
clock-frequency = <100000000>;
};

&uart0 {
status = "okay";
current-speed = <115200>;
clock-frequency = <100000000>;
};
10 changes: 10 additions & 0 deletions boards/amd/versalnet_rpu/versalnet_rpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
identifier: versalnet_rpu
name: AMD Development board for Versal NET RPU
arch: arm
toolchain:
- zephyr
testing:
ignore_tags:
- net
- bluetooth
vendor: amd
9 changes: 9 additions & 0 deletions boards/amd/versalnet_rpu/versalnet_rpu_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Enable UART driver
CONFIG_SERIAL=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Enable serial port
CONFIG_UART_PL011=y

0 comments on commit 2c7862a

Please sign in to comment.