Browse Source

soc: nordic: move nrf_ironside from drivers/firmware to soc/nordic

Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.

Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
pull/92566/merge
Jonathan Nilsen 3 weeks ago committed by Daniel DeGrasse
parent
commit
b18c326946
  1. 1
      drivers/firmware/CMakeLists.txt
  2. 1
      drivers/firmware/Kconfig
  3. 0
      dts/bindings/misc/nordic,ironside-call.yaml
  4. 4
      samples/boards/nordic/nrf_ironside/update/src/main.c
  5. 1
      soc/nordic/CMakeLists.txt
  6. 2
      soc/nordic/ironside/CMakeLists.txt
  7. 0
      soc/nordic/ironside/Kconfig
  8. 2
      soc/nordic/ironside/boot_report.c
  9. 2
      soc/nordic/ironside/call.c
  10. 4
      soc/nordic/ironside/cpuconf.c
  11. 4
      soc/nordic/ironside/dvfs.c
  12. 6
      soc/nordic/ironside/include/nrf_ironside/boot_report.h
  13. 6
      soc/nordic/ironside/include/nrf_ironside/call.h
  14. 8
      soc/nordic/ironside/include/nrf_ironside/cpuconf.h
  15. 6
      soc/nordic/ironside/include/nrf_ironside/dvfs.h
  16. 6
      soc/nordic/ironside/include/nrf_ironside/update.h
  17. 4
      soc/nordic/ironside/update.c
  18. 2
      soc/nordic/nrf54h/soc.c

1
drivers/firmware/CMakeLists.txt

@ -2,6 +2,5 @@
# zephyr-keep-sorted-start # zephyr-keep-sorted-start
add_subdirectory_ifdef(CONFIG_ARM_SCMI scmi) add_subdirectory_ifdef(CONFIG_ARM_SCMI scmi)
add_subdirectory_ifdef(CONFIG_NRF_IRONSIDE nrf_ironside)
add_subdirectory_ifdef(CONFIG_TISCI tisci) add_subdirectory_ifdef(CONFIG_TISCI tisci)
# zephyr-keep-sorted-stop # zephyr-keep-sorted-stop

1
drivers/firmware/Kconfig

@ -11,7 +11,6 @@ config ARM_SCMI
Interface (SCMI). Interface (SCMI).
# zephyr-keep-sorted-start # zephyr-keep-sorted-start
source "drivers/firmware/nrf_ironside/Kconfig"
source "drivers/firmware/scmi/Kconfig" source "drivers/firmware/scmi/Kconfig"
source "drivers/firmware/tisci/Kconfig" source "drivers/firmware/tisci/Kconfig"
# zephyr-keep-sorted-stop # zephyr-keep-sorted-stop

0
dts/bindings/firmware/nordic,ironside-call.yaml → dts/bindings/misc/nordic,ironside-call.yaml

4
samples/boards/nordic/nrf_ironside/update/src/main.c

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/drivers/firmware/nrf_ironside/boot_report.h> #include <nrf_ironside/boot_report.h>
#include <zephyr/drivers/firmware/nrf_ironside/update.h> #include <nrf_ironside/update.h>
#include <zephyr/logging/log.h> #include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(app, LOG_LEVEL_INF); LOG_MODULE_REGISTER(app, LOG_LEVEL_INF);

1
soc/nordic/CMakeLists.txt

@ -47,3 +47,4 @@ endif()
add_subdirectory(${SOC_SERIES}) add_subdirectory(${SOC_SERIES})
add_subdirectory(common) add_subdirectory(common)
add_subdirectory(ironside)

2
drivers/firmware/nrf_ironside/CMakeLists.txt → soc/nordic/ironside/CMakeLists.txt

@ -1,6 +1,8 @@
# Copyright (c) 2025 Nordic Semiconductor ASA # Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
zephyr_include_directories(include)
zephyr_library() zephyr_library()
zephyr_library_sources_ifdef(CONFIG_NRF_IRONSIDE_CALL call.c) zephyr_library_sources_ifdef(CONFIG_NRF_IRONSIDE_CALL call.c)

0
drivers/firmware/nrf_ironside/Kconfig → soc/nordic/ironside/Kconfig

2
drivers/firmware/nrf_ironside/boot_report.c → soc/nordic/ironside/boot_report.c

@ -5,7 +5,7 @@
#include <errno.h> #include <errno.h>
#include <zephyr/devicetree.h> #include <zephyr/devicetree.h>
#include <zephyr/drivers/firmware/nrf_ironside/boot_report.h> #include <nrf_ironside/boot_report.h>
#define IRONSIDE_SE_BOOT_REPORT_ADDR DT_REG_ADDR(DT_NODELABEL(ironside_se_boot_report)) #define IRONSIDE_SE_BOOT_REPORT_ADDR DT_REG_ADDR(DT_NODELABEL(ironside_se_boot_report))

2
drivers/firmware/nrf_ironside/call.c → soc/nordic/ironside/call.c

@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <nrf_ironside/call.h>
#include <zephyr/cache.h> #include <zephyr/cache.h>
#include <zephyr/device.h> #include <zephyr/device.h>
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
#include <zephyr/drivers/mbox.h> #include <zephyr/drivers/mbox.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/sys/barrier.h> #include <zephyr/sys/barrier.h>

4
drivers/firmware/nrf_ironside/cpuconf.c → soc/nordic/ironside/cpuconf.c

@ -9,8 +9,8 @@
#include <zephyr/sys/util.h> #include <zephyr/sys/util.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/drivers/firmware/nrf_ironside/call.h> #include <nrf_ironside/call.h>
#include <zephyr/drivers/firmware/nrf_ironside/cpuconf.h> #include <nrf_ironside/cpuconf.h>
#define CPU_PARAMS_CPU_OFFSET (0) #define CPU_PARAMS_CPU_OFFSET (0)
#define CPU_PARAMS_CPU_MASK (0xF) #define CPU_PARAMS_CPU_MASK (0xF)

4
drivers/firmware/nrf_ironside/dvfs.c → soc/nordic/ironside/dvfs.c

@ -5,8 +5,8 @@
#include <hal/nrf_hsfll.h> #include <hal/nrf_hsfll.h>
#include <zephyr/kernel.h> #include <zephyr/kernel.h>
#include <zephyr/drivers/firmware/nrf_ironside/dvfs.h> #include <nrf_ironside/dvfs.h>
#include <zephyr/drivers/firmware/nrf_ironside/call.h> #include <nrf_ironside/call.h>
static enum ironside_dvfs_oppoint current_dvfs_oppoint = IRONSIDE_DVFS_OPP_HIGH; static enum ironside_dvfs_oppoint current_dvfs_oppoint = IRONSIDE_DVFS_OPP_HIGH;

6
include/zephyr/drivers/firmware/nrf_ironside/boot_report.h → soc/nordic/ironside/include/nrf_ironside/boot_report.h

@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_BOOT_REPORT_H_ #ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_BOOT_REPORT_H_ #define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
@ -74,4 +74,4 @@ struct ironside_boot_report {
*/ */
int ironside_boot_report_get(const struct ironside_boot_report **report); int ironside_boot_report_get(const struct ironside_boot_report **report);
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_BOOT_REPORT_H_ */ #endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_ */

6
include/zephyr/drivers/firmware/nrf_ironside/call.h → soc/nordic/ironside/include/nrf_ironside/call.h

@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CALL_H_ #ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CALL_H_
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CALL_H_ #define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CALL_H_
#include <stdint.h> #include <stdint.h>
@ -79,4 +79,4 @@ void ironside_call_dispatch(struct ironside_call_buf *buf);
*/ */
void ironside_call_release(struct ironside_call_buf *buf); void ironside_call_release(struct ironside_call_buf *buf);
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CALL_H_ */ #endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CALL_H_ */

8
include/zephyr/drivers/firmware/nrf_ironside/cpuconf.h → soc/nordic/ironside/include/nrf_ironside/cpuconf.h

@ -3,14 +3,14 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CPUCONF_H_ #ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CPUCONF_H_
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CPUCONF_H_ #define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CPUCONF_H_
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <zephyr/drivers/firmware/nrf_ironside/call.h>
#include <zephyr/toolchain/common.h> #include <zephyr/toolchain/common.h>
#include <nrf.h> #include <nrf.h>
#include <nrf_ironside/call.h>
/** /**
* @name CPUCONF service error codes. * @name CPUCONF service error codes.
@ -71,4 +71,4 @@ BUILD_ASSERT(IRONSIDE_CPUCONF_NUM_ARGS <= NRF_IRONSIDE_CALL_NUM_ARGS);
int ironside_cpuconf(NRF_PROCESSORID_Type cpu, const void *vector_table, bool cpu_wait, int ironside_cpuconf(NRF_PROCESSORID_Type cpu, const void *vector_table, bool cpu_wait,
const uint8_t *msg, size_t msg_size); const uint8_t *msg, size_t msg_size);
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_CPUCONF_H_ */ #endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_CPUCONF_H_ */

6
include/zephyr/drivers/firmware/nrf_ironside/dvfs.h → soc/nordic/ironside/include/nrf_ironside/dvfs.h

@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_DVFS_H_ #ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_DVFS_H_
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_DVFS_H_ #define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_DVFS_H_
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
@ -89,4 +89,4 @@ static inline bool ironside_dvfs_is_oppoint_valid(enum ironside_dvfs_oppoint dvf
return true; return true;
} }
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_DVFS_H_ */ #endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_DVFS_H_ */

6
include/zephyr/drivers/firmware/nrf_ironside/update.h → soc/nordic/ironside/include/nrf_ironside/update.h

@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#ifndef ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_UPDATE_H_ #ifndef ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_UPDATE_H_
#define ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_UPDATE_H_ #define ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_UPDATE_H_
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
@ -69,4 +69,4 @@ struct ironside_update_blob {
*/ */
int ironside_update(const struct ironside_update_blob *update); int ironside_update(const struct ironside_update_blob *update);
#endif /* ZEPHYR_INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_NRF_IRONSIDE_UPDATE_H_ */ #endif /* ZEPHYR_SOC_NORDIC_IRONSIDE_INCLUDE_NRF_IRONSIDE_UPDATE_H_ */

4
drivers/firmware/nrf_ironside/update.c → soc/nordic/ironside/update.c

@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
#include <zephyr/drivers/firmware/nrf_ironside/update.h> #include <nrf_ironside/update.h>
#include <zephyr/drivers/firmware/nrf_ironside/call.h> #include <nrf_ironside/call.h>
int ironside_update(const struct ironside_update_blob *update) int ironside_update(const struct ironside_update_blob *update)
{ {

2
soc/nordic/nrf54h/soc.c

@ -22,7 +22,7 @@
#include <soc/nrfx_coredep.h> #include <soc/nrfx_coredep.h>
#include <soc_lrcconf.h> #include <soc_lrcconf.h>
#include <dmm.h> #include <dmm.h>
#include <zephyr/drivers/firmware/nrf_ironside/cpuconf.h> #include <nrf_ironside/cpuconf.h>
LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);

Loading…
Cancel
Save