Skip to content

Commit 471de2c

Browse files
sudeep-hollaJassiBrar
authored andcommitted
dt-bindings: mailbox: add doorbell support to ARM MHU
The ARM MHU's reference manual states following: "The MHU drives the signal using a 32-bit register, with all 32 bits logically ORed together. The MHU provides a set of registers to enable software to set, clear, and check the status of each of the bits of this register independently. The use of 32 bits for each interrupt line enables software to provide more information about the source of the interrupt. For example, each bit of the register can be associated with a type of event that can contribute to raising the interrupt." This patch thus extends the MHU controller's DT binding to add support for doorbell mode. Though the same MHU hardware controller is used in the two modes, A new compatible string is added here to represent the combination of the MHU hardware and the firmware sitting on the other side (which expects each bit to represent a different signal now). Reviewed-by: Rob Herring <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Co-developed-by: Viresh Kumar <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 9070f35 commit 471de2c

File tree

1 file changed

+54
-6
lines changed

1 file changed

+54
-6
lines changed

Documentation/devicetree/bindings/mailbox/arm,mhu.yaml

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,40 @@ description: |
1818
remote clears it after having read the data. The last channel is specified to
1919
be a 'Secure' resource, hence can't be used by Linux running NS.
2020
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+
2131
# We need a select here so we don't match all nodes with 'arm,primecell'
2232
select:
2333
properties:
2434
compatible:
2535
contains:
26-
const: arm,mhu
36+
enum:
37+
- arm,mhu
38+
- arm,mhu-doorbell
2739
required:
2840
- compatible
2941

3042
properties:
3143
compatible:
32-
items:
33-
- const: arm,mhu
34-
- const: arm,primecell
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+
3555

3656
reg:
3757
maxItems: 1
@@ -51,8 +71,11 @@ properties:
5171
- const: apb_pclk
5272

5373
'#mbox-cells':
54-
description: Index of the channel.
55-
const: 1
74+
description: |
75+
Set to 1 in data transfer mode and represents index of the channel.
76+
Set to 2 in doorbell mode and represents index of the channel and doorbell
77+
number.
78+
enum: [ 1, 2 ]
5679

5780
required:
5881
- compatible
@@ -63,6 +86,7 @@ required:
6386
additionalProperties: false
6487

6588
examples:
89+
# Data transfer mode.
6690
- |
6791
soc {
6892
#address-cells = <2>;
@@ -85,3 +109,27 @@ examples:
85109
mboxes = <&mhuA 1>; /* HP-NonSecure */
86110
};
87111
};
112+
113+
# Doorbell mode.
114+
- |
115+
soc {
116+
#address-cells = <2>;
117+
#size-cells = <2>;
118+
119+
mhuB: mailbox@2b2f0000 {
120+
#mbox-cells = <2>;
121+
compatible = "arm,mhu-doorbell", "arm,primecell";
122+
reg = <0 0x2b2f0000 0 0x1000>;
123+
interrupts = <0 36 4>, /* LP-NonSecure */
124+
<0 35 4>, /* HP-NonSecure */
125+
<0 37 4>; /* Secure */
126+
clocks = <&clock 0 2 1>;
127+
clock-names = "apb_pclk";
128+
};
129+
130+
mhu_client_scpi: scpi@2f000000 {
131+
compatible = "arm,scpi";
132+
reg = <0 0x2f000000 0 0x200>;
133+
mboxes = <&mhuB 1 4>; /* HP-NonSecure, 5th doorbell */
134+
};
135+
};

0 commit comments

Comments
 (0)