Merge tag 'for-linus-5.15-1' of git://github.com/cminyard/linux-ipmi
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / mailbox / mtk-gce.txt
1 MediaTek GCE
2 ===============
3
4 The Global Command Engine (GCE) is used to help read/write registers with
5 critical time limitation, such as updating display configuration during the
6 vblank. The GCE can be used to implement the Command Queue (CMDQ) driver.
7
8 CMDQ driver uses mailbox framework for communication. Please refer to
9 mailbox.txt for generic information about mailbox device-tree bindings.
10
11 Required properties:
12 - compatible: can be "mediatek,mt8173-gce", "mediatek,mt8183-gce",
13   "mediatek,mt8192-gce", "mediatek,mt8195-gce" or "mediatek,mt6779-gce".
14 - reg: Address range of the GCE unit
15 - interrupts: The interrupt signal from the GCE block
16 - clock: Clocks according to the common clock binding
17 - clock-names: Must be "gce" to stand for GCE clock
18 - #mbox-cells: Should be 2.
19         <&phandle channel priority>
20         phandle: Label name of a gce node.
21         channel: Channel of mailbox. Be equal to the thread id of GCE.
22         priority: Priority of GCE thread.
23
24 Required properties for a client device:
25 - mboxes: Client use mailbox to communicate with GCE, it should have this
26   property and list of phandle, mailbox specifiers.
27 Optional properties for a client device:
28 - mediatek,gce-client-reg: Specify the sub-system id which is corresponding
29   to the register address, it should have this property and list of phandle,
30   sub-system specifiers.
31   <&phandle subsys_number start_offset size>
32   phandle: Label name of a gce node.
33   subsys_number: specify the sub-system id which is corresponding
34                  to the register address.
35   start_offset: the start offset of register address that GCE can access.
36   size: the total size of register address that GCE can access.
37
38 Optional properties for a client mutex node:
39 - mediatek,gce-events: GCE events used by clients. The event numbers are
40   defined in 'dt-bindings/gce/<chip>-gce.h'.
41
42 Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h',
43 'dt-binding/gce/mt8183-gce.h', 'dt-binding/gce/mt8192-gce.h',
44 'dt-binding/gce/mt8195-gce.h' or 'dt-bindings/gce/mt6779-gce.h'.
45 Such as sub-system ids, thread priority, event ids.
46
47 Example:
48
49         gce: gce@10212000 {
50                 compatible = "mediatek,mt8173-gce";
51                 reg = <0 0x10212000 0 0x1000>;
52                 interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>;
53                 clocks = <&infracfg CLK_INFRA_GCE>;
54                 clock-names = "gce";
55                 #mbox-cells = <2>;
56         };
57
58 Example for a client device:
59
60         mmsys: clock-controller@14000000 {
61                 compatible = "mediatek,mt8173-mmsys";
62                 mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST>,
63                          <&gce 1 CMDQ_THR_PRIO_LOWEST>;
64                 mutex-event-eof = <CMDQ_EVENT_MUTEX0_STREAM_EOF
65                                 CMDQ_EVENT_MUTEX1_STREAM_EOF>;
66                 mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x3000 0x1000>,
67                                           <&gce SUBSYS_1401XXXX 0x2000 0x100>;
68                 ...
69         };
70
71 Example for a client mutex node:
72         mutex: mutex@14020000 {
73                 compatible = "mediatek,mt8173-disp-mutex";
74                 reg = <0 0x14020000 0 0x1000>;
75                 interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_LOW>;
76                 power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
77                 clocks = <&mmsys CLK_MM_MUTEX_32K>;
78                 mediatek,gce-events = <CMDQ_EVENT_MUTEX0_STREAM_EOF>,
79                                       <CMDQ_EVENT_MUTEX1_STREAM_EOF>;
80         };