1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/coda.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Chips&Media Coda multi-standard codec IP
8
9maintainers:
10  - Philipp Zabel <p.zabel@pengutronix.de>
11
12description: |-
13  Coda codec IPs are present in i.MX SoCs in various versions,
14  called VPU (Video Processing Unit).
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - const: fsl,imx27-vpu
21          - const: cnm,codadx6
22      - items:
23          - const: fsl,imx51-vpu
24          - const: cnm,codahx4
25      - items:
26          - const: fsl,imx53-vpu
27          - const: cnm,coda7541
28      - items:
29          - enum:
30              - fsl,imx6dl-vpu
31              - fsl,imx6q-vpu
32          - const: cnm,coda960
33
34  reg:
35    maxItems: 1
36
37  clocks:
38    items:
39      - description: PER clock
40      - description: AHB interface clock
41
42  clock-names:
43    items:
44      - const: per
45      - const: ahb
46
47  interrupts:
48    minItems: 1
49    items:
50      - description: BIT processor interrupt
51      - description: JPEG unit interrupt
52
53  interrupt-names:
54    minItems: 1
55    items:
56      - const: bit
57      - const: jpeg
58
59  power-domains:
60    maxItems: 1
61
62  resets:
63    maxItems: 1
64
65  iram:
66    $ref: /schemas/types.yaml#/definitions/phandle
67    description: phandle pointing to the SRAM device node
68    maxItems: 1
69
70required:
71  - compatible
72  - reg
73  - interrupts
74  - clocks
75  - clock-names
76
77additionalProperties: false
78
79allOf:
80  - if:
81      properties:
82        compatible:
83          contains:
84            const: cnm,coda960
85    then:
86      properties:
87        interrupts:
88          minItems: 2
89
90        interrupt-names:
91          minItems: 2
92    else:
93      properties:
94        interrupts:
95          maxItems: 1
96
97        power-domains: false
98
99examples:
100  - |
101    vpu: video-codec@63ff4000 {
102        compatible = "fsl,imx53-vpu", "cnm,coda7541";
103        reg = <0x63ff4000 0x1000>;
104        interrupts = <9>;
105        clocks = <&clks 63>, <&clks 63>;
106        clock-names = "per", "ahb";
107        iram = <&ocram>;
108    };
109