arch: arm64: boot: dts: T210 camera devnames
[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
78                                 /* Defines number of frames to be dropped by driver internally after applying */
79                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
80                                 /* crop co-ordinates */
81                                 post_crop_frame_drop = "0";
82
83                                 /**
84                                 * A modeX node is required to support v4l2 driver
85                                 * implementation with NVIDIA camera software stack
86                                 *
87                                 * mclk_khz = "";
88                                 * Standard MIPI driving clock, typically 24MHz
89                                 *
90                                 * num_lanes = "";
91                                 * Number of lane channels sensor is programmed to output
92                                 *
93                                 * tegra_sinterface = "";
94                                 * The base tegra serial interface lanes are connected to
95                                 *
96                                 * discontinuous_clk = "";
97                                 * The sensor is programmed to use a discontinuous clock on MIPI lanes
98                                 *
99                                 * dpcm_enable = "true";
100                                 * The sensor is programmed to use a DPCM modes
101                                 *
102                                 * cil_settletime = "";
103                                 * MIPI lane settle time value.
104                                 * A "0" value attempts to autocalibrate based on mclk_multiplier
105                                 *
106                                 *
107                                 *
108                                 *
109                                 * active_w = "";
110                                 * Pixel active region width
111                                 *
112                                 * active_h = "";
113                                 * Pixel active region height
114                                 *
115                                 * pixel_t = "";
116                                 * The sensor readout pixel pattern
117                                 * For eg - 10 bit bayer having 'bggr' pixel pattern has value "bayer_bggr"
118                                 *          12 bit bayer having 'bggr' pixel pattern has value "bayer_bggr12"
119                                 *          14 bit bayer having 'bggr' pixel pattern has value "bayer_bggr14"
120                                 *
121                                 * readout_orientation = "0";
122                                 * Based on camera module orientation.
123                                 * Only change readout_orientation if you specifically
124                                 * Program a different readout order for this mode
125                                 *
126                                 * line_length = "";
127                                 * Pixel line length (width) for sensor mode.
128                                 * This is used to calibrate features in our camera stack.
129                                 *
130                                 * mclk_multiplier = "";
131                                 * Multiplier to MCLK to help time hardware capture sequence
132                                 * TODO: Assign to PLL_Multiplier as well until fixed in core
133                                 *
134                                 * pix_clk_hz = "";
135                                 * Sensor pixel clock used for calculations like exposure and framerate
136                                 *
137                                 *
138                                 *
139                                 *
140                                 * inherent_gain = "";
141                                 * Gain obtained inherently from mode (ie. pixel binning)
142                                 *
143                                 * min_gain_val = ""; (floor to 6 decimal places)
144                                 * max_gain_val = ""; (floor to 6 decimal places)
145                                 * Gain limits for mode
146                                 *
147                                 * min_exp_time = ""; (ceil to integer)
148                                 * max_exp_time = ""; (ceil to integer)
149                                 * Exposure Time limits for mode (us)
150                                 *
151                                 *
152                                 * min_hdr_ratio = "";
153                                 * max_hdr_ratio = "";
154                                 * HDR Ratio limits for mode
155                                 *
156                                 * min_framerate = "";
157                                 * max_framerate = "";
158                                 * Framerate limits for mode (fps)
159                                 *
160                                 * embedded_metadata_height = "";
161                                 * Sensor embedded metadata height in units of rows.
162                                 * If sensor does not support embedded metadata value should be 0.
163                                 */
164
165                                 mode0 { // OV23850_MODE_5632X4224
166                                         mclk_khz = "24000";
167                                         num_lanes = "4";
168                                         tegra_sinterface = "serial_a";
169                                         discontinuous_clk = "no";
170                                         dpcm_enable = "false";
171                                         cil_settletime = "0";
172
173                                         active_w = "5632";
174                                         active_h = "4224";
175                                         pixel_t = "bayer_bggr";
176                                         readout_orientation = "270";
177                                         line_length = "7200";
178                                         inherent_gain = "1";
179                                         mclk_multiplier = "31.25";
180                                         pix_clk_hz = "750000000";
181
182                                         min_gain_val = "1.0";
183                                         max_gain_val = "15.5";
184                                         min_hdr_ratio = "1";
185                                         max_hdr_ratio = "64";
186                                         min_framerate = "3.179011";
187                                         max_framerate = "21";
188                                         min_exp_time = "20";
189                                         max_exp_time = "314256";
190                                         embedded_metadata_height = "0";
191                                 };
192
193                                 mode1 { // OV23850_MODE_5632X3168
194                                         mclk_khz = "24000";
195                                         num_lanes = "4";
196                                         tegra_sinterface = "serial_a";
197                                         discontinuous_clk = "no";
198                                         dpcm_enable = "false";
199                                         cil_settletime = "0";
200
201                                         active_w = "5632";
202                                         active_h = "3168";
203                                         pixel_t = "bayer_bggr";
204                                         readout_orientation = "270";
205                                         line_length = "7108";
206                                         inherent_gain = "1";
207                                         mclk_multiplier = "31.25";
208                                         pix_clk_hz = "750000000";
209
210                                         min_gain_val = "1.0";
211                                         max_gain_val = "15.5";
212                                         min_hdr_ratio = "1";
213                                         max_hdr_ratio = "64";
214                                         min_framerate = "3.220157";
215                                         max_framerate = "30";
216                                         min_exp_time = "19";
217                                         max_exp_time = "310241";
218                                         embedded_metadata_height = "0";
219                                 };
220                                 ports {
221                                         #address-cells = <1>;
222                                         #size-cells = <0>;
223
224                                         port@0 {
225                                                 reg = <0>;
226                                                 ov23850_out0: endpoint {
227                                                         csi-port = <0>;
228                                                         bus-width = <4>;
229                                                         remote-endpoint = <&e3323_vi_in0>;
230                                                 };
231                                         };
232                                 };
233                         };
234                         lc898212@72 {
235                                 compatible = "nvidia,lc898212";
236                                 reg = <0x72>;
237
238                                 /* physical camera layer interface tags */
239                                 /**
240                                 * Type specifies the control features supported by
241                                 * the focuser driver.
242                                 * default type means only position control setting
243                                 * supported by the focuser
244                                 */
245                                 type = "default";
246                                 min_focus_distance = "10.0"; /* 1.0f/0.1f */
247                                 hyper_focal = "0.2"; /* 1.0f/5.0f */
248                                 focal_length = "4.73";
249                                 f_number = "2.2";
250                                 aperture = "2.2";
251                                 support_mfi = "true";
252
253                                 ports {
254                                         #address-cells = <1>;
255                                         #size-cells = <0>;
256                                         port@0 {
257                                                 reg = <0>;
258                                                 lc898212_out0: endpoint {
259                                                         remote-endpoint = <&e3323_vi_in2>;
260                                                 };
261                                         };
262                                 };
263                         };
264                 };
265         };
266
267         i2c@7000c000 {
268                 ov23850_c@36 {
269                         compatible = "nvidia,ov23850";
270
271                         reg = <0x36>;
272                         /* Physical dimensions of sensor */
273                         physical_w = "7.3998";
274                         physical_h = "5.5998";
275
276                         /* Sensor Model */
277                         sensor_model ="ov23850";
278
279                         /* Define any required hw resources needed by driver */
280                         /* ie. clocks, io pins, power sources */
281                         avdd-reg = "vana";
282                         dvdd-reg = "vdig";
283                         iovdd-reg = "vif";
284                         vcmvdd-reg = "vvcm";
285
286                         /* Defines number of frames to be dropped by driver internally after applying */
287                         /* sensor crop settings. Some sensors send corrupt frames after applying */
288                         /* crop co-ordinates */
289                         post_crop_frame_drop = "0";
290
291                         mode0 { // OV23850_MODE_5632X4224
292                                 mclk_khz = "24000";
293                                 num_lanes = "4";
294                                 tegra_sinterface = "serial_c";
295                                 discontinuous_clk = "no";
296                                 dpcm_enable = "false";
297                                 cil_settletime = "0";
298
299                                 active_w = "5632";
300                                 active_h = "4224";
301                                 pixel_t = "bayer_bggr";
302                                 readout_orientation = "270";
303                                 line_length = "7200";
304                                 inherent_gain = "1";
305                                 mclk_multiplier = "31.25";
306                                 pix_clk_hz = "750000000";
307
308                                 min_gain_val = "1.0";
309                                 max_gain_val = "15.5";
310                                 min_hdr_ratio = "1";
311                                 max_hdr_ratio = "64";
312                                 min_framerate = "3.179011";
313                                 max_framerate = "20";
314                                 min_exp_time = "20";
315                                 max_exp_time = "314256";
316                                 embedded_metadata_height = "0";
317                         };
318
319                         mode1 { // OV23850_MODE_5632X3168
320                                 mclk_khz = "24000";
321                                 num_lanes = "4";
322                                 tegra_sinterface = "serial_c";
323                                 discontinuous_clk = "no";
324                                 dpcm_enable = "false";
325                                 cil_settletime = "0";
326
327                                 active_w = "5632";
328                                 active_h = "3168";
329                                 pixel_t = "bayer_bggr";
330                                 readout_orientation = "270";
331                                 line_length = "7108";
332                                 inherent_gain = "1";
333                                 mclk_multiplier = "31.25";
334                                 pix_clk_hz = "750000000";
335
336                                 min_gain_val = "1.0";
337                                 max_gain_val = "15.5";
338                                 min_hdr_ratio = "1";
339                                 max_hdr_ratio = "64";
340                                 min_framerate = "3.220157";
341                                 max_framerate = "30";
342                                 min_exp_time = "19";
343                                 max_exp_time = "310467";
344                                 embedded_metadata_height = "0";
345                         };
346                         ports {
347                                 #address-cells = <1>;
348                                 #size-cells = <0>;
349
350                                 port@0 {
351                                         reg = <0>;
352                                         ov23850_out1: endpoint {
353                                                 csi-port = <2>;
354                                                 bus-width = <4>;
355                                                 remote-endpoint = <&e3323_vi_in1>;
356                                         };
357                                 };
358                         };
359                 };
360                 lc898212@72 {
361                         compatible = "nvidia,lc898212";
362                         reg = <0x72>;
363
364                         /* physical camera layer interface tags */
365                         type = "default";
366                         min_focus_distance = "10.0"; /* 1.0f/0.1f */
367                         hyper_focal = "0.2"; /* 1.0f/5.0f */
368                         focal_length = "4.73";
369                         f_number = "2.2";
370                         aperture = "2.2";
371                         support_mfi = "true";
372
373                         ports {
374                                 #address-cells = <1>;
375                                 #size-cells = <0>;
376                                 port@0 {
377                                         reg = <0>;
378                                         lc898212_out1: endpoint {
379                                                 remote-endpoint = <&e3323_vi_in3>;
380                                         };
381                                 };
382                         };
383                 };
384         };
385
386         tegra-camera-platform {
387                 compatible = "nvidia, tegra-camera-platform";
388
389                 /**
390                 * The general guideline for naming badge_info contains 3 parts, and is as follows,
391                 * The first part is the camera_board_id for the module; if the module is in a FFD
392                 * platform, then use the platform name for this part.
393                 * The second part contains the position of the module, ex. “rear” or “front”.
394                 * The third part contains the last 6 characters of a part number which is found
395                 * in the module's specsheet from the vender.
396                 */
397                 modules {
398                         module0 {
399                                 badge = "e3323_bottom_CH06P1";
400                                 position = "bottom";
401                                 orientation = "3";
402                                 drivernode0 {
403                                         /* Declare PCL support driver (classically known as guid)  */
404                                         pcl_id = "v4l2_sensor";
405                                         /* Driver's v4l2 device name */
406                                         devname = "ov23850 6-0010";
407                                         /* Declare the device-tree hierarchy to driver instance */
408                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/ov23850_a@10";
409                                 };
410                                 drivernode1 {
411                                         /* Declare PCL support driver (classically known as guid)  */
412                                         pcl_id = "v4l2_focuser";
413                                         /* Driver's v4l2 device name */
414                                         devname = "lc898212 6-0072";
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                                         /* Driver's v4l2 device name */
427                                         devname = "ov23850 0-0036";
428                                         /* Declare the device-tree hierarchy to driver instance */
429                                         proc-device-tree = "/proc/device-tree/i2c@7000c000/ov23850_c@36";
430                                 };
431                                 drivernode1 {
432                                         /* Declare PCL support driver (classically known as guid)  */
433                                         pcl_id = "v4l2_focuser";
434                                         /* Driver's v4l2 device name */
435                                         devname = "lc898212 0-0072";
436                                         /* Declare the device-tree hierarchy to driver instance */
437                                         proc-device-tree = "/proc/device-tree/i2c@7000c000/lc898212@72";
438                                 };
439                         };
440                 };
441         };
442 };