driver: media: tegra: Update tegra camera_common
[linux-3.10.git] / arch / arm64 / boot / dts / tegra210-platforms / tegra210-jetson-e-camera-p2530-0930-e03.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 #define CAM_I2C_BUS     2
22 #define VI_I2C_BUS      6
23
24 /* generally used camera control gpio definitions and aliases*/
25 #define CAM_RST         TEGRA_GPIO(S, 4)
26 #define CAM_AF_EN       TEGRA_GPIO(S, 5)
27 #define CAM_FLASH_EN    TEGRA_GPIO(S, 6)
28 #define CAM_PWDN_RQ     TEGRA_GPIO(S, 7)
29 #define CAM_PWDN_FQ     TEGRA_GPIO(T, 0)
30 #define CAM_STROBE_EN   TEGRA_GPIO(T, 1)
31 /* alias */
32 #define CAM_PWDN_AF     CAM_AF_EN
33 #define CAMFI_PWDN      CAM_STROBE_EN
34 #define CAMRI_PWDN      CAM_STROBE_EN
35
36 /* specifically used on camera board designs */
37 /* NxOV10823 general */
38
39 #define OV10823_SID_CAM1        CAMRI_PWDN      /*PT1*/
40 #define OV10823_SID_CAM2        CAM_AF_EN       /*PS5*/
41 #define OV10823_SID_CAM3        CAM_PWDN_FQ     /*PT0*/
42
43 #define OV10823_DEFAULT_I2C_ADDR_SID_LOW        (0x10)
44 #define OV10823_DEFAULT_I2C_ADDR_SID_HIGH       (0x36)
45 #define OV10823_SENSOR_REG_RW_SID_LOW           (0x300c)
46 #define OV10823_SENSOR_REG_RW_SID_HIGH          (0x3661)
47
48 #define OV10823_I2C_ADDR_CAM1   (0x20)
49 #define OV10823_I2C_ADDR_CAM2   (0x22)
50 #define OV10823_I2C_ADDR_CAM3   (0x24)
51
52 /* ov10823 board specific */
53 #define OV10823_USE_OSC_FOR_MCLK        (1)
54 #define OV10823_NEED_I2C_RECOVERY       (0)
55
56 #define FIRST_CAM_POS (0)
57 #define SECOND_CAM_POS (1)
58 #define THIRD_CAM_POS (2)
59
60 / {
61         host1x {
62                 vi {
63                         num-channels = <2>;
64                         ports {
65                                 #address-cells = <1>;
66                                 #size-cells = <0>;
67                                 port@0 {
68                                         reg = <0>;
69                                         vi_in0: endpoint {
70                                                 remote-endpoint = <&ov5693_out0>;
71                                         };
72                                 };
73                                 port@1 {
74                                         reg = <1>;
75                                         vi_in1: endpoint {
76                                                 remote-endpoint = <&ov5693_out1>;
77                                         };
78                                 };
79                         };
80                 };
81
82                 i2c@546c0000 {
83                         status = "okay";
84                         #address-cells = <1>;
85                         #size-cells = <0>;
86                         ov5693_a@10 {
87                                 compatible = "nvidia,ov5693";
88                                 /* I2C device address */
89                                 reg = <0x10>;
90
91                                 /* V4L2 device node location */
92                                 devnode = "video0";
93
94                                 /* Physical dimensions of sensor */
95                                 physical_w = "3.674";
96                                 physical_h = "2.738";
97
98                                 /* Sensor Model */
99                                 sensor_model ="ov5693";
100
101                                 /* Define any required hw resources needed by driver */
102                                 /* ie. clocks, io pins, power sources */
103                                 avdd-reg = "vana";
104                                 iovdd-reg = "vif";
105
106                                 /* Define any required hw resources needed by driver */
107                                 /* ie. clocks, io pins, power sources */
108                                 /* mclk-index indicates the index of the */
109                                 /* mclk-name with in the clock-names array */
110
111                                 clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
112                                 clock-names = "mclk";
113                                 clock-frequency = <24000000>;
114
115                                 mclk = "cam_mclk1";
116                                 pwdn-gpios = <&gpio CAM_PWDN_RQ GPIO_ACTIVE_HIGH>;
117                                 vana-supply = <&max77620_ldo3>;
118                                 vif-supply = <&en_vdd_cam>;
119
120                                 /* Defines number of frames to be dropped by driver internally after applying */
121                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
122                                 /* crop co-ordinates */
123                                 post_crop_frame_drop = "0";
124
125                                 /**
126                                 * A modeX node is required to support v4l2 driver
127                                 * implementation with NVIDIA camera software stack
128                                 *
129                                 * mclk_khz = "";
130                                 * Standard MIPI driving clock, typically 24MHz
131                                 *
132                                 * num_lanes = "";
133                                 * Number of lane channels sensor is programmed to output
134                                 *
135                                 * tegra_sinterface = "";
136                                 * The base tegra serial interface lanes are connected to
137                                 *
138                                 * discontinuous_clk = "";
139                                 * The sensor is programmed to use a discontinuous clock on MIPI lanes
140                                 *
141                                 * dpcm_enable = "true";
142                                 * The sensor is programmed to use a DPCM modes
143                                 *
144                                 * cil_settletime = "";
145                                 * MIPI lane settle time value.
146                                 * A "0" value attempts to autocalibrate based on mclk_multiplier
147                                 *
148                                 *
149                                 *
150                                 *
151                                 * active_w = "";
152                                 * Pixel active region width
153                                 *
154                                 * active_h = "";
155                                 * Pixel active region height
156                                 *
157                                 * pixel_t = "";
158                                 * The sensor readout pixel pattern
159                                 * For eg - 10 bit bayer having 'bggr' pixel pattern has value "bayer_bggr"
160                                 *          12 bit bayer having 'bggr' pixel pattern has value "bayer_bggr12"
161                                 *          14 bit bayer having 'bggr' pixel pattern has value "bayer_bggr14"
162                                 *
163                                 * readout_orientation = "0";
164                                 * Based on camera module orientation.
165                                 * Only change readout_orientation if you specifically
166                                 * Program a different readout order for this mode
167                                 *
168                                 * line_length = "";
169                                 * Pixel line length (width) for sensor mode.
170                                 * This is used to calibrate features in our camera stack.
171                                 *
172                                 * mclk_multiplier = "";
173                                 * Multiplier to MCLK to help time hardware capture sequence
174                                 * TODO: Assign to PLL_Multiplier as well until fixed in core
175                                 *
176                                 * pix_clk_hz = "";
177                                 * Sensor pixel clock used for calculations like exposure and framerate
178                                 *
179                                 *
180                                 *
181                                 *
182                                 * inherent_gain = "";
183                                 * Gain obtained inherently from mode (ie. pixel binning)
184                                 *
185                                 * min_gain_val = ""; (floor to 6 decimal places)
186                                 * max_gain_val = ""; (floor to 6 decimal places)
187                                 * Gain limits for mode
188                                 *
189                                 * min_exp_time = ""; (ceil to integer)
190                                 * max_exp_time = ""; (ceil to integer)
191                                 * Exposure Time limits for mode (us)
192                                 *
193                                 *
194                                 * min_hdr_ratio = "";
195                                 * max_hdr_ratio = "";
196                                 * HDR Ratio limits for mode
197                                 *
198                                 * min_framerate = "";
199                                 * max_framerate = "";
200                                 * Framerate limits for mode (fps)
201                                 *
202                                 * embedded_metadata_height = "";
203                                 * Sensor embedded metadata height in units of rows.
204                                 * If sensor does not support embedded metadata value should be 0.
205                                 */
206                                 mode0 { // OV5693_MODE_2592X1944
207                                         mclk_khz = "24000";
208                                         num_lanes = "2";
209                                         tegra_sinterface = "serial_a";
210                                         discontinuous_clk = "no";
211                                         dpcm_enable = "false";
212                                         cil_settletime = "0";
213
214                                         active_w = "2592";
215                                         active_h = "1944";
216                                         pixel_t = "bayer_bggr";
217                                         readout_orientation = "90";
218                                         line_length = "2688";
219                                         inherent_gain = "1";
220                                         mclk_multiplier = "17.0";
221                                         pix_clk_hz = "160000000";
222
223                                         min_gain_val = "1.0";
224                                         max_gain_val = "16";
225                                         min_hdr_ratio = "1";
226                                         max_hdr_ratio = "64";
227                                         min_framerate = "1.816577";
228                                         max_framerate = "30";
229                                         min_exp_time = "34";
230                                         max_exp_time = "550385";
231                                         embedded_metadata_height = "0";
232                                 };
233
234                                 mode1 { //OV5693_MODE_2592X1458
235                                         mclk_khz = "24000";
236                                         num_lanes = "2";
237                                         tegra_sinterface = "serial_a";
238                                         discontinuous_clk = "no";
239                                         dpcm_enable = "false";
240                                         cil_settletime = "0";
241
242                                         active_w = "2592";
243                                         active_h = "1458";
244                                         pixel_t = "bayer_bggr";
245                                         readout_orientation = "90";
246                                         line_length = "2688";
247                                         inherent_gain = "1";
248                                         mclk_multiplier = "17.0";
249                                         pix_clk_hz = "160000000";
250
251                                         min_gain_val = "1.0";
252                                         max_gain_val = "16";
253                                         min_hdr_ratio = "1";
254                                         max_hdr_ratio = "64";
255                                         min_framerate = "1.816577";
256                                         max_framerate = "30";
257                                         min_exp_time = "34";
258                                         max_exp_time = "550385";
259                                         embedded_metadata_height = "0";
260                                 };
261
262                                 mode2 { //OV5693_MODE_1280X720
263                                         mclk_khz = "24000";
264                                         num_lanes = "2";
265                                         tegra_sinterface = "serial_a";
266                                         discontinuous_clk = "no";
267                                         dpcm_enable = "false";
268                                         cil_settletime = "0";
269
270                                         active_w = "1280";
271                                         active_h = "720";
272                                         pixel_t = "bayer_bggr";
273                                         readout_orientation = "90";
274                                         line_length = "1752";
275                                         inherent_gain = "1";
276                                         mclk_multiplier = "17.0";
277                                         pix_clk_hz = "160000000";
278
279                                         min_gain_val = "1.0";
280                                         max_gain_val = "16";
281                                         min_hdr_ratio = "1";
282                                         max_hdr_ratio = "64";
283                                         min_framerate = "2.787078";
284                                         max_framerate = "120";
285                                         min_exp_time = "22";
286                                         max_exp_time = "358733";
287                                         embedded_metadata_height = "0";
288                                 };
289
290                                 // HDR Modes
291                                 mode3 { //OV5693_MODE_2592X1944_HDR
292                                         mclk_khz = "24000";
293                                         num_lanes = "2";
294                                         tegra_sinterface = "serial_a";
295                                         discontinuous_clk = "no";
296                                         dpcm_enable = "false";
297                                         cil_settletime = "0";
298
299                                         active_w = "2592";
300                                         active_h = "1944";
301                                         pixel_t = "hdr_bggr";
302                                         readout_orientation = "90";
303                                         line_length = "3696";
304                                         inherent_gain = "1";
305                                         mclk_multiplier = "19.0";
306                                         pix_clk_hz = "176000000";
307
308                                         min_gain_val = "1.0";
309                                         max_gain_val = "16";
310                                         min_hdr_ratio = "1";
311                                         max_hdr_ratio = "64";
312                                         min_framerate = "1.453262";
313                                         max_framerate = "24";
314                                         min_exp_time = "42";
315                                         max_exp_time = "687981";
316                                         embedded_metadata_height = "0";
317                                 };
318
319                                 ports {
320                                         #address-cells = <1>;
321                                         #size-cells = <0>;
322
323                                         port@0 {
324                                                 reg = <0>;
325                                                 ov5693_out0: endpoint {
326                                                         csi-port = <0>;
327                                                         bus-width = <2>;
328                                                         remote-endpoint = <&vi_in0>;
329                                                 };
330                                         };
331                                 };
332                         };
333
334                         ov5693_c@36 {
335                                 compatible = "nvidia,ov5693";
336                                 /* I2C device address */
337                                 reg = <0x36>;
338
339                                 /* V4L2 device node location */
340                                 devnode = "video1";
341
342                                 /* Physical dimensions of sensor */
343                                 physical_w = "3.674";
344                                 physical_h = "2.738";
345
346                                 /* Sensor Model */
347                                 sensor_model ="ov5693";
348
349                                 /* Define any required hw resources needed by driver */
350                                 /* ie. clocks, io pins, power sources */
351                                 avdd-reg = "vana";
352                                 iovdd-reg = "vif";
353
354
355                                 /* Define any required hw resources needed by driver */
356                                 /* ie. clocks, io pins, power sources */
357                                 /* mclk-index indicates the index of the */
358                                 /* mclk-name with in the clock-names array */
359
360                                 clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
361                                 clock-names = "mclk";
362                                 clock-frequency = <24000000>;
363
364                                 mclk = "cam_mclk1";
365                                 pwdn-gpios = <&gpio CAM_PWDN_FQ GPIO_ACTIVE_HIGH>;
366                                 vana-supply = <&max77620_ldo3>;
367                                 vif-supply = <&en_vdd_cam>;
368
369                                 /* Defines number of frames to be dropped by driver internally after applying */
370                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
371                                 /* crop co-ordinates */
372                                 post_crop_frame_drop = "0";
373
374                                 /**
375                                 * A modeX node is required to support v4l2 driver
376                                 * implementation with NVIDIA camera software stack
377                                 *
378                                 * mclk_khz = "";
379                                 * Standard MIPI driving clock, typically 24MHz
380                                 *
381                                 * num_lanes = "";
382                                 * Number of lane channels sensor is programmed to output
383                                 *
384                                 * tegra_sinterface = "";
385                                 * The base tegra serial interface lanes are connected to
386                                 *
387                                 * discontinuous_clk = "";
388                                 * The sensor is programmed to use a discontinuous clock on MIPI lanes
389                                 *
390                                 * dpcm_enable = "true";
391                                 * The sensor is programmed to use a DPCM modes
392                                 *
393                                 * cil_settletime = "";
394                                 * MIPI lane settle time value.
395                                 * A "0" value attempts to autocalibrate based on mclk_multiplier
396                                 *
397                                 *
398                                 *
399                                 *
400                                 * active_w = "";
401                                 * Pixel active region width
402                                 *
403                                 * active_h = "";
404                                 * Pixel active region height
405                                 *
406                                 * pixel_t = "";
407                                 * The sensor readout pixel pattern
408                                 * For eg - 10 bit bayer having 'bggr' pixel pattern has value "bayer_bggr"
409                                 *          12 bit bayer having 'bggr' pixel pattern has value "bayer_bggr12"
410                                 *          14 bit bayer having 'bggr' pixel pattern has value "bayer_bggr14"
411                                 *
412                                 * readout_orientation = "0";
413                                 * Based on camera module orientation.
414                                 * Only change readout_orientation if you specifically
415                                 * Program a different readout order for this mode
416                                 *
417                                 * line_length = "";
418                                 * Pixel line length (width) for sensor mode.
419                                 * This is used to calibrate features in our camera stack.
420                                 *
421                                 * mclk_multiplier = "";
422                                 * Multiplier to MCLK to help time hardware capture sequence
423                                 * TODO: Assign to PLL_Multiplier as well until fixed in core
424                                 *
425                                 * pix_clk_hz = "";
426                                 * Sensor pixel clock used for calculations like exposure and framerate
427                                 *
428                                 *
429                                 *
430                                 *
431                                 * inherent_gain = "";
432                                 * Gain obtained inherently from mode (ie. pixel binning)
433                                 *
434                                 * min_gain_val = ""; (floor to 6 decimal places)
435                                 * max_gain_val = ""; (floor to 6 decimal places)
436                                 * Gain limits for mode
437                                 *
438                                 * min_exp_time = ""; (ceil to integer)
439                                 * max_exp_time = ""; (ceil to integer)
440                                 * Exposure Time limits for mode (us)
441                                 *
442                                 *
443                                 * min_hdr_ratio = "";
444                                 * max_hdr_ratio = "";
445                                 * HDR Ratio limits for mode
446                                 *
447                                 * min_framerate = "";
448                                 * max_framerate = "";
449                                 * Framerate limits for mode (fps)
450                                 *
451                                 * embedded_metadata_height = "";
452                                 * Sensor embedded metadata height in units of rows.
453                                 * If sensor does not support embedded metadata value should be 0.
454                                 */
455                                 mode0 { // OV5693_MODE_2592X1944
456                                         mclk_khz = "24000";
457                                         num_lanes = "2";
458                                         tegra_sinterface = "serial_c";
459                                         discontinuous_clk = "no";
460                                         dpcm_enable = "false";
461                                         cil_settletime = "0";
462
463                                         active_w = "2592";
464                                         active_h = "1944";
465                                         pixel_t = "bayer_bggr";
466                                         readout_orientation = "90";
467                                         line_length = "2688";
468                                         inherent_gain = "1";
469                                         mclk_multiplier = "6.67";
470                                         pix_clk_hz = "160000000";
471
472                                         min_gain_val = "1.0";
473                                         max_gain_val = "16";
474                                         min_hdr_ratio = "1";
475                                         max_hdr_ratio = "64";
476                                         min_framerate = "1.816577";
477                                         max_framerate = "30";
478                                         min_exp_time = "34";
479                                         max_exp_time = "550385";
480                                         embedded_metadata_height = "0";
481                                 };
482
483                                 mode1 { //OV5693_MODE_2592X1458
484                                         mclk_khz = "24000";
485                                         num_lanes = "2";
486                                         tegra_sinterface = "serial_c";
487                                         discontinuous_clk = "no";
488                                         dpcm_enable = "false";
489                                         cil_settletime = "0";
490
491                                         active_w = "2592";
492                                         active_h = "1458";
493                                         pixel_t = "bayer_bggr";
494                                         readout_orientation = "90";
495                                         line_length = "2688";
496                                         inherent_gain = "1";
497                                         mclk_multiplier = "6.67";
498                                         pix_clk_hz = "160000000";
499
500                                         min_gain_val = "1.0";
501                                         max_gain_val = "16";
502                                         min_hdr_ratio = "1";
503                                         max_hdr_ratio = "64";
504                                         min_framerate = "1.816577";
505                                         max_framerate = "30";
506                                         min_exp_time = "34";
507                                         max_exp_time = "550385";
508                                 };
509
510                                 mode2 { //OV5693_MODE_1280X720
511                                         mclk_khz = "24000";
512                                         num_lanes = "2";
513                                         tegra_sinterface = "serial_c";
514                                         discontinuous_clk = "no";
515                                         dpcm_enable = "false";
516                                         cil_settletime = "0";
517
518                                         active_w = "1280";
519                                         active_h = "720";
520                                         pixel_t = "bayer_bggr";
521                                         readout_orientation = "90";
522                                         line_length = "1752";
523                                         inherent_gain = "1";
524                                         mclk_multiplier = "6.67";
525                                         pix_clk_hz = "160000000";
526
527                                         min_gain_val = "1.0";
528                                         max_gain_val = "16";
529                                         min_hdr_ratio = "1";
530                                         max_hdr_ratio = "64";
531                                         min_framerate = "2.787078";
532                                         max_framerate = "120";
533                                         min_exp_time = "22";
534                                         max_exp_time = "358733";
535                                         embedded_metadata_height = "0";
536                                 };
537
538                                 // HDR Modes
539                                 mode3 { //OV5693_MODE_2592X1944_HDR
540                                         mclk_khz = "24000";
541                                         num_lanes = "2";
542                                         tegra_sinterface = "serial_c";
543                                         discontinuous_clk = "no";
544                                         dpcm_enable = "false";
545                                         cil_settletime = "0";
546
547                                         active_w = "2592";
548                                         active_h = "1944";
549                                         pixel_t = "hdr_bggr";
550                                         readout_orientation = "90";
551                                         line_length = "3696";
552                                         inherent_gain = "1";
553                                         mclk_multiplier = "7.33";
554                                         pix_clk_hz = "176000000";
555
556                                         min_gain_val = "1.0";
557                                         max_gain_val = "16";
558                                         min_hdr_ratio = "1";
559                                         max_hdr_ratio = "64";
560                                         min_framerate = "1.453262";
561                                         max_framerate = "24";
562                                         min_exp_time = "42";
563                                         max_exp_time = "687981";
564                                         embedded_metadata_height = "0";
565                                 };
566
567                                 ports {
568                                         #address-cells = <1>;
569                                         #size-cells = <0>;
570
571                                         port@0 {
572                                                 reg = <0>;
573                                                 ov5693_out1: endpoint {
574                                                         csi-port = <2>;
575                                                         bus-width = <2>;
576                                                         remote-endpoint = <&vi_in1>;
577                                                 };
578                                         };
579                                 };
580                         };
581
582                 };
583         };
584
585         tegra-camera-platform {
586                 compatible = "nvidia, tegra-camera-platform";
587
588                 /**
589                 * The general guideline for naming badge_info contains 3 parts, and is as follows,
590                 * The first part is the camera_board_id for the module; if the module is in a FFD
591                 * platform, then use the platform name for this part.
592                 * The second part contains the position of the module, ex. “rear” or “front”.
593                 * The third part contains the last 6 characters of a part number which is found
594                 * in the module's specsheet from the vender.
595                 */
596                 modules {
597                         module0 {
598                                 badge = "e2146_rear_BA519C";
599                                 position = "rear";
600                                 orientation = "1";
601                                 drivernode0 {
602                                         /* Declare PCL support driver (classically known as guid)  */
603                                         pcl_id = "v4l2_sensor";
604                                         /* Declare the device-tree hierarchy to driver instance */
605                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/ov5693_a@10";
606                                 };
607                                 drivernode1 {
608                                         /* Declare PCL support driver (classically known as guid)  */
609                                         pcl_id = "v4l2_focuser_stub";
610                                 };
611                                 drivernode2 {
612                                         /* Declare PCL support driver (classically known as guid)  */
613                                         pcl_id = "f_AD5823";
614                                 };
615                         };
616                         module1 {
617                                 badge = "e2146_front_P5V27C";
618                                 position = "front";
619                                 orientation = "3";
620                                 drivernode0 {
621                                         /* Declare PCL support driver (classically known as guid)  */
622                                         pcl_id = "v4l2_sensor";
623                                         /* Declare the device-tree hierarchy to driver instance */
624                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/ov5693_c@36";
625                                 };
626                                 drivernode1 {
627                                         /* Declare PCL support driver (classically known as guid)  */
628                                         pcl_id = "v4l2_focuser_stub";
629                                 };
630                         };
631                 };
632         };
633
634         camera-pcl {
635                 compatible = "nvidia,tegra210-camera", "simple-bus";
636                 configuration = <0xAA55AA55>;
637
638                 modules {
639                         module1: module1@modules {
640                                 compatible = "sensor,rear";
641                                 badge_info = "e2146_rear_BA519C";
642                           focuser {
643                                         profile = <&ad5823_1>;
644                                         platformdata = "t210ref_ov5693_pdata";
645                                 };
646                         };
647                         module2: module2@modules {
648                                 compatible = "sensor,front";
649                                 badge_info = "e2146_front_P5V27C";
650                         };
651
652                         module3: module3@modules {
653                                 compatible = "sensor,rear";
654                                 badge_info = "e2385_angle0_ov10823";
655
656                                 sensor {
657                                         profile = <&ov10823_A>;
658                                         platformdata = "t210ref_ov10823A_pdata";
659                                 };
660                         };
661
662                         module4: module4@modules {
663                                 compatible = "sensor,rear";
664                                 badge_info = "e2385_angle120_ov10823";
665
666                                 sensor {
667                                         profile = <&ov10823_B>;
668                                         platformdata = "t210ref_ov10823B_pdata";
669                                 };
670                         };
671
672                         module5: module5@modules {
673                                 compatible = "sensor,rear";
674                                 badge_info = "e2385_angle240_ov10823";
675
676                                 sensor {
677                                         profile = <&ov10823_C>;
678                                         platformdata = "t210ref_ov10823C_pdata";
679                                 };
680                         };
681                 };
682
683                 profiles {
684                         ov5693_1: ov5693@2_0010 {
685                                 index = <1>;
686                                 chipname = "pcl_OV5693";
687                                 type = "sensor";
688                                 guid = "s_OV5693";
689                                 position = <0>;
690                                 bustype = "i2c";
691                                 busnum = <VI_I2C_BUS>;
692                                 addr = <0x10>;
693                                 datalen = <2>;
694                                 pinmuxgrp = <0xFFFF>;
695                                 gpios = <3>;
696                                 regulators = "vana", "vif";
697                                 clocks = "cam_mclk1";
698                                 drivername = "ov5693";
699                                 detect = <0x0002 0x300A 0xFFFF 0x5690>;
700                                 devid = <0x5693>;
701                                 poweron = <
702                                         CAMERA_IND_CLK_SET(10000)
703                                         CAMERA_GPIO_CLR(CAM_PWDN_RQ)
704                                         CAMERA_WAITMS(1)
705                                         CAMERA_REGULATOR_ON(0)
706                                         CAMERA_REGULATOR_ON(1)
707                                         CAMERA_WAITMS(1)
708                                         CAMERA_GPIO_SET(CAM_PWDN_RQ)
709                                         CAMERA_WAITMS(10)
710                                         CAMERA_END
711                                         >;
712                                 poweroff = <
713                                         CAMERA_IND_CLK_CLR
714                                         CAMERA_GPIO_CLR(CAM_PWDN_RQ)
715                                         CAMERA_WAITUS(10)
716                                         CAMERA_REGULATOR_OFF(1)
717                                         CAMERA_REGULATOR_OFF(0)
718                                         CAMERA_END
719                                         >;
720                                 /* sensor capabilities */
721                                 cap-version = <0x34340002>;
722                                 cap-identifier = "OV5693";
723                                 cap-sensor_nvc_interface = <3>;
724                                 cap-pixel_types = <0x2101>;
725                                 cap-orientation = <1>;
726                                 cap-direction = <0>;
727                                 cap-initial_clock_rate_khz = <6000>;
728                                 cap-h_sync_edge = <0>;
729                                 cap-v_sync_edge = <0>;
730                                 cap-mclk_on_vgp0 = <0>;
731                                 cap-csi_port = <0>;
732                                 cap-data_lanes = <2>;
733                                 cap-virtual_channel_id = <0>;
734                                 cap-discontinuous_clk_mode = <1>;
735                                 cap-cil_threshold_settle = <0>;
736                                 cap-min_blank_time_width = <16>;
737                                 cap-min_blank_time_height = <16>;
738                                 cap-preferred_mode_index = <0>;
739                                 cap-external_clock_khz_0 = <24000>;
740                                 cap-clock_multiplier_0 = <8000000>;
741                                 cap-external_clock_khz_1 = <0>;
742                                 cap-clock_multiplier_1 = <0>;
743                                 cap-hdr-enabled;
744                         };
745                         ad5823_1: ad5823@2_000c {
746                                 index = <2>;
747                                 chipname = "pcl_AD5823";
748                                 type = "focuser";
749                                 guid = "f_AD5823";
750                                 position = <0>;
751                                 bustype = "i2c";
752                                 busnum = <VI_I2C_BUS>;
753                                 addr = <0xc>;
754                                 datalen = <1>;
755                                 pinmuxgrp = <0xFFFF>;
756                                 gpios = <3>;
757                                 regulators = "vdd", "vif";
758                                 drivername = "ad5823";
759                                 detect = <0x0002 0x0006 0xFFFF 0x0010>;
760                                 devid = <0x5823>;
761                                 poweron = <
762                                         CAMERA_REGULATOR_ON(1)
763                                         CAMERA_REGULATOR_ON(0)
764                                         CAMERA_WAITUS(10)
765                                         CAMERA_GPIO_SET(CAM_PWDN_AF)
766                                         CAMERA_WAITUS(10)
767                                         CAMERA_END
768                                         >;
769                                 poweroff = <
770                                         CAMERA_REGULATOR_OFF(0)
771                                         CAMERA_REGULATOR_OFF(1)
772                                         CAMERA_GPIO_CLR(CAM_PWDN_AF)
773                                         CAMERA_WAITUS(10)
774                                         CAMERA_END
775                                         >;
776                         };
777                         ov5693_2: ov5693@2_0036 {
778                                 index = <3>;
779                                 chipname = "pcl_OV5693f";
780                                 type = "sensor";
781                                 guid = "sOV5693f";
782                                 position = <1>;
783                                 bustype = "i2c";
784                                 busnum = <VI_I2C_BUS>;
785                                 addr = <0x36>;
786                                 datalen = <2>;
787                                 pinmuxgrp = <0xFFFF>;
788                                 gpios = <3>;
789                                 regulators = "vana", "vif";
790                                 clocks = "cam_mclk1";
791                                 drivername = "ov5693.1";
792                                 detect = <0x0002 0x300A 0xFFFF 0x5690>;
793                                 devid = <0x5693>;
794                                 poweron = <
795                                         CAMERA_IND_CLK_SET(10000)
796                                         CAMERA_GPIO_CLR(CAM_PWDN_FQ)
797                                         CAMERA_WAITMS(1)
798                                         CAMERA_REGULATOR_ON(0)
799                                         CAMERA_REGULATOR_ON(1)
800                                         CAMERA_WAITMS(1)
801                                         CAMERA_GPIO_SET(CAM_PWDN_FQ)
802                                         CAMERA_WAITMS(10)
803                                         CAMERA_END
804                                         >;
805                                 poweroff = <
806                                         CAMERA_IND_CLK_CLR
807                                         CAMERA_GPIO_CLR(CAM_PWDN_FQ)
808                                         CAMERA_WAITUS(10)
809                                         CAMERA_REGULATOR_OFF(1)
810                                         CAMERA_REGULATOR_OFF(0)
811                                         CAMERA_END
812                                         >;
813                                 /* sensor capabilities */
814                                 cap-version = <0x34340002>;
815                                 cap-identifier = "OV5693.1";
816                                 cap-sensor_nvc_interface = <5>;
817                                 cap-pixel_types = <0x2101>;
818                                 cap-orientation = <3>;
819                                 cap-direction = <1>;
820                                 cap-initial_clock_rate_khz = <6000>;
821                                 cap-h_sync_edge = <0>;
822                                 cap-v_sync_edge = <0>;
823                                 cap-mclk_on_vgp0 = <0>;
824                                 cap-csi_port = <1>;
825                                 cap-data_lanes = <2>;
826                                 cap-virtual_channel_id = <0>;
827                                 cap-discontinuous_clk_mode = <1>;
828                                 cap-cil_threshold_settle = <0>;
829                                 cap-min_blank_time_width = <16>;
830                                 cap-min_blank_time_height = <16>;
831                                 cap-preferred_mode_index = <0>;
832                                 cap-external_clock_khz_0 = <24000>;
833                                 cap-clock_multiplier_0 = <8000000>;
834                                 cap-external_clock_khz_1 = <0>;
835                                 cap-clock_multiplier_1 = <0>;
836                                 cap-hdr-enabled;
837                         };
838
839                         ov10823_A: ov10823@6_0020 {
840                                 index = <4>;
841                                 chipname = "pcl_OV10823_A";
842                                 type = "sensor";
843                                 guid = "sOVA823A";
844                                 position = <FIRST_CAM_POS>;
845                                 bustype = "i2c";
846                                 busnum = <VI_I2C_BUS>;
847                                 addr = <OV10823_I2C_ADDR_CAM1>;
848                                 datalen = <2>;
849                                 pinmuxgrp = <0xFFFF>;
850                                 gpios = <3>;
851                                 drivername = "ov10823";
852                                 detect = <0x0002 0x300A 0xFFFF 0xA820>;
853                                 devid = <0xA823>;
854                                 poweron = <
855                                         CAMERA_GPIO_SET(OV10823_SID_CAM1)
856                                         CAMERA_GPIO_SET(OV10823_SID_CAM2)
857                                         CAMERA_GPIO_SET(OV10823_SID_CAM3)
858                                         CAMERA_WAITUS(10)
859                                         CAMERA_GPIO_CLR(OV10823_SID_CAM1)
860                                         CAMERA_WAITUS(300)
861                                         CAMERA_TABLE_RAW_WRITE(CAMERA_RAW_I2C_ADDRESS(\
862                                                 OV10823_DEFAULT_I2C_ADDR_SID_LOW, \
863                                                 OV10823_SENSOR_REG_RW_SID_LOW, \
864                                                 (OV10823_I2C_ADDR_CAM1 << 1)))
865                                         CAMERA_END
866                                         >;
867                                 poweroff = <
868                                         CAMERA_END
869                                         >;
870                         };
871
872                         ov10823_B: ov10823@6_0022 {
873                                 index = <4>;
874                                 chipname = "pcl_OV10823_B";
875                                 type = "sensor";
876                                 guid = "sOVA823B";
877                                 position = <SECOND_CAM_POS>;
878                                 bustype = "i2c";
879                                 busnum = <VI_I2C_BUS>;
880                                 addr = <OV10823_I2C_ADDR_CAM2>;
881                                 datalen = <2>;
882                                 pinmuxgrp = <0xFFFF>;
883                                 gpios = <3>;
884                                 drivername = "ov10823";
885                                 detect = <0x0002 0x300A 0xFFFF 0xA820>;
886                                 devid = <0xA823>;
887                                 poweron = <
888                                         CAMERA_GPIO_CLR(OV10823_SID_CAM2)
889                                         CAMERA_WAITUS(300)
890                                         CAMERA_TABLE_RAW_WRITE(CAMERA_RAW_I2C_ADDRESS(\
891                                                 OV10823_DEFAULT_I2C_ADDR_SID_LOW, \
892                                                 OV10823_SENSOR_REG_RW_SID_LOW, \
893                                                 (OV10823_I2C_ADDR_CAM2 << 1)))
894                                         CAMERA_END
895                                         >;
896                                 poweroff = <
897                                         CAMERA_END
898                                         >;
899                         };
900
901                         ov10823_C: ov10823@6_0024 {
902                                 index = <4>;
903                                 chipname = "pcl_OV10823_C";
904                                 type = "sensor";
905                                 guid = "sOVA823C";
906                                 position = <THIRD_CAM_POS>;
907                                 bustype = "i2c";
908                                 busnum = <VI_I2C_BUS>;
909                                 addr = <OV10823_I2C_ADDR_CAM3>;
910                                 datalen = <2>;
911                                 pinmuxgrp = <0xFFFF>;
912                                 gpios = <3>;
913                                 drivername = "ov10823";
914                                 detect = <0x0002 0x300A 0xFFFF 0xA820>;
915                                 devid = <0xA823>;
916                                 poweron = <
917                                         CAMERA_GPIO_CLR(OV10823_SID_CAM3)
918                                         CAMERA_WAITUS(300)
919                                         CAMERA_TABLE_RAW_WRITE(CAMERA_RAW_I2C_ADDRESS(\
920                                                 OV10823_DEFAULT_I2C_ADDR_SID_LOW, \
921                                                 OV10823_SENSOR_REG_RW_SID_LOW, \
922                                                 (OV10823_I2C_ADDR_CAM3 << 1)))
923                                         CAMERA_END
924                                         >;
925                                 poweroff = <
926                                         CAMERA_END
927                                         >;
928                         };
929
930                 };
931         };
932 };