xref: /linux/Documentation/devicetree/bindings/mailbox/microchip,sbi-ipc.yaml (revision 1260ed77798502de9c98020040d2995008de10cc)
1*af33bd58SValentina Fernandez# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*af33bd58SValentina Fernandez%YAML 1.2
3*af33bd58SValentina Fernandez---
4*af33bd58SValentina Fernandez$id: http://devicetree.org/schemas/mailbox/microchip,sbi-ipc.yaml#
5*af33bd58SValentina Fernandez$schema: http://devicetree.org/meta-schemas/core.yaml#
6*af33bd58SValentina Fernandez
7*af33bd58SValentina Fernandeztitle: Microchip Inter-processor communication (IPC) mailbox controller
8*af33bd58SValentina Fernandez
9*af33bd58SValentina Fernandezmaintainers:
10*af33bd58SValentina Fernandez  - Valentina Fernandez <valentina.fernandezalanis@microchip.com>
11*af33bd58SValentina Fernandez
12*af33bd58SValentina Fernandezdescription:
13*af33bd58SValentina Fernandez  The Microchip Inter-processor Communication (IPC) facilitates
14*af33bd58SValentina Fernandez  message passing between processors using an interrupt signaling
15*af33bd58SValentina Fernandez  mechanism.
16*af33bd58SValentina Fernandez
17*af33bd58SValentina Fernandezproperties:
18*af33bd58SValentina Fernandez  compatible:
19*af33bd58SValentina Fernandez    oneOf:
20*af33bd58SValentina Fernandez      - description:
21*af33bd58SValentina Fernandez          Intended for use by software running in supervisor privileged
22*af33bd58SValentina Fernandez          mode (s-mode). This SBI interface is compatible with the Mi-V
23*af33bd58SValentina Fernandez          Inter-hart Communication (IHC) IP.
24*af33bd58SValentina Fernandez        const: microchip,sbi-ipc
25*af33bd58SValentina Fernandez
26*af33bd58SValentina Fernandez      - description:
27*af33bd58SValentina Fernandez          Intended for use by the SBI implementation in machine mode
28*af33bd58SValentina Fernandez          (m-mode), this compatible string is for the MIV_IHC Soft-IP.
29*af33bd58SValentina Fernandez        const: microchip,miv-ihc-rtl-v2
30*af33bd58SValentina Fernandez
31*af33bd58SValentina Fernandez  reg:
32*af33bd58SValentina Fernandez    maxItems: 1
33*af33bd58SValentina Fernandez
34*af33bd58SValentina Fernandez  interrupts:
35*af33bd58SValentina Fernandez    minItems: 1
36*af33bd58SValentina Fernandez    maxItems: 5
37*af33bd58SValentina Fernandez
38*af33bd58SValentina Fernandez  interrupt-names:
39*af33bd58SValentina Fernandez    minItems: 1
40*af33bd58SValentina Fernandez    maxItems: 5
41*af33bd58SValentina Fernandez    items:
42*af33bd58SValentina Fernandez      enum:
43*af33bd58SValentina Fernandez        - hart-0
44*af33bd58SValentina Fernandez        - hart-1
45*af33bd58SValentina Fernandez        - hart-2
46*af33bd58SValentina Fernandez        - hart-3
47*af33bd58SValentina Fernandez        - hart-4
48*af33bd58SValentina Fernandez        - hart-5
49*af33bd58SValentina Fernandez
50*af33bd58SValentina Fernandez  "#mbox-cells":
51*af33bd58SValentina Fernandez    description: >
52*af33bd58SValentina Fernandez      For "microchip,sbi-ipc", the cell represents the global "logical"
53*af33bd58SValentina Fernandez      channel IDs. The meaning of channel IDs are platform firmware dependent.
54*af33bd58SValentina Fernandez
55*af33bd58SValentina Fernandez      For "microchip,miv-ihc-rtl-v2", the cell represents the physical
56*af33bd58SValentina Fernandez      channel and does not vary based on the platform firmware.
57*af33bd58SValentina Fernandez    const: 1
58*af33bd58SValentina Fernandez
59*af33bd58SValentina Fernandez  microchip,ihc-chan-disabled-mask:
60*af33bd58SValentina Fernandez    description: >
61*af33bd58SValentina Fernandez      Represents the enable/disable state of the bi-directional IHC
62*af33bd58SValentina Fernandez      channels within the MIV-IHC IP configuration.
63*af33bd58SValentina Fernandez
64*af33bd58SValentina Fernandez      A bit set to '1' indicates that the corresponding channel is disabled,
65*af33bd58SValentina Fernandez      and any read or write operations to that channel will return zero.
66*af33bd58SValentina Fernandez
67*af33bd58SValentina Fernandez      A bit set to '0' indicates that the corresponding channel is enabled
68*af33bd58SValentina Fernandez      and will be accessible through its dedicated address range registers.
69*af33bd58SValentina Fernandez
70*af33bd58SValentina Fernandez      The actual enable/disable state of each channel is determined by the
71*af33bd58SValentina Fernandez      IP blocks configuration.
72*af33bd58SValentina Fernandez    $ref: /schemas/types.yaml#/definitions/uint16
73*af33bd58SValentina Fernandez    maximum: 0x7fff
74*af33bd58SValentina Fernandez    default: 0
75*af33bd58SValentina Fernandez
76*af33bd58SValentina Fernandezrequired:
77*af33bd58SValentina Fernandez  - compatible
78*af33bd58SValentina Fernandez  - interrupts
79*af33bd58SValentina Fernandez  - interrupt-names
80*af33bd58SValentina Fernandez  - "#mbox-cells"
81*af33bd58SValentina Fernandez
82*af33bd58SValentina FernandezallOf:
83*af33bd58SValentina Fernandez  - if:
84*af33bd58SValentina Fernandez      properties:
85*af33bd58SValentina Fernandez        compatible:
86*af33bd58SValentina Fernandez          contains:
87*af33bd58SValentina Fernandez            const: microchip,sbi-ipc
88*af33bd58SValentina Fernandez    then:
89*af33bd58SValentina Fernandez      properties:
90*af33bd58SValentina Fernandez        reg:
91*af33bd58SValentina Fernandez          not: {}
92*af33bd58SValentina Fernandez          description:
93*af33bd58SValentina Fernandez            The 'microchip,sbi-ipc' operates in a programming model
94*af33bd58SValentina Fernandez            that does not require memory-mapped I/O (MMIO) registers
95*af33bd58SValentina Fernandez            since it uses SBI ecalls provided by the m-mode/firmware
96*af33bd58SValentina Fernandez            SBI implementation to access hardware registers.
97*af33bd58SValentina Fernandez        microchip,ihc-chan-disabled-mask: false
98*af33bd58SValentina Fernandez    else:
99*af33bd58SValentina Fernandez      required:
100*af33bd58SValentina Fernandez        - reg
101*af33bd58SValentina Fernandez        - microchip,ihc-chan-disabled-mask
102*af33bd58SValentina Fernandez
103*af33bd58SValentina FernandezadditionalProperties: false
104*af33bd58SValentina Fernandez
105*af33bd58SValentina Fernandezexamples:
106*af33bd58SValentina Fernandez  - |
107*af33bd58SValentina Fernandez    mailbox {
108*af33bd58SValentina Fernandez      compatible = "microchip,sbi-ipc";
109*af33bd58SValentina Fernandez      interrupt-parent = <&plic>;
110*af33bd58SValentina Fernandez      interrupts = <180>, <179>, <178>;
111*af33bd58SValentina Fernandez      interrupt-names = "hart-1", "hart-2", "hart-3";
112*af33bd58SValentina Fernandez      #mbox-cells = <1>;
113*af33bd58SValentina Fernandez    };
114*af33bd58SValentina Fernandez  - |
115*af33bd58SValentina Fernandez    mailbox@50000000 {
116*af33bd58SValentina Fernandez      compatible = "microchip,miv-ihc-rtl-v2";
117*af33bd58SValentina Fernandez      microchip,ihc-chan-disabled-mask = /bits/ 16 <0>;
118*af33bd58SValentina Fernandez      reg = <0x50000000 0x1c000>;
119*af33bd58SValentina Fernandez      interrupt-parent = <&plic>;
120*af33bd58SValentina Fernandez      interrupts = <180>, <179>, <178>;
121*af33bd58SValentina Fernandez      interrupt-names = "hart-1", "hart-2", "hart-3";
122*af33bd58SValentina Fernandez      #mbox-cells = <1>;
123*af33bd58SValentina Fernandez    };
124