xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/mediatek,gce-mailbox.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27ef62cebSEmmanuel Vadot%YAML 1.2
37ef62cebSEmmanuel Vadot---
47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/mediatek,gce-mailbox.yaml#
57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67ef62cebSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Mediatek Global Command Engine Mailbox
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - Houlong Wei <houlong.wei@mediatek.com>
117ef62cebSEmmanuel Vadot
127ef62cebSEmmanuel Vadotdescription:
137ef62cebSEmmanuel Vadot  The Global Command Engine (GCE) is used to help read/write registers with
147ef62cebSEmmanuel Vadot  critical time limitation, such as updating display configuration during the
157ef62cebSEmmanuel Vadot  vblank. The GCE can be used to implement the Command Queue (CMDQ) driver.
167ef62cebSEmmanuel Vadot
177ef62cebSEmmanuel Vadotproperties:
187ef62cebSEmmanuel Vadot  compatible:
19*fac71e4eSEmmanuel Vadot    oneOf:
20*fac71e4eSEmmanuel Vadot      - enum:
217ef62cebSEmmanuel Vadot          - mediatek,mt6779-gce
227ef62cebSEmmanuel Vadot          - mediatek,mt8173-gce
237ef62cebSEmmanuel Vadot          - mediatek,mt8183-gce
247ef62cebSEmmanuel Vadot          - mediatek,mt8186-gce
258bab661aSEmmanuel Vadot          - mediatek,mt8188-gce
267ef62cebSEmmanuel Vadot          - mediatek,mt8192-gce
277ef62cebSEmmanuel Vadot          - mediatek,mt8195-gce
28*fac71e4eSEmmanuel Vadot      - items:
29*fac71e4eSEmmanuel Vadot          - const: mediatek,mt6795-gce
30*fac71e4eSEmmanuel Vadot          - const: mediatek,mt8173-gce
317ef62cebSEmmanuel Vadot
327ef62cebSEmmanuel Vadot  "#mbox-cells":
337ef62cebSEmmanuel Vadot    const: 2
347ef62cebSEmmanuel Vadot    description:
357ef62cebSEmmanuel Vadot      The first cell describes the Thread ID of the GCE,
367ef62cebSEmmanuel Vadot      the second cell describes the priority of the GCE thread
377ef62cebSEmmanuel Vadot
387ef62cebSEmmanuel Vadot  reg:
397ef62cebSEmmanuel Vadot    maxItems: 1
407ef62cebSEmmanuel Vadot
417ef62cebSEmmanuel Vadot  interrupts:
427ef62cebSEmmanuel Vadot    maxItems: 1
437ef62cebSEmmanuel Vadot
447ef62cebSEmmanuel Vadot  clocks:
457ef62cebSEmmanuel Vadot    items:
467ef62cebSEmmanuel Vadot      - description: Global Command Engine clock
477ef62cebSEmmanuel Vadot
487ef62cebSEmmanuel Vadot  clock-names:
497ef62cebSEmmanuel Vadot    items:
507ef62cebSEmmanuel Vadot      - const: gce
517ef62cebSEmmanuel Vadot
527ef62cebSEmmanuel Vadotrequired:
537ef62cebSEmmanuel Vadot  - compatible
547ef62cebSEmmanuel Vadot  - "#mbox-cells"
557ef62cebSEmmanuel Vadot  - reg
567ef62cebSEmmanuel Vadot  - interrupts
577ef62cebSEmmanuel Vadot  - clocks
587ef62cebSEmmanuel Vadot
597ef62cebSEmmanuel VadotallOf:
607ef62cebSEmmanuel Vadot  - if:
617ef62cebSEmmanuel Vadot      not:
627ef62cebSEmmanuel Vadot        properties:
637ef62cebSEmmanuel Vadot          compatible:
647ef62cebSEmmanuel Vadot            contains:
657ef62cebSEmmanuel Vadot              const: mediatek,mt8195-gce
667ef62cebSEmmanuel Vadot    then:
677ef62cebSEmmanuel Vadot      required:
687ef62cebSEmmanuel Vadot        - clock-names
697ef62cebSEmmanuel Vadot
707ef62cebSEmmanuel VadotadditionalProperties: false
717ef62cebSEmmanuel Vadot
727ef62cebSEmmanuel Vadotexamples:
737ef62cebSEmmanuel Vadot  - |
747ef62cebSEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
757ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
767ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
777ef62cebSEmmanuel Vadot
787ef62cebSEmmanuel Vadot    soc {
797ef62cebSEmmanuel Vadot        #address-cells = <2>;
807ef62cebSEmmanuel Vadot        #size-cells = <2>;
817ef62cebSEmmanuel Vadot
827ef62cebSEmmanuel Vadot        gce: mailbox@10212000 {
837ef62cebSEmmanuel Vadot            compatible = "mediatek,mt8173-gce";
847ef62cebSEmmanuel Vadot            reg = <0 0x10212000 0 0x1000>;
857ef62cebSEmmanuel Vadot            interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>;
867ef62cebSEmmanuel Vadot            #mbox-cells = <2>;
877ef62cebSEmmanuel Vadot            clocks = <&infracfg CLK_INFRA_GCE>;
887ef62cebSEmmanuel Vadot            clock-names = "gce";
897ef62cebSEmmanuel Vadot        };
907ef62cebSEmmanuel Vadot    };
91