Skip to content

Commit 92ac94f

Browse files
cris-masudeep-holla
authored andcommitted
dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels
SCMI defines two kinds of communication channels between the agent and the platform: one bidirectional 'a2p' channel used by the agent to send SCMI commands and synchronously receive the related replies, and an optional 'p2a' unidirectional channel used to asynchronously receive delayed responses and notifications emitted from the platform. When configuring an SCMI transport based on mailboxes, the current binding supports only mailboxes providing bidirectional channels: in such a case one mailbox channel can be easily assigned to each SCMI channel as above described. In case, instead, to have to deal with mailboxes providing only distinct unidirectional channels, it becomes necessary to extend the binding in order to be able to bind 2 distinct unidirectional mailbox channels to the same SCMI 'a2p' channel. Bidirectional and unidirectional channels support for the SCMI mailbox transport can coexist by carefully considering the effective combination of defined 'mboxes' and 'shmem' descriptors. Signed-off-by: Cristian Marussi <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent b2ccba9 commit 92ac94f

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

Documentation/devicetree/bindings/firmware/arm,scmi.yaml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,38 @@ properties:
5656
description:
5757
Specifies the mailboxes used to communicate with SCMI compliant
5858
firmware.
59-
items:
60-
- const: tx
61-
- const: rx
59+
oneOf:
60+
- items:
61+
- const: tx
62+
- const: rx
63+
minItems: 1
64+
- items:
65+
- const: tx
66+
- const: tx_reply
67+
- const: rx
68+
minItems: 2
6269

6370
mboxes:
6471
description:
6572
List of phandle and mailbox channel specifiers. It should contain
66-
exactly one or two mailboxes, one for transmitting messages("tx")
67-
and another optional for receiving the notifications("rx") if supported.
73+
exactly one, two or three mailboxes; the first one or two for transmitting
74+
messages ("tx") and another optional ("rx") for receiving notifications
75+
and delayed responses, if supported by the platform.
76+
The number of mailboxes needed for transmitting messages depends on the
77+
type of channels exposed by the specific underlying mailbox controller;
78+
one single channel descriptor is enough if such channel is bidirectional,
79+
while two channel descriptors are needed to represent the SCMI ("tx")
80+
channel if the underlying mailbox channels are of unidirectional type.
81+
The effective combination in numbers of mboxes and shmem descriptors let
82+
the SCMI subsystem determine unambiguosly which type of SCMI channels are
83+
made available by the underlying mailbox controller and how to use them.
84+
1 mbox / 1 shmem => SCMI TX over 1 mailbox bidirectional channel
85+
2 mbox / 2 shmem => SCMI TX and RX over 2 mailbox bidirectional channels
86+
2 mbox / 1 shmem => SCMI TX over 2 mailbox unidirectional channels
87+
3 mbox / 2 shmem => SCMI TX and RX over 3 mailbox unidirectional channels
88+
Any other combination of mboxes and shmem is invalid.
6889
minItems: 1
69-
maxItems: 2
90+
maxItems: 3
7091

7192
shmem:
7293
description:
@@ -228,13 +249,20 @@ $defs:
228249
maxItems: 1
229250

230251
mbox-names:
231-
items:
232-
- const: tx
233-
- const: rx
252+
oneOf:
253+
- items:
254+
- const: tx
255+
- const: rx
256+
minItems: 1
257+
- items:
258+
- const: tx
259+
- const: tx_reply
260+
- const: rx
261+
minItems: 2
234262

235263
mboxes:
236264
minItems: 1
237-
maxItems: 2
265+
maxItems: 3
238266

239267
shmem:
240268
minItems: 1

0 commit comments

Comments
 (0)