]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blob - arch/arm64/boot/dts/tegra210-platforms/tegra210-camera-e3322-a00.dtsi
7b0d711dc790380d798a391d4f7e58d4e76e18d4
[sojka/nv-tegra/linux-3.10.git] / arch / arm64 / boot / dts / tegra210-platforms / tegra210-camera-e3322-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 #define CAM0_RST_L      TEGRA_GPIO(S, 4)
22 #define CAM0_PWDN       TEGRA_GPIO(S, 7)
23
24 /* camera control gpio definitions */
25 / {
26         host1x {
27                 vi {
28                         num-channels = <6>;
29                         ports {
30                                 #address-cells = <1>;
31                                 #size-cells = <0>;
32                                 port@0 {
33                                         reg = <0>;
34                                         e3322_vi_in0: endpoint {
35                                                 remote-endpoint = <&imx219_out0>;
36                                         };
37                                 };
38                                 port@1 {
39                                         reg = <1>;
40                                         e3322_vi_in1: endpoint {
41                                                 remote-endpoint = <&imx219_out1>;
42                                         };
43                                 };
44                                 port@2 {
45                                         reg = <2>;
46                                         e3322_vi_in2: endpoint {
47                                                 remote-endpoint = <&imx219_out2>;
48                                         };
49                                 };
50                                 port@3 {
51                                         reg = <3>;
52                                         e3322_vi_in3: endpoint {
53                                                 remote-endpoint = <&imx219_out3>;
54                                         };
55                                 };
56                                 port@4 {
57                                         reg = <4>;
58                                         e3322_vi_in4: endpoint {
59                                                 remote-endpoint = <&imx219_out4>;
60                                         };
61                                 };
62                                 port@5 {
63                                         reg = <5>;
64                                         e3322_vi_in5: endpoint {
65                                                 remote-endpoint = <&imx219_out5>;
66                                         };
67                                 };
68                         };
69                 };
70
71                 i2c@546c0000 {
72                         status = "okay";
73                         #address-cells = <1>;
74                         #size-cells = <0>;
75
76                         tca9548@77 {
77                                 i2c@0 {
78                                         imx219_a@10 {
79                                                 compatible = "nvidia,imx219";
80                                                 reg = <0x10>;
81
82                                                 physical_w = "5.095";
83                                                 physical_h = "4.930";
84
85                                                 sensor_model ="imx219";
86                                                 dovdd-supply = <&en_vdd_cam>;
87                                                 avdd-reg = "vana";
88                                                 dvdd-reg = "vdig";
89                                                 iovdd-reg = "dovdd";
90                                                 devnode = "video0";
91
92                                                 /* Defines number of frames to be dropped by driver internally after applying */
93                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
94                                                 /* crop co-ordinates */
95                                                 post_crop_frame_drop = "0";
96
97                                                 mode0 { // IMX219_MODE_3280X2464
98                                                         mclk_khz = "12000";
99                                                         num_lanes = "2";
100                                                         tegra_sinterface = "serial_a";
101                                                         discontinuous_clk = "yes";
102                                                         cil_settletime = "0";
103
104                                                         active_w = "3280";
105                                                         active_h = "2464";
106                                                         pixel_t = "bayer_rggb";
107                                                         readout_orientation = "90";
108                                                         line_length = "3448";
109                                                         inherent_gain = "1";
110                                                         mclk_multiplier = "25";
111                                                         pix_clk_hz = "170000000";
112
113                                                         min_gain_val = "1.0";
114                                                         max_gain_val = "16.0";
115                                                         min_hdr_ratio = "1";
116                                                         max_hdr_ratio = "64";
117                                                         min_framerate = "1.462526";
118                                                         max_framerate = "21";
119                                                         min_exp_time = "13";
120                                                         max_exp_time = "683709";
121                                                 };
122                                                 ports {
123                                                         #address-cells = <1>;
124                                                         #size-cells = <0>;
125
126                                                         port@0 {
127                                                                 reg = <0>;
128                                                                 imx219_out0: endpoint {
129                                                                         csi-port = <0>;
130                                                                         bus-width = <2>;
131                                                                         remote-endpoint = <&e3322_vi_in0>;
132                                                                 };
133                                                         };
134                                                 };
135                                         };
136                                 };
137                                 i2c@1 {
138                                         imx219_b@10 {
139                                                 compatible = "nvidia,imx219";
140                                                 reg = <0x10>;
141
142                                                 physical_w = "5.095";
143                                                 physical_h = "4.930";
144
145                                                 sensor_model ="imx219";
146                                                 avdd-reg = "vana";
147                                                 dvdd-reg = "vdig";
148                                                 iovdd-reg = "dovdd";
149                                                 devnode = "video1";
150
151                                                 /* Defines number of frames to be dropped by driver internally after applying */
152                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
153                                                 /* crop co-ordinates */
154                                                 post_crop_frame_drop = "0";
155
156                                                 mode0 { // IMX219_MODE_3280X2464
157                                                         mclk_khz = "12000";
158                                                         num_lanes = "2";
159                                                         tegra_sinterface = "serial_b";
160                                                         discontinuous_clk = "yes";
161                                                         cil_settletime = "0";
162
163                                                         active_w = "3280";
164                                                         active_h = "2464";
165                                                         pixel_t = "bayer_rggb";
166                                                         readout_orientation = "90";
167                                                         line_length = "3448";
168                                                         inherent_gain = "1";
169                                                         mclk_multiplier = "25";
170                                                         pix_clk_hz = "170000000";
171
172                                                         min_gain_val = "1.0";
173                                                         max_gain_val = "16.0";
174                                                         min_hdr_ratio = "1";
175                                                         max_hdr_ratio = "64";
176                                                         min_framerate = "1.462526";
177                                                         max_framerate = "21";
178                                                         min_exp_time = "13";
179                                                         max_exp_time = "683709";
180                                                 };
181                                                 ports {
182                                                         #address-cells = <1>;
183                                                         #size-cells = <0>;
184
185                                                         port@0 {
186                                                                 reg = <0>;
187                                                                 imx219_out1: endpoint {
188                                                                         csi-port = <1>;
189                                                                         bus-width = <2>;
190                                                                         remote-endpoint = <&e3322_vi_in1>;
191                                                                 };
192                                                         };
193                                                 };
194                                         };
195                                 };
196                                 i2c@2 {
197                                         imx219_c@10 {
198                                                 compatible = "nvidia,imx219";
199                                                 reg = <0x10>;
200
201                                                 physical_w = "5.095";
202                                                 physical_h = "4.930";
203
204                                                 sensor_model ="imx219";
205                                                 avdd-reg = "vana";
206                                                 dvdd-reg = "vdig";
207                                                 iovdd-reg = "dovdd";
208                                                 devnode = "video2";
209
210                                                 /* Defines number of frames to be dropped by driver internally after applying */
211                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
212                                                 /* crop co-ordinates */
213                                                 post_crop_frame_drop = "0";
214
215                                                 mode0 { // IMX219_MODE_3280X2464
216                                                         mclk_khz = "12000";
217                                                         num_lanes = "2";
218                                                         tegra_sinterface = "serial_c";
219                                                         discontinuous_clk = "yes";
220                                                         cil_settletime = "0";
221
222                                                         active_w = "3280";
223                                                         active_h = "2464";
224                                                         pixel_t = "bayer_rggb";
225                                                         readout_orientation = "90";
226                                                         line_length = "3448";
227                                                         inherent_gain = "1";
228                                                         mclk_multiplier = "25";
229                                                         pix_clk_hz = "170000000";
230
231                                                         min_gain_val = "1.0";
232                                                         max_gain_val = "16.0";
233                                                         min_hdr_ratio = "1";
234                                                         max_hdr_ratio = "64";
235                                                         min_framerate = "1.462526";
236                                                         max_framerate = "21";
237                                                         min_exp_time = "13";
238                                                         max_exp_time = "683709";
239                                                 };
240                                                 ports {
241                                                         #address-cells = <1>;
242                                                         #size-cells = <0>;
243
244                                                         port@0 {
245                                                                 reg = <0>;
246                                                                 imx219_out2: endpoint {
247                                                                         csi-port = <2>;
248                                                                         bus-width = <2>;
249                                                                         remote-endpoint = <&e3322_vi_in2>;
250                                                                 };
251                                                         };
252                                                 };
253                                         };
254                                 };
255                                 i2c@3 {
256                                         imx219_d@10 {
257                                                 compatible = "nvidia,imx219";
258                                                 reg = <0x10>;
259
260                                                 physical_w = "5.095";
261                                                 physical_h = "4.930";
262
263                                                 sensor_model ="imx219";
264                                                 avdd-reg = "vana";
265                                                 dvdd-reg = "vdig";
266                                                 iovdd-reg = "dovdd";
267                                                 devnode = "video3";
268
269                                                 /* Defines number of frames to be dropped by driver internally after applying */
270                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
271                                                 /* crop co-ordinates */
272                                                 post_crop_frame_drop = "0";
273
274                                                 mode0 { // IMX219_MODE_3280X2464
275                                                         mclk_khz = "12000";
276                                                         num_lanes = "2";
277                                                         tegra_sinterface = "serial_d";
278                                                         discontinuous_clk = "yes";
279                                                         cil_settletime = "0";
280
281                                                         active_w = "3280";
282                                                         active_h = "2464";
283                                                         pixel_t = "bayer_rggb";
284                                                         readout_orientation = "90";
285                                                         line_length = "3448";
286                                                         inherent_gain = "1";
287                                                         mclk_multiplier = "25";
288                                                         pix_clk_hz = "170000000";
289
290                                                         min_gain_val = "1.0";
291                                                         max_gain_val = "16.0";
292                                                         min_hdr_ratio = "1";
293                                                         max_hdr_ratio = "64";
294                                                         min_framerate = "1.462526";
295                                                         max_framerate = "21";
296                                                         min_exp_time = "13";
297                                                         max_exp_time = "683709";
298                                                 };
299                                                 ports {
300                                                         #address-cells = <1>;
301                                                         #size-cells = <0>;
302
303                                                         port@0 {
304                                                                 reg = <0>;
305                                                                 imx219_out3: endpoint {
306                                                                         csi-port = <3>;
307                                                                         bus-width = <2>;
308                                                                         remote-endpoint = <&e3322_vi_in3>;
309                                                                 };
310                                                         };
311                                                 };
312                                         };
313                                 };
314                                 i2c@4 {
315                                         imx219_e@10 {
316                                                 compatible = "nvidia,imx219";
317                                                 reg = <0x10>;
318
319                                                 physical_w = "5.095";
320                                                 physical_h = "4.930";
321
322                                                 sensor_model ="imx219";
323                                                 avdd-reg = "vana";
324                                                 dvdd-reg = "vdig";
325                                                 iovdd-reg = "dovdd";
326                                                 devnode = "video4";
327
328                                                 /* Defines number of frames to be dropped by driver internally after applying */
329                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
330                                                 /* crop co-ordinates */
331                                                 post_crop_frame_drop = "0";
332
333                                                 mode0 { // IMX219_MODE_3280X2464
334                                                         mclk_khz = "12000";
335                                                         num_lanes = "2";
336                                                         tegra_sinterface = "serial_e";
337                                                         discontinuous_clk = "yes";
338                                                         cil_settletime = "0";
339
340                                                         active_w = "3280";
341                                                         active_h = "2464";
342                                                         pixel_t = "bayer_rggb";
343                                                         readout_orientation = "90";
344                                                         line_length = "3448";
345                                                         inherent_gain = "1";
346                                                         mclk_multiplier = "25";
347                                                         pix_clk_hz = "170000000";
348
349                                                         min_gain_val = "1.0";
350                                                         max_gain_val = "16.0";
351                                                         min_hdr_ratio = "1";
352                                                         max_hdr_ratio = "64";
353                                                         min_framerate = "1.462526";
354                                                         max_framerate = "21";
355                                                         min_exp_time = "13";
356                                                         max_exp_time = "683709";
357                                                 };
358                                                 ports {
359                                                         #address-cells = <1>;
360                                                         #size-cells = <0>;
361
362                                                         port@0 {
363                                                                 reg = <0>;
364                                                                 imx219_out4: endpoint {
365                                                                         csi-port = <4>;
366                                                                         bus-width = <2>;
367                                                                         remote-endpoint = <&e3322_vi_in4>;
368                                                                 };
369                                                         };
370                                                 };
371                                         };
372                                 };
373                                 i2c@5 {
374                                         imx219_f@10 {
375                                                 compatible = "nvidia,imx219";
376                                                 reg = <0x10>;
377
378                                                 physical_w = "5.095";
379                                                 physical_h = "4.930";
380
381                                                 sensor_model ="imx219";
382                                                 avdd-reg = "vana";
383                                                 dvdd-reg = "vdig";
384                                                 iovdd-reg = "dovdd";
385                                                 devnode = "video5";
386
387                                                 /* Defines number of frames to be dropped by driver internally after applying */
388                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
389                                                 /* crop co-ordinates */
390                                                 post_crop_frame_drop = "0";
391
392                                                 mode0 { // IMX219_MODE_3280X2464
393                                                         mclk_khz = "12000";
394                                                         num_lanes = "2";
395                                                         tegra_sinterface = "serial_f";
396                                                         discontinuous_clk = "yes";
397                                                         cil_settletime = "0";
398
399                                                         active_w = "3280";
400                                                         active_h = "2464";
401                                                         pixel_t = "bayer_rggb";
402                                                         readout_orientation = "90";
403                                                         line_length = "3448";
404                                                         inherent_gain = "1";
405                                                         mclk_multiplier = "25";
406                                                         pix_clk_hz = "170000000";
407
408                                                         min_gain_val = "1.0";
409                                                         max_gain_val = "16.0";
410                                                         min_hdr_ratio = "1";
411                                                         max_hdr_ratio = "64";
412                                                         min_framerate = "1.462526";
413                                                         max_framerate = "21";
414                                                         min_exp_time = "13";
415                                                         max_exp_time = "683709";
416                                                 };
417                                                 ports {
418                                                         #address-cells = <1>;
419                                                         #size-cells = <0>;
420
421                                                         port@0 {
422                                                                 reg = <0>;
423                                                                 imx219_out5: endpoint {
424                                                                         csi-port = <5>;
425                                                                         bus-width = <2>;
426                                                                         remote-endpoint = <&e3322_vi_in5>;
427                                                                 };
428                                                         };
429                                                 };
430                                         };
431                                 };
432                         };
433                 };
434         };
435 };
436
437 /* camera control gpio definitions */
438 / {
439
440         tegra-camera-platform {
441                 compatible = "nvidia, tegra-camera-platform";
442
443                 /**
444                  * The general guideline for naming badge_info contains 3 parts, and is as follows,
445                  * The first part is the camera_board_id for the module; if the module is in a FFD
446                  * platform, then use the platform name for this part.
447                  * The second part contains the position of the module, ex. “rear” or “front”.
448                  * The third part contains the last 6 characters of a part number which is found
449                  * in the module's specsheet from the vender.
450                  */
451                 modules {
452                         module0 {
453                                 badge = "e3322_bottomleft_A815P2";
454                                 position = "bottomleft";
455                                 orientation = "1";
456                                 drivernode0 {
457                                         pcl_id = "v4l2_sensor";
458                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9548@77/i2c@0/imx219_a@10";
459                                 };
460                         };
461                         module1 {
462                                 badge = "e3322_centerleft_A815P2";
463                                 position = "centerleft";
464                                 orientation = "1";
465                                 drivernode0 {
466                                         pcl_id = "v4l2_sensor";
467                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9548@77/i2c@1/imx219_b@10";
468                                 };
469                         };
470                         module2 {
471                                 badge = "e3322_centerleft_A815P2";
472                                 position = "centerright";
473                                 orientation = "1";
474                                 drivernode0 {
475                                         pcl_id = "v4l2_sensor";
476                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9548@77/i2c@2/imx219_c@10";
477                                 };
478                         };
479                         module3 {
480                                 badge = "e3322_centerleft_A815P2";
481                                 position = "topleft";
482                                 orientation = "1";
483                                 drivernode0 {
484                                         pcl_id = "v4l2_sensor";
485                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9548@77/i2c@3/imx219_d@10";
486                                 };
487                         };
488                         module4 {
489                                 badge = "e3322_centerleft_A815P2";
490                                 position = "bottomright";
491                                 orientation = "1";
492                                 drivernode0 {
493                                         pcl_id = "v4l2_sensor";
494                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9548@77/i2c@4/imx219_e@10";
495                                 };
496                         };
497                         module5 {
498                                 badge = "e3322_centerleft_A815P2";
499                                 position = "topright";
500                                 orientation = "1";
501                                 drivernode0 {
502                                         pcl_id = "v4l2_sensor";
503                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9548@77/i2c@5/imx219_f@10";
504                                 };
505                         };
506                 };
507         };
508 };