I use i2c-2 (i2c@7000c500) as camera i2c(ds90ub954) ; when kernel start-up ,i2c-2 don’t start working;
here are the logs
[ 0.554136] i2c i2c-2: of_i2c: modalias failure on /i2c@7000c500/i2c@0
[ 0.554188] i2c i2c-2: of_i2c: modalias failure on /i2c@7000c500/i2c@1
[ 1.042784] tegradc tegradc.1: dpd enable lookup fail:-19
- the log:
<hit enter to activate fiq debugger>
[ 0.554136] i2c i2c-2: of_i2c: modalias failure on /i2c@7000c500/i2c@0
[ 0.554188] i2c i2c-2: of_i2c: modalias failure on /i2c@7000c500/i2c@1
[ 1.042784] tegradc tegradc.1: dpd enable lookup fail:-19
[ 1.554235] Host read timeout at address 545c00c4
[ 1.732678] ar0231 2-0030: mclk_not_in_DT = -22,(null)
[ 1.738054] ar0231 2-0030: unable to get clock cam_mclk1
[ 1.743408] ar0231 2-0030: unable to power get
[ 1.747864] ar0231 2-0030: tegra_camera_driver_registration_failed = -14
[ 2.237905] cgroup: cgroup2: unknown option "nsdelegate"
[ 3.420936] using random self ethernet address
[ 3.438502] using random host ethernet address
[ 3.810262] random: crng init done
[ 3.813670] random: 7 urandom warning(s) missed due to ratelimiting
[ 3.952769] overlay: disagrees about version of symbol revert_creds
[ 3.968891] overlay: Unknown symbol revert_creds (err -22)
[ 3.975090] overlay: disagrees about version of symbol vfs_rename
[ 3.986574] overlay: Unknown symbol vfs_rename (err -22)
[ 3.993296] overlay: disagrees about version of symbol lookup_one_len
[ 4.000653] overlay: Unknown symbol lookup_one_len (err -22)
[ 4.000691] overlay: disagrees about version of symbol generic_readlink
[ 4.000693] overlay: Unknown symbol generic_readlink (err -22)
[ 4.000706] overlay: disagrees about version of symbol generic_permission
[ 4.000708] overlay: Unknown symbol generic_permission (err -22)
[ 4.000731] overlay: disagrees about version of symbol vfs_unlink
[ 4.000733] overlay: Unknown symbol vfs_unlink (err -22)
[ 4.000743] overlay: disagrees about version of symbol path_put
[ 4.000745] overlay: Unknown symbol path_put (err -22)
[ 4.000751] overlay: disagrees about version of symbol __put_cred
[ 4.000753] overlay: Unknown symbol __put_cred (err -22)
[ 4.000758] overlay: disagrees about version of symbol vfs_mkdir
[ 4.000760] overlay: Unknown symbol vfs_mkdir (err -22)
[ 4.000796] overlay: disagrees about version of symbol __check_sticky
[ 4.000798] overlay: Unknown symbol __check_sticky (err -22)
[ 4.000818] overlay: disagrees about version of symbol prepare_creds
[ 4.000970] overlay: Unknown symbol prepare_creds (err -22)
[ 4.000986] overlay: disagrees about version of symbol vfs_get_link
[ 4.000988] overlay: Unknown symbol vfs_get_link (err -22)
[ 4.001001] overlay: disagrees about version of symbol vfs_whiteout
[ 4.001003] overlay: Unknown symbol vfs_whiteout (err -22)
[ 4.001011] overlay: disagrees about version of symbol lock_rename
[ 4.001013] overlay: Unknown symbol lock_rename (err -22)
[ 4.002491] overlay: disagrees about version of symbol kern_path
[ 4.002495] overlay: Unknown symbol kern_path (err -22)
[ 4.002506] overlay: disagrees about version of symbol unlock_rename
[ 4.002510] overlay: Unknown symbol unlock_rename (err -22)
[ 4.002514] overlay: disagrees about version of symbol vfs_rmdir
[ 4.002516] overlay: Unknown symbol vfs_rmdir (err -22)
[ 4.002531] overlay: disagrees about version of symbol override_creds
[ 4.002533] overlay: Unknown symbol override_creds (err -22)
[ 4.002541] overlay: disagrees about version of symbol vfs_symlink
[ 4.002542] overlay: Unknown symbol vfs_symlink (err -22)
[ 4.002559] overlay: disagrees about version of symbol vfs_mknod
[ 4.002560] overlay: Unknown symbol vfs_mknod (err -22)
[ 4.002592] overlay: disagrees about version of symbol lookup_one_len_unlocked
[ 4.002594] overlay: Unknown symbol lookup_one_len_unlocked (err -22)
[ 4.002608] overlay: disagrees about version of symbol vfs_link
[ 4.002611] overlay: Unknown symbol vfs_link (err -22)
[ 4.002624] overlay: disagrees about version of symbol inode_permission
[ 4.002626] overlay: Unknown symbol inode_permission (err -22)
[ 4.002641] overlay: disagrees about version of symbol vfs_create
[ 4.002642] overlay: Unknown symbol vfs_create (err -22)
[ 4.043838] using random self ethernet address
[ 4.043841] using random host ethernet address
[ 4.228277] nvgpu: disagrees about version of symbol nvhost_module_idle_ext
[ 4.228281] nvgpu: Unknown symbol nvhost_module_idle_ext (err -22)
[ 4.228437] nvgpu: disagrees about version of symbol dev_warn
[ 4.228439] nvgpu: Unknown symbol dev_warn (err -22)
[ 4.228756] nvgpu: disagrees about version of symbol __dynamic_dev_dbg
[ 4.228757] nvgpu: Unknown symbol __dynamic_dev_dbg (err -22)
[ 4.228807] nvgpu: disagrees about version of symbol wake_up_process
[ 4.228808] nvgpu: Unknown symbol wake_up_process (err -22)
[ 4.228818] nvgpu: disagrees about version of symbol device_show_int
[ 4.228819] nvgpu: Unknown symbol device_show_int (err -22)
[ 4.229075] nvgpu: disagrees about version of symbol device_create_file
[ 4.229076] nvgpu: Unknown symbol device_create_file (err -22)
[ 4.229150] nvgpu: disagrees about version of symbol perf_trace_run_bpf_submit
[ 4.229151] nvgpu: Unknown symbol perf_trace_run_bpf_submit (err -22)
[ 4.229256] nvgpu: disagrees about version of symbol device_create
[ 4.229258] nvgpu: Unknown symbol device_create (err -22)
[ 4.229366] nvgpu: Unknown symbol tegra_is_vpr_resize_supported (err 0)
[ 4.229446] nvgpu: disagrees about version of symbol dev_err
[ 4.229448] nvgpu: Unknown symbol dev_err (err -22)
[ 4.229629] nvgpu: disagrees about version of symbol nvhost_module_busy_ext
[ 4.229631] nvgpu: Unknown symbol nvhost_module_busy_ext (err -22)
[ 4.229696] nvgpu: disagrees about version of symbol device_destroy
[ 4.229698] nvgpu: Unknown symbol device_destroy (err -22)
[ 4.229864] nvgpu: disagrees about version of symbol device_remove_file
[ 4.229866] nvgpu: Unknown symbol device_remove_file (err -22)
[ 4.465323] tegra_udrm: disagrees about version of symbol dev_warn
[ 4.501645] tegra_udrm: Unknown symbol dev_warn (err -22)
- device tree:tegra210-camera-ar0231-a00.dtsi
/*
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <dt-bindings/media/camera.h>
#include <dt-bindings/platform/t210/t210.h>
/ {
host1x {
vi {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liar0231_vi_in0: endpoint {
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&liar0231_csi_out0>;
};
};
};
};
nvcsi {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liar0231_csi_in0: endpoint@0 {
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&liar0231_ar0231_out0>;
};
};
port@1 {
reg = <1>;
liar0231_csi_out0: endpoint@1 {
remote-endpoint = <&liar0231_vi_in0>;
};
};
};
};
};
};
i2c@7000c500{
ar0231_a@48 {
compatible = "nvidia,ar0231";
/* I2C device address */
reg = <0x30>; //??
devnode = "video0";
physical_w = "3.674";
physical_h = "2.738";
sensor_model = "ar0231";
avdd-reg = "vana";
iovdd-reg = "vif";
delayed_gain = "true";
mode0 {
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "1280";
active_h = "719";
mode_type = "yuv";
pixel_phase = "uyvy";
csi_pixel_bit_depth = "16";
dynamic_pixel_bit_depth = "8";
readout_orientation = "0";
line_length = "1280";
inherent_gain = "1";
mclk_multiplier = "2.304";
pix_clk_hz = "55296000";
serdes_pix_clk_hz = "200000000";
gain_factor = "1000000";
min_gain_val = "1000000";
max_gain_val = "48000000";
step_gain_val = "1";
default_gain = "1000000";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1";
min_framerate = "6";
max_framerate = "30";
step_framerate = "1";
default_framerate= "30";
exposure_factor = "1000000";
min_exp_time = "110";
max_exp_time = "166577";
step_exp_time = "1";
default_exp_time = "16657";/* us */
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
liar0231_ar0231_out0: endpoint {
port-index = <0>;
bus-width = <2>;
remote-endpoint = <&liar0231_csi_in0>;
};
};
};
};
};
lens_ar0231@A6V26 {
min_focus_distance = "0.0";
hyper_focal = "0.0";
focal_length = "5.00";
f_number = "2.0";
aperture = "2.2";
};
};
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
/**
* Physical settings to calculate max ISO BW
*
* num_csi_lanes = <>;
* Total number of CSI lanes when all cameras are active
*
* max_lane_speed = <>;
* Max lane speed in Kbit/s
*
* min_bits_per_pixel = <>;
* Min bits per pixel
*
* vi_peak_byte_per_pixel = <>;
* Max byte per pixel for the VI ISO case
*
* vi_bw_margin_pct = <>;
* Vi bandwidth margin in percentage
*
* max_pixel_rate = <>;
* Max pixel rate in Kpixel/s for the ISP ISO case
*
* isp_peak_byte_per_pixel = <>;
* Max byte per pixel for the ISP ISO case
*
* isp_bw_margin_pct = <>;
* Isp bandwidth margin in percentage
*/
num_csi_lanes = <2>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <750000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
/**
* The general guideline for naming badge_info contains 3 parts, and is as follows,
* The first part is the camera_board_id for the module; if the module is in a FFD
* platform, then use the platform name for this part.
* The second part contains the position of the module, ex. "rear" or "front".
* The third part contains the last 6 characters of a part number which is found
* in the module's specsheet from the vender.
*/
modules {
module0 {
badge = "ar0231_bottom_A6V26";
position = "bottom";
orientation = "1";
status = "okay";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "ar0231 1-0048";
proc-device-tree = "/proc/device-tree/i2c@7000c500/ar0231_a@48";
};
drivernode1 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_lens";
proc-device-tree = "/proc/device-tree/lens_ar0231@A6V26/";
};
};
};
};
};
- device tree:tegra210-porc-camera-ar0231-a00.dtsi
/*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// #include <t19x-common-modules/tegra194-camera-ar0231-a00.dtsi>
// #include "dt-bindings/clock/tegra194-clock.h"
//#include "tegra210-camera-e3323-a00.dtsi"
#include "tegra210-camera-ar0231-a00.dtsi"
#define CAM0_RST_L TEGRA_GPIO(S, 4)
#define CAM0_PWDN TEGRA_GPIO(S, 7)
// #define CAM1_RST_L TEGRA_GPIO(S, 5)
// #define CAM1_PWDN TEGRA_GPIO(T, 0)
#define CAMERA_I2C_MUX_BUS(x) (0x1E + x)
/* camera control gpio definitions */
/ {
host1x {
gpio@6000d000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_RST_L 0 CAM0_PWDN 0>;
label = "cam0-rst", "cam0-pwdn";
};
};
i2c@7000c500 {
ar0231_a@48 {
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
// clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
// clock-names = "clk_out_3";
// clock-frequency = <24000000>;
// mclk = "clk_out_3";
// reset-gpios = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
// pown-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
//vana-supply = <&en_vdd_cam_hv_2v8>;
//vif-supply = <&en_vdd_cam>;
status = "okay";
reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
};
};
};
};
ar0213.log (5.9 KB) tegra210-camera-ar0231-a00.dtsi.txt (5.3 KB) tegra210-porc-camera-ar0231-a00.dtsi.txt (1.9 KB)