xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/mediatek,gce-mailbox.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1*7ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*7ef62cebSEmmanuel Vadot%YAML 1.2
3*7ef62cebSEmmanuel Vadot---
4*7ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/mediatek,gce-mailbox.yaml#
5*7ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*7ef62cebSEmmanuel Vadot
7*7ef62cebSEmmanuel Vadottitle: Mediatek Global Command Engine Mailbox
8*7ef62cebSEmmanuel Vadot
9*7ef62cebSEmmanuel Vadotmaintainers:
10*7ef62cebSEmmanuel Vadot  - Houlong Wei <houlong.wei@mediatek.com>
11*7ef62cebSEmmanuel Vadot
12*7ef62cebSEmmanuel Vadotdescription:
13*7ef62cebSEmmanuel Vadot  The Global Command Engine (GCE) is used to help read/write registers with
14*7ef62cebSEmmanuel Vadot  critical time limitation, such as updating display configuration during the
15*7ef62cebSEmmanuel Vadot  vblank. The GCE can be used to implement the Command Queue (CMDQ) driver.
16*7ef62cebSEmmanuel Vadot
17*7ef62cebSEmmanuel Vadotproperties:
18*7ef62cebSEmmanuel Vadot  compatible:
19*7ef62cebSEmmanuel Vadot    enum:
20*7ef62cebSEmmanuel Vadot      - mediatek,mt6779-gce
21*7ef62cebSEmmanuel Vadot      - mediatek,mt8173-gce
22*7ef62cebSEmmanuel Vadot      - mediatek,mt8183-gce
23*7ef62cebSEmmanuel Vadot      - mediatek,mt8186-gce
24*7ef62cebSEmmanuel Vadot      - mediatek,mt8192-gce
25*7ef62cebSEmmanuel Vadot      - mediatek,mt8195-gce
26*7ef62cebSEmmanuel Vadot
27*7ef62cebSEmmanuel Vadot  "#mbox-cells":
28*7ef62cebSEmmanuel Vadot    const: 2
29*7ef62cebSEmmanuel Vadot    description:
30*7ef62cebSEmmanuel Vadot      The first cell describes the Thread ID of the GCE,
31*7ef62cebSEmmanuel Vadot      the second cell describes the priority of the GCE thread
32*7ef62cebSEmmanuel Vadot
33*7ef62cebSEmmanuel Vadot  reg:
34*7ef62cebSEmmanuel Vadot    maxItems: 1
35*7ef62cebSEmmanuel Vadot
36*7ef62cebSEmmanuel Vadot  interrupts:
37*7ef62cebSEmmanuel Vadot    maxItems: 1
38*7ef62cebSEmmanuel Vadot
39*7ef62cebSEmmanuel Vadot  clocks:
40*7ef62cebSEmmanuel Vadot    items:
41*7ef62cebSEmmanuel Vadot      - description: Global Command Engine clock
42*7ef62cebSEmmanuel Vadot
43*7ef62cebSEmmanuel Vadot  clock-names:
44*7ef62cebSEmmanuel Vadot    items:
45*7ef62cebSEmmanuel Vadot      - const: gce
46*7ef62cebSEmmanuel Vadot
47*7ef62cebSEmmanuel Vadotrequired:
48*7ef62cebSEmmanuel Vadot  - compatible
49*7ef62cebSEmmanuel Vadot  - "#mbox-cells"
50*7ef62cebSEmmanuel Vadot  - reg
51*7ef62cebSEmmanuel Vadot  - interrupts
52*7ef62cebSEmmanuel Vadot  - clocks
53*7ef62cebSEmmanuel Vadot
54*7ef62cebSEmmanuel VadotallOf:
55*7ef62cebSEmmanuel Vadot  - if:
56*7ef62cebSEmmanuel Vadot      not:
57*7ef62cebSEmmanuel Vadot        properties:
58*7ef62cebSEmmanuel Vadot          compatible:
59*7ef62cebSEmmanuel Vadot            contains:
60*7ef62cebSEmmanuel Vadot              const: mediatek,mt8195-gce
61*7ef62cebSEmmanuel Vadot    then:
62*7ef62cebSEmmanuel Vadot      required:
63*7ef62cebSEmmanuel Vadot        - clock-names
64*7ef62cebSEmmanuel Vadot
65*7ef62cebSEmmanuel VadotadditionalProperties: false
66*7ef62cebSEmmanuel Vadot
67*7ef62cebSEmmanuel Vadotexamples:
68*7ef62cebSEmmanuel Vadot  - |
69*7ef62cebSEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
70*7ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
71*7ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
72*7ef62cebSEmmanuel Vadot
73*7ef62cebSEmmanuel Vadot    soc {
74*7ef62cebSEmmanuel Vadot        #address-cells = <2>;
75*7ef62cebSEmmanuel Vadot        #size-cells = <2>;
76*7ef62cebSEmmanuel Vadot
77*7ef62cebSEmmanuel Vadot        gce: mailbox@10212000 {
78*7ef62cebSEmmanuel Vadot            compatible = "mediatek,mt8173-gce";
79*7ef62cebSEmmanuel Vadot            reg = <0 0x10212000 0 0x1000>;
80*7ef62cebSEmmanuel Vadot            interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>;
81*7ef62cebSEmmanuel Vadot            #mbox-cells = <2>;
82*7ef62cebSEmmanuel Vadot            clocks = <&infracfg CLK_INFRA_GCE>;
83*7ef62cebSEmmanuel Vadot            clock-names = "gce";
84*7ef62cebSEmmanuel Vadot        };
85*7ef62cebSEmmanuel Vadot    };
86