xref: /linux/Documentation/devicetree/bindings/media/ti,cal.yaml (revision cb05c6c82fb0853b53ecf983c29ab02aaca13194)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/ti,cal.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Texas Instruments DRA72x CAMERA ADAPTATION LAYER (CAL) Device Tree Bindings
8
9maintainers:
10  - Benoit Parrot <bparrot@ti.com>
11
12description: |-
13  The Camera Adaptation Layer (CAL) is a key component for image capture
14  applications. The capture module provides the system interface and the
15  processing capability to connect CSI2 image-sensor modules to the
16  DRA72x device.
17
18  CAL supports 2 camera port nodes on MIPI bus. Each CSI2 camera port nodes
19  should contain a 'port' child node with child 'endpoint' node. Please
20  refer to the bindings defined in
21  Documentation/devicetree/bindings/media/video-interfaces.txt.
22
23properties:
24  compatible:
25    enum:
26      # for DRA72 controllers
27      - ti,dra72-cal
28      # for DRA72 controllers pre ES2.0
29      - ti,dra72-pre-es2-cal
30      # for DRA76 controllers
31      - ti,dra76-cal
32      # for AM654 controllers
33      - ti,am654-cal
34
35  reg:
36    minItems: 2
37    items:
38      - description: The CAL main register region
39      - description: The RX Core0 (DPHY0) register region
40      - description: The RX Core1 (DPHY1) register region
41
42  reg-names:
43    minItems: 2
44    items:
45      - const: cal_top
46      - const: cal_rx_core0
47      - const: cal_rx_core1
48
49  interrupts:
50    maxItems: 1
51
52  ti,camerrx-control:
53    $ref: "/schemas/types.yaml#/definitions/phandle-array"
54    description:
55      phandle to the device control module and offset to the
56      control_camerarx_core register
57
58  clocks:
59    maxItems: 1
60
61  clock-names:
62    const: fck
63
64  power-domains:
65    description:
66      List of phandle and PM domain specifier as documented in
67      Documentation/devicetree/bindings/power/power_domain.txt
68    maxItems: 1
69
70  # See ./video-interfaces.txt for details
71  ports:
72    type: object
73    additionalProperties: false
74
75    properties:
76      "#address-cells":
77        const: 1
78
79      "#size-cells":
80        const: 0
81
82      port@0:
83        type: object
84        additionalProperties: false
85
86        properties:
87          reg:
88            const: 0
89            description: CSI2 Port #0
90
91        patternProperties:
92          endpoint:
93            type: object
94            additionalProperties: false
95
96            properties:
97              clock-lanes:
98                maxItems: 1
99
100              data-lanes:
101                minItems: 1
102                maxItems: 4
103
104              remote-endpoint: true
105
106        required:
107          - reg
108
109      port@1:
110        type: object
111        additionalProperties: false
112
113        properties:
114          reg:
115            const: 1
116            description: CSI2 Port #1
117
118        patternProperties:
119          endpoint:
120            type: object
121            additionalProperties: false
122
123            properties:
124              clock-lanes:
125                maxItems: 1
126
127              data-lanes:
128                minItems: 1
129                maxItems: 4
130
131              remote-endpoint: true
132
133        required:
134          - reg
135
136    required:
137      - "#address-cells"
138      - "#size-cells"
139      - port@0
140
141required:
142  - compatible
143  - reg
144  - reg-names
145  - interrupts
146  - ti,camerrx-control
147
148additionalProperties: false
149
150examples:
151  - |
152    #include <dt-bindings/interrupt-controller/arm-gic.h>
153
154    cal: cal@4845b000 {
155        compatible = "ti,dra72-cal";
156        reg = <0x4845B000 0x400>,
157              <0x4845B800 0x40>,
158              <0x4845B900 0x40>;
159        reg-names = "cal_top",
160                    "cal_rx_core0",
161                    "cal_rx_core1";
162        interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
163        ti,camerrx-control = <&scm_conf 0xE94>;
164
165        ports {
166              #address-cells = <1>;
167              #size-cells = <0>;
168
169              csi2_0: port@0 {
170                    reg = <0>;
171                    csi2_phy0: endpoint {
172                           remote-endpoint = <&csi2_cam0>;
173                           clock-lanes = <0>;
174                           data-lanes = <1 2>;
175                    };
176              };
177        };
178    };
179
180    i2c {
181        clock-frequency = <400000>;
182        #address-cells = <1>;
183        #size-cells = <0>;
184
185        camera-sensor@3c {
186               compatible = "ovti,ov5640";
187               reg = <0x3c>;
188
189               clocks = <&clk_ov5640_fixed>;
190               clock-names = "xclk";
191
192               port {
193                    csi2_cam0: endpoint {
194                            remote-endpoint = <&csi2_phy0>;
195                            clock-lanes = <0>;
196                            data-lanes = <1 2>;
197                    };
198               };
199        };
200    };
201
202...
203