Skip to content

Commit 9502f0d

Browse files
committed
Merge tag 'mailbox-v4.19' of git://git.linaro.org/landing-teams/working/fujitsu/integration
Pull mailbox updates from Jassi Brar: - xgene: potential null pointer fix - omap: switch to spdx license and use of_device_get_match_data() to match data - ti-msgmgr: cleanup and optimisation. New TI specific feature - secure proxy thread. - mediatek: add driver for CMDQ controller. - nxp: add driver for MU controller * tag 'mailbox-v4.19' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Add support for i.MX messaging unit dt-bindings: mailbox: imx-mu: add generic MU channel support dt-bindings: arm: fsl: add mu binding doc mailbox: add MODULE_LICENSE() for mtk-cmdq-mailbox.c mailbox: mediatek: Add Mediatek CMDQ driver dt-bindings: soc: Add documentation for the MediaTek GCE unit mailbox: ti-msgmgr: Add support for Secure Proxy dt-bindings: mailbox: Add support for secure proxy threads mailbox: ti-msgmgr: Move the memory region name to descriptor mailbox: ti-msgmgr: Change message count mask to be descriptor based mailbox: ti-msgmgr: Allocate Rx channel resources only on request mailbox: ti-msgmgr: Get rid of unused structure members mailbox/omap: use of_device_get_match_data() to get match data mailbox/omap: switch to SPDX license identifier mailbox: xgene-slimpro: Fix potential NULL pointer dereference
2 parents ea93102 + 2bb7005 commit 9502f0d

File tree

13 files changed

+1536
-90
lines changed

13 files changed

