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