]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blob - arch/arm64/boot/dts/tegra210-platforms/tegra210-camera-li-mipi-adpt-a00.dtsi
WAR:arm64: dts: update imx185 dt
[sojka/nv-tegra/linux-3.10.git] / arch / arm64 / boot / dts / tegra210-platforms / tegra210-camera-li-mipi-adpt-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                                         liimx185_vi_in0: endpoint {
31                                                 csi-port = <0>;
32                                                 bus-width = <4>;
33                                                 remote-endpoint = <&liimx185_out0>;
34                                         };
35                                 };
36                         };
37                 };
38
39                 i2c@546c0000 {
40                         avdd_dsi_csi-supply = <&max77620_gpio7>;
41
42                         status = "okay";
43                         #address-cells = <1>;
44                         #size-cells = <0>;
45
46                         tca9546@70 {
47                                 i2c@0 {
48                                         imx185_a@1a {
49                                                 compatible = "nvidia,imx185";
50
51                                                 reg = <0x1a>;
52
53                                                 /* Physical dimensions of sensor */
54                                                 physical_w = "15.0";
55                                                 physical_h = "12.5";
56
57                                                 sensor_model ="imx185";
58                                                 /* Define any required hw resources needed by driver */
59                                                 /* ie. clocks, io pins, power sources */
60
61                                                 /* Defines number of frames to be dropped by driver internally after applying */
62                                                 /* sensor crop settings. Some sensors send corrupt frames after applying */
63                                                 /* crop co-ordinates */
64                                                 post_crop_frame_drop = "0";
65
66                                                 /* Convert Gain to unit of dB (decibel) befor passing to kernel driver */
67                                                 use_decibel_gain = "true";
68
69                                                 /* enable CID_SENSOR_MODE_ID for sensor modes selection */
70                                                 use_sensor_mode_id = "true";
71                                                 /**
72                                                 * A modeX node is required to support v4l2 driver
73                                                 * implementation with NVIDIA camera software stack
74                                                 *
75                                                 * mclk_khz = "";
76                                                 * Standard MIPI driving clock, typically 24MHz
77                                                 *
78                                                 * num_lanes = "";
79                                                 * Number of lane channels sensor is programmed to output
80                                                 *
81                                                 * tegra_sinterface = "";
82                                                 * The base tegra serial interface lanes are connected to
83                                                 *
84                                                 * discontinuous_clk = "";
85                                                 * The sensor is programmed to use a discontinuous clock on MIPI lanes
86                                                 *
87                                                 * dpcm_enable = "true";
88                                                 * The sensor is programmed to use a DPCM modes
89                                                 *
90                                                 * cil_settletime = "";
91                                                 * MIPI lane settle time value.
92                                                 * A "0" value attempts to autocalibrate based on mclk_multiplier
93                                                 *
94                                                 * active_w = "";
95                                                 * Pixel active region width
96                                                 *
97                                                 * active_h = "";
98                                                 * Pixel active region height
99                                                 *
100                                                 * dynamic_pixel_bit_depth = "";
101                                                 * sensor dynamic bit depth for sensor mode
102                                                 *
103                                                 * csi_pixel_bit_depth = "";
104                                                 * sensor output bit depth for sensor mode
105                                                 *
106                                                 * mode_type="";
107                                                 * Sensor mode type, For eg: yuv, Rgb, bayer, bayer_wdr_pwl
108                                                 *
109                                                 * pixel_phase="";
110                                                 * Pixel phase for sensor mode, For eg: rggb, vyuy, rgb888
111                                                 *
112                                                 * readout_orientation = "0";
113                                                 * Based on camera module orientation.
114                                                 * Only change readout_orientation if you specifically
115                                                 * Program a different readout order for this mode
116                                                 *
117                                                 * line_length = "";
118                                                 * Pixel line length (width) for sensor mode.
119                                                 * This is used to calibrate features in our camera stack.
120                                                 *
121                                                 * mclk_multiplier = "";
122                                                 * Multiplier to MCLK to help time hardware capture sequence
123                                                 * TODO: Assign to PLL_Multiplier as well until fixed in core
124                                                 *
125                                                 * pix_clk_hz = "";
126                                                 * Sensor pixel clock used for calculations like exposure and framerate
127                                                 *
128                                                 *
129                                                 *
130                                                 *
131                                                 * inherent_gain = "";
132                                                 * Gain obtained inherently from mode (ie. pixel binning)
133                                                 *
134                                                 * min_gain_val = ""; (floor to 6 decimal places)
135                                                 * max_gain_val = ""; (floor to 6 decimal places)
136                                                 * Gain limits for mode
137                                                 * if use_decibel_gain = "true", please set the gain as decibel
138                                                 *
139                                                 * min_exp_time = ""; (ceil to integer)
140                                                 * max_exp_time = ""; (ceil to integer)
141                                                 * Exposure Time limits for mode (us)
142                                                 *
143                                                 *
144                                                 * min_hdr_ratio = "";
145                                                 * max_hdr_ratio = "";
146                                                 * HDR Ratio limits for mode
147                                                 *
148                                                 * min_framerate = "";
149                                                 * max_framerate = "";
150                                                 * Framerate limits for mode (fps)
151                                                 *
152                                                 * embedded_metadata_height = "";
153                                                 * Sensor embedded metadata height in units of rows.
154                                                 * If sensor does not support embedded metadata value should be 0.
155                                                 */
156
157                                                 mode0 {/*mode IMX185_MODE_1920X1080_CROP_30FPS*/
158                                                         mclk_khz = "37125";
159                                                         num_lanes = "4";
160                                                         tegra_sinterface = "serial_a";
161                                                         discontinuous_clk = "no";
162                                                         dpcm_enable = "false";
163                                                         cil_settletime = "0";
164                                                         dynamic_pixel_bit_depth = "12";
165                                                         csi_pixel_bit_depth = "12";
166                                                         mode_type = "bayer";
167                                                         pixel_phase = "rggb";
168
169                                                         active_w = "1920";
170                                                         active_h = "1080";
171                                                         readout_orientation = "0";
172                                                         line_length = "2200";
173                                                         inherent_gain = "1";
174                                                         mclk_multiplier = "2";
175                                                         pix_clk_hz = "74250000";
176
177                                                         min_gain_val = "0"; /* dB */
178                                                         max_gain_val = "48"; /* dB */
179                                                         min_hdr_ratio = "1";
180                                                         max_hdr_ratio = "1";
181                                                         min_framerate = "1.5";
182                                                         max_framerate = "30";
183                                                         min_exp_time = "30";
184                                                         max_exp_time = "680000";
185                                                         embedded_metadata_height = "0";
186                                                 };
187
188 #if 0
189                                                 mode1 {/*mode IMX185_MODE_1920X1080_CROP_10BIT_30FPS*/
190                                                         mclk_khz = "37125";
191                                                         num_lanes = "4";
192                                                         tegra_sinterface = "serial_a";
193                                                         discontinuous_clk = "no";
194                                                         dpcm_enable = "false";
195                                                         cil_settletime = "0";
196                                                         dynamic_pixel_bit_depth = "10";
197                                                         csi_pixel_bit_depth = "10";
198                                                         mode_type = "bayer";
199                                                         pixel_phase = "rggb";
200
201                                                         active_w = "1920";
202                                                         active_h = "1080";
203                                                         readout_orientation = "0";
204                                                         line_length = "2200";
205                                                         inherent_gain = "1";
206                                                         mclk_multiplier = "2";
207                                                         pix_clk_hz = "74250000";
208
209                                                         min_gain_val = "0";
210                                                         max_gain_val = "48";
211                                                         min_hdr_ratio = "1";
212                                                         max_hdr_ratio = "1";
213                                                         min_framerate = "1.5";
214                                                         max_framerate = "30";
215                                                         min_exp_time = "30";
216                                                         max_exp_time = "680000";
217                                                         embedded_metadata_height = "0";
218                                                 };
219
220                                                 mode2 {/*mode IMX185_MODE_1920X1080_CROP_60FPS*/
221                                                         mclk_khz = "37125";
222                                                         num_lanes = "4";
223                                                         tegra_sinterface = "serial_a";
224                                                         discontinuous_clk = "no";
225                                                         dpcm_enable = "false";
226                                                         cil_settletime = "0";
227                                                         dynamic_pixel_bit_depth = "12";
228                                                         csi_pixel_bit_depth = "12";
229                                                         mode_type = "bayer";
230                                                         pixel_phase = "rggb";
231
232                                                         active_w = "1920";
233                                                         active_h = "1080";
234                                                         readout_orientation = "0";
235                                                         line_length = "2200";
236                                                         inherent_gain = "1";
237                                                         mclk_multiplier = "4";
238                                                         pix_clk_hz = "148500000";
239
240                                                         min_gain_val = "0";
241                                                         max_gain_val = "48";
242                                                         min_hdr_ratio = "1";
243                                                         max_hdr_ratio = "1";
244                                                         min_framerate = "1.5";
245                                                         max_framerate = "60";
246                                                         min_exp_time = "30";
247                                                         max_exp_time = "680000";
248                                                         embedded_metadata_height = "0";
249                                                 };
250
251                                                 mode3 {/*mode IMX185_MODE_1920X1080_CROP_10BIT_60FPS*/
252                                                         mclk_khz = "37125";
253                                                         num_lanes = "4";
254                                                         tegra_sinterface = "serial_a";
255                                                         discontinuous_clk = "no";
256                                                         dpcm_enable = "false";
257                                                         cil_settletime = "0";
258                                                         dynamic_pixel_bit_depth = "10";
259                                                         csi_pixel_bit_depth = "10";
260                                                         mode_type = "bayer";
261                                                         pixel_phase = "rggb";
262
263                                                         active_w = "1920";
264                                                         active_h = "1080";
265                                                         readout_orientation = "0";
266                                                         line_length = "2200";
267                                                         inherent_gain = "1";
268                                                         mclk_multiplier = "4";
269                                                         pix_clk_hz = "148500000";
270
271                                                         min_gain_val = "0";
272                                                         max_gain_val = "48";
273                                                         min_hdr_ratio = "1";
274                                                         max_hdr_ratio = "1";
275                                                         min_framerate = "1.5";
276                                                         max_framerate = "60";
277                                                         min_exp_time = "30";
278                                                         max_exp_time = "680000";
279                                                         embedded_metadata_height = "0";
280                                                 };
281 #endif
282                                                 ports {
283                                                         #address-cells = <1>;
284                                                         #size-cells = <0>;
285
286                                                         port@0 {
287                                                                 reg = <0>;
288                                                                 liimx185_out0: endpoint {
289                                                                         csi-port = <0>;
290                                                                         bus-width = <4>;
291                                                                         remote-endpoint = <&liimx185_vi_in0>;
292                                                                 };
293                                                         };
294                                                 };
295                                         };
296                                 };
297                         };
298                 };
299         };
300 };
301
302 / {
303
304         tegra-camera-platform {
305                 compatible = "nvidia, tegra-camera-platform";
306
307                 /**
308                  * The general guideline for naming badge_info contains 3 parts, and is as follows,
309                  * The first part is the camera_board_id for the module; if the module is in a FFD
310                  * platform, then use the platform name for this part.
311                  * The second part contains the position of the module, ex. "rear" or "front".
312                  * The third part contains the last 6 characters of a part number which is found
313                  * in the module's specsheet from the vender.
314                  */
315                 modules {
316                         module0 {
317                                 badge = "imx185_bottom_liimx185";
318                                 position = "bottom";
319                                 orientation = "0";
320                                 status = "okay";
321                                 drivernode0 {
322                                         /* Declare PCL support driver (classically known as guid)  */
323                                         pcl_id = "v4l2_sensor";
324                                         /* Driver's v4l2 device name */
325                                         devname = "imx185 6-001a";
326                                         /* Declare the device-tree hierarchy to driver instance */
327                                         proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@0/imx185_a@1a";
328                                         status = "okay";
329                                 };
330                         };
331                 };
332         };
333 };