Skip to content

Commit

Permalink
Merge tag 'mailbox-v6.14' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/jassibrar/mailbox

Pull mailbox updates from Jassi Brar:

 - samsung: add gs101-mbox driver

 - microchip: add sbi-ipc driver

 - zynqmp: fix invalid __percpu annotation

 - qcom: add IPQ5424 APCS compatible

 - mpfs fix copy and paste bug

 - th1520: Fix NULL vs IS_ERR() and a memory corruption bug

 - tegra-hsp: clear mailbox before using message

* tag 'mailbox-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox:
  riscv: export __cpuid_to_hartid_map
  riscv: sbi: vendorid_list: Add Microchip Technology to the vendor list
  mailbox: th1520: Fix memory corruption due to incorrect array size
  mailbox: zynqmp: Remove invalid __percpu annotation in zynqmp_ipi_probe()
  MAINTAINERS: add entry for Samsung Exynos mailbox driver
  mailbox: add Samsung Exynos driver
  dt-bindings: mailbox: add google,gs101-mbox
  mailbox: qcom: Add support for IPQ5424 APCS IPC
  dt-bindings: mailbox: qcom: Add IPQ5424 APCS compatible
  mailbox: qcom-ipcc: Reset CLEAR_ON_RECV_RD if set from boot firmware
  mailbox: add Microchip IPC support
  dt-bindings: mailbox: add binding for Microchip IPC mailbox controller
  mailbox: tegra-hsp: Clear mailbox before using message
  mailbox: mpfs: fix copy and paste bug in probe
  mailbox: th1520: Fix a NULL vs IS_ERR() bug
  • Loading branch information
Linus Torvalds committed Jan 25, 2025
2 parents 9d5db4e + 4783ce3 commit 917846e
Show file tree
Hide file tree
Showing 18 changed files with 973 additions and 6 deletions.
69 changes: 69 additions & 0 deletions Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2024 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mailbox/google,gs101-mbox.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Exynos Mailbox Controller

maintainers:
- Tudor Ambarus <tudor.ambarus@linaro.org>

description:
The Samsung Exynos mailbox controller, used on Google GS101 SoC, has 16 flag
bits for hardware interrupt generation and a shared register for passing
mailbox messages. When the controller is used by the ACPM interface
the shared register is ignored and the mailbox controller acts as a doorbell.
The controller just raises the interrupt to the firmware after the
ACPM interface has written the message to SRAM.

properties:
compatible:
const: google,gs101-mbox

reg:
maxItems: 1

clocks:
maxItems: 1

clock-names:
items:
- const: pclk

interrupts:
description: IRQ line for the RX mailbox.
maxItems: 1

'#mbox-cells':
const: 0

required:
- compatible
- reg
- clocks
- clock-names
- interrupts
- '#mbox-cells'

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/google,gs101.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
ap2apm_mailbox: mailbox@17610000 {
compatible = "google,gs101-mbox";
reg = <0x17610000 0x1000>;
clocks = <&cmu_apm CLK_GOUT_APM_MAILBOX_APM_AP_PCLK>;
clock-names = "pclk";
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH 0>;
#mbox-cells = <0>;
};
};
123 changes: 123 additions & 0 deletions Documentation/devicetree/bindings/mailbox/microchip,sbi-ipc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mailbox/microchip,sbi-ipc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip Inter-processor communication (IPC) mailbox controller

maintainers:
- Valentina Fernandez <valentina.fernandezalanis@microchip.com>

description:
The Microchip Inter-processor Communication (IPC) facilitates
message passing between processors using an interrupt signaling
mechanism.

properties:
compatible:
oneOf:
- description:
Intended for use by software running in supervisor privileged
mode (s-mode). This SBI interface is compatible with the Mi-V
Inter-hart Communication (IHC) IP.
const: microchip,sbi-ipc

- description:
Intended for use by the SBI implementation in machine mode
(m-mode), this compatible string is for the MIV_IHC Soft-IP.
const: microchip,miv-ihc-rtl-v2

reg:
maxItems: 1

interrupts:
minItems: 1
maxItems: 5

interrupt-names:
minItems: 1
maxItems: 5
items:
enum:
- hart-0
- hart-1
- hart-2
- hart-3
- hart-4
- hart-5

"#mbox-cells":
description: >
For "microchip,sbi-ipc", the cell represents the global "logical"
channel IDs. The meaning of channel IDs are platform firmware dependent.
For "microchip,miv-ihc-rtl-v2", the cell represents the physical
channel and does not vary based on the platform firmware.
const: 1

microchip,ihc-chan-disabled-mask:
description: >
Represents the enable/disable state of the bi-directional IHC
channels within the MIV-IHC IP configuration.
A bit set to '1' indicates that the corresponding channel is disabled,
and any read or write operations to that channel will return zero.
A bit set to '0' indicates that the corresponding channel is enabled
and will be accessible through its dedicated address range registers.
The actual enable/disable state of each channel is determined by the
IP block’s configuration.
$ref: /schemas/types.yaml#/definitions/uint16
maximum: 0x7fff
default: 0

required:
- compatible
- interrupts
- interrupt-names
- "#mbox-cells"

allOf:
- if:
properties:
compatible:
contains:
const: microchip,sbi-ipc
then:
properties:
reg:
not: {}
description:
The 'microchip,sbi-ipc' operates in a programming model
that does not require memory-mapped I/O (MMIO) registers
since it uses SBI ecalls provided by the m-mode/firmware
SBI implementation to access hardware registers.
microchip,ihc-chan-disabled-mask: false
else:
required:
- reg
- microchip,ihc-chan-disabled-mask

