Sven Peter | 29848f3 | 2021-10-25 08:22:03 +0200 | [diff] [blame] | 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 | |
| 7 | title: Apple Mailbox Controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Hector Martin <marcan@marcan.st> |
| 11 | - Sven Peter <sven@svenpeter.dev> |
| 12 | |
| 13 | description: |
| 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 | |
| 22 | properties: |
| 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 | - const: apple,t8103-asc-mailbox |
| 31 | |
| 32 | - description: |
| 33 | M3 mailboxes are an older variant with a slightly different MMIO |
| 34 | interface still found on the M1. It is used for the Thunderbolt |
| 35 | co-processors. |
| 36 | items: |
| 37 | - const: apple,t8103-m3-mailbox |
| 38 | |
| 39 | reg: |
| 40 | maxItems: 1 |
| 41 | |
| 42 | interrupts: |
| 43 | items: |
| 44 | - description: send fifo is empty interrupt |
| 45 | - description: send fifo is not empty interrupt |
| 46 | - description: receive fifo is empty interrupt |
| 47 | - description: receive fifo is not empty interrupt |
| 48 | |
| 49 | interrupt-names: |
| 50 | items: |
| 51 | - const: send-empty |
| 52 | - const: send-not-empty |
| 53 | - const: recv-empty |
| 54 | - const: recv-not-empty |
| 55 | |
| 56 | "#mbox-cells": |
| 57 | const: 0 |
| 58 | |
Hector Martin | 301f651 | 2021-12-09 13:50:42 +0900 | [diff] [blame] | 59 | power-domains: |
| 60 | maxItems: 1 |
| 61 | |
Sven Peter | 29848f3 | 2021-10-25 08:22:03 +0200 | [diff] [blame] | 62 | required: |
| 63 | - compatible |
| 64 | - reg |
| 65 | - interrupts |
| 66 | - interrupt-names |
| 67 | - "#mbox-cells" |
| 68 | |
| 69 | additionalProperties: false |
| 70 | |
| 71 | examples: |
| 72 | - | |
| 73 | mailbox@77408000 { |
| 74 | compatible = "apple,t8103-asc-mailbox"; |
| 75 | reg = <0x77408000 0x4000>; |
| 76 | interrupts = <1 583 4>, <1 584 4>, <1 585 4>, <1 586 4>; |
| 77 | interrupt-names = "send-empty", "send-not-empty", |
| 78 | "recv-empty", "recv-not-empty"; |
| 79 | #mbox-cells = <0>; |
| 80 | }; |