+1536
-90
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
NXP i.MX Messaging Unit (MU)
2+
--------------------------------------------------------------------
3+
4+
The Messaging Unit module enables two processors within the SoC to
5+
communicate and coordinate by passing messages (e.g. data, status
6+
and control) through the MU interface. The MU also provides the ability
7+
for one processor to signal the other processor using interrupts.
8+
9+
Because the MU manages the messaging between processors, the MU uses
10+
different clocks (from each side of the different peripheral buses).
11+
Therefore, the MU must synchronize the accesses from one side to the
12+
other. The MU accomplishes synchronization using two sets of matching
13+
registers (Processor A-facing, Processor B-facing).
14+
15+
Messaging Unit Device Node:
16+
=============================
17+
18+
Required properties:
19+
-------------------
20+
- compatible : should be "fsl,<chip>-mu", the supported chips include
21+
imx6sx, imx7s, imx8qxp, imx8qm.
22+
The "fsl,imx6sx-mu" compatible is seen as generic and should
23+
be included together with SoC specific compatible.
24+
- reg : Should contain the registers location and length
25+
- interrupts : Interrupt number. The interrupt specifier format depends
26+
on the interrupt controller parent.
27+
- #mbox-cells: Must be 2.
28+
<&phandle type channel>
29+
phandle : Label name of controller
30+
type : Channel type
31+
channel : Channel number
32+
33+
This MU support 4 type of unidirectional channels, each type
34+
has 4 channels. A total of 16 channels. Following types are
35+
supported:
36+
0 - TX channel with 32bit transmit register and IRQ transmit
37+
acknowledgment support.
38+
1 - RX channel with 32bit receive register and IRQ support
39+
2 - TX doorbell channel. Without own register and no ACK support.
40+
3 - RX doorbell channel.
41+
42+
Optional properties:
43+
-------------------
44+
- clocks : phandle to the input clock.
45+
- fsl,mu-side-b : Should be set for side B MU.
46+
47+
Examples:
48+
--------
49+
lsio_mu0: mailbox@5d1b0000 {
50+
compatible = "fsl,imx8qxp-mu";
51+
reg = <0x0 0x5d1b0000 0x0 0x10000>;
52+
interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
53+
#mbox-cells = <2>;
54+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
MediaTek GCE
2+
===============
3+
4+
The Global Command Engine (GCE) is used to help read/write registers with
5+
critical time limitation, such as updating display configuration during the
6+
vblank. The GCE can be used to implement the Command Queue (CMDQ) driver.
7+
8+
CMDQ driver uses mailbox framework for communication. Please refer to
9+
mailbox.txt for generic information about mailbox device-tree bindings.
10+
11+
Required properties:
12+
- compatible: Must be "mediatek,mt8173-gce"
13+
- reg: Address range of the GCE unit
14+
- interrupts: The interrupt signal from the GCE block
15+
- clock: Clocks according to the common clock binding
16+
- clock-names: Must be "gce" to stand for GCE clock
17+
- #mbox-cells: Should be 3.
18+
<&phandle channel priority atomic_exec>
19+
phandle: Label name of a gce node.
20+
channel: Channel of mailbox. Be equal to the thread id of GCE.
21+
priority: Priority of GCE thread.
22+
atomic_exec: GCE processing continuous packets of commands in atomic
23+
way.
24+
25+
Required properties for a client device:
26+
- mboxes: Client use mailbox to communicate with GCE, it should have this
27+
property and list of phandle, mailbox specifiers.
28+
- mediatek,gce-subsys: u32, specify the sub-system id which is corresponding
29+
to the register address.
30+
31+
Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h'. Such as
32+
sub-system ids, thread priority, event ids.
33+
34+
Example:
35+
36+
gce: gce@10212000 {
37+
compatible = "mediatek,mt8173-gce";
38+
reg = <0 0x10212000 0 0x1000>;
39+
interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>;
40+
clocks = <&infracfg CLK_INFRA_GCE>;
41+
clock-names = "gce";
42+
thread-num = CMDQ_THR_MAX_COUNT;
43+
#mbox-cells = <3>;
44+
};
45+
46+
Example for a client device:
47+
48+
mmsys: clock-controller@14000000 {
49+
compatible = "mediatek,mt8173-mmsys";
50+
mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST 1>,
51+
<&gce 1 CMDQ_THR_PRIO_LOWEST 1>;
52+
mediatek,gce-subsys = <SUBSYS_1400XXXX>;
53+
mutex-event-eof = <CMDQ_EVENT_MUTEX0_STREAM_EOF
54+
CMDQ_EVENT_MUTEX1_STREAM_EOF>;
55+
56+
...
57+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Texas Instruments' Secure Proxy
2+
========================================
3+
4+
The Texas Instruments' secure proxy is a mailbox controller that has
5+
configurable queues selectable at SoC(System on Chip) integration. The
6+
Message manager is broken up into different address regions that are
7+
called "threads" or "proxies" - each instance is unidirectional and is
8+
instantiated at SoC integration level by system controller to indicate
9+
receive or transmit path.
10+
11+
Message Manager Device Node:
12+
===========================
13+
Required properties:
14+
--------------------
15+
- compatible: Shall be "ti,am654-secure-proxy"
16+
- reg-names target_data - Map the proxy data region
17+
rt - Map the realtime status region
18+
scfg - Map the configuration region
19+
- reg: Contains the register map per reg-names.
20+
- #mbox-cells Shall be 1 and shall refer to the transfer path
21+
called thread.
22+
- interrupt-names: Contains interrupt names matching the rx transfer path
23+
for a given SoC. Receive interrupts shall be of the
24+
format: "rx_<PID>".
25+
- interrupts: Contains the interrupt information corresponding to
26+
interrupt-names property.
27+
28+
Example(AM654):
29+
------------
30+
31+
secure_proxy: mailbox@32c00000 {
32+
compatible = "ti,am654-secure-proxy";
33+
#mbox-cells = <1>;
34+
reg-names = "target_data", "rt", "scfg";
35+
reg = <0x0 0x32c00000 0x0 0x100000>,
36+
<0x0 0x32400000 0x0 0x100000>,
37+
<0x0 0x32800000 0x0 0x100000>;
38+
interrupt-names = "rx_011";
39+
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
40+
};
41+
42+
dmsc: dmsc {
43+
[...]
44+
mbox-names = "rx", "tx";
45+
# RX Thread ID is 11
46+
# TX Thread ID is 13
47+
mboxes= <&secure_proxy 11>,
48+
<&secure_proxy 13>;
49+
[...]
50+
};

drivers/mailbox/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ config ARM_MHU
1515
The controller has 3 mailbox channels, the last of which can be
1616
used in Secure mode only.
1717

18+
config IMX_MBOX
19+
tristate "i.MX Mailbox"
20+
depends on ARCH_MXC || COMPILE_TEST
21+
help
22+
Mailbox implementation for i.MX Messaging Unit (MU).
23+
1824
config PLATFORM_MHU
1925
tristate "Platform MHU Mailbox"
2026
depends on OF
@@ -189,4 +195,14 @@ config STM32_IPCC
189195
Mailbox implementation for STMicroelectonics STM32 family chips
190196
with hardware for Inter-Processor Communication Controller (IPCC)
191197
between processors. Say Y here if you want to have this support.
198+
199+
config MTK_CMDQ_MBOX
200+
tristate "MediaTek CMDQ Mailbox Support"
201+
depends on ARCH_MEDIATEK || COMPILE_TEST
202+
select MTK_INFRACFG
203+
help
204+
Say yes here to add support for the MediaTek Command Queue (CMDQ)
205+
mailbox driver. The CMDQ is used to help read/write registers with
206+
critical time limitation, such as updating display configuration
207+
during the vblank.
192208
endif

drivers/mailbox/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ obj-$(CONFIG_MAILBOX_TEST) += mailbox-test.o
77

88
obj-$(CONFIG_ARM_MHU) += arm_mhu.o
99

10+
obj-$(CONFIG_IMX_MBOX) += imx-mailbox.o
11+
1012
obj-$(CONFIG_PLATFORM_MHU) += platform_mhu.o
1113

1214
obj-$(CONFIG_PL320_MBOX) += pl320-ipc.o
@@ -40,3 +42,5 @@ obj-$(CONFIG_QCOM_APCS_IPC) += qcom-apcs-ipc-mailbox.o
4042
obj-$(CONFIG_TEGRA_HSP_MBOX) += tegra-hsp.o
4143

4244
obj-$(CONFIG_STM32_IPCC) += stm32-ipcc.o
45+
46+
obj-$(CONFIG_MTK_CMDQ_MBOX) += mtk-cmdq-mailbox.o

0 commit comments

Comments
 (0)