]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blob - arch/arm64/boot/dts/tegra210-platforms/tegra210-camera-e3323-a00.dtsi
65837a3981451cee399a5501ce6237bc4c0dd5ef
[sojka/nv-tegra/linux-3.10.git] / arch / arm64 / boot / dts / tegra210-platforms / tegra210-camera-e3323-a00.dtsi
1 /*
2  * Copyright (c) 2015-2016, NVIDIA CORPORATION.  All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #include <dt-bindings/media/camera.h>
19 #include <dt-bindings/platform/t210/t210.h>
20
21 / {
22         host1x {
23                 vi {
24                         num-channels = <4>;
25                         ports {
26                                 #address-cells = <1>;
27                                 #size-cells = <0>;
28                                 port@0 {
29                                         reg = <0>;
30                                         e3323_vi_in0: endpoint {
31                                                 csi-port = <0>;
32                                                 bus-width = <4>;
33                                                 remote-endpoint = <&ov23850_out0>;
34                                         };
35                                 };
36                                 port@1 {
37                                         reg = <1>;
38                                         e3323_vi_in1: endpoint {
39                                                 csi-port = <2>;
40                                                 bus-width = <4>;
41                                                 remote-endpoint = <&ov23850_out1>;
42                                         };
43                                 };
44                                 port@2 {
45                                         reg = <2>;
46                                         e3323_vi_in2: endpoint {
47                                                 remote-endpoint = <&lc898212_out0>;
48                                         };
49                                 };
50                                 port@3 {
51                                         reg = <3>;
52                                         e3323_vi_in3: endpoint {
53                                                 remote-endpoint = <&lc898212_out1>;
54                                         };
55                                 };
56                         };
57                 };
58
59                 i2c@546c0000 {
60                         ov23850_a@10 {
61                                 compatible = "nvidia,ov23850";
62
63                                 reg = <0x10>;
64                                 /* Physical dimensions of sensor */
65                                 physical_w = "7.3998";
66                                 physical_h = "5.5998";
67
68                                 /* Sensor Model */
69                                 sensor_model ="ov23850";
70
71                                 /* Define any required hw resources needed by driver */
72                                 /* ie. clocks, io pins, power sources */
73                                 avdd-reg = "vana";
74                                 dvdd-reg = "vdig";
75                                 iovdd-reg = "vif";
76                                 vcmvdd-reg = "vvcm";
77                                 devnode = "video0";
78
79                                 /* Defines number of frames to be dropped by driver internally after applying */
80                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
81                                 /* crop co-ordinates */
82                                 post_crop_frame_drop = "0";
83
84                                 /**
85                                 * A modeX node is required to support v4l2 driver
86                                 * implementation with NVIDIA camera software stack
87                                 *
88                                 * mclk_khz = "";
89                                 * Standard MIPI driving clock, typically 24MHz
90                                 *
91                                 * num_lanes = "";
92                                 * Number of lane channels sensor is programmed to output
93                                 *
94                                 * tegra_sinterface = "";
95                                 * The base tegra serial interface lanes are connected to
96                                 *
97                                 * discontinuous_clk = "";
98                                 * The sensor is programmed to use a discontinuous clock on MIPI lanes
99                                 *
100                                 * dpcm_enable = "true";
101                                 * The sensor is programmed to use a DPCM modes
102                                 *
103                                 * cil_settletime = "";
104                                 * MIPI lane settle time value.
105                                 * A "0" value attempts to autocalibrate based on mclk_multiplier
106                                 *
107                                 *
108                                 *
109                                 *
110                                 * active_w = "";
111                                 * Pixel active region width
112                                 *
113                                 * active_h = "";
114                                 * Pixel active region height
115                                 *
116                                 * pixel_t = "";
117                                 * The sensor readout pixel pattern
118                                 * For eg - 10 bit bayer having 'bggr' pixel pattern has value "bayer_bggr"
119                                 *          12 bit bayer having 'bggr' pixel pattern has value "bayer_bggr12"
120                                 *          14 bit bayer having 'bggr' pixel pattern has value "bayer_bggr14"
121                                 *
122                                 * readout_orientation = "0";
123                                 * Based on camera module orientation.
124                                 * Only change readout_orientation if you specifically
125                                 * Program a different readout order for this mode
126                                 *
127                                 * line_length = "";
128                                 * Pixel line length (width) for sensor mode.
129                                 * This is used to calibrate features in our camera stack.
130                                 *
131                                 * mclk_multiplier = "";
132                                 * Multiplier to MCLK to help time hardware capture sequence
133                                 * TODO: Assign to PLL_Multiplier as well until fixed in core
134                                 *
135                                 * pix_clk_hz = "";
136                                 * Sensor pixel clock used for calculations like exposure and framerate
137                                 *
138                                 *
139                                 *
140                                 *
141                                 * inherent_gain = "";
142                                 * Gain obtained inherently from mode (ie. pixel binning)
143                                 *
144                                 * min_gain_val = ""; (floor to 6 decimal places)
145                                 * max_gain_val = ""; (floor to 6 decimal places)
146                                 * Gain limits for mode
147                                 *
148                                 * min_exp_time = ""; (ceil to integer)
149                                 * max_exp_time = ""; (ceil to integer)
150                                 * Exposure Time limits for mode (us)
151                                 *
152                                 *
153                                 * min_hdr_ratio = "";
154                                 * max_hdr_ratio = "";
155                                 * HDR Ratio limits for mode
156                                 *
157                                 * min_framerate = "";
158                                 * max_framerate = "";
159                                 * Framerate limits for mode (fps)
160                                 *
161                                 * embedded_metadata_height = "";
162                                 * Sensor embedded metadata height in units of rows.
163                                 * If sensor does not support embedded metadata value should be 0.
164                                 */
165
166                                 mode0 { // OV23850_MODE_5632X4224
167                                         mclk_khz = "24000";
168                                         num_lanes = "4";
169                                         tegra_sinterface = "serial_a";
170                                         discontinuous_clk = "no";
171                                         dpcm_enable = "false";
172                                         cil_settletime = "0";
173
174                                         active_w = "5632";
175                                         active_h = "4224";
176                                         pixel_t = "bayer_bggr";
177                                         readout_orientation = "270";
178                                         line_length = "7200";
179                                         inherent_gain = "1";
180                                         mclk_multiplier = "31.25";
181                                         pix_clk_hz = "750000000";
182
183                                         min_gain_val = "1.0";
184                                         max_gain_val = "15.5";
185                                         min_hdr_ratio = "1";
186                                         max_hdr_ratio = "64";
187                                         min_framerate = "3.179011";
188                                         max_framerate = "21";
189                                         min_exp_time = "20";
190                                         max_exp_time = "314256";
191                                         embedded_metadata_height = "0";
192                                 };
193
194                                 mode1 { // OV23850_MODE_5632X3168
195                                         mclk_khz = "24000";
196                                         num_lanes = "4";
197                                         tegra_sinterface = "serial_a";
198                                         discontinuous_clk = "no";
199                                         dpcm_enable = "false";
200                                         cil_settletime = "0";
201
202                                         active_w = "5632";
203                                         active_h = "3168";
204                                         pixel_t = "bayer_bggr";
205                                         readout_orientation = "270";
206                                         line_length = "7108";
207                                         inherent_gain = "1";
208                                         mclk_multiplier = "31.25";
209                                         pix_clk_hz = "750000000";
210
211                                         min_gain_val = "1.0";
212                                         max_gain_val = "15.5";
213                                         min_hdr_ratio = "1";
214                                         max_hdr_ratio = "64";
215                                         min_framerate = "3.220157";
216                                         max_framerate = "30";
217                                         min_exp_time = "19";
218                                         max_exp_time = "310241";
219                                         embedded_metadata_height = "0";
220                                 };
221                                 ports {
222                                         #address-cells = <1>;
223                                         #size-cells = <0>;
224
225                                         port@0 {
226                                                 reg = <0>;
227                                                 ov23850_out0: endpoint {
228                                                         csi-port = <0>;
229                                                         bus-width = <4>;
230                                                         remote-endpoint = <&e3323_vi_in0>;
231                                                 };
232                                         };
233                                 };
234                         };
235                         lc898212@72 {
236                                 compatible = "nvidia,lc898212";
237                                 reg = <0x72>;
238
239                                 /* physical camera layer interface tags */
240                                 devnode = "video2";
241                                 /**
242                                 * Type specifies the control features supported by
243                                 * the focuser driver.
244                                 * default type means only position control setting
245                                 * supported by the focuser
246                                 */
247                                 type = "default";
248                                 min_focus_distance = "10.0"; /* 1.0f/0.1f */
249                                 hyper_focal = "0.2"; /* 1.0f/5.0f */
250                                 focal_length = "4.73";
251                                 f_number = "2.2";
252                                 aperture = "2.2";
253                                 support_mfi = "true";
254
255                                 ports {
256                                         #address-cells = <1>;
257                                         #size-cells = <0>;
258                                         port@0 {
259                                                 reg = <0>;
260                                                 lc898212_out0: endpoint {
261                                                         remote-endpoint = <&e3323_vi_in2>;
262                                                 };
263                                         };
264                                 };
265                         };
266                 };
267         };
268
269         i2c@7000c000 {
270                 ov23850_c@36 {
271                         compatible = "nvidia,ov23850";
272
273                         reg = <0x36>;
274                         /* Physical dimensions of sensor */
275                         physical_w = "7.3998";
276                         physical_h = "5.5998";
277
278                         /* Sensor Model */
279                         sensor_model ="ov23850";
280
281                         /* Define any required hw resources needed by driver */
282                         /* ie. clocks, io pins, power sources */
283                         avdd-reg = "vana";
284                         dvdd-reg = "vdig";
285                         iovdd-reg = "vif";
286                         vcmvdd-reg = "vvcm";
287                         devnode = "video1";
288
289                         /* Defines number of frames to be dropped by driver internally after applying */
290                         /* sensor crop settings. Some sensors send corrupt frames after applying */
291                         /* crop co-ordinates */
292                         post_crop_frame_drop = "0";
293
294                         mode0 { // OV23850_MODE_5632X4224
295                                 mclk_khz = "24000";
296                                 num_lanes = "4";
297                                 tegra_sinterface = "serial_c";
298                                 discontinuous_clk = "no";
299                                 dpcm_enable = "false";
300                                 cil_settletime = "0";
301
302                                 active_w = "5632";
303                                 active_h = "4224";
304                                 pixel_t = "bayer_bggr";
305                                 readout_orientation = "270";
306                                 line_length = "7200";
307                                 inherent_gain = "1";
308                                 mclk_multiplier = "31.25";
309                                 pix_clk_hz = "750000000";
310
311                                 min_gain_val = "1.0";
312                                 max_gain_val = "15.5";
313                                 min_hdr_ratio = "1";
314                                 max_hdr_ratio = "64";
315                                 min_framerate = "3.179011";
316                                 max_framerate = "20";
317                                 min_exp_time = "20";
318                                 max_exp_time = "314256";
319                                 embedded_metadata_height = "0";
320                         };
321
322                         mode1 { // OV23850_MODE_5632X3168
323                                 mclk_khz = "24000";
324                                 num_lanes = "4";
325                                 tegra_sinterface = "serial_c";
326                                 discontinuous_clk = "no";
327                                 dpcm_enable = "false";
328                                 cil_settletime = "0";
329
330                                 active_w = "5632";
331                                 active_h = "3168";
332                                 pixel_t = "bayer_bggr";
333                                 readout_orientation = "270";
334                                 line_length = "7108";
335                                 inherent_gain = "1";
336                                 mclk_multiplier = "31.25";
337                                 pix_clk_hz = "750000000";
338
339                                 min_gain_val = "1.0";
340                                 max_gain_val = "15.5";
341                                 min_hdr_ratio = "1";
342                                 max_hdr_ratio = "64";
343                                 min_framerate = "3.220157";
344                                 max_framerate = "30";
345                                 min_exp_time = "19";
346                                 max_exp_time = "310467";
347                                 embedded_metadata_height = "0";
348                         };
349                         ports {
350                                 #address-cells = <1>;
351                                 #size-cells = <0>;
352
353                                 port@0 {
354                                         reg = <0>;
355                                         ov23850_out1: endpoint {
356                                                 csi-port = <2>;
357                                                 bus-width = <4>;
358                                                 remote-endpoint = <&e3323_vi_in1>;
359                                         };
360                                 };
361                         };
362                 };
363                 lc898212@72 {
364                         compatible = "nvidia,lc898212";
365                         reg = <0x72>;
366
367                         /* physical camera layer interface tags */
368                         devnode = "video3";
369                         type = "default";
370                         min_focus_distance = "10.0"; /* 1.0f/0.1f */
371                         hyper_focal = "0.2"; /* 1.0f/5.0f */
372                         focal_length = "4.73";
373                         f_number = "2.2";
374                         aperture = "2.2";
375                         support_mfi = "true";
376
377                         ports {
378                                 #address-cells = <1>;
379                                 #size-cells = <0>;
380                                 port@0 {
381                                         reg = <0>;
382                                         lc898212_out1: endpoint {
383                                                 remote-endpoint = <&e3323_vi_in3>;
384                                         };
385                                 };
386                         };
387                 };
388         };
389
390         tegra-camera-platform {
391                 compatible = "nvidia, tegra-camera-platform";
392
393                 /**
394                 * The general guideline for naming badge_info contains 3 parts, and is as follows,
395                 * The first part is the camera_board_id for the module; if the module is in a FFD
396                 * platform, then use the platform name for this part.
397                 * The second part contains the position of the module, ex. “rear” or “front”.
398                 * The third part contains the last 6 characters of a part number which is found
399                 * in the module's specsheet from the vender.
400                 */
401                 modules {
402                         module0 {
403                                 badge = "e3323_bottom_CH06P1";
404                                 position = "bottom";
405                                 orientation = "3";
406                                 drivernode0 {
407                                         /* Declare PCL support driver (classically known as guid)  */
408                                         pcl_id = "v4l2_sensor";
409                                         /* Declare the device-tree hierarchy to driver instance */
410                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/ov23850_a@10";
411                                 };
412                                 drivernode1 {
413                                         /* Declare PCL support driver (classically known as guid)  */
414                                         pcl_id = "v4l2_focuser";
415                                         /* Declare the device-tree hierarchy to driver instance */
416                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/lc898212@72";
417                                 };
418                         };
419                         module1 {
420                                 badge = "e3323_top_CH06P1";
421                                 position = "top";
422                                 orientation = "3";
423                                 drivernode0 {
424                                         /* Declare PCL support driver (classically known as guid)  */
425                                         pcl_id = "v4l2_sensor";
426                                         /* Declare the device-tree hierarchy to driver instance */
427                                         proc-device-tree = "/proc/device-tree/i2c@7000c000/ov23850_c@36";
428                                 };
429                                 drivernode1 {
430                                         /* Declare PCL support driver (classically known as guid)  */
431                                         pcl_id = "v4l2_focuser";
432                                         /* Declare the device-tree hierarchy to driver instance */
433                                         proc-device-tree = "/proc/device-tree/i2c@7000c000/lc898212@72";
434                                 };
435                         };
436                 };
437         };
438 };