Hello,
Given:
Ubuntu 22.04 LTS
JP 36.3, (on JP 36.4 drivers mouse and keyboard not working).
On kernel without I2C (I took the example from ov5693 as a basis), I2C and GPIOs on user space linux.
The problem occurred because of no probing camera.
tegra234-camera-ZZZZZ-a00.dtsi
/ { fragment-camera@0 { target-path = "/"; __overlay__ { tegra-capture-vi { num-channels = <1>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; ZZZZZ_vi_in0: endpoint { port-index = <0>; bus-width = <4>; remote-endpoint = <&ZZZZZ_csi_out0>; }; }; }; }; bus@0 { host1x@13e00000 { nvcsi@15a00000 { num-channels = <1>; #address-cells = <1>; #size-cells = <0>; channel@0 { reg = <0>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; ZZZZZ_csi_in0: endpoint@0 { port-index = <0>; bus-width = <4>; remote-endpoint = <&ZZZZZ_vi_out0>; }; }; port@1 { reg = <1>; ZZZZZ_csi_out0: endpoint@1 { remote-endpoint = <&ZZZZZ_vi_in0>; }; }; }; }; }; }; i2c@3180000 { tca9546@70 { i2c@0 { ZZZZZ_a@18 { compatible = "ZZZZZ"; reg = <0x18>; //change other register write for I2C devnode = "video0"; /* Define any required hw resources needed by driver */ /* ie. clocks, io pins, power sources */ avdd-reg = "vana"; iovdd-reg = "vif"; dvdd-reg = "vdig"; /* Physical dimensions of sensor */ physical_w = "18.0"; physical_h = "18.0"; sensor_model ="ZZZZZ"; post_crop_frame_drop = "0"; use_decibel_gain = "false"; delayed_gain = "false"; use_sensor_mode_id = "false"; limit_analog_gain = "false"; mode0 { /*ZZZZZ_MODE_2592X2048*/ mclk_khz = "24000"; /* 24 MHz*/ num_lanes = "4"; tegra_sinterface = "serial_a"; phy_mode = "DPHY"; discontinuous_clk = "no"; dpcm_enable = "false"; cil_settletime = "0"; csi_pixel_bit_depth = "10"; mode_type = "raw"; pixel_phase = "y"; active_w = "2592"; active_h = "2048"; readout_orientation = "0"; line_length = "2784"; mclk_multiplier = "14.46"; pix_clk_hz = "347109120"; framerate_factor = "1000000"; /* 1 */ min_framerate = "60000000"; /* 60 */ max_framerate = "60000000"; /* 60 */ step_framerate = "1"; default_framerate= "60000000"; /* 60 */ embedded_metadata_height = "0"; }; mode1 { /*ZZZZZ_MODE_2592X2048*/ mclk_khz = "24000"; /* 24 MHz*/ num_lanes = "4"; tegra_sinterface = "serial_a"; phy_mode = "DPHY"; discontinuous_clk = "no"; dpcm_enable = "false"; cil_settletime = "0"; csi_pixel_bit_depth = "10"; mode_type = "bayer"; pixel_phase = "rggb"; active_w = "2592"; active_h = "2048"; readout_orientation = "0"; line_length = "2784"; mclk_multiplier = "14.46"; pix_clk_hz = "347109120"; framerate_factor = "1000000"; /* 1 */ min_framerate = "60000000"; /* 60 */ max_framerate = "60000000"; /* 60 */ step_framerate = "1"; default_framerate= "60000000"; /* 60 */ embedded_metadata_height = "0"; }; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; ZZZZZ_vi_out0: endpoint { port-index = <0>; bus-width = <4>; remote-endpoint = <&ZZZZZ_csi_in0>; }; }; }; }; }; }; }; }; tegra-camera-platform { compatible = "nvidia, tegra-camera-platform"; num_csi_lanes = <4>; max_lane_speed = <1500000>; 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 { badge = "ZZZZZ_bottom"; position = "bottom"; orientation = "1"; drivernode0 { pcl_id = "v4l2_sensor"; sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9546@70/i2c@0/ZZZZZ_a@18"; }; }; }; }; }; }; };
tegra234-p3737-camera-ZZZZZ-overlay.dts
// SPDX-License-Identifier: GPL-2.0-only /* * Jetson Device-tree overlay for Camera ZZZZZ module on t23x platforms * */ /dts-v1/; /plugin/; #include <dt-bindings/clock/tegra234-clock.h> #include <dt-bindings/gpio/tegra234-gpio.h> #include <dt-bindings/tegra234-p3737-0000+p3701-0000.h> / { overlay-name = "Jetson Camera ZZZZZ"; jetson-header-name = "Jetson AGX CSI Connector"; compatible = JETSON_COMPATIBLE; // compatible = "nvidia,p3737-0000+p3701-0000", "nvidia,p3737-0000+p3701-0004", "nvidia,p3737-0000+p3701-0005", "nvidia,p3737-0000+p3701-0008"; fragment@0 { target-path = "/"; board-config { //added ids = "ZZZZZ"; sw-modules = "kernel"; }; __overlay__ { status = "okay"; //added tegra-capture-vi { num-channels = <1>; ports { status = "okay"; port@0 { status = "okay"; ZZZZZ_vi_in0: endpoint { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&ZZZZZ_csi_out0>; }; }; }; }; tegra-camera-platform { modules { status = "okay"; module0 { badge = "ZZZZZ_bottom"; position = "bottom"; orientation = "1"; status = "okay"; drivernode0 { status = "okay"; /* Declare PCL support driver (classically known as guid) */ pcl_id = "v4l2_sensor"; /* Declare the device-tree hierarchy to driver instance */ sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9546@70/i2c@0/ZZZZZ_a@18"; }; }; }; }; bus@0 { host1x@13e00000 { nvcsi@15a00000 { num-channels = <1>; channel@0 { status = "okay"; ports { status = "okay"; port@0 { status = "okay"; ZZZZZ_csi_in0: endpoint@0 { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&ZZZZZ_vi_out0>; }; }; port@1 { status = "okay"; ZZZZZ_csi_out0: endpoint@1 { status = "okay"; remote-endpoint = <&ZZZZZ_vi_in0>; }; }; }; }; }; }; i2c@3180000 { tca9546@70 { status = "okay"; compatible = "nxp,pca9546"; reg = <0x70>; #address-cells = <1>; #size-cells = <0>; skip_mux_detect = "yes"; i2c@0 { reg = <0>; i2c-mux,deselect-on-exit; #address-cells = <1>; #size-cells = <0>; status = "okay"; ZZZZZ_a@18 { channel = "a"; status = "okay"; def-addr = <0x18>; ports { status = "okay"; port@0 { status = "okay"; ZZZZZ_vi_out0: endpoint { status = "okay"; port-index = <0>; bus-width = <4>; remote-endpoint = <&ZZZZZ_csi_in0>; }; }; }; }; }; }; }; }; }; }; };
In tegra234-p3737-camera-modules.dtsi I added:
#include "tegra234-camera-ZZZZZ-a00.dtsi"
commented gpios:
/* set camera gpio direction to output */
/*
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";
};
};
*/
added:
tca9546@70 {
status = "disabled";
i2c@0 {
...
ZZZZZ_a@18 {
status = "disabled";
};
};
In Makefile added:
dtbo-y += tegra234-p3737-camera-ZZZZZ-overlay.dtbo
In p3737-0000-p3701-0000.conf added:
OVERLAY_DTB_FILE="...,tegra234-p3737-camera-ZZZZZ-overlay.dtbo";
And I flashed:
sudo ./flash.sh jetson-agx-orin-devkit internal
How to fix it so that the camera probing and device /dev/video0 appears?
Thanks!
