xref: /linux/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml (revision fee2e558b4884df08fad8dd0e5e12466dce89996)
1# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mailbox/apple,mailbox.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Apple Mailbox Controller
8
9maintainers:
10  - Hector Martin <marcan@marcan.st>
11  - Sven Peter <sven@svenpeter.dev>
12
13description:
14  The Apple mailbox consists of two FIFOs used to exchange 64+32 bit
15  messages between the main CPU and a co-processor. Multiple instances
16  of this mailbox can be found on Apple SoCs.
17  One of the two FIFOs is used to send data to a co-processor while the other
18  FIFO is used for the other direction.
19  Various clients implement different IPC protocols based on these simple
20  messages and shared memory buffers.
21
22properties:
23  compatible:
24    oneOf:
25      - description:
26          ASC mailboxes are the most common variant found on the M1 used
27          for example for the display controller, the system management
28          controller and the NVMe coprocessor.
29        items:
30          - enum:
31              - apple,t8103-asc-mailbox
32              - apple,t8112-asc-mailbox
33              - apple,t6000-asc-mailbox
34          - const: apple,asc-mailbox-v4
35
36      - description:
37          An older ASC mailbox interface found on T2 and A11 that is also
38          used for the NVMe coprocessor and the system management
39          controller.
40        items:
41          - const: apple,t8015-asc-mailbox
42
43      - description:
44          M3 mailboxes are an older variant with a slightly different MMIO
45          interface still found on the M1. It is used for the Thunderbolt
46          co-processors.
47        items:
48          - enum:
49              - apple,t8103-m3-mailbox
50              - apple,t8112-m3-mailbox
51              - apple,t6000-m3-mailbox
52          - const: apple,m3-mailbox-v2
53
54  reg:
55    maxItems: 1
56
57  interrupts:
58    items:
59      - description: send fifo is empty interrupt
60      - description: send fifo is not empty interrupt
61      - description: receive fifo is empty interrupt
62      - description: receive fifo is not empty interrupt
63
64  interrupt-names:
65    items:
66      - const: send-empty
67      - const: send-not-empty
68      - const: recv-empty
69      - const: recv-not-empty
70
71  "#mbox-cells":
72    const: 0
73
74  power-domains:
75    maxItems: 1
76
77required:
78  - compatible
79  - reg
80  - interrupts
81  - interrupt-names
82  - "#mbox-cells"
83
84additionalProperties: false
85
86examples:
87  - |
88    mailbox@77408000 {
89        compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
90        reg = <0x77408000 0x4000>;
91        interrupts = <1 583 4>, <1 584 4>, <1 585 4>, <1 586 4>;
92        interrupt-names = "send-empty", "send-not-empty",
93                          "recv-empty", "recv-not-empty";
94        #mbox-cells = <0>;
95    };
96