1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mailbox/xlnx,zynqmp-ipi-mailbox.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Xilinx IPI(Inter Processor Interrupt) mailbox controller
8
9description: |
10  The Xilinx IPI(Inter Processor Interrupt) mailbox controller is to manage
11  messaging between two Xilinx Zynq UltraScale+ MPSoC IPI agents. Each IPI
12  agent owns registers used for notification and buffers for message.
13
14               +-------------------------------------+
15               | Xilinx ZynqMP IPI Controller        |
16               +-------------------------------------+
17    +--------------------------------------------------+
18  TF-A                   |                     |
19                         |                     |
20                         |                     |
21    +--------------------------+               |
22                         |                     |
23                         |                     |
24    +--------------------------------------------------+
25              +------------------------------------------+
26              |  +----------------+   +----------------+ |
27  Hardware    |  |  IPI Agent     |   |  IPI Buffers   | |
28              |  |  Registers     |   |                | |
29              |  |                |   |                | |
30              |  +----------------+   +----------------+ |
31              |                                          |
32              | Xilinx IPI Agent Block                   |
33              +------------------------------------------+
34
35maintainers:
36  - Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
37
38properties:
39  compatible:
40    const: xlnx,zynqmp-ipi-mailbox
41
42  method:
43    description: |
44      The method of calling the PM-API firmware layer.
45      Permitted values are.
46      - "smc" : SMC #0, following the SMCCC
47      - "hvc" : HVC #0, following the SMCCC
48
49    $ref: /schemas/types.yaml#/definitions/string
50    enum:
51      - smc
52      - hvc
53    default: smc
54
55  '#address-cells':
56    const: 2
57
58  '#size-cells':
59    const: 2
60
61  xlnx,ipi-id:
62    description: |
63      Remote Xilinx IPI agent ID of which the mailbox is connected to.
64    $ref: /schemas/types.yaml#/definitions/uint32
65
66  interrupts:
67    maxItems: 1
68
69  ranges: true
70
71patternProperties:
72  '^mailbox@[0-9a-f]+$':
73    description: Internal ipi mailbox node
74    type: object  # DT nodes are json objects
75    additionalProperties: false
76    properties:
77      xlnx,ipi-id:
78        description:
79          Remote Xilinx IPI agent ID of which the mailbox is connected to.
80        $ref: /schemas/types.yaml#/definitions/uint32
81
82      '#mbox-cells':
83        const: 1
84        description:
85          It contains tx(0) or rx(1) channel IPI id number.
86
87      reg:
88        maxItems: 4
89
90      reg-names:
91        items:
92          - const: local_request_region
93          - const: local_response_region
94          - const: remote_request_region
95          - const: remote_response_region
96
97    required:
98      - reg
99      - reg-names
100      - "#mbox-cells"
101
102additionalProperties: false
103
104required:
105  - compatible
106  - interrupts
107  - '#address-cells'
108  - '#size-cells'
109  - xlnx,ipi-id
110
111examples:
112  - |
113    #include<dt-bindings/interrupt-controller/arm-gic.h>
114
115    amba {
116      #address-cells = <0x2>;
117      #size-cells = <0x2>;
118      zynqmp-mailbox {
119        compatible = "xlnx,zynqmp-ipi-mailbox";
120        interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
121        xlnx,ipi-id = <0>;
122        #address-cells = <2>;
123        #size-cells = <2>;
124        ranges;
125
126        mailbox: mailbox@ff9905c0 {
127          reg = <0x0 0xff9905c0 0x0 0x20>,
128                <0x0 0xff9905e0 0x0 0x20>,
129                <0x0 0xff990e80 0x0 0x20>,
130                <0x0 0xff990ea0 0x0 0x20>;
131          reg-names = "local_request_region",
132                      "local_response_region",
133                      "remote_request_region",
134                      "remote_response_region";
135          #mbox-cells = <1>;
136          xlnx,ipi-id = <4>;
137        };
138      };
139    };
140
141...
142