I am working on using Auvidea J20 board and raspberry pi camera V2 imx219 with TX2 L4T 28.2.
So far i have created my own dts file, and sensor can be probed but /dev/video0 not appeared.
I found some error on ‘dmesg’
[ 2.764257] imx219 1-0010: [IMX219] Driver: Function: imx219_probe.
[ 2.764640] regulator_get() failed for (1-0010,vdig), -19
[ 2.764644] imx219 1-0010: camera_common_regulator_get vdig ERR: ffffffffffffffed
It seemed like can not get vdig value?
Here is my dts file referenced other dts file in :t18-common-modules and t18-common-platforms folders.
#include "dt-bindings/clock/tegra186-clock.h"
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
#include <dt-bindings/gpio/tegra186-gpio.h>
#define CAM0_RST_L TEGRA_MAIN_GPIO(R, 5)
#define CAM0_PWDN TEGRA_MAIN_GPIO(R, 0)
#define CAM1_RST_L TEGRA_MAIN_GPIO(R, 1)
#define CAM1_PWDN TEGRA_MAIN_GPIO(L, 6)
/ {
gpio@2200000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_RST_L 0 CAM0_PWDN 0
CAM1_RST_L 0 CAM1_PWDN 0>;
label = "cam0-rst", "cam0-pwdn",
"cam1-rst", "cam1-pwdn";
};
};
};
/ {
host1x {
vi@15700000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
vi_port0: port@0 {
status = "okay";
reg = <0>;
vi_in0: endpoint {
status = "okay";
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&imx219_csi_out0>;
};
};
};
};
nvcsi@150c0000 {
status = "okay";
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
imx219_csi_in0: endpoint@0 {
status = "okay";
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&imx219_phy_out0>;
};
};
port@1 {
status = "okay";
reg = <1>;
imx219_csi_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&vi_in0>;
};
};
};
};
};
};
//Make seperate module
i2c@c240000 {
imx219_a@10 {
#address-cells = <1>;
#size-cells = <0>;
//ADDED
clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>,<&tegra_car TEGRA186_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
clock-frequency = <24000000>;
reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
vana-supply = <&en_vdd_cam_hv_2v8>;
vif-supply = <&en_vdd_cam>;
//END
devnode = "video0";
compatible = "nvidia,imx219";
reg = <0x10>;
physical_w = "5.095";
physical_h = "4.930";
sensor_model ="imx219";
dovdd-supply = <&en_vdd_cam>;
avdd-reg = "vana";
dvdd-reg = "vdig";
iovdd-reg = "vif";
mode0 { // IMX219_MODE_1920X1080
mclk_khz = "24000";
mclk_multiplier = "25";
pix_clk_hz = "182400000";
//pix_clk_hz = "170000000";
num_lanes = "2";
tegra_sinterface = "serial_a";
discontinuous_clk = "yes";
cil_settletime = "0";
pixel_t = "bayer_rggb";
readout_orientation = "90";
inherent_gain = "1";
active_w = "1920";
active_h = "1080";
line_length = "3448";
dpcm_enable = "false";
min_gain_val = "1.0";
max_gain_val = "16";
min_hdr_ratio = "1";
max_hdr_ratio = "64";
min_framerate = "1";
max_framerate = "30";
//min_exp_time = "33";
min_exp_time = "11";
max_exp_time = "683709";
embedded_metadata_height = "0";
};
mode1 { // IMX219_MODE_1280X720
mclk_khz = "24000";
mclk_multiplier = "25";
pix_clk_hz = "182400000";
//pix_clk_hz = "170000000";
num_lanes = "2";
tegra_sinterface = "serial_a";
discontinuous_clk = "yes";
cil_settletime = "0";
pixel_t = "bayer_rggb";
readout_orientation = "90";
inherent_gain = "1";
active_w = "1280";
active_h = "720";
line_length = "3448";
dpcm_enable = "false";
//line_length = "1752";
min_gain_val = "1";
max_gain_val = "16";
min_hdr_ratio = "1";
max_hdr_ratio = "64";
min_framerate = "1";
max_framerate = "60";
//min_exp_time = "16";
min_exp_time = "11";
max_exp_time = "683710";
embedded_metadata_height = "0";
};
mode2 { // IMX219_MODE_640X480
//mclk_khz = "47000";
mclk_khz = "24000";
mclk_multiplier = "25.0";
pix_clk_hz = "182400000";
//pix_clk_hz = "170000000";
num_lanes = "2";
tegra_sinterface = "serial_a";
discontinuous_clk = "yes";
cil_settletime = "0";
pixel_t = "bayer_rggb";
readout_orientation = "90";
inherent_gain = "1";
active_w = "640";
active_h = "480";
//line_length = "3448";
line_length = "3559";
dpcm_enable = "false";
min_gain_val = "1";
max_gain_val = "16";
min_hdr_ratio = "1";
max_hdr_ratio = "64";
min_framerate = "1";
max_framerate = "90";
min_exp_time = "11";
max_exp_time = "358731";
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx219_phy_out0: endpoint {
csi-port = <0>;
bus-width = <2>;
remote-endpoint = <&imx219_csi_in0>;
};
};
};
};
};
};
/* camera control gpio definitions */
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <2>;
max_lane_speed = <1500000>;
max_pixel_rate = <750000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
module0 {
status = "okay";
//badge = "imx185_bottom_liimx185";
//badge = "e3322_bottom_A815P2";
badge = "e3326_bottom_P5V27C";
position = "bottom";
orientation = "0";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "imx219 9-0010";
proc-device-tree = "/proc/device-tree/i2c@c240000/imx219_a@10";
};
};
};
};
};
I never changed the imx219.c and imx219_mode_tbls.h. I google a lot, some one said this file need be modified but i don’t know how. I really appriciate some advice and instruction from anyone, thanks.