soc: amd: Add support for AMD Versal Gen 2 RPU

Add support for the RPU, real-time processing unit on Versal Gen 2 SoC.
It is based on Cortext-R52 processor.

The patch contains initial wiring and configuration for generic board
with OCM(1MB) and DDR(2G) memories, cpu, interrupt controller, global
timer and UART.

versal2.dtsi contains common peripherals integrated into Versal Gen 2
SoC, and versal2_r52.dtsi has peripherals which are private to
Cortex-R52 processor.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
This commit is contained in:
Appana Durga Kedareswara rao 2025-03-29 20:00:10 +05:30 committed by Benjamin Cabé
commit 4f6b48ee6c
10 changed files with 241 additions and 0 deletions

28
soc/xlnx/versal2/soc.c Normal file
View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2025 Advanced Micro Devices, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/cache.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
void soc_early_init_hook(void)
{
if (IS_ENABLED(CONFIG_ICACHE)) {
if (!(__get_SCTLR() & SCTLR_I_Msk)) {
L1C_InvalidateICacheAll();
__set_SCTLR(__get_SCTLR() | SCTLR_I_Msk);
barrier_isync_fence_full();
}
}
if (IS_ENABLED(CONFIG_DCACHE)) {
if (!(__get_SCTLR() & SCTLR_C_Msk)) {
L1C_InvalidateDCacheAll();
__set_SCTLR(__get_SCTLR() | SCTLR_C_Msk);
barrier_dsync_fence_full();
}
}
}