OV2740 driver development

I try to develop a driver for OV2740 in TX2. My steps is as follow:

  1. Sort out all file contain the word “OV5693” as a reference.
  2. Create the file “ov2740.c”, ov2740.h" & “ov2740_mode_tbls.h”.
  3. I noticed that the file “tegra210-jetson-cv-camera-modules.dtsi” contain the following code:
    i2c@546C0000 {
    e3326_cam0: ov5639_c@36 {
    status = “disabled”;
    };

    cam_tca9548_77: tca9548@77 {
    status = “disabled”;
    i2c@0 {
    e3333_cam0: ov5693_a@36 {
    status = “disabled”;
    };

I intend to copy this section of code then change the word “ov5639” to “ov2740”.

My question is as below:

  1. What is the meaning of those numbers “546C0000”, “e3326”, “@36”, “tca9548_77”. “@77” & “e3333”?
  2. What number I should use after I copy this section of code and change the wording to “OV2740”?
  3. Is there any other advice for developing driver for “OV2740”?

Thx.

Moving this to the Jetson TX2 forum for better visibility.

hello albert.siu,

  1. you’re checking the wrong device tree, TX2 is using tegra186-quill-p3310-1000-c03-00-base.dts file.

  2. 1. What is the meaning of those numbers “546C0000”, “e3326”, “@36”, “tca9548_77”. “@77” & “e3333”?
    “546C0000”: this is the memory address of the i2c, you may check [Tegra X2 (Parker Series SoC) Technical Reference Manual] to have more details.
    “e3326” and “e3333”: this is camera board naming. you may also refer to Tegra Linux Driver Package TX2 Adaptation Guide to have more details.
    @36”, “tca9548_77”, and “@77”: these were i2c address of specific devices.

  3. please check Tutorials page, there’s webinar training video [V4L2 Sensor Driver Development Tutorial] for your reference.