2 * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
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.
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
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/>.
18 #include <dt-bindings/media/camera.h>
19 #include <dt-bindings/platform/t210/t210.h>
21 /* camera control gpio definitions */
31 liimx185_vi_in0: endpoint {
34 remote-endpoint = <&liimx185_out0>;
41 avdd_dsi_csi-supply = <&max77620_gpio7>;
50 compatible = "nvidia,imx185";
54 /* Physical dimensions of sensor */
58 sensor_model ="imx185";
59 /* Define any required hw resources needed by driver */
60 /* ie. clocks, io pins, power sources */
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";
67 /* Convert Gain to unit of dB (decibel) befor passing to kernel driver */
68 use_decibel_gain = "true";
71 * A modeX node is required to support v4l2 driver
72 * implementation with NVIDIA camera software stack
75 * Standard MIPI driving clock, typically 24MHz
78 * Number of lane channels sensor is programmed to output
80 * tegra_sinterface = "";
81 * The base tegra serial interface lanes are connected to
83 * discontinuous_clk = "";
84 * The sensor is programmed to use a discontinuous clock on MIPI lanes
86 * dpcm_enable = "true";
87 * The sensor is programmed to use a DPCM modes
89 * cil_settletime = "";
90 * MIPI lane settle time value.
91 * A "0" value attempts to autocalibrate based on mclk_multiplier
94 * Pixel active region width
97 * Pixel active region height
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"
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
111 * Pixel line length (width) for sensor mode.
112 * This is used to calibrate features in our camera stack.
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
119 * Sensor pixel clock used for calculations like exposure and framerate
124 * inherent_gain = "";
125 * Gain obtained inherently from mode (ie. pixel binning)
127 * min_gain_val = ""; (floor to 6 decimal places)
128 * max_gain_val = ""; (floor to 6 decimal places)
129 * Gain limits for mode
131 * min_exp_time = ""; (ceil to integer)
132 * max_exp_time = ""; (ceil to integer)
133 * Exposure Time limits for mode (us)
136 * min_hdr_ratio = "";
137 * max_hdr_ratio = "";
138 * HDR Ratio limits for mode
140 * min_framerate = "";
141 * max_framerate = "";
142 * Framerate limits for mode (fps)
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.
149 mode0 {/*mode IMX185_MODE_1920X1080_CROP_30FPS*/
152 tegra_sinterface = "serial_a";
153 discontinuous_clk = "no";
154 dpcm_enable = "false";
155 cil_settletime = "0";
159 pixel_t = "bayer_rggb12";
160 readout_orientation = "0";
161 line_length = "2200";
163 mclk_multiplier = "6";
164 pix_clk_hz = "74250000";
166 min_gain_val = "0"; /* dB */
167 max_gain_val = "48"; /* dB */
171 max_framerate = "30";
173 max_exp_time = "33000";
174 embedded_metadata_height = "0";
177 mode1 {/*mode IMX185_MODE_1920X1080_CROP_HDR_30FPS*/
180 tegra_sinterface = "serial_a";
181 discontinuous_clk = "no";
182 dpcm_enable = "false";
183 cil_settletime = "0";
187 pixel_t = "bayer_rggb12";
188 readout_orientation = "0";
189 line_length = "2200";
191 mclk_multiplier = "6";
192 pix_clk_hz = "74250000";
194 min_gain_val = "0"; /* dB */
195 max_gain_val = "48"; /* dB */
196 min_hdr_ratio = "16";
197 max_hdr_ratio = "16";
199 max_framerate = "30";
201 max_exp_time = "33000";
202 embedded_metadata_height = "0";
206 #address-cells = <1>;
211 liimx185_out0: endpoint {
214 remote-endpoint = <&liimx185_vi_in0>;
225 /* camera control gpio definitions */
228 tegra-camera-platform {
229 compatible = "nvidia, tegra-camera-platform";
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.
241 badge = "imx185_bottom_liimx185";
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";