xref: /linux/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml (revision 02680c23d7b3febe45ea3d4f9818c2b2dc89020a)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mailbox/arm,mhu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: ARM MHU Mailbox Controller
8
9maintainers:
10  - Jassi Brar <jaswinder.singh@linaro.org>
11
12description: |
13  The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has 3
14  independent channels/links to communicate with remote processor(s).  MHU links
15  are hardwired on a platform. A link raises interrupt for any received data.
16  However, there is no specified way of knowing if the sent data has been read
17  by the remote. This driver assumes the sender polls STAT register and the
18  remote clears it after having read the data.  The last channel is specified to
19  be a 'Secure' resource, hence can't be used by Linux running NS.
20
21  The MHU hardware also allows operations in doorbell mode. The MHU drives the
22  interrupt signal using a 32-bit register, with all 32-bits logically ORed
23  together. It provides a set of registers to enable software to set, clear and
24  check the status of each of the bits of this register independently. The use
25  of 32 bits per interrupt line enables software to provide more information
26  about the source of the interrupt. For example, each bit of the register can
27  be associated with a type of event that can contribute to raising the
28  interrupt. Each of the 32-bits can be used as "doorbell" to alert the remote
29  processor.
30
31# We need a select here so we don't match all nodes with 'arm,primecell'
32select:
33  properties:
34    compatible:
35      contains:
36        enum:
37          - arm,mhu
38          - arm,mhu-doorbell
39  required:
40    - compatible
41
42properties:
43  compatible:
44    oneOf:
45      - description: Data transfer mode
46        items:
47          - const: arm,mhu
48          - const: arm,primecell
49
50      - description: Doorbell mode
51        items:
52          - const: arm,mhu-doorbell
53          - const: arm,primecell
54
55
56  reg:
57    maxItems: 1
58
59  interrupts:
60    items:
61      - description: low-priority non-secure
62      - description: high-priority non-secure
63      - description: Secure
64
65  clocks:
66    maxItems: 1
67
68  clock-names:
69    items:
70      - const: apb_pclk
71
72  '#mbox-cells':
73    description: |
74      Set to 1 in data transfer mode and represents index of the channel.
75      Set to 2 in doorbell mode and represents index of the channel and doorbell
76      number.
77    enum: [ 1, 2 ]
78
79required:
80  - compatible
81  - reg
82  - interrupts
83  - '#mbox-cells'
84
85additionalProperties: false
86
87examples:
88  # Data transfer mode.
89  - |
90    soc {
91        #address-cells = <2>;
92        #size-cells = <2>;
93
94        mhuA: mailbox@2b1f0000 {
95            #mbox-cells = <1>;
96            compatible = "arm,mhu", "arm,primecell";
97            reg = <0 0x2b1f0000 0 0x1000>;
98            interrupts = <0 36 4>, /* LP-NonSecure */
99                         <0 35 4>, /* HP-NonSecure */
100                         <0 37 4>; /* Secure */
101            clocks = <&clock 0 2 1>;
102            clock-names = "apb_pclk";
103        };
104
105        mhu_client_scb: scb@2e000000 {
106            compatible = "fujitsu,mb86s70-scb-1.0";
107            reg = <0 0x2e000000 0 0x4000>;
108            mboxes = <&mhuA 1>; /* HP-NonSecure */
109        };
110    };
111
112  # Doorbell mode.
113  - |
114    soc {
115        #address-cells = <2>;
116        #size-cells = <2>;
117
118        mhuB: mailbox@2b2f0000 {
119            #mbox-cells = <2>;
120            compatible = "arm,mhu-doorbell", "arm,primecell";
121            reg = <0 0x2b2f0000 0 0x1000>;
122            interrupts = <0 36 4>, /* LP-NonSecure */
123                         <0 35 4>, /* HP-NonSecure */
124                         <0 37 4>; /* Secure */
125            clocks = <&clock 0 2 1>;
126            clock-names = "apb_pclk";
127        };
128
129        mhu_client_scpi: scpi@2f000000 {
130            compatible = "arm,scpi";
131            reg = <0 0x2f000000 0 0x200>;
132            mboxes = <&mhuB 1 4>; /* HP-NonSecure, 5th doorbell */
133        };
134    };
135