1f126890aSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2f126890aSEmmanuel Vadot%YAML 1.2
3f126890aSEmmanuel Vadot---
4f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/media/samsung,s5p-mfc.yaml#
5f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6f126890aSEmmanuel Vadot
7f126890aSEmmanuel Vadottitle: Samsung Exynos Multi Format Codec (MFC)
8f126890aSEmmanuel Vadot
9f126890aSEmmanuel Vadotmaintainers:
10f126890aSEmmanuel Vadot  - Marek Szyprowski <m.szyprowski@samsung.com>
11f126890aSEmmanuel Vadot  - Aakarsh Jain <aakarsh.jain@samsung.com>
12f126890aSEmmanuel Vadot
13f126890aSEmmanuel Vadotdescription:
14f126890aSEmmanuel Vadot  Multi Format Codec (MFC) is the IP present in Samsung SoCs which
15f126890aSEmmanuel Vadot  supports high resolution decoding and encoding functionalities.
16f126890aSEmmanuel Vadot
17f126890aSEmmanuel Vadotproperties:
18f126890aSEmmanuel Vadot  compatible:
19f126890aSEmmanuel Vadot    oneOf:
20f126890aSEmmanuel Vadot      - enum:
21f126890aSEmmanuel Vadot          - samsung,exynos5433-mfc        # Exynos5433
22f126890aSEmmanuel Vadot          - samsung,mfc-v5                # Exynos4
23f126890aSEmmanuel Vadot          - samsung,mfc-v6                # Exynos5
24f126890aSEmmanuel Vadot          - samsung,mfc-v7                # Exynos5420
25f126890aSEmmanuel Vadot          - samsung,mfc-v8                # Exynos5800
26f126890aSEmmanuel Vadot          - samsung,mfc-v10               # Exynos7880
27*8d13bc63SEmmanuel Vadot          - tesla,fsd-mfc                 # Tesla FSD
28f126890aSEmmanuel Vadot      - items:
29f126890aSEmmanuel Vadot          - enum:
30f126890aSEmmanuel Vadot              - samsung,exynos3250-mfc    # Exynos3250
31f126890aSEmmanuel Vadot          - const: samsung,mfc-v7         # Fall back for Exynos3250
32f126890aSEmmanuel Vadot
33f126890aSEmmanuel Vadot  reg:
34f126890aSEmmanuel Vadot    maxItems: 1
35f126890aSEmmanuel Vadot
36f126890aSEmmanuel Vadot  clocks:
37f126890aSEmmanuel Vadot    minItems: 1
38f126890aSEmmanuel Vadot    maxItems: 3
39f126890aSEmmanuel Vadot
40f126890aSEmmanuel Vadot  clock-names:
41f126890aSEmmanuel Vadot    minItems: 1
42f126890aSEmmanuel Vadot    maxItems: 3
43f126890aSEmmanuel Vadot
44f126890aSEmmanuel Vadot  interrupts:
45f126890aSEmmanuel Vadot    maxItems: 1
46f126890aSEmmanuel Vadot
47f126890aSEmmanuel Vadot  iommus:
48f126890aSEmmanuel Vadot    minItems: 1
49f126890aSEmmanuel Vadot    maxItems: 2
50f126890aSEmmanuel Vadot
51f126890aSEmmanuel Vadot  iommu-names:
52f126890aSEmmanuel Vadot    minItems: 1
53*8d13bc63SEmmanuel Vadot    items:
54*8d13bc63SEmmanuel Vadot      - const: left
55*8d13bc63SEmmanuel Vadot      - const: right
56f126890aSEmmanuel Vadot
57f126890aSEmmanuel Vadot  power-domains:
58f126890aSEmmanuel Vadot    maxItems: 1
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot  memory-region:
61f126890aSEmmanuel Vadot    minItems: 1
62f126890aSEmmanuel Vadot    maxItems: 2
63f126890aSEmmanuel Vadot
64f126890aSEmmanuel Vadotrequired:
65f126890aSEmmanuel Vadot  - compatible
66f126890aSEmmanuel Vadot  - reg
67f126890aSEmmanuel Vadot  - clocks
68f126890aSEmmanuel Vadot  - clock-names
69f126890aSEmmanuel Vadot  - interrupts
70f126890aSEmmanuel Vadot
71f126890aSEmmanuel VadotadditionalProperties: false
72f126890aSEmmanuel Vadot
73f126890aSEmmanuel VadotallOf:
74f126890aSEmmanuel Vadot  - if:
75f126890aSEmmanuel Vadot      properties:
76f126890aSEmmanuel Vadot        compatible:
77f126890aSEmmanuel Vadot          contains:
78f126890aSEmmanuel Vadot            enum:
79f126890aSEmmanuel Vadot              - samsung,exynos3250-mfc
80f126890aSEmmanuel Vadot    then:
81f126890aSEmmanuel Vadot      properties:
82f126890aSEmmanuel Vadot        clocks:
83f126890aSEmmanuel Vadot          maxItems: 2
84f126890aSEmmanuel Vadot        clock-names:
85f126890aSEmmanuel Vadot          items:
86f126890aSEmmanuel Vadot            - const: mfc
87f126890aSEmmanuel Vadot            - const: sclk_mfc
88f126890aSEmmanuel Vadot        iommus:
89f126890aSEmmanuel Vadot          maxItems: 1
90*8d13bc63SEmmanuel Vadot        iommu-names: false
91f126890aSEmmanuel Vadot
92f126890aSEmmanuel Vadot  - if:
93f126890aSEmmanuel Vadot      properties:
94f126890aSEmmanuel Vadot        compatible:
95f126890aSEmmanuel Vadot          contains:
96f126890aSEmmanuel Vadot            enum:
97f126890aSEmmanuel Vadot              - samsung,exynos5433-mfc
98f126890aSEmmanuel Vadot    then:
99f126890aSEmmanuel Vadot      properties:
100f126890aSEmmanuel Vadot        clocks:
101f126890aSEmmanuel Vadot          maxItems: 3
102f126890aSEmmanuel Vadot        clock-names:
103f126890aSEmmanuel Vadot          items:
104f126890aSEmmanuel Vadot            - const: pclk
105f126890aSEmmanuel Vadot            - const: aclk
106f126890aSEmmanuel Vadot            - const: aclk_xiu
107f126890aSEmmanuel Vadot        iommus:
108*8d13bc63SEmmanuel Vadot          minItems: 2
109*8d13bc63SEmmanuel Vadot        iommu-names:
110*8d13bc63SEmmanuel Vadot          minItems: 2
111f126890aSEmmanuel Vadot
112f126890aSEmmanuel Vadot  - if:
113f126890aSEmmanuel Vadot      properties:
114f126890aSEmmanuel Vadot        compatible:
115f126890aSEmmanuel Vadot          contains:
116f126890aSEmmanuel Vadot            enum:
117f126890aSEmmanuel Vadot              - samsung,mfc-v5
118f126890aSEmmanuel Vadot    then:
119f126890aSEmmanuel Vadot      properties:
120f126890aSEmmanuel Vadot        clocks:
121f126890aSEmmanuel Vadot          maxItems: 2
122f126890aSEmmanuel Vadot        clock-names:
123f126890aSEmmanuel Vadot          items:
124f126890aSEmmanuel Vadot            - const: mfc
125f126890aSEmmanuel Vadot            - const: sclk_mfc
126f126890aSEmmanuel Vadot        iommus:
127*8d13bc63SEmmanuel Vadot          minItems: 2
128*8d13bc63SEmmanuel Vadot        iommu-names:
129*8d13bc63SEmmanuel Vadot          minItems: 2
130f126890aSEmmanuel Vadot
131f126890aSEmmanuel Vadot  - if:
132f126890aSEmmanuel Vadot      properties:
133f126890aSEmmanuel Vadot        compatible:
134f126890aSEmmanuel Vadot          contains:
135f126890aSEmmanuel Vadot            enum:
136f126890aSEmmanuel Vadot              - samsung,mfc-v6
137f126890aSEmmanuel Vadot              - samsung,mfc-v8
138f126890aSEmmanuel Vadot    then:
139f126890aSEmmanuel Vadot      properties:
140f126890aSEmmanuel Vadot        clocks:
141f126890aSEmmanuel Vadot          maxItems: 1
142f126890aSEmmanuel Vadot        clock-names:
143f126890aSEmmanuel Vadot          items:
144f126890aSEmmanuel Vadot            - const: mfc
145f126890aSEmmanuel Vadot        iommus:
146*8d13bc63SEmmanuel Vadot          minItems: 2
147*8d13bc63SEmmanuel Vadot        iommu-names:
148*8d13bc63SEmmanuel Vadot          minItems: 2
149f126890aSEmmanuel Vadot
150f126890aSEmmanuel Vadot  - if:
151f126890aSEmmanuel Vadot      properties:
152f126890aSEmmanuel Vadot        compatible:
153f126890aSEmmanuel Vadot          contains:
154f126890aSEmmanuel Vadot            enum:
155f126890aSEmmanuel Vadot              - samsung,mfc-v7
156f126890aSEmmanuel Vadot    then:
157f126890aSEmmanuel Vadot      properties:
158f126890aSEmmanuel Vadot        clocks:
159f126890aSEmmanuel Vadot          minItems: 1
160f126890aSEmmanuel Vadot          maxItems: 2
161*8d13bc63SEmmanuel Vadot
162*8d13bc63SEmmanuel Vadot  - if:
163*8d13bc63SEmmanuel Vadot      properties:
164*8d13bc63SEmmanuel Vadot        compatible:
165*8d13bc63SEmmanuel Vadot          contains:
166*8d13bc63SEmmanuel Vadot            enum:
167*8d13bc63SEmmanuel Vadot              - tesla,fsd-mfc
168*8d13bc63SEmmanuel Vadot    then:
169*8d13bc63SEmmanuel Vadot      properties:
170*8d13bc63SEmmanuel Vadot        clocks:
171*8d13bc63SEmmanuel Vadot          maxItems: 1
172*8d13bc63SEmmanuel Vadot        clock-names:
173*8d13bc63SEmmanuel Vadot          items:
174*8d13bc63SEmmanuel Vadot            - const: mfc
175f126890aSEmmanuel Vadot        iommus:
176f126890aSEmmanuel Vadot          maxItems: 2
177*8d13bc63SEmmanuel Vadot        iommus-names: false
178f126890aSEmmanuel Vadot
179f126890aSEmmanuel Vadotexamples:
180f126890aSEmmanuel Vadot  - |
181f126890aSEmmanuel Vadot    #include <dt-bindings/clock/exynos4.h>
182f126890aSEmmanuel Vadot    #include <dt-bindings/clock/exynos-audss-clk.h>
183f126890aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
184f126890aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot    codec@13400000 {
187f126890aSEmmanuel Vadot        compatible = "samsung,mfc-v5";
188f126890aSEmmanuel Vadot        reg = <0x13400000 0x10000>;
189f126890aSEmmanuel Vadot        interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
190f126890aSEmmanuel Vadot        power-domains = <&pd_mfc>;
191f126890aSEmmanuel Vadot        clocks = <&clock CLK_MFC>, <&clock CLK_SCLK_MFC>;
192f126890aSEmmanuel Vadot        clock-names = "mfc", "sclk_mfc";
193f126890aSEmmanuel Vadot        iommus = <&sysmmu_mfc_l>, <&sysmmu_mfc_r>;
194f126890aSEmmanuel Vadot        iommu-names = "left", "right";
195f126890aSEmmanuel Vadot    };
196