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