Sensor driver development

I am developing a driver for OV2740 is TX2.

My hardware setup is as below:
TX2 -> Deserializer [DS90UB954] -> Serializer [DS90UB953] -> OV2740 (no EEPROM)

I follow the information I obtain form my previous enquire to build the driver.

I build by kernel with the following command:


cd ~/workspace/sources_albert/kernel/kernel-4.4
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra18_cti_defconfig

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j6

sudo cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image /boot/Image
sudo cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra186-tx2-cti-ASG006-IMX185-3CAM.dtb /boot/dtb/tegra186-tx2-cti-ASG006-IMX185-3CAM.dtb
sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install

I can build the driver successfully as no error and I can figure out the “ov2740.o” object after execute the above code:

My situation is as below:

  1. TX2 can’t detect the sensor after reboot TX2 [no “video*” under /dev]. I already follow the section “Using Main Platform Device Tree File” of the “Tegra Linux Driver Package Development Guide 28.2 Release”.

My question is as below:

  1. I the “Using Main Platform Device Tree File”, it said that I should edit the file “tegra186…dtsi” [step 1 and 2]. I can’t find this dtsi file. So I just skip these steps and follow step 3 and 4 to continuous my device registration process. Is it true that I can register my device successfully?

  2. The command “dmesg | grep -I ov2740” don’t output any information. Am I right that it is due to TX2 can’t detect my sensor [no “veido*” under /dev]?

  3. I check my circuit and find that my sensor is power down by the GPIO of my Serializer. I think it is a reason that TX2 can’t detect my sensor. The GPIO of the Serializer can control by I2C. I would like to known how to modify my code to control the serializer?

  4. The seriializer provide a I2C path to control the sensor. The device address of the serializer and sensor are different. Is it true I should use the serializer I2C device address instead of using the sensor I2C device address when coding my driver?

  5. How to access those sensor I2C register as it is behind the seializer?

Sorry I am new in TX2, Linux and this serializer so may be asking some silly question.


The “Using Main Platform Device Tree File” step 1 should be talked about the xxxx.dts instead of xxxx.dtsi