Please help me: Some questions and steps about adding a camera in orin nano

IDE:jeston 36.0

JetPack6.0

core board:orin Nano4GB

board:Jetson Orin Nano Developer Kit

kernel source: Jetson Linux 36.3 | NVIDIA Developer

rootfs source: Basic Flavor Root File System Root File System — NVIDIA Jetson Linux Developer Guide 1 documentation

I am a novice, and the problem may be too low-level. I hope you can understand that it is my first time to use orin nano4G, and I need to add an imx415 camera to my project. I refer to the “Sensor Software Driver Programming - NVIDIA Jetson Linux Developer’s Guide 1 document”, but I still feel that I have no way to start. There are a few questions, hope to get the solution to:
一、There are two csi interfaces on the motherboard, corresponding to i2c9 and i2c10 respectively. May I ask how to associate them with the corresponding i2c interface in the device tree written by myself? How to reflect i2c9 and i2c10 in the device tree, how to name them and how to apply them?
二、There are two csi interfaces on the motherboard. When I write my own device tree, how to correspond to the csi interface I use, and what are their device tree nodes?
三、There is a CAM0_PWDN pin in the csi interface of the motherboard. After I reference this node in the device tree, how do I get the pin in the driver and how do the drivers operate on this pin?
四、https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SeI’m a little confused about this routine and don’t know where to start. This routine summarizes the steps for myself:
1.Find or create a device tree node in the kernel source tree
I’m creating my first device tree node /hardware/nvidia/t23x/nv-public/overlay/tegra234-camera-imx415-a00.dtsi
After this node is created, do I need to add it to the Makefile for compilation?
2.tegra234-camera-imx415-a00.dtsi Add:

tegra-camera-platform {
    compatible = "nvidia, tegra-camera-platform";
    modules {
        module0 {
            badge = "imx415_bottom_liimx415";
            position = "bottom";
            orientation = "0";
            drivernode0 {
                pcl_id = "v4l2_sensor";
                sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9546@70/i2c@0/imx415_a@1a";
            };
        };
    };
};

imx415_a@1a {
    compatible = "sony,imx415";
    reg = <0x1a>;
    physical_w = "15.0";
    physical_h = "12.5";
    sensor_model ="imx415";
    post_crop_frame_drop = "0";
    use_decibel_gain = "true";
    delayed_gain = "true";
    use_sensor_mode_id = "true";
    mode0 {
        mclk_khz = "37125";
        num_lanes = "4";
        tegra_sinterface = "serial_a";
        phy_mode = "DPHY";
        discontinuous_clk = "no";
        dpcm_enable = "false";
        cil_settletime = "0";
        dynamic_pixel_bit_depth = "12";
        csi_pixel_bit_depth = "12";
        mode_type = "bayer";
        pixel_phase = "rggb";
        active_w = "1920";
        active_h = "1080";
        readout_orientation = "0";
        line_length = "2200";
        inherent_gain = "1";
        mclk_multiplier = "2";
        pix_clk_hz = "74250000";
        gain_factor = "10";
        min_gain_val = "0";             /* 0dB */
        max_gain_val = "480";           /* 48dB */
        step_gain_val = "3";            /* 0.3 */
        default_gain = "0";
        min_hdr_ratio = "1";
        max_hdr_ratio = "1";
        framerate_factor = "1000000";
        min_framerate = "1500000";
        max_framerate = "30000000";     /* 30 */
        min_exp_time = "30";            /* us */
        max_exp_time = "660000";        /* us */
        step_exp_time = "1";
        default_exp_time = "33334";     /* us */
        embedded_metadata_height = "1";
    };

    . . .

    ports {
        #address-cells = <1>;
        #size-cells = <0>;
        port@0 {
            reg = <0>;
            liimx415_imx415_out0: endpoint {
                port-index = <0>;
                bus-width = <4>;
                remote-endpoint = <&liimx415_csi_in0>;
            };
        };
    };
};

tegra-capture-vi {
    num-channels = <1>;
    ports {
        #address-cells = <1>;
        #size-cells = <0>;
        port@0 {
            reg = <0>;
            liimx415_vi_in0: endpoint {
                port-index = <0>;
                bus-width = <4>;
                remote-endpoint = <&liimx415_csi_out0>;
            };
        };
    };
};

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>;
                    liimx415_csi_in0: endpoint@0 {
                        port-index = <0>;
                        bus-width = <4>;
                        remote-endpoint = <&liimx415_imx415_out0>;
                    };
                };
                port@1 {
                    reg = <1>;
                    liimx415_csi_out0: endpoint@1 {
                        remote-endpoint = <&liimx415_vi_in0>;
                    };
                };
            };
        };
    };
};

The sysfs device - tree = “/ sys/firmware/devicetree/base / / i2c bus @ 0 @ 3180000 / tca9546 @ 70 / i2c @ 0 / imx415_a @ 1 a”. What does it mean? Student: My understanding is that this corresponds to the node i2c9? Or is a imx415_a@1a node generated below this node?
This is my first experience with the development platform, having previously used zynq cs to implement camera displays. I don’t know if there are more detailed operation steps or cases that can help me complete the camera display.

it looks duplicated with Topic 304699.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.