xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/fsl,mu.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/fsl,mu.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: NXP i.MX Messaging Unit (MU)
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Dong Aisheng <aisheng.dong@nxp.com>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription: |
13c66ec88fSEmmanuel Vadot  The Messaging Unit module enables two processors within the SoC to
14c66ec88fSEmmanuel Vadot  communicate and coordinate by passing messages (e.g. data, status
15c66ec88fSEmmanuel Vadot  and control) through the MU interface. The MU also provides the ability
16c66ec88fSEmmanuel Vadot  for one processor to signal the other processor using interrupts.
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel Vadot  Because the MU manages the messaging between processors, the MU uses
19c66ec88fSEmmanuel Vadot  different clocks (from each side of the different peripheral buses).
20c66ec88fSEmmanuel Vadot  Therefore, the MU must synchronize the accesses from one side to the
21c66ec88fSEmmanuel Vadot  other. The MU accomplishes synchronization using two sets of matching
22c66ec88fSEmmanuel Vadot  registers (Processor A-facing, Processor B-facing).
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadotproperties:
25c66ec88fSEmmanuel Vadot  compatible:
26c66ec88fSEmmanuel Vadot    oneOf:
27c66ec88fSEmmanuel Vadot      - const: fsl,imx6sx-mu
28c66ec88fSEmmanuel Vadot      - const: fsl,imx7ulp-mu
295956d97fSEmmanuel Vadot      - const: fsl,imx8ulp-mu
30c66ec88fSEmmanuel Vadot      - const: fsl,imx8-mu-scu
31c9ccf3a3SEmmanuel Vadot      - const: fsl,imx8-mu-seco
32c9ccf3a3SEmmanuel Vadot      - const: fsl,imx93-mu-s4
338cc087a1SEmmanuel Vadot      - const: fsl,imx8ulp-mu-s4
34c66ec88fSEmmanuel Vadot      - items:
35c9ccf3a3SEmmanuel Vadot          - const: fsl,imx93-mu
36c9ccf3a3SEmmanuel Vadot          - const: fsl,imx8ulp-mu
37c9ccf3a3SEmmanuel Vadot      - items:
38c66ec88fSEmmanuel Vadot          - enum:
39c66ec88fSEmmanuel Vadot              - fsl,imx7s-mu
40c66ec88fSEmmanuel Vadot              - fsl,imx8mq-mu
41c66ec88fSEmmanuel Vadot              - fsl,imx8mm-mu
42c66ec88fSEmmanuel Vadot              - fsl,imx8mn-mu
43c66ec88fSEmmanuel Vadot              - fsl,imx8mp-mu
442eb4d8dcSEmmanuel Vadot              - fsl,imx8qm-mu
45c66ec88fSEmmanuel Vadot              - fsl,imx8qxp-mu
46c66ec88fSEmmanuel Vadot          - const: fsl,imx6sx-mu
47c66ec88fSEmmanuel Vadot      - description: To communicate with i.MX8 SCU with fast IPC
48c66ec88fSEmmanuel Vadot        items:
49c66ec88fSEmmanuel Vadot          - const: fsl,imx8-mu-scu
502eb4d8dcSEmmanuel Vadot          - enum:
512eb4d8dcSEmmanuel Vadot              - fsl,imx8qm-mu
522eb4d8dcSEmmanuel Vadot              - fsl,imx8qxp-mu
536be33864SEmmanuel Vadot          - const: fsl,imx6sx-mu
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot  reg:
56c66ec88fSEmmanuel Vadot    maxItems: 1
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  interrupts:
59c9ccf3a3SEmmanuel Vadot    minItems: 1
60c9ccf3a3SEmmanuel Vadot    maxItems: 2
61c9ccf3a3SEmmanuel Vadot
62c9ccf3a3SEmmanuel Vadot  interrupt-names:
63c9ccf3a3SEmmanuel Vadot    minItems: 1
64c9ccf3a3SEmmanuel Vadot    items:
65c9ccf3a3SEmmanuel Vadot      - const: tx
66c9ccf3a3SEmmanuel Vadot      - const: rx
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel Vadot  "#mbox-cells":
69c66ec88fSEmmanuel Vadot    description: |
70c66ec88fSEmmanuel Vadot      <&phandle type channel>
71c66ec88fSEmmanuel Vadot      phandle   : Label name of controller
72c66ec88fSEmmanuel Vadot      type      : Channel type
73c66ec88fSEmmanuel Vadot      channel   : Channel number
74c66ec88fSEmmanuel Vadot
75*b97ee269SEmmanuel Vadot      This MU support 5 type of unidirectional channels, each type
76*b97ee269SEmmanuel Vadot      has 4 channels except RST channel which only has 1 channel.
77*b97ee269SEmmanuel Vadot      A total of 17 channels.  Following types are
78c66ec88fSEmmanuel Vadot      supported:
79c66ec88fSEmmanuel Vadot      0 - TX channel with 32bit transmit register and IRQ transmit
80c66ec88fSEmmanuel Vadot          acknowledgment support.
81c66ec88fSEmmanuel Vadot      1 - RX channel with 32bit receive register and IRQ support
82c66ec88fSEmmanuel Vadot      2 - TX doorbell channel. Without own register and no ACK support.
83c66ec88fSEmmanuel Vadot      3 - RX doorbell channel.
84*b97ee269SEmmanuel Vadot      4 - RST channel
85c66ec88fSEmmanuel Vadot    const: 2
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot  clocks:
88c66ec88fSEmmanuel Vadot    maxItems: 1
89c66ec88fSEmmanuel Vadot
90c66ec88fSEmmanuel Vadot  fsl,mu-side-b:
91c66ec88fSEmmanuel Vadot    description: boolean, if present, means it is for side B MU.
92c66ec88fSEmmanuel Vadot    type: boolean
93c66ec88fSEmmanuel Vadot
946be33864SEmmanuel Vadot  power-domains:
956be33864SEmmanuel Vadot    maxItems: 1
966be33864SEmmanuel Vadot
97c66ec88fSEmmanuel Vadotrequired:
98c66ec88fSEmmanuel Vadot  - compatible
99c66ec88fSEmmanuel Vadot  - reg
100c66ec88fSEmmanuel Vadot  - interrupts
101c66ec88fSEmmanuel Vadot  - "#mbox-cells"
102c66ec88fSEmmanuel Vadot
103c9ccf3a3SEmmanuel VadotallOf:
104c9ccf3a3SEmmanuel Vadot  - if:
105c9ccf3a3SEmmanuel Vadot      properties:
106c9ccf3a3SEmmanuel Vadot        compatible:
107c9ccf3a3SEmmanuel Vadot          enum:
108c9ccf3a3SEmmanuel Vadot            - fsl,imx93-mu-s4
109c9ccf3a3SEmmanuel Vadot    then:
110c9ccf3a3SEmmanuel Vadot      properties:
111c9ccf3a3SEmmanuel Vadot        interrupt-names:
112c9ccf3a3SEmmanuel Vadot          minItems: 2
113c9ccf3a3SEmmanuel Vadot        interrupts:
114c9ccf3a3SEmmanuel Vadot          minItems: 2
115c9ccf3a3SEmmanuel Vadot
116c9ccf3a3SEmmanuel Vadot    else:
117c9ccf3a3SEmmanuel Vadot      properties:
118c9ccf3a3SEmmanuel Vadot        interrupts:
119c9ccf3a3SEmmanuel Vadot          maxItems: 1
120c9ccf3a3SEmmanuel Vadot      not:
121c9ccf3a3SEmmanuel Vadot        required:
122c9ccf3a3SEmmanuel Vadot          - interrupt-names
123c9ccf3a3SEmmanuel Vadot
124c66ec88fSEmmanuel VadotadditionalProperties: false
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadotexamples:
127c66ec88fSEmmanuel Vadot  - |
128c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
129c66ec88fSEmmanuel Vadot
130c66ec88fSEmmanuel Vadot    mailbox@5d1b0000 {
131c66ec88fSEmmanuel Vadot        compatible = "fsl,imx8qxp-mu", "fsl,imx6sx-mu";
132c66ec88fSEmmanuel Vadot        reg = <0x5d1b0000 0x10000>;
133c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
134c66ec88fSEmmanuel Vadot        #mbox-cells = <2>;
135c66ec88fSEmmanuel Vadot    };
136