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 #define GANG_MODE_L_R 1
22 #define GANG_MODE_T_B 2
23 #define GANG_MODE_R_L 3
24 #define GANG_MODE_B_T 4
35 imx274_vi_in0: endpoint {
38 remote-endpoint = <&imx274_out0>;
43 tc358840_vi_in0: endpoint {
46 gang-mode = <GANG_MODE_L_R>;
47 remote-endpoint = <&tc358840_out0>;
58 compatible = "nvidia,imx274";
59 /* I2C device address */
62 /* V4L2 device node location */
65 /* Physical dimensions of sensor */
70 sensor_model ="imx274";
72 /* Define any required hw resources needed by driver */
73 /* ie. clocks, io pins, power sources */
78 /* Defines number of frames to be dropped by driver internally after applying */
79 /* sensor crop settings. Some sensors send corrupt frames after applying */
80 /* crop co-ordinates */
81 post_crop_frame_drop = "0";
84 * A modeX node is required to support v4l2 driver
85 * implementation with NVIDIA camera software stack
88 * Standard MIPI driving clock, typically 24MHz
91 * Number of lane channels sensor is programmed to output
93 * tegra_sinterface = "";
94 * The base tegra serial interface lanes are connected to
96 * discontinuous_clk = "";
97 * The sensor is programmed to use a discontinuous clock on MIPI lanes
99 * dpcm_enable = "true";
100 * The sensor is programmed to use a DPCM modes
102 * cil_settletime = "";
103 * MIPI lane settle time value.
104 * A "0" value attempts to autocalibrate based on mclk_multiplier
110 * Pixel active region width
113 * Pixel active region height
116 * The sensor readout pixel pattern
118 * readout_orientation = "0";
119 * Based on camera module orientation.
120 * Only change readout_orientation if you specifically
121 * Program a different readout order for this mode
124 * Pixel line length (width) for sensor mode.
125 * This is used to calibrate features in our camera stack.
127 * mclk_multiplier = "";
128 * Multiplier to MCLK to help time hardware capture sequence
129 * TODO: Assign to PLL_Multiplier as well until fixed in core
132 * Sensor pixel clock used for calculations like exposure and framerate
137 * inherent_gain = "";
138 * Gain obtained inherently from mode (ie. pixel binning)
140 * min_gain_val = ""; (floor to 6 decimal places)
141 * max_gain_val = ""; (floor to 6 decimal places)
142 * Gain limits for mode
144 * min_exp_time = ""; (ceil to integer)
145 * max_exp_time = ""; (ceil to integer)
146 * Exposure Time limits for mode (us)
149 * min_hdr_ratio = "";
150 * max_hdr_ratio = "";
151 * HDR Ratio limits for mode
153 * min_framerate = "";
154 * max_framerate = "";
155 * Framerate limits for mode (fps)
157 * embedded_metadata_height = "";
158 * Sensor embedded metadata height in units of rows.
159 * If sensor does not support embedded metadata value should be 0.
162 mode0 { // IMX274_MODE_3840X2160@30fps
165 tegra_sinterface = "serial_a";
166 discontinuous_clk = "yes";
167 cil_settletime = "0";
171 pixel_t = "bayer_rggb";
172 readout_orientation = "90";
173 line_length = "4200";
175 mclk_multiplier = "25";
176 pix_clk_hz = "576000000";
178 min_gain_val = "1.0";
179 max_gain_val = "22.2";
181 max_hdr_ratio = "64";
182 min_framerate = "1.462526";
183 max_framerate = "30";
184 min_exp_time = "16.165";
185 max_exp_time = "33191";
186 embedded_metadata_height = "0";
189 mode1 { // IMX274_MODE_3840X2160@60fps
192 tegra_sinterface = "serial_a";
193 discontinuous_clk = "yes";
194 cil_settletime = "0";
198 pixel_t = "bayer_rggb";
199 readout_orientation = "90";
200 line_length = "4200";
202 mclk_multiplier = "25";
203 pix_clk_hz = "576000000";
205 min_gain_val = "1.0";
206 max_gain_val = "22.2";
208 max_hdr_ratio = "64";
209 min_framerate = "1.462526";
210 max_framerate = "60";
211 min_exp_time = "16.165";
212 max_exp_time = "33191";
213 embedded_metadata_height = "0";
216 mode2 { // IMX274_MODE_1920X1080@60fps
219 tegra_sinterface = "serial_a";
220 discontinuous_clk = "yes";
221 cil_settletime = "0";
225 pixel_t = "bayer_rggb";
226 readout_orientation = "90";
227 line_length = "4200";
229 mclk_multiplier = "25";
230 pix_clk_hz = "576000000";
232 min_gain_val = "1.0";
233 max_gain_val = "22.2";
235 max_hdr_ratio = "64";
236 min_framerate = "1.462526";
237 max_framerate = "60";
238 min_exp_time = "16.165";
239 max_exp_time = "33191";
240 embedded_metadata_height = "0";
244 #address-cells = <1>;
249 imx274_out0: endpoint {
252 remote-endpoint = <&imx274_vi_in0>;
258 compatible = "toshiba,tc358840";
261 /* Physical dimensions of sensor */
262 physical_w = "4.713";
263 physical_h = "3.494";
266 sensor_model ="tc358840";
269 #address-cells = <1>;
274 tc358840_out0: endpoint {
277 remote-endpoint = <&tc358840_vi_in0>;
285 tegra-camera-platform {
286 compatible = "nvidia, tegra-camera-platform";
289 * The general guideline for naming badge_info contains 3 parts, and is as follows,
290 * The first part is the camera_board_id for the module; if the module is in a FFD
291 * platform, then use the platform name for this part.
292 * The second part contains the position of the module, ex. “rear” or “front”.
293 * The third part contains the last 6 characters of a part number which is found
294 * in the module's specsheet from the vender.
298 badge = "imx274_front_A6V24";
302 /* Declare PCL support driver (classically known as guid) */
303 pcl_id = "v4l2_sensor";
304 /* Declare the device-tree hierarchy to driver instance */
305 proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/imx274_a@1a";