Skip to content

Commit 3a979e8

Browse files
committed
Merge tag 'mailbox-v4.18' of git://git.linaro.org/landing-teams/working/fujitsu/integration
Pull mailbox updates from Jassi Brar: - Remove HAS_DMA config dependencies - New STMicroelectronics STM32 IPCC driver - Enable QCom driver to run more controllers - Fixed return code from null to ptr-err for Brcm driver - Fix kconfig dependencies for the HiSilicon driver * tag 'mailbox-v4.18' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox/drivers/hisi: Consolidate the Kconfig for the MAILBOX mailbox: Add support for Qualcomm SDM845 SoCs dt-bindings: mailbox: Add APSS shared binding for SDM845 SoCs mailbox: bcm2835: Fix of_xlate return value mailbox: qcom: Add msm8998 hmss compatible mailbox: add STMicroelectronics STM32 IPCC driver dt-bindings: mailbox: add STMicroelectronics STM32 IPCC binding mailbox: Remove depends on HAS_DMA in case of platform dependency
2 parents a1cdde8 + f83d1cf commit 3a979e8

File tree

7 files changed

+472
-7
lines changed

7 files changed

+472
-7
lines changed

Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ platforms.
1010
Definition: must be one of:
1111
"qcom,msm8916-apcs-kpss-global",
1212
"qcom,msm8996-apcs-hmss-global"
13+
"qcom,msm8998-apcs-hmss-global"
14+
"qcom,sdm845-apss-shared"
1315

1416
- reg:
1517
Usage: required
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
* STMicroelectronics STM32 IPCC (Inter-Processor Communication Controller)
2+
3+
The IPCC block provides a non blocking signaling mechanism to post and
4+
retrieve messages in an atomic way between two processors.
5+
It provides the signaling for N bidirectionnal channels. The number of channels
6+
(N) can be read from a dedicated register.
7+
8+
Required properties:
9+
- compatible: Must be "st,stm32mp1-ipcc"
10+
- reg: Register address range (base address and length)
11+
- st,proc-id: Processor id using the mailbox (0 or 1)
12+
- clocks: Input clock
13+
- interrupt-names: List of names for the interrupts described by the interrupt
14+
property. Must contain the following entries:
15+
- "rx"
16+
- "tx"
17+
- "wakeup"
18+
- interrupts: Interrupt specifiers for "rx channel occupied", "tx channel
19+
free" and "system wakeup".
20+
- #mbox-cells: Number of cells required for the mailbox specifier. Must be 1.
21+
The data contained in the mbox specifier of the "mboxes"
22+
property in the client node is the mailbox channel index.
23+
24+
Optional properties:
25+
- wakeup-source: Flag to indicate whether this device can wake up the system
26+
27+
28+
29+
Example:
30+
ipcc: mailbox@4c001000 {
31+
compatible = "st,stm32mp1-ipcc";
32+
#mbox-cells = <1>;
33+
reg = <0x4c001000 0x400>;
34+
st,proc-id = <0>;
35+
interrupts-extended = <&intc GIC_SPI 100 IRQ_TYPE_NONE>,
36+
<&intc GIC_SPI 101 IRQ_TYPE_NONE>,
37+
<&aiec 62 1>;
38+
interrupt-names = "rx", "tx", "wakeup";
39+
clocks = <&rcc_clk IPCC>;
40+
wakeup-source;
41+
}
42+
43+
Client:
44+
mbox_test {
45+
...
46+
mboxes = <&ipcc 0>, <&ipcc 1>;
47+
};

drivers/mailbox/Kconfig

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,20 @@ config TI_MESSAGE_MANAGER
109109
platform has support for the hardware block.
110110

111111
config HI3660_MBOX
112-
tristate "Hi3660 Mailbox"
113-
depends on ARCH_HISI && OF
112+
tristate "Hi3660 Mailbox" if EXPERT
113+
depends on (ARCH_HISI || COMPILE_TEST)
114+
depends on OF
115+
default ARCH_HISI
114116
help
115117
An implementation of the hi3660 mailbox. It is used to send message
116118
between application processors and other processors/MCU/DSP. Select
117119
Y here if you want to use Hi3660 mailbox controller.
118120

119121
config HI6220_MBOX
120-
tristate "Hi6220 Mailbox"
121-
depends on ARCH_HISI
122+
tristate "Hi6220 Mailbox" if EXPERT
123+
depends on (ARCH_HISI || COMPILE_TEST)
124+
depends on OF
125+
default ARCH_HISI
122126
help
123127
An implementation of the hi6220 mailbox. It is used to send message
124128
between application processors and MCU. Say Y here if you want to
@@ -162,7 +166,6 @@ config XGENE_SLIMPRO_MBOX
162166
config BCM_PDC_MBOX
163167
tristate "Broadcom FlexSparx DMA Mailbox"
164168
depends on ARCH_BCM_IPROC || COMPILE_TEST
165-
depends on HAS_DMA
166169
help
167170
Mailbox implementation for the Broadcom FlexSparx DMA ring manager,
168171
which provides access to various offload engines on Broadcom
@@ -172,11 +175,18 @@ config BCM_FLEXRM_MBOX
172175
tristate "Broadcom FlexRM Mailbox"
173176
depends on ARM64
174177
depends on ARCH_BCM_IPROC || COMPILE_TEST
175-
depends on HAS_DMA
176178
select GENERIC_MSI_IRQ_DOMAIN
177179
default m if ARCH_BCM_IPROC
178180
help
179181
Mailbox implementation of the Broadcom FlexRM ring manager,
180182
which provides access to various offload engines on Broadcom
181183
SoCs. Say Y here if you want to use the Broadcom FlexRM.
184+
185+
config STM32_IPCC
186+
tristate "STM32 IPCC Mailbox"
187+
depends on MACH_STM32MP157
188+
help
189+
Mailbox implementation for STMicroelectonics STM32 family chips
190+
with hardware for Inter-Processor Communication Controller (IPCC)
191+
between processors. Say Y here if you want to have this support.
182192
endif

drivers/mailbox/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ obj-$(CONFIG_BCM_FLEXRM_MBOX) += bcm-flexrm-mailbox.o
3838
obj-$(CONFIG_QCOM_APCS_IPC) += qcom-apcs-ipc-mailbox.o
3939

4040
obj-$(CONFIG_TEGRA_HSP_MBOX) += tegra-hsp.o
41+
42+
obj-$(CONFIG_STM32_IPCC) += stm32-ipcc.o

drivers/mailbox/bcm2835-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static struct mbox_chan *bcm2835_mbox_index_xlate(struct mbox_controller *mbox,
134134
const struct of_phandle_args *sp)
135135
{
136136
if (sp->args_count != 0)
137-
return NULL;
137+
return ERR_PTR(-EINVAL);
138138

139139
return &mbox->chans[0];
140140
}

drivers/mailbox/qcom-apcs-ipc-mailbox.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev)
125125
static const struct of_device_id qcom_apcs_ipc_of_match[] = {
126126
{ .compatible = "qcom,msm8916-apcs-kpss-global", .data = (void *)8 },
127127
{ .compatible = "qcom,msm8996-apcs-hmss-global", .data = (void *)16 },
128+
{ .compatible = "qcom,msm8998-apcs-hmss-global", .data = (void *)8 },
129+
{ .compatible = "qcom,sdm845-apss-shared", .data = (void *)12 },
128130
{}
129131
};
130132
MODULE_DEVICE_TABLE(of, qcom_apcs_ipc_of_match);

0 commit comments

Comments
 (0)