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