xref: /freebsd-src/sys/contrib/device-tree/Bindings/soc/mediatek/mediatek,mutex.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mutex.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
7b97ee269SEmmanuel Vadottitle: Mediatek mutex
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Chun-Kuang Hu <chunkuang.hu@kernel.org>
11b97ee269SEmmanuel Vadot  - Philipp Zabel <p.zabel@pengutronix.de>
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel Vadotdescription: |
14b97ee269SEmmanuel Vadot  Mediatek mutex, namely MUTEX, is used to send the triggers signals called
15b97ee269SEmmanuel Vadot  Start Of Frame (SOF) / End Of Frame (EOF) to each sub-modules on the display
16b97ee269SEmmanuel Vadot  data path or MDP data path.
17b97ee269SEmmanuel Vadot  In some SoC, such as mt2701, MUTEX could be a hardware mutex which protects
18b97ee269SEmmanuel Vadot  the shadow register.
19b97ee269SEmmanuel Vadot  MUTEX device node must be siblings to the central MMSYS_CONFIG node.
20b97ee269SEmmanuel Vadot  For a description of the MMSYS_CONFIG binding, see
21b97ee269SEmmanuel Vadot  Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
22b97ee269SEmmanuel Vadot  for details.
23b97ee269SEmmanuel Vadot
24b97ee269SEmmanuel Vadotproperties:
25b97ee269SEmmanuel Vadot  compatible:
26b97ee269SEmmanuel Vadot    enum:
27b97ee269SEmmanuel Vadot      - mediatek,mt2701-disp-mutex
28b97ee269SEmmanuel Vadot      - mediatek,mt2712-disp-mutex
297ef62cebSEmmanuel Vadot      - mediatek,mt6795-disp-mutex
30b97ee269SEmmanuel Vadot      - mediatek,mt8167-disp-mutex
31b97ee269SEmmanuel Vadot      - mediatek,mt8173-disp-mutex
32b97ee269SEmmanuel Vadot      - mediatek,mt8183-disp-mutex
33b97ee269SEmmanuel Vadot      - mediatek,mt8186-disp-mutex
347ef62cebSEmmanuel Vadot      - mediatek,mt8186-mdp3-mutex
35cb7aa33aSEmmanuel Vadot      - mediatek,mt8188-disp-mutex
36*0e8011faSEmmanuel Vadot      - mediatek,mt8188-vpp-mutex
37b97ee269SEmmanuel Vadot      - mediatek,mt8192-disp-mutex
38b97ee269SEmmanuel Vadot      - mediatek,mt8195-disp-mutex
39fac71e4eSEmmanuel Vadot      - mediatek,mt8195-vpp-mutex
40fac71e4eSEmmanuel Vadot      - mediatek,mt8365-disp-mutex
41b97ee269SEmmanuel Vadot
42b97ee269SEmmanuel Vadot  reg:
43b97ee269SEmmanuel Vadot    maxItems: 1
44b97ee269SEmmanuel Vadot
45b97ee269SEmmanuel Vadot  interrupts:
46b97ee269SEmmanuel Vadot    maxItems: 1
47b97ee269SEmmanuel Vadot
48b97ee269SEmmanuel Vadot  power-domains:
49b97ee269SEmmanuel Vadot    description: A phandle and PM domain specifier as defined by bindings of
50b97ee269SEmmanuel Vadot      the power controller specified by phandle. See
51b97ee269SEmmanuel Vadot      Documentation/devicetree/bindings/power/power-domain.yaml for details.
52b97ee269SEmmanuel Vadot
53b97ee269SEmmanuel Vadot  clocks:
54b97ee269SEmmanuel Vadot    items:
55b97ee269SEmmanuel Vadot      - description: MUTEX Clock
56b97ee269SEmmanuel Vadot
57b97ee269SEmmanuel Vadot  mediatek,gce-events:
58b97ee269SEmmanuel Vadot    description:
59b97ee269SEmmanuel Vadot      The event id which is mapping to the specific hardware event signal
60b97ee269SEmmanuel Vadot      to gce. The event id is defined in the gce header
61b97ee269SEmmanuel Vadot      include/dt-bindings/gce/<chip>-gce.h of each chips.
62b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
63b97ee269SEmmanuel Vadot
64b97ee269SEmmanuel Vadot  mediatek,gce-client-reg:
65b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
66b97ee269SEmmanuel Vadot    items:
67b97ee269SEmmanuel Vadot      items:
68b97ee269SEmmanuel Vadot        - description: phandle of GCE
69b97ee269SEmmanuel Vadot        - description: GCE subsys id
70b97ee269SEmmanuel Vadot        - description: register offset
71b97ee269SEmmanuel Vadot        - description: register size
72b97ee269SEmmanuel Vadot    description: The register of client driver can be configured by gce with
73b97ee269SEmmanuel Vadot      4 arguments defined in this property. Each GCE subsys id is mapping to
74b97ee269SEmmanuel Vadot      a client defined in the header include/dt-bindings/gce/<chip>-gce.h.
75b97ee269SEmmanuel Vadot
76fac71e4eSEmmanuel VadotallOf:
77fac71e4eSEmmanuel Vadot  - if:
78fac71e4eSEmmanuel Vadot      properties:
79fac71e4eSEmmanuel Vadot        compatible:
80fac71e4eSEmmanuel Vadot          contains:
81fac71e4eSEmmanuel Vadot            enum:
82fac71e4eSEmmanuel Vadot              - mediatek,mt2701-disp-mutex
83fac71e4eSEmmanuel Vadot              - mediatek,mt2712-disp-mutex
84fac71e4eSEmmanuel Vadot              - mediatek,mt6795-disp-mutex
85fac71e4eSEmmanuel Vadot              - mediatek,mt8173-disp-mutex
86fac71e4eSEmmanuel Vadot              - mediatek,mt8186-disp-mutex
87fac71e4eSEmmanuel Vadot              - mediatek,mt8186-mdp3-mutex
88fac71e4eSEmmanuel Vadot              - mediatek,mt8192-disp-mutex
89fac71e4eSEmmanuel Vadot              - mediatek,mt8195-disp-mutex
90fac71e4eSEmmanuel Vadot    then:
91fac71e4eSEmmanuel Vadot      required:
92fac71e4eSEmmanuel Vadot        - clocks
93fac71e4eSEmmanuel Vadot
94fac71e4eSEmmanuel Vadot
95b97ee269SEmmanuel Vadotrequired:
96b97ee269SEmmanuel Vadot  - compatible
97b97ee269SEmmanuel Vadot  - reg
98b97ee269SEmmanuel Vadot  - interrupts
99b97ee269SEmmanuel Vadot  - power-domains
100b97ee269SEmmanuel Vadot
101b97ee269SEmmanuel VadotadditionalProperties: false
102b97ee269SEmmanuel Vadot
103b97ee269SEmmanuel Vadotexamples:
104b97ee269SEmmanuel Vadot  - |
105b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
106b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
107b97ee269SEmmanuel Vadot    #include <dt-bindings/power/mt8173-power.h>
108b97ee269SEmmanuel Vadot    #include <dt-bindings/gce/mt8173-gce.h>
109b97ee269SEmmanuel Vadot
110b97ee269SEmmanuel Vadot    soc {
111b97ee269SEmmanuel Vadot        #address-cells = <2>;
112b97ee269SEmmanuel Vadot        #size-cells = <2>;
113b97ee269SEmmanuel Vadot
114b97ee269SEmmanuel Vadot        mutex: mutex@14020000 {
115b97ee269SEmmanuel Vadot            compatible = "mediatek,mt8173-disp-mutex";
116b97ee269SEmmanuel Vadot            reg = <0 0x14020000 0 0x1000>;
117b97ee269SEmmanuel Vadot            interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_LOW>;
118b97ee269SEmmanuel Vadot            power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
119b97ee269SEmmanuel Vadot            clocks = <&mmsys CLK_MM_MUTEX_32K>;
120b97ee269SEmmanuel Vadot            mediatek,gce-events = <CMDQ_EVENT_MUTEX0_STREAM_EOF>,
121b97ee269SEmmanuel Vadot                                  <CMDQ_EVENT_MUTEX1_STREAM_EOF>;
122b97ee269SEmmanuel Vadot        };
123b97ee269SEmmanuel Vadot    };
124