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  resets:
48    maxItems: 1
49
50  iram:
51    $ref: /schemas/types.yaml#/definitions/phandle
52    description: phandle pointing to the SRAM device node
53    maxItems: 1
54
55required:
56  - compatible
57  - reg
58  - interrupts
59  - clocks
60  - clock-names
61
62allOf:
63  - if:
64      properties:
65        compatible:
66          contains:
67            const: cnm,coda960
68    then:
69      properties:
70        interrupts:
71          items:
72            - description: BIT processor interrupt
73            - description: JPEG unit interrupt
74
75        interrupt-names:
76          items:
77            - const: bit
78            - const: jpeg
79    else:
80      properties:
81        interrupts:
82          items:
83            - description: BIT processor interrupt
84
85  - if:
86      properties:
87        compatible:
88          contains:
89            enum:
90              - fsl,imx6dl-vpu
91              - fsl,imx6q-vpu
92    then:
93      properties:
94        power-domains:
95          $ref: /schemas/types.yaml#/definitions/phandle
96          description: phandle pointing to the PU power domain
97          maxItems: 1
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