diff options
author | Mike Leach <mike.leach@linaro.org> | 2023-03-16 21:40:39 +0000 |
---|---|---|
committer | Mike Leach <mike.leach@linaro.org> | 2023-07-14 11:12:37 +0100 |
commit | dbea7b48559bc6fc3761a59813a0137b555d3d17 (patch) | |
tree | 0d0fbdd1949efe45beae4c5ec5e7ef3c20611523 | |
parent | ae27147bd4a90b7976844b5dc1f7af1cc47da9e6 (diff) |
module: juno_rom: Add dt configuration support
Update juno_rom module to support device tree configuration.
Signed-off-by: Mike Leach <mike.leach@linaro.org>
-rw-r--r-- | dts/bindings/juno/arm,juno-rom.yaml | 18 | ||||
-rw-r--r-- | product/juno/module/juno_rom/CMakeLists.txt | 8 | ||||
-rw-r--r-- | product/juno/module/juno_rom/src/config_dt_juno_rom.c | 22 |
3 files changed, 48 insertions, 0 deletions
diff --git a/dts/bindings/juno/arm,juno-rom.yaml b/dts/bindings/juno/arm,juno-rom.yaml new file mode 100644 index 000000000000..6603d20d675c --- /dev/null +++ b/dts/bindings/juno/arm,juno-rom.yaml @@ -0,0 +1,18 @@ +# SCP firmware, juno ROM module + +description: Configuration information for Juno ROM + +compatible: "arm,juno-rom" + +include: base.yaml + +properties: + ap-context: + description: Application Processor memory context area, address and size + required: true + type: array + + ram-fw-base: + description: Firmware RAM base address + required: true + type: int diff --git a/product/juno/module/juno_rom/CMakeLists.txt b/product/juno/module/juno_rom/CMakeLists.txt index 4950d95850e4..64eef8fd0b93 100644 --- a/product/juno/module/juno_rom/CMakeLists.txt +++ b/product/juno/module/juno_rom/CMakeLists.txt @@ -15,6 +15,14 @@ target_sources( "${CMAKE_CURRENT_SOURCE_DIR}/src/juno_debug_rom.c" "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_juno_rom.c") +if(SCP_MODULE IN_LIST SCP_DT_CONFIG_MODULES_ALL) + target_sources(${SCP_MODULE_TARGET} + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/config_dt_juno_rom.c") + + # no need to add header files to DT defines for this module + +endif() + target_link_libraries(${SCP_MODULE_TARGET} PRIVATE module-juno-ppu) target_link_libraries(${SCP_MODULE_TARGET} PRIVATE module-power-domain) target_link_libraries(${SCP_MODULE_TARGET} PRIVATE module-bootloader) diff --git a/product/juno/module/juno_rom/src/config_dt_juno_rom.c b/product/juno/module/juno_rom/src/config_dt_juno_rom.c new file mode 100644 index 000000000000..069eba5ac90f --- /dev/null +++ b/product/juno/module/juno_rom/src/config_dt_juno_rom.c @@ -0,0 +1,22 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <mod_juno_rom.h> + +#include <fwk_dt_config_common.h> +#include <fwk_module.h> + +#define J_ROM_INST DT_INST(0, arm_juno_rom) + +struct fwk_module_config config_dt_juno_rom = { + .data = &(struct mod_juno_rom_config) { + .ap_context_base = DT_PROP_BY_IDX(J_ROM_INST, ap_context, 0), + .ap_context_size = DT_PROP_BY_IDX(J_ROM_INST, ap_context, 1), + .ramfw_base = DT_PROP(J_ROM_INST, ram_fw_base), + }, +}; + |