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