0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mailbox/arm,mhu.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: ARM MHU Mailbox Controller
0008
0009 maintainers:
0010 - Jassi Brar <jaswinder.singh@linaro.org>
0011
0012 description: |
0013 The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has 3
0014 independent channels/links to communicate with remote processor(s). MHU links
0015 are hardwired on a platform. A link raises interrupt for any received data.
0016 However, there is no specified way of knowing if the sent data has been read
0017 by the remote. This driver assumes the sender polls STAT register and the
0018 remote clears it after having read the data. The last channel is specified to
0019 be a 'Secure' resource, hence can't be used by Linux running NS.
0020
0021 The MHU hardware also allows operations in doorbell mode. The MHU drives the
0022 interrupt signal using a 32-bit register, with all 32-bits logically ORed
0023 together. It provides a set of registers to enable software to set, clear and
0024 check the status of each of the bits of this register independently. The use
0025 of 32 bits per interrupt line enables software to provide more information
0026 about the source of the interrupt. For example, each bit of the register can
0027 be associated with a type of event that can contribute to raising the
0028 interrupt. Each of the 32-bits can be used as "doorbell" to alert the remote
0029 processor.
0030
0031 # We need a select here so we don't match all nodes with 'arm,primecell'
0032 select:
0033 properties:
0034 compatible:
0035 contains:
0036 enum:
0037 - arm,mhu
0038 - arm,mhu-doorbell
0039 required:
0040 - compatible
0041
0042 properties:
0043 compatible:
0044 oneOf:
0045 - description: Data transfer mode
0046 items:
0047 - const: arm,mhu
0048 - const: arm,primecell
0049
0050 - description: Doorbell mode
0051 items:
0052 - const: arm,mhu-doorbell
0053 - const: arm,primecell
0054
0055
0056 reg:
0057 maxItems: 1
0058
0059 interrupts:
0060 minItems: 2
0061 items:
0062 - description: low-priority non-secure
0063 - description: high-priority non-secure
0064 - description: Secure
0065
0066 clocks:
0067 maxItems: 1
0068
0069 clock-names:
0070 items:
0071 - const: apb_pclk
0072
0073 '#mbox-cells':
0074 description: |
0075 Set to 1 in data transfer mode and represents index of the channel.
0076 Set to 2 in doorbell mode and represents index of the channel and doorbell
0077 number.
0078 enum: [ 1, 2 ]
0079
0080 required:
0081 - compatible
0082 - reg
0083 - interrupts
0084 - '#mbox-cells'
0085
0086 additionalProperties: false
0087
0088 examples:
0089 # Data transfer mode.
0090 - |
0091 soc {
0092 #address-cells = <2>;
0093 #size-cells = <2>;
0094
0095 mhuA: mailbox@2b1f0000 {
0096 #mbox-cells = <1>;
0097 compatible = "arm,mhu", "arm,primecell";
0098 reg = <0 0x2b1f0000 0 0x1000>;
0099 interrupts = <0 36 4>, /* LP-NonSecure */
0100 <0 35 4>, /* HP-NonSecure */
0101 <0 37 4>; /* Secure */
0102 clocks = <&clock 0 2 1>;
0103 clock-names = "apb_pclk";
0104 };
0105 };
0106
0107 firmware {
0108 scpi {
0109 compatible = "arm,scpi";
0110 mboxes = <&mhuA 1>; /* HP-NonSecure */
0111 shmem = <&cpu_scp_hpri>; /* HP-NonSecure */
0112
0113 scpi_devpd: power-controller {
0114 compatible = "arm,scpi-power-domains";
0115 num-domains = <2>;
0116 #power-domain-cells = <1>;
0117 };
0118 };
0119 };
0120
0121 # Doorbell mode.
0122 - |
0123 soc {
0124 #address-cells = <2>;
0125 #size-cells = <2>;
0126
0127 mhuB: mailbox@2b2f0000 {
0128 #mbox-cells = <2>;
0129 compatible = "arm,mhu-doorbell", "arm,primecell";
0130 reg = <0 0x2b2f0000 0 0x1000>;
0131 interrupts = <0 36 4>, /* LP-NonSecure */
0132 <0 35 4>, /* HP-NonSecure */
0133 <0 37 4>; /* Secure */
0134 clocks = <&clock 0 2 1>;
0135 clock-names = "apb_pclk";
0136 };
0137 };
0138
0139 firmware {
0140 scmi {
0141 compatible = "arm,scmi";
0142 mboxes = <&mhuB 0 0>, /* LP-NonSecure, 1st doorbell */
0143 <&mhuB 0 1>; /* LP-NonSecure, 2nd doorbell */
0144 mbox-names = "tx", "rx";
0145 shmem = <&cpu_scp_lpri0>,
0146 <&cpu_scp_lpri1>;
0147
0148 #address-cells = <1>;
0149 #size-cells = <0>;
0150
0151 scmi_devpd: protocol@11 {
0152 reg = <0x11>;
0153 #power-domain-cells = <1>;
0154 };
0155
0156 scmi_dvfs: protocol@13 {
0157 reg = <0x13>;
0158 #clock-cells = <1>;
0159
0160 mboxes = <&mhuB 1 2>, /* HP-NonSecure, 3rd doorbell */
0161 <&mhuB 1 3>; /* HP-NonSecure, 4th doorbell */
0162 mbox-names = "tx", "rx";
0163 shmem = <&cpu_scp_hpri0>,
0164 <&cpu_scp_hpri1>;
0165 };
0166 };
0167 };
0168
0169 ...