xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/cix,sky1-mbox.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/cix,sky1-mbox.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: Cixtech mailbox controller
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotmaintainers:
10*833e5d42SEmmanuel Vadot  - Guomin Chen <Guomin.Chen@cixtech.com>
11*833e5d42SEmmanuel Vadot
12*833e5d42SEmmanuel Vadotdescription:
13*833e5d42SEmmanuel Vadot  The Cixtech mailbox controller, used in the Cixtech Sky1 SoC,
14*833e5d42SEmmanuel Vadot  is used for message transmission between multiple processors
15*833e5d42SEmmanuel Vadot  within the SoC, such as the AP, PM, audio DSP, SensorHub MCU,
16*833e5d42SEmmanuel Vadot  and others
17*833e5d42SEmmanuel Vadot
18*833e5d42SEmmanuel Vadot  Each Cixtech mailbox controller is unidirectional, so they are
19*833e5d42SEmmanuel Vadot  typically used in pairs-one for receiving and one for transmitting.
20*833e5d42SEmmanuel Vadot
21*833e5d42SEmmanuel Vadot  Each Cixtech mailbox supports 11 channels with different transmission modes
22*833e5d42SEmmanuel Vadot    channel 0-7 - Fast channel with 32bit transmit register and IRQ support
23*833e5d42SEmmanuel Vadot    channel 8   - Doorbell mode,using the mailbox as an interrupt-generating
24*833e5d42SEmmanuel Vadot                   mechanism.
25*833e5d42SEmmanuel Vadot    channel 9   - Fifo based channel with 32*32bit depth fifo and IRQ support
26*833e5d42SEmmanuel Vadot    channel 10  - Reg based channel with 32*32bit transmit register and
27*833e5d42SEmmanuel Vadot                   Doorbell+transmit acknowledgment IRQ support
28*833e5d42SEmmanuel Vadot
29*833e5d42SEmmanuel Vadot  In the CIX Sky1 SoC use case, there are 4 pairs of mailbox controllers
30*833e5d42SEmmanuel Vadot    AP <--> PM - using Doorbell transfer mode
31*833e5d42SEmmanuel Vadot    AP <--> SE - using REG transfer mode
32*833e5d42SEmmanuel Vadot    AP <--> DSP - using FIFO transfer mode
33*833e5d42SEmmanuel Vadot    AP <--> SensorHub - using FIFO transfer mode
34*833e5d42SEmmanuel Vadot
35*833e5d42SEmmanuel Vadotproperties:
36*833e5d42SEmmanuel Vadot  compatible:
37*833e5d42SEmmanuel Vadot    const: cix,sky1-mbox
38*833e5d42SEmmanuel Vadot
39*833e5d42SEmmanuel Vadot  reg:
40*833e5d42SEmmanuel Vadot    maxItems: 1
41*833e5d42SEmmanuel Vadot
42*833e5d42SEmmanuel Vadot  interrupts:
43*833e5d42SEmmanuel Vadot    maxItems: 1
44*833e5d42SEmmanuel Vadot
45*833e5d42SEmmanuel Vadot  "#mbox-cells":
46*833e5d42SEmmanuel Vadot    const: 1
47*833e5d42SEmmanuel Vadot
48*833e5d42SEmmanuel Vadot  cix,mbox-dir:
49*833e5d42SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
50*833e5d42SEmmanuel Vadot    description: Direction of the mailbox relative to the AP
51*833e5d42SEmmanuel Vadot    enum: [tx, rx]
52*833e5d42SEmmanuel Vadot
53*833e5d42SEmmanuel Vadotrequired:
54*833e5d42SEmmanuel Vadot  - compatible
55*833e5d42SEmmanuel Vadot  - reg
56*833e5d42SEmmanuel Vadot  - interrupts
57*833e5d42SEmmanuel Vadot  - "#mbox-cells"
58*833e5d42SEmmanuel Vadot  - cix,mbox-dir
59*833e5d42SEmmanuel Vadot
60*833e5d42SEmmanuel VadotadditionalProperties: false
61*833e5d42SEmmanuel Vadot
62*833e5d42SEmmanuel Vadotexamples:
63*833e5d42SEmmanuel Vadot  - |
64*833e5d42SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
65*833e5d42SEmmanuel Vadot
66*833e5d42SEmmanuel Vadot    soc {
67*833e5d42SEmmanuel Vadot        #address-cells = <2>;
68*833e5d42SEmmanuel Vadot        #size-cells = <2>;
69*833e5d42SEmmanuel Vadot
70*833e5d42SEmmanuel Vadot        mbox_ap2pm: mailbox@30000000 {
71*833e5d42SEmmanuel Vadot            compatible = "cix,sky1-mbox";
72*833e5d42SEmmanuel Vadot            reg = <0 0x30000000 0 0x10000>;
73*833e5d42SEmmanuel Vadot            interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH 0>;
74*833e5d42SEmmanuel Vadot            #mbox-cells = <1>;
75*833e5d42SEmmanuel Vadot            cix,mbox-dir = "tx";
76*833e5d42SEmmanuel Vadot        };
77*833e5d42SEmmanuel Vadot    };
78