arch: arm64: boot: dts: T210 camera devnames
[linux-3.10.git] / arch / arm64 / boot / dts / tegra210-platforms / tegra210-camera-e3326-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 = <1>;
25                         ports {
26                                 #address-cells = <1>;
27                                 #size-cells = <0>;
28                                 port@0 {
29                                         reg = <0>;
30                                         e3326_vi_in0: endpoint {
31                                                 csi-port = <2>;
32                                                 bus-width = <2>;
33                                                 remote-endpoint = <&e3326_ov5693_out0>;
34                                         };
35                                 };
36                         };
37                 };
38
39                 i2c@546c0000 {
40                         status = "okay";
41                         #address-cells = <1>;
42                         #size-cells = <0>;
43                         ov5693_c@36 {
44                                 compatible = "nvidia,ov5693";
45                                 /* I2C device address */
46                                 reg = <0x36>;
47
48                                 /* Physical dimensions of sensor */
49                                 physical_w = "3.674";
50                                 physical_h = "2.738";
51
52                                 /* Sensor Model */
53                                 sensor_model ="ov5693";
54
55                                 /* Define any required hw resources needed by driver */
56                                 /* ie. clocks, io pins, power sources */
57                                 avdd-reg = "vana";
58                                 iovdd-reg = "vif";
59
60                                 /* Defines number of frames to be dropped by driver internally after applying */
61                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
62                                 /* crop co-ordinates */
63                                 post_crop_frame_drop = "0";
64
65                                 /**
66                                 * A modeX node is required to support v4l2 driver
67                                 * implementation with NVIDIA camera software stack
68                                 *
69                                 * mclk_khz = "";
70                                 * Standard MIPI driving clock, typically 24MHz
71                                 *
72                                 * num_lanes = "";
73                                 * Number of lane channels sensor is programmed to output
74                                 *
75                                 * tegra_sinterface = "";
76                                 * The base tegra serial interface lanes are connected to
77                                 *
78                                 * discontinuous_clk = "";
79                                 * The sensor is programmed to use a discontinuous clock on MIPI lanes
80                                 *
81                                 * dpcm_enable = "true";
82                                 * The sensor is programmed to use a DPCM modes
83                                 *
84                                 * cil_settletime = "";
85                                 * MIPI lane settle time value.
86                                 * A "0" value attempts to autocalibrate based on mclk_multiplier
87                                 *
88                                 *
89                                 *
90                                 *
91                                 * active_w = "";
92                                 * Pixel active region width
93                                 *
94                                 * active_h = "";
95                                 * Pixel active region height
96                                 *
97                                 * pixel_t = "";
98                                 * The sensor readout pixel pattern
99                                 * For eg - 10 bit bayer having 'bggr' pixel pattern has value "bayer_bggr"
100                                 *          12 bit bayer having 'bggr' pixel pattern has value "bayer_bggr12"
101                                 *          14 bit bayer having 'bggr' pixel pattern has value "bayer_bggr14"
102                                 *
103                                 * readout_orientation = "0";
104                                 * Based on camera module orientation.
105                                 * Only change readout_orientation if you specifically
106                                 * Program a different readout order for this mode
107                                 *
108                                 * line_length = "";
109                                 * Pixel line length (width) for sensor mode.
110                                 * This is used to calibrate features in our camera stack.
111                                 *
112                                 * mclk_multiplier = "";
113                                 * Multiplier to MCLK to help time hardware capture sequence
114                                 * TODO: Assign to PLL_Multiplier as well until fixed in core
115                                 *
116                                 * pix_clk_hz = "";
117                                 * Sensor pixel clock used for calculations like exposure and framerate
118                                 *
119                                 *
120                                 *
121                                 *
122                                 * inherent_gain = "";
123                                 * Gain obtained inherently from mode (ie. pixel binning)
124                                 *
125                                 * min_gain_val = ""; (floor to 6 decimal places)
126                                 * max_gain_val = ""; (floor to 6 decimal places)
127                                 * Gain limits for mode
128                                 *
129                                 * min_exp_time = ""; (ceil to integer)
130                                 * max_exp_time = ""; (ceil to integer)
131                                 * Exposure Time limits for mode (us)
132                                 *
133                                 *
134                                 * min_hdr_ratio = "";
135                                 * max_hdr_ratio = "";
136                                 * HDR Ratio limits for mode
137                                 *
138                                 * min_framerate = "";
139                                 * max_framerate = "";
140                                 * Framerate limits for mode (fps)
141                                 *
142                                 * embedded_metadata_height = "";
143                                 * Sensor embedded metadata height in units of rows.
144                                 * If sensor does not support embedded metadata value should be 0.
145                                 */
146                                 mode0 { // OV5693_MODE_2592X1944
147                                         mclk_khz = "24000";
148                                         num_lanes = "2";
149                                         tegra_sinterface = "serial_c";
150                                         discontinuous_clk = "no";
151                                         dpcm_enable = "false";
152                                         cil_settletime = "0";
153
154                                         active_w = "2592";
155                                         active_h = "1944";
156                                         pixel_t = "bayer_bggr";
157                                         readout_orientation = "180";
158                                         line_length = "2688";
159                                         inherent_gain = "1";
160                                         mclk_multiplier = "17.0";
161                                         pix_clk_hz = "160000000";
162
163                                         min_gain_val = "1.0";
164                                         max_gain_val = "16";
165                                         min_hdr_ratio = "1";
166                                         max_hdr_ratio = "64";
167                                         min_framerate = "1.816577";
168                                         max_framerate = "30";
169                                         min_exp_time = "34";
170                                         max_exp_time = "550385";
171                                         embedded_metadata_height = "0";
172                                 };
173
174                                 mode1 { //OV5693_MODE_2592X1458
175                                         mclk_khz = "24000";
176                                         num_lanes = "2";
177                                         tegra_sinterface = "serial_c";
178                                         discontinuous_clk = "no";
179                                         dpcm_enable = "false";
180                                         cil_settletime = "0";
181
182                                         active_w = "2592";
183                                         active_h = "1458";
184                                         pixel_t = "bayer_bggr";
185                                         readout_orientation = "180";
186                                         line_length = "2688";
187                                         inherent_gain = "1";
188                                         mclk_multiplier = "17.0";
189                                         pix_clk_hz = "160000000";
190
191                                         min_gain_val = "1.0";
192                                         max_gain_val = "16";
193                                         min_hdr_ratio = "1";
194                                         max_hdr_ratio = "64";
195                                         min_framerate = "1.816577";
196                                         max_framerate = "30";
197                                         min_exp_time = "34";
198                                         max_exp_time = "550385";
199                                         embedded_metadata_height = "0";
200                                 };
201
202                                 mode2 { //OV5693_MODE_1280X720
203                                         mclk_khz = "24000";
204                                         num_lanes = "2";
205                                         tegra_sinterface = "serial_c";
206                                         discontinuous_clk = "no";
207                                         dpcm_enable = "false";
208                                         cil_settletime = "0";
209
210                                         active_w = "1280";
211                                         active_h = "720";
212                                         pixel_t = "bayer_bggr";
213                                         readout_orientation = "180";
214                                         line_length = "1752";
215                                         inherent_gain = "1";
216                                         mclk_multiplier = "17.0";
217                                         pix_clk_hz = "160000000";
218
219                                         min_gain_val = "1.0";
220                                         max_gain_val = "16";
221                                         min_hdr_ratio = "1";
222                                         max_hdr_ratio = "64";
223                                         min_framerate = "2.787078";
224                                         max_framerate = "120";
225                                         min_exp_time = "22";
226                                         max_exp_time = "358733";
227                                         embedded_metadata_height = "0";
228                                 };
229
230                                 ports {
231                                         #address-cells = <1>;
232                                         #size-cells = <0>;
233
234                                         port@0 {
235                                                 reg = <0>;
236                                                 e3326_ov5693_out0: endpoint {
237                                                         csi-port = <2>;
238                                                         bus-width = <2>;
239                                                         remote-endpoint = <&e3326_vi_in0>;
240                                                 };
241                                         };
242                                 };
243                         };
244
245                 };
246         };
247
248         tegra-camera-platform {
249                 compatible = "nvidia, tegra-camera-platform";
250
251                 /**
252                 * The general guideline for naming badge_info contains 3 parts, and is as follows,
253                 * The first part is the camera_board_id for the module; if the module is in a FFD
254                 * platform, then use the platform name for this part.
255                 * The second part contains the position of the module, ex. “rear” or “front”.
256                 * The third part contains the last 6 characters of a part number which is found
257                 * in the module's specsheet from the vender.
258                 */
259                 modules {
260                         module0 {
261                                 badge = "e3326_front_P5V27C";
262                                 position = "rear";
263                                 orientation = "1";
264                                 drivernode0 {
265                                         /* Declare PCL support driver (classically known as guid)  */
266                                         pcl_id = "v4l2_sensor";
267                                         /* Driver's v4l2 device name */
268                                         devname = "ov5693 6-0036";
269                                         /* Declare the device-tree hierarchy to driver instance */
270                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/ov5693_c@36";
271                                 };
272                                 drivernode1 {
273                                         /* Declare PCL support driver (classically known as guid)  */
274                                         pcl_id = "v4l2_focuser_stub";
275                                 };
276                         };
277                 };
278         };
279 };