1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2d5b0e70fSEmmanuel Vadot%YAML 1.2 3d5b0e70fSEmmanuel Vadot--- 4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/xlnx,zynqmp-ipi-mailbox.yaml# 5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6d5b0e70fSEmmanuel Vadot 7d5b0e70fSEmmanuel Vadottitle: Xilinx IPI(Inter Processor Interrupt) mailbox controller 8d5b0e70fSEmmanuel Vadot 9d5b0e70fSEmmanuel Vadotdescription: | 10d5b0e70fSEmmanuel Vadot The Xilinx IPI(Inter Processor Interrupt) mailbox controller is to manage 11d5b0e70fSEmmanuel Vadot messaging between two Xilinx Zynq UltraScale+ MPSoC IPI agents. Each IPI 12d5b0e70fSEmmanuel Vadot agent owns registers used for notification and buffers for message. 13d5b0e70fSEmmanuel Vadot 14d5b0e70fSEmmanuel Vadot +-------------------------------------+ 15d5b0e70fSEmmanuel Vadot | Xilinx ZynqMP IPI Controller | 16d5b0e70fSEmmanuel Vadot +-------------------------------------+ 17d5b0e70fSEmmanuel Vadot +--------------------------------------------------+ 18d5b0e70fSEmmanuel Vadot TF-A | | 19d5b0e70fSEmmanuel Vadot | | 20d5b0e70fSEmmanuel Vadot | | 21d5b0e70fSEmmanuel Vadot +--------------------------+ | 22d5b0e70fSEmmanuel Vadot | | 23d5b0e70fSEmmanuel Vadot | | 24d5b0e70fSEmmanuel Vadot +--------------------------------------------------+ 25d5b0e70fSEmmanuel Vadot +------------------------------------------+ 26d5b0e70fSEmmanuel Vadot | +----------------+ +----------------+ | 27d5b0e70fSEmmanuel Vadot Hardware | | IPI Agent | | IPI Buffers | | 28d5b0e70fSEmmanuel Vadot | | Registers | | | | 29d5b0e70fSEmmanuel Vadot | | | | | | 30d5b0e70fSEmmanuel Vadot | +----------------+ +----------------+ | 31d5b0e70fSEmmanuel Vadot | | 32d5b0e70fSEmmanuel Vadot | Xilinx IPI Agent Block | 33d5b0e70fSEmmanuel Vadot +------------------------------------------+ 34d5b0e70fSEmmanuel Vadot 35d5b0e70fSEmmanuel Vadotmaintainers: 36f126890aSEmmanuel Vadot - Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> 37d5b0e70fSEmmanuel Vadot 38d5b0e70fSEmmanuel Vadotproperties: 39d5b0e70fSEmmanuel Vadot compatible: 40*8d13bc63SEmmanuel Vadot enum: 41*8d13bc63SEmmanuel Vadot - xlnx,zynqmp-ipi-mailbox 42*8d13bc63SEmmanuel Vadot - xlnx,versal-ipi-mailbox 43d5b0e70fSEmmanuel Vadot 44d5b0e70fSEmmanuel Vadot method: 45d5b0e70fSEmmanuel Vadot description: | 46d5b0e70fSEmmanuel Vadot The method of calling the PM-API firmware layer. 47d5b0e70fSEmmanuel Vadot Permitted values are. 48d5b0e70fSEmmanuel Vadot - "smc" : SMC #0, following the SMCCC 49d5b0e70fSEmmanuel Vadot - "hvc" : HVC #0, following the SMCCC 50d5b0e70fSEmmanuel Vadot 51d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 52d5b0e70fSEmmanuel Vadot enum: 53d5b0e70fSEmmanuel Vadot - smc 54d5b0e70fSEmmanuel Vadot - hvc 55d5b0e70fSEmmanuel Vadot default: smc 56d5b0e70fSEmmanuel Vadot 57d5b0e70fSEmmanuel Vadot '#address-cells': 58d5b0e70fSEmmanuel Vadot const: 2 59d5b0e70fSEmmanuel Vadot 60d5b0e70fSEmmanuel Vadot '#size-cells': 61d5b0e70fSEmmanuel Vadot const: 2 62d5b0e70fSEmmanuel Vadot 63*8d13bc63SEmmanuel Vadot reg: 64*8d13bc63SEmmanuel Vadot maxItems: 2 65*8d13bc63SEmmanuel Vadot 66*8d13bc63SEmmanuel Vadot reg-names: 67*8d13bc63SEmmanuel Vadot maxItems: 2 68*8d13bc63SEmmanuel Vadot 69d5b0e70fSEmmanuel Vadot xlnx,ipi-id: 70d5b0e70fSEmmanuel Vadot description: | 71d5b0e70fSEmmanuel Vadot Remote Xilinx IPI agent ID of which the mailbox is connected to. 72d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 73d5b0e70fSEmmanuel Vadot 74d5b0e70fSEmmanuel Vadot interrupts: 75d5b0e70fSEmmanuel Vadot maxItems: 1 76d5b0e70fSEmmanuel Vadot 77d5b0e70fSEmmanuel Vadot ranges: true 78d5b0e70fSEmmanuel Vadot 79d5b0e70fSEmmanuel VadotpatternProperties: 80d5b0e70fSEmmanuel Vadot '^mailbox@[0-9a-f]+$': 81d5b0e70fSEmmanuel Vadot description: Internal ipi mailbox node 82d5b0e70fSEmmanuel Vadot type: object # DT nodes are json objects 83fac71e4eSEmmanuel Vadot additionalProperties: false 84d5b0e70fSEmmanuel Vadot properties: 8584943d6fSEmmanuel Vadot 8684943d6fSEmmanuel Vadot compatible: 87*8d13bc63SEmmanuel Vadot enum: 88*8d13bc63SEmmanuel Vadot - xlnx,zynqmp-ipi-dest-mailbox 89*8d13bc63SEmmanuel Vadot - xlnx,versal-ipi-dest-mailbox 90*8d13bc63SEmmanuel Vadot 91*8d13bc63SEmmanuel Vadot reg: 92*8d13bc63SEmmanuel Vadot minItems: 1 93*8d13bc63SEmmanuel Vadot maxItems: 4 94*8d13bc63SEmmanuel Vadot 95*8d13bc63SEmmanuel Vadot reg-names: 96*8d13bc63SEmmanuel Vadot minItems: 1 97*8d13bc63SEmmanuel Vadot maxItems: 4 9884943d6fSEmmanuel Vadot 99d5b0e70fSEmmanuel Vadot xlnx,ipi-id: 100d5b0e70fSEmmanuel Vadot description: 101d5b0e70fSEmmanuel Vadot Remote Xilinx IPI agent ID of which the mailbox is connected to. 102d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 103d5b0e70fSEmmanuel Vadot 104d5b0e70fSEmmanuel Vadot '#mbox-cells': 105d5b0e70fSEmmanuel Vadot const: 1 106d5b0e70fSEmmanuel Vadot description: 107d5b0e70fSEmmanuel Vadot It contains tx(0) or rx(1) channel IPI id number. 108d5b0e70fSEmmanuel Vadot 109*8d13bc63SEmmanuel Vadot allOf: 110*8d13bc63SEmmanuel Vadot - if: 111*8d13bc63SEmmanuel Vadot properties: 112*8d13bc63SEmmanuel Vadot compatible: 113*8d13bc63SEmmanuel Vadot contains: 114*8d13bc63SEmmanuel Vadot enum: 115*8d13bc63SEmmanuel Vadot - xlnx,zynqmp-ipi-dest-mailbox 116*8d13bc63SEmmanuel Vadot then: 117*8d13bc63SEmmanuel Vadot properties: 118d5b0e70fSEmmanuel Vadot reg: 119d5b0e70fSEmmanuel Vadot maxItems: 4 120d5b0e70fSEmmanuel Vadot 121d5b0e70fSEmmanuel Vadot reg-names: 122d5b0e70fSEmmanuel Vadot items: 123d5b0e70fSEmmanuel Vadot - const: local_request_region 124d5b0e70fSEmmanuel Vadot - const: local_response_region 125d5b0e70fSEmmanuel Vadot - const: remote_request_region 126d5b0e70fSEmmanuel Vadot - const: remote_response_region 127*8d13bc63SEmmanuel Vadot else: 128*8d13bc63SEmmanuel Vadot properties: 129*8d13bc63SEmmanuel Vadot reg: 130*8d13bc63SEmmanuel Vadot minItems: 1 131*8d13bc63SEmmanuel Vadot items: 132*8d13bc63SEmmanuel Vadot - description: Remote IPI agent control register region 133*8d13bc63SEmmanuel Vadot - description: Remote IPI agent optional message buffers 134*8d13bc63SEmmanuel Vadot 135*8d13bc63SEmmanuel Vadot reg-names: 136*8d13bc63SEmmanuel Vadot minItems: 1 137*8d13bc63SEmmanuel Vadot items: 138*8d13bc63SEmmanuel Vadot - const: ctrl 139*8d13bc63SEmmanuel Vadot - const: msg 140d5b0e70fSEmmanuel Vadot 141d5b0e70fSEmmanuel Vadot required: 14284943d6fSEmmanuel Vadot - compatible 143d5b0e70fSEmmanuel Vadot - reg 144d5b0e70fSEmmanuel Vadot - reg-names 145d5b0e70fSEmmanuel Vadot - "#mbox-cells" 146*8d13bc63SEmmanuel Vadot - xlnx,ipi-id 147d5b0e70fSEmmanuel Vadot 148d5b0e70fSEmmanuel Vadotrequired: 149d5b0e70fSEmmanuel Vadot - compatible 150d5b0e70fSEmmanuel Vadot - interrupts 151d5b0e70fSEmmanuel Vadot - '#address-cells' 152d5b0e70fSEmmanuel Vadot - '#size-cells' 153d5b0e70fSEmmanuel Vadot - xlnx,ipi-id 154d5b0e70fSEmmanuel Vadot 155*8d13bc63SEmmanuel VadotallOf: 156*8d13bc63SEmmanuel Vadot - if: 157*8d13bc63SEmmanuel Vadot properties: 158*8d13bc63SEmmanuel Vadot compatible: 159*8d13bc63SEmmanuel Vadot contains: 160*8d13bc63SEmmanuel Vadot enum: 161*8d13bc63SEmmanuel Vadot - xlnx,zynqmp-ipi-mailbox 162*8d13bc63SEmmanuel Vadot then: 163*8d13bc63SEmmanuel Vadot properties: 164*8d13bc63SEmmanuel Vadot reg: false 165*8d13bc63SEmmanuel Vadot reg-names: false 166*8d13bc63SEmmanuel Vadot 167*8d13bc63SEmmanuel Vadot else: 168*8d13bc63SEmmanuel Vadot properties: 169*8d13bc63SEmmanuel Vadot reg: 170*8d13bc63SEmmanuel Vadot items: 171*8d13bc63SEmmanuel Vadot - description: Host IPI agent control register region 172*8d13bc63SEmmanuel Vadot - description: Host IPI agent optional message buffers 173*8d13bc63SEmmanuel Vadot 174*8d13bc63SEmmanuel Vadot reg-names: 175*8d13bc63SEmmanuel Vadot items: 176*8d13bc63SEmmanuel Vadot - const: ctrl 177*8d13bc63SEmmanuel Vadot - const: msg 178*8d13bc63SEmmanuel Vadot 179*8d13bc63SEmmanuel Vadot required: 180*8d13bc63SEmmanuel Vadot - reg 181*8d13bc63SEmmanuel Vadot - reg-names 182*8d13bc63SEmmanuel Vadot 183*8d13bc63SEmmanuel VadotadditionalProperties: false 184*8d13bc63SEmmanuel Vadot 185d5b0e70fSEmmanuel Vadotexamples: 186d5b0e70fSEmmanuel Vadot - | 187d5b0e70fSEmmanuel Vadot #include<dt-bindings/interrupt-controller/arm-gic.h> 188d5b0e70fSEmmanuel Vadot 189d5b0e70fSEmmanuel Vadot amba { 190d5b0e70fSEmmanuel Vadot #address-cells = <0x2>; 191d5b0e70fSEmmanuel Vadot #size-cells = <0x2>; 192d5b0e70fSEmmanuel Vadot zynqmp-mailbox { 193d5b0e70fSEmmanuel Vadot compatible = "xlnx,zynqmp-ipi-mailbox"; 194d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; 195d5b0e70fSEmmanuel Vadot xlnx,ipi-id = <0>; 196d5b0e70fSEmmanuel Vadot #address-cells = <2>; 197d5b0e70fSEmmanuel Vadot #size-cells = <2>; 198d5b0e70fSEmmanuel Vadot ranges; 199d5b0e70fSEmmanuel Vadot 200d5b0e70fSEmmanuel Vadot mailbox: mailbox@ff9905c0 { 20184943d6fSEmmanuel Vadot compatible = "xlnx,zynqmp-ipi-dest-mailbox"; 202d5b0e70fSEmmanuel Vadot reg = <0x0 0xff9905c0 0x0 0x20>, 203d5b0e70fSEmmanuel Vadot <0x0 0xff9905e0 0x0 0x20>, 204d5b0e70fSEmmanuel Vadot <0x0 0xff990e80 0x0 0x20>, 205d5b0e70fSEmmanuel Vadot <0x0 0xff990ea0 0x0 0x20>; 206d5b0e70fSEmmanuel Vadot reg-names = "local_request_region", 207d5b0e70fSEmmanuel Vadot "local_response_region", 208d5b0e70fSEmmanuel Vadot "remote_request_region", 209d5b0e70fSEmmanuel Vadot "remote_response_region"; 210d5b0e70fSEmmanuel Vadot #mbox-cells = <1>; 211d5b0e70fSEmmanuel Vadot xlnx,ipi-id = <4>; 212d5b0e70fSEmmanuel Vadot }; 213d5b0e70fSEmmanuel Vadot }; 214d5b0e70fSEmmanuel Vadot }; 215d5b0e70fSEmmanuel Vadot 216*8d13bc63SEmmanuel Vadot - | 217*8d13bc63SEmmanuel Vadot #include<dt-bindings/interrupt-controller/arm-gic.h> 218*8d13bc63SEmmanuel Vadot 219*8d13bc63SEmmanuel Vadot bus { 220*8d13bc63SEmmanuel Vadot #address-cells = <2>; 221*8d13bc63SEmmanuel Vadot #size-cells = <2>; 222*8d13bc63SEmmanuel Vadot mailbox@ff300000 { 223*8d13bc63SEmmanuel Vadot compatible = "xlnx,versal-ipi-mailbox"; 224*8d13bc63SEmmanuel Vadot interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; 225*8d13bc63SEmmanuel Vadot #address-cells = <2>; 226*8d13bc63SEmmanuel Vadot #size-cells = <2>; 227*8d13bc63SEmmanuel Vadot reg = <0x0 0xff300000 0x0 0x1000>, 228*8d13bc63SEmmanuel Vadot <0x0 0xff990000 0x0 0x1ff>; 229*8d13bc63SEmmanuel Vadot reg-names = "ctrl", "msg"; 230*8d13bc63SEmmanuel Vadot xlnx,ipi-id = <0>; 231*8d13bc63SEmmanuel Vadot ranges; 232*8d13bc63SEmmanuel Vadot 233*8d13bc63SEmmanuel Vadot /* buffered IPI */ 234*8d13bc63SEmmanuel Vadot mailbox@ff340000 { 235*8d13bc63SEmmanuel Vadot compatible = "xlnx,versal-ipi-dest-mailbox"; 236*8d13bc63SEmmanuel Vadot reg = <0x0 0xff340000 0x0 0x1000>, 237*8d13bc63SEmmanuel Vadot <0x0 0xff990400 0x0 0x1ff>; 238*8d13bc63SEmmanuel Vadot reg-names = "ctrl", "msg"; 239*8d13bc63SEmmanuel Vadot #mbox-cells = <1>; 240*8d13bc63SEmmanuel Vadot xlnx,ipi-id = <4>; 241*8d13bc63SEmmanuel Vadot }; 242*8d13bc63SEmmanuel Vadot 243*8d13bc63SEmmanuel Vadot /* bufferless IPI */ 244*8d13bc63SEmmanuel Vadot mailbox@ff370000 { 245*8d13bc63SEmmanuel Vadot compatible = "xlnx,versal-ipi-dest-mailbox"; 246*8d13bc63SEmmanuel Vadot reg = <0x0 0xff370000 0x0 0x1000>; 247*8d13bc63SEmmanuel Vadot reg-names = "ctrl"; 248*8d13bc63SEmmanuel Vadot #mbox-cells = <1>; 249*8d13bc63SEmmanuel Vadot xlnx,ipi-id = <7>; 250*8d13bc63SEmmanuel Vadot }; 251*8d13bc63SEmmanuel Vadot }; 252*8d13bc63SEmmanuel Vadot }; 253d5b0e70fSEmmanuel Vadot... 254