-
Notifications
You must be signed in to change notification settings - Fork 7k
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
boards: amd: Add support for AMD Versal NET RPU #86276
base: main
Are you sure you want to change the base?
boards: amd: Add support for AMD Versal NET RPU #86276
Conversation
ebe195f
to
dc8364d
Compare
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.
PR needs splitting up into soc and board commits too
CONFIG_ARM_MPU=y | ||
CONFIG_CACHE_MANAGEMENT=y | ||
CONFIG_DCACHE=y | ||
CONFIG_ICACHE=y |
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.
why can't these be set by soc?
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.
okay will move
CONFIG_ISR_STACK_SIZE=1024 | ||
CONFIG_THREAD_STACK_INFO=y | ||
|
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.
remove
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.
sure
|
||
CONFIG_ARM_MPU=y | ||
CONFIG_CACHE_MANAGEMENT=y | ||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=100000000 |
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.
why can't this be set at soc level?
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.
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=100000000 - this is configurable based on HW design and not really hardcoded in SOC.
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.
will read it from dt parameter
dts/arm/xilinx/versalnet_r52.dtsi
Outdated
interrupt-parent = <&gic>; | ||
status = "okay"; | ||
}; | ||
|
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.
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.
will remove
dts/arm/xilinx/versalnet_r52.dtsi
Outdated
#interrupt-cells = <4>; | ||
status = "okay"; | ||
}; | ||
|
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.
as above
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.
sure will fix
soc/xlnx/versalnet/Kconfig.soc
Outdated
default "amd_versalnet" if SOC_AMD_VERSALNET | ||
|
||
config SOC | ||
default "versalnet_rpu" if SOC_AMD_VERSALNET_RPU |
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.
name mismatch either needs to be default "amd_versalnet_rpu" if SOC_AMD_VERSALNET_RPU
or default "versalnet_rpu" if SOC_VERSALNET_RPU
, and soc.yml needs to be the same
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.
sure will fix
CONFIG_DCACHE=y | ||
CONFIG_ICACHE=y |
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.
These items are already provided for any Cortex-R52 CPU in arch/arm/core/cortex_a_r/Kconfig.
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.
okay will remove
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
config SOC_AMD_VERSALNET_RPU |
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.
add 'select ARM_MPU' here , then you can remove the other instances of 'CONFIG_ARM_MPU=y'.
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.
okay will fix
soc/xlnx/versalnet/soc.c
Outdated
#include <zephyr/device.h> | ||
#include <zephyr/kernel.h> | ||
|
||
void z_arm_platform_init(void) |
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.
In order for z_arm_platform_init() to be executed, you'll have to select PLATFORM_SPECIFIC_INIT. However, this is deprecated and therefore shouldn't be used. You can do things like disabling the caches, adjusting VBAR if available, or making sure that HIVECS is cleared at the earliest stages of booting in soc_reset_hook() which goes into soc.c. With this current implementation of z_arm_platform_init(), the caches are enabled before the MPU is set up.
Have a look at #85537 as reference, this PR is currently in progress, adding cache support for the Cortex-R5.
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.
sure fill fix
Thanks for the review, will fix |
dc8364d
to
2c7862a
Compare
Add support for the RPU, real-time processing unit on Versal NET 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. versalnet.dtsi contains common peripherals integrated into Versal NET SoC, and versalnet_r52.dtsi has peripherals which are private to Cortex-R52 processor. Signed-off-by: Mubin Sayyed <[email protected]> Signed-off-by: Appana Durga Kedareswara rao <[email protected]>
2c7862a
to
86b545f
Compare
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]>
86b545f
to
efa3d16
Compare
Add support for the RPU, real-time processing unit on Versal NET 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.
versalnet.dtsi contains common peripherals integrated into Versal NET SoC, and versalnet_r52.dtsi has peripherals which are private to Cortex-R52 processor.
CC: @mubinsyed