xref: /linux/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
129848f30SSven Peter# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
229848f30SSven Peter%YAML 1.2
329848f30SSven Peter---
429848f30SSven Peter$id: http://devicetree.org/schemas/mailbox/apple,mailbox.yaml#
529848f30SSven Peter$schema: http://devicetree.org/meta-schemas/core.yaml#
629848f30SSven Peter
729848f30SSven Petertitle: Apple Mailbox Controller
829848f30SSven Peter
929848f30SSven Petermaintainers:
1029848f30SSven Peter  - Hector Martin <marcan@marcan.st>
1129848f30SSven Peter  - Sven Peter <sven@svenpeter.dev>
1229848f30SSven Peter
1329848f30SSven Peterdescription:
1429848f30SSven Peter  The Apple mailbox consists of two FIFOs used to exchange 64+32 bit
1529848f30SSven Peter  messages between the main CPU and a co-processor. Multiple instances
1629848f30SSven Peter  of this mailbox can be found on Apple SoCs.
1729848f30SSven Peter  One of the two FIFOs is used to send data to a co-processor while the other
1829848f30SSven Peter  FIFO is used for the other direction.
1929848f30SSven Peter  Various clients implement different IPC protocols based on these simple
2029848f30SSven Peter  messages and shared memory buffers.
2129848f30SSven Peter
2229848f30SSven Peterproperties:
2329848f30SSven Peter  compatible:
2429848f30SSven Peter    oneOf:
2529848f30SSven Peter      - description:
2629848f30SSven Peter          ASC mailboxes are the most common variant found on the M1 used
2729848f30SSven Peter          for example for the display controller, the system management
2829848f30SSven Peter          controller and the NVMe coprocessor.
2929848f30SSven Peter        items:
30b29d644bSHector Martin          - enum:
31b29d644bSHector Martin              - apple,t8103-asc-mailbox
32*695ea8ccSJanne Grunau              - apple,t8112-asc-mailbox
33b29d644bSHector Martin              - apple,t6000-asc-mailbox
34b29d644bSHector Martin          - const: apple,asc-mailbox-v4
3529848f30SSven Peter
3629848f30SSven Peter      - description:
3729848f30SSven Peter          M3 mailboxes are an older variant with a slightly different MMIO
3829848f30SSven Peter          interface still found on the M1. It is used for the Thunderbolt
3929848f30SSven Peter          co-processors.
4029848f30SSven Peter        items:
41b29d644bSHector Martin          - enum:
42b29d644bSHector Martin              - apple,t8103-m3-mailbox
43*695ea8ccSJanne Grunau              - apple,t8112-m3-mailbox
44b29d644bSHector Martin              - apple,t6000-m3-mailbox
45b29d644bSHector Martin          - const: apple,m3-mailbox-v2
4629848f30SSven Peter
4729848f30SSven Peter  reg:
4829848f30SSven Peter    maxItems: 1
4929848f30SSven Peter
5029848f30SSven Peter  interrupts:
5129848f30SSven Peter    items:
5229848f30SSven Peter      - description: send fifo is empty interrupt
5329848f30SSven Peter      - description: send fifo is not empty interrupt
5429848f30SSven Peter      - description: receive fifo is empty interrupt
5529848f30SSven Peter      - description: receive fifo is not empty interrupt
5629848f30SSven Peter
5729848f30SSven Peter  interrupt-names:
5829848f30SSven Peter    items:
5929848f30SSven Peter      - const: send-empty
6029848f30SSven Peter      - const: send-not-empty
6129848f30SSven Peter      - const: recv-empty
6229848f30SSven Peter      - const: recv-not-empty
6329848f30SSven Peter
6429848f30SSven Peter  "#mbox-cells":
6529848f30SSven Peter    const: 0
6629848f30SSven Peter
67301f6516SHector Martin  power-domains:
68301f6516SHector Martin    maxItems: 1
69301f6516SHector Martin
7029848f30SSven Peterrequired:
7129848f30SSven Peter  - compatible
7229848f30SSven Peter  - reg
7329848f30SSven Peter  - interrupts
7429848f30SSven Peter  - interrupt-names
7529848f30SSven Peter  - "#mbox-cells"
7629848f30SSven Peter
7729848f30SSven PeteradditionalProperties: false
7829848f30SSven Peter
7929848f30SSven Peterexamples:
8029848f30SSven Peter  - |
8129848f30SSven Peter        mailbox@77408000 {
82b29d644bSHector Martin                compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
8329848f30SSven Peter                reg = <0x77408000 0x4000>;
8429848f30SSven Peter                interrupts = <1 583 4>, <1 584 4>, <1 585 4>, <1 586 4>;
8529848f30SSven Peter                interrupt-names = "send-empty", "send-not-empty",
8629848f30SSven Peter                 "recv-empty", "recv-not-empty";
8729848f30SSven Peter                #mbox-cells = <0>;
8829848f30SSven Peter        };
89