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