additionalProperties: false

examples:
- |
mailbox {
compatible = "microchip,sbi-ipc";
interrupt-parent = <&plic>;
interrupts = <180>, <179>, <178>;
interrupt-names = "hart-1", "hart-2", "hart-3";
#mbox-cells = <1>;
};
- |
mailbox@50000000 {
compatible = "microchip,miv-ihc-rtl-v2";
microchip,ihc-chan-disabled-mask = /bits/ 16 <0>;
reg = <0x50000000 0x1c000>;
interrupt-parent = <&plic>;
interrupts = <180>, <179>, <178>;
interrupt-names = "hart-1", "hart-2", "hart-3";
#mbox-cells = <1>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ properties:
- enum:
- qcom,ipq5018-apcs-apps-global
- qcom,ipq5332-apcs-apps-global
- qcom,ipq5424-apcs-apps-global
- qcom,ipq8074-apcs-apps-global
- qcom,ipq9574-apcs-apps-global
- const: qcom,ipq6018-apcs-apps-global
Expand Down
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,7 @@ F: drivers/*/*s3c24*
F: drivers/*/*s3c64xx*
F: drivers/*/*s5pv210*
F: drivers/clocksource/samsung_pwm_timer.c
F: drivers/mailbox/exynos-mailbox.c
F: drivers/memory/samsung/
F: drivers/pwm/pwm-samsung.c
F: drivers/soc/samsung/
Expand Down Expand Up @@ -20826,6 +20827,15 @@ F: arch/arm64/boot/dts/exynos/exynos850*
F: drivers/clk/samsung/clk-exynos850.c
F: include/dt-bindings/clock/exynos850.h

SAMSUNG EXYNOS MAILBOX DRIVER
M: Tudor Ambarus <tudor.ambarus@linaro.org>
L: linux-kernel@vger.kernel.org
L: linux-samsung-soc@vger.kernel.org
S: Supported
F: Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml
F: drivers/mailbox/exynos-mailbox.c
F: include/linux/mailbox/exynos-message.h

SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER
M: Krzysztof Kozlowski <krzk@kernel.org>
L: linux-crypto@vger.kernel.org
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/include/asm/vendorid_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASM_VENDOR_LIST_H

#define ANDES_VENDOR_ID 0x31e
#define MICROCHIP_VENDOR_ID 0x029
#define SIFIVE_VENDOR_ID 0x489
#define THEAD_VENDOR_ID 0x5b7

Expand Down
1 change: 1 addition & 0 deletions arch/riscv/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ enum ipi_message_type {
unsigned long __cpuid_to_hartid_map[NR_CPUS] __ro_after_init = {
[0 ... NR_CPUS-1] = INVALID_HARTID
};
EXPORT_SYMBOL_GPL(__cpuid_to_hartid_map);

void __init smp_setup_processor_id(void)
{
Expand Down
24 changes: 24 additions & 0 deletions drivers/mailbox/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ config ARM_MHU_V3
that provides different means of transports: supported extensions
will be discovered and possibly managed at probe-time.

config EXYNOS_MBOX
tristate "Exynos Mailbox"
depends on ARCH_EXYNOS || COMPILE_TEST
help
Say Y here if you want to build the Samsung Exynos Mailbox controller
driver. The controller has 16 flag bits for hardware interrupt
generation and a shared register for passing mailbox messages.
When the controller is used by the ACPM interface the shared register
is ignored and the mailbox controller acts as a doorbell that raises
the interrupt to the ACPM firmware.

config IMX_MBOX
tristate "i.MX Mailbox"
depends on ARCH_MXC || COMPILE_TEST
Expand Down Expand Up @@ -178,6 +189,19 @@ config POLARFIRE_SOC_MAILBOX

If unsure, say N.

config MCHP_SBI_IPC_MBOX
tristate "Microchip Inter-processor Communication (IPC) SBI driver"
depends on RISCV_SBI || COMPILE_TEST
depends on ARCH_MICROCHIP
help
Mailbox implementation for Microchip devices with an
Inter-process communication (IPC) controller.

To compile this driver as a module, choose M here. the
module will be called mailbox-mchp-ipc-sbi.

If unsure, say N.

config QCOM_APCS_IPC
tristate "Qualcomm APCS IPC driver"
depends on ARCH_QCOM || COMPILE_TEST
Expand Down
4 changes: 4 additions & 0 deletions drivers/mailbox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ obj-$(CONFIG_ARM_MHU_V2) += arm_mhuv2.o

obj-$(CONFIG_ARM_MHU_V3) += arm_mhuv3.o

obj-$(CONFIG_EXYNOS_MBOX) += exynos-mailbox.o

obj-$(CONFIG_IMX_MBOX) += imx-mailbox.o

obj-$(CONFIG_ARMADA_37XX_RWTM_MBOX) += armada-37xx-rwtm-mailbox.o
Expand Down Expand Up @@ -45,6 +47,8 @@ obj-$(CONFIG_BCM_FLEXRM_MBOX) += bcm-flexrm-mailbox.o

obj-$(CONFIG_POLARFIRE_SOC_MAILBOX) += mailbox-mpfs.o

obj-$(CONFIG_MCHP_SBI_IPC_MBOX) += mailbox-mchp-ipc-sbi.o

obj-$(CONFIG_QCOM_APCS_IPC) += qcom-apcs-ipc-mailbox.o

obj-$(CONFIG_TEGRA_HSP_MBOX) += tegra-hsp.o
Expand Down
Loading

0 comments on commit 917846e

Please sign in to comment.