drivers: mbox: Add Arm MHUv3 Mailbox driver

This adds new Arm MHUv3 mailbox driver.

The Arm MHUv3 (Message Handling Unit version 3) is a hardware
block designed for inter-processor communication in SoCs.

The ARM MHUv3 can optionally support various extensions to
enable different kinds of transport to be used for communication.

At the moment only the doorbell extension is supported in the
driver.

For more information refer to Arm Message Handling Unit
Architecture
https://documentation-service.arm.com/static/65f01fbab5e3c10fe1335edf

Signed-off-by: Ziad Elhanafy <ziad.elhanafy@arm.com>
This commit is contained in:
Ziad Elhanafy 2024-11-19 08:57:41 +00:00 committed by Benjamin Cabé
parent 06f42f6bfa
commit a7ba802dbe
5 changed files with 1615 additions and 0 deletions

View File

@ -21,3 +21,4 @@ zephyr_library_sources_ifdef(CONFIG_MBOX_STM32_HSEM mbox_stm32_hsem.c)
zephyr_library_sources_ifdef(CONFIG_MBOX_IVSHMEM mbox_ivshmem.c)
zephyr_library_sources_ifdef(CONFIG_MBOX_TI_OMAP_MAILBOX mbox_ti_omap.c)
zephyr_library_sources_ifdef(CONFIG_MBOX_RENESAS_RZ_MHU mbox_renesas_rz_mhu.c)
zephyr_library_sources_ifdef(CONFIG_MBOX_MHUV3 mbox_mhuv3.c)

View File

@ -25,6 +25,7 @@ source "drivers/mbox/Kconfig.esp32"
source "drivers/mbox/Kconfig.ivshmem"
source "drivers/mbox/Kconfig.ti_omap"
source "drivers/mbox/Kconfig.renesas_rz"
source "drivers/mbox/Kconfig.mhuv3"
config MBOX_INIT_PRIORITY

View File

@ -0,0 +1,27 @@
#
# SPDX-FileCopyrightText: <text>Copyright 2024-2025 Arm Limited and/or its
# affiliates <open-source-office@arm.com></text>
#
# SPDX-License-Identifier: Apache-2.0
config MBOX_MHUV3
bool "ARM MHUv3 mailbox driver"
depends on DT_HAS_ARM_MHUV3_ENABLED
default y
help
Driver for Arm MHUv3 (Message Handling Unit v3)
if MBOX_MHUV3
config MBOX_MHUV3_NUM_DBCH
int "ARM MHUv3 mailbox doorbell number of channels"
default 0
help
Maximum number of doorbell channels allowed in the Postbox/Mailbox.
This number has to be less than or equal to (NUM_DBCH + 1) in PBX_DBCH_CFG0/MBX_DBCH_CFG0 registers.
If the doorbell extension is supported then this number has to be bigger than zero.
MHUv3 allows up to 128 doorbell channels.
This configuration parameter is needed to avoid the dynamic memory allocation of doorbell channels
data structures.
endif

1563
drivers/mbox/mbox_mhuv3.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: <text>Copyright 2024 Arm Limited and/or its
# affiliates <open-source-office@arm.com></text>
#
# SPDX-License-Identifier: Apache-2.0
description: ARM MHUv3 (Message Handling Unit v3)
compatible: "arm,mhuv3"
include: [base.yaml, mailbox-controller.yaml]
properties:
reg:
required: true
interrupts:
required: true
interrupt-names:
required: true
mbox-cells:
- channel