16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 26be33864SEmmanuel Vadot%YAML 1.2 36be33864SEmmanuel Vadot--- 46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/arm,mhu.yaml# 56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 66be33864SEmmanuel Vadot 76be33864SEmmanuel Vadottitle: ARM MHU Mailbox Controller 86be33864SEmmanuel Vadot 96be33864SEmmanuel Vadotmaintainers: 106be33864SEmmanuel Vadot - Jassi Brar <jaswinder.singh@linaro.org> 116be33864SEmmanuel Vadot 126be33864SEmmanuel Vadotdescription: | 136be33864SEmmanuel Vadot The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has 3 146be33864SEmmanuel Vadot independent channels/links to communicate with remote processor(s). MHU links 156be33864SEmmanuel Vadot are hardwired on a platform. A link raises interrupt for any received data. 166be33864SEmmanuel Vadot However, there is no specified way of knowing if the sent data has been read 176be33864SEmmanuel Vadot by the remote. This driver assumes the sender polls STAT register and the 186be33864SEmmanuel Vadot remote clears it after having read the data. The last channel is specified to 196be33864SEmmanuel Vadot be a 'Secure' resource, hence can't be used by Linux running NS. 206be33864SEmmanuel Vadot 216be33864SEmmanuel Vadot The MHU hardware also allows operations in doorbell mode. The MHU drives the 226be33864SEmmanuel Vadot interrupt signal using a 32-bit register, with all 32-bits logically ORed 236be33864SEmmanuel Vadot together. It provides a set of registers to enable software to set, clear and 246be33864SEmmanuel Vadot check the status of each of the bits of this register independently. The use 256be33864SEmmanuel Vadot of 32 bits per interrupt line enables software to provide more information 266be33864SEmmanuel Vadot about the source of the interrupt. For example, each bit of the register can 276be33864SEmmanuel Vadot be associated with a type of event that can contribute to raising the 286be33864SEmmanuel Vadot interrupt. Each of the 32-bits can be used as "doorbell" to alert the remote 296be33864SEmmanuel Vadot processor. 306be33864SEmmanuel Vadot 316be33864SEmmanuel Vadot# We need a select here so we don't match all nodes with 'arm,primecell' 326be33864SEmmanuel Vadotselect: 336be33864SEmmanuel Vadot properties: 346be33864SEmmanuel Vadot compatible: 356be33864SEmmanuel Vadot contains: 366be33864SEmmanuel Vadot enum: 376be33864SEmmanuel Vadot - arm,mhu 386be33864SEmmanuel Vadot - arm,mhu-doorbell 396be33864SEmmanuel Vadot required: 406be33864SEmmanuel Vadot - compatible 416be33864SEmmanuel Vadot 426be33864SEmmanuel Vadotproperties: 436be33864SEmmanuel Vadot compatible: 446be33864SEmmanuel Vadot oneOf: 456be33864SEmmanuel Vadot - description: Data transfer mode 466be33864SEmmanuel Vadot items: 476be33864SEmmanuel Vadot - const: arm,mhu 486be33864SEmmanuel Vadot - const: arm,primecell 496be33864SEmmanuel Vadot 506be33864SEmmanuel Vadot - description: Doorbell mode 516be33864SEmmanuel Vadot items: 526be33864SEmmanuel Vadot - const: arm,mhu-doorbell 536be33864SEmmanuel Vadot - const: arm,primecell 546be33864SEmmanuel Vadot 556be33864SEmmanuel Vadot 566be33864SEmmanuel Vadot reg: 576be33864SEmmanuel Vadot maxItems: 1 586be33864SEmmanuel Vadot 596be33864SEmmanuel Vadot interrupts: 60*b97ee269SEmmanuel Vadot minItems: 2 616be33864SEmmanuel Vadot items: 626be33864SEmmanuel Vadot - description: low-priority non-secure 636be33864SEmmanuel Vadot - description: high-priority non-secure 646be33864SEmmanuel Vadot - description: Secure 656be33864SEmmanuel Vadot 666be33864SEmmanuel Vadot clocks: 676be33864SEmmanuel Vadot maxItems: 1 686be33864SEmmanuel Vadot 696be33864SEmmanuel Vadot clock-names: 706be33864SEmmanuel Vadot items: 716be33864SEmmanuel Vadot - const: apb_pclk 726be33864SEmmanuel Vadot 736be33864SEmmanuel Vadot '#mbox-cells': 746be33864SEmmanuel Vadot description: | 756be33864SEmmanuel Vadot Set to 1 in data transfer mode and represents index of the channel. 766be33864SEmmanuel Vadot Set to 2 in doorbell mode and represents index of the channel and doorbell 776be33864SEmmanuel Vadot number. 786be33864SEmmanuel Vadot enum: [ 1, 2 ] 796be33864SEmmanuel Vadot 806be33864SEmmanuel Vadotrequired: 816be33864SEmmanuel Vadot - compatible 826be33864SEmmanuel Vadot - reg 836be33864SEmmanuel Vadot - interrupts 846be33864SEmmanuel Vadot - '#mbox-cells' 856be33864SEmmanuel Vadot 866be33864SEmmanuel VadotadditionalProperties: false 876be33864SEmmanuel Vadot 886be33864SEmmanuel Vadotexamples: 896be33864SEmmanuel Vadot # Data transfer mode. 906be33864SEmmanuel Vadot - | 916be33864SEmmanuel Vadot soc { 926be33864SEmmanuel Vadot #address-cells = <2>; 936be33864SEmmanuel Vadot #size-cells = <2>; 946be33864SEmmanuel Vadot 956be33864SEmmanuel Vadot mhuA: mailbox@2b1f0000 { 966be33864SEmmanuel Vadot #mbox-cells = <1>; 976be33864SEmmanuel Vadot compatible = "arm,mhu", "arm,primecell"; 986be33864SEmmanuel Vadot reg = <0 0x2b1f0000 0 0x1000>; 996be33864SEmmanuel Vadot interrupts = <0 36 4>, /* LP-NonSecure */ 1006be33864SEmmanuel Vadot <0 35 4>, /* HP-NonSecure */ 1016be33864SEmmanuel Vadot <0 37 4>; /* Secure */ 1026be33864SEmmanuel Vadot clocks = <&clock 0 2 1>; 1036be33864SEmmanuel Vadot clock-names = "apb_pclk"; 1046be33864SEmmanuel Vadot }; 1055956d97fSEmmanuel Vadot }; 1066be33864SEmmanuel Vadot 1075956d97fSEmmanuel Vadot firmware { 1085956d97fSEmmanuel Vadot scpi { 1095956d97fSEmmanuel Vadot compatible = "arm,scpi"; 1106be33864SEmmanuel Vadot mboxes = <&mhuA 1>; /* HP-NonSecure */ 1115956d97fSEmmanuel Vadot shmem = <&cpu_scp_hpri>; /* HP-NonSecure */ 1125956d97fSEmmanuel Vadot 1135956d97fSEmmanuel Vadot scpi_devpd: power-controller { 1145956d97fSEmmanuel Vadot compatible = "arm,scpi-power-domains"; 1155956d97fSEmmanuel Vadot num-domains = <2>; 1165956d97fSEmmanuel Vadot #power-domain-cells = <1>; 1175956d97fSEmmanuel Vadot }; 1186be33864SEmmanuel Vadot }; 1196be33864SEmmanuel Vadot }; 1206be33864SEmmanuel Vadot 1216be33864SEmmanuel Vadot # Doorbell mode. 1226be33864SEmmanuel Vadot - | 1236be33864SEmmanuel Vadot soc { 1246be33864SEmmanuel Vadot #address-cells = <2>; 1256be33864SEmmanuel Vadot #size-cells = <2>; 1266be33864SEmmanuel Vadot 1276be33864SEmmanuel Vadot mhuB: mailbox@2b2f0000 { 1286be33864SEmmanuel Vadot #mbox-cells = <2>; 1296be33864SEmmanuel Vadot compatible = "arm,mhu-doorbell", "arm,primecell"; 1306be33864SEmmanuel Vadot reg = <0 0x2b2f0000 0 0x1000>; 1316be33864SEmmanuel Vadot interrupts = <0 36 4>, /* LP-NonSecure */ 1326be33864SEmmanuel Vadot <0 35 4>, /* HP-NonSecure */ 1336be33864SEmmanuel Vadot <0 37 4>; /* Secure */ 1346be33864SEmmanuel Vadot clocks = <&clock 0 2 1>; 1356be33864SEmmanuel Vadot clock-names = "apb_pclk"; 1366be33864SEmmanuel Vadot }; 1375956d97fSEmmanuel Vadot }; 1386be33864SEmmanuel Vadot 1395956d97fSEmmanuel Vadot firmware { 1405956d97fSEmmanuel Vadot scmi { 1415956d97fSEmmanuel Vadot compatible = "arm,scmi"; 1425956d97fSEmmanuel Vadot mboxes = <&mhuB 0 0>, /* LP-NonSecure, 1st doorbell */ 1435956d97fSEmmanuel Vadot <&mhuB 0 1>; /* LP-NonSecure, 2nd doorbell */ 1445956d97fSEmmanuel Vadot mbox-names = "tx", "rx"; 1455956d97fSEmmanuel Vadot shmem = <&cpu_scp_lpri0>, 1465956d97fSEmmanuel Vadot <&cpu_scp_lpri1>; 1475956d97fSEmmanuel Vadot 1485956d97fSEmmanuel Vadot #address-cells = <1>; 1495956d97fSEmmanuel Vadot #size-cells = <0>; 1505956d97fSEmmanuel Vadot 1515956d97fSEmmanuel Vadot scmi_devpd: protocol@11 { 1525956d97fSEmmanuel Vadot reg = <0x11>; 1535956d97fSEmmanuel Vadot #power-domain-cells = <1>; 1545956d97fSEmmanuel Vadot }; 1555956d97fSEmmanuel Vadot 1565956d97fSEmmanuel Vadot scmi_dvfs: protocol@13 { 1575956d97fSEmmanuel Vadot reg = <0x13>; 1585956d97fSEmmanuel Vadot #clock-cells = <1>; 1595956d97fSEmmanuel Vadot 1605956d97fSEmmanuel Vadot mboxes = <&mhuB 1 2>, /* HP-NonSecure, 3rd doorbell */ 1615956d97fSEmmanuel Vadot <&mhuB 1 3>; /* HP-NonSecure, 4th doorbell */ 1625956d97fSEmmanuel Vadot mbox-names = "tx", "rx"; 1635956d97fSEmmanuel Vadot shmem = <&cpu_scp_hpri0>, 1645956d97fSEmmanuel Vadot <&cpu_scp_hpri1>; 1656be33864SEmmanuel Vadot }; 1666be33864SEmmanuel Vadot }; 1675956d97fSEmmanuel Vadot }; 1685956d97fSEmmanuel Vadot 1695956d97fSEmmanuel Vadot... 170