How to disable camera sensors in dtsi in Kernel

I have a Dragon board 410C with Debian Kernel in it. I am trying to disable the sensor in Dtsi file. How to Do it?..I am not able to locate this file in Kernel. Please let me know the procedure to do this.

Your are looking for arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi, there are camera sensors defined (ov5645) but disabled by default. If you mean removing the whole camera subsystem then you can just change the camss status field:

&camss {
status = “disabled”;

You can do the same with the camera control interface (CCI) node as well.

With current installed Kernel which is running , I am not able to find arch/arm64 folder. Is there any way to surf that path?.. system is configured with ov5640 camera and its running and video is out. I am new to this system and exploring one by one, so please don’t mistake if I ask non-sense questions.

No problem, there are no stupid questions, is there any reason why you want to disable camera other than exploring the system/board ?

Actually this path is located in the Linux kernel source tree, not at runtime on your board. To keep it simple, your system is composed of a bootloader, a kernel (Linux) for hardware abstraction, a file system (rootfs, containing standard files and applications) and a device-tree which is a data structure describing the hardware (resources, hierarchy, addresses, GPIOs…). If you want to disable the camera device/subsystem, you basically need to modify and rebuild the device-tree (at least).

You can have more information at:

Thanks for responding. We want to attach a different imager and configure the device tree structure for it. Before that I want to explore on current system, so as to get handson experience on it. I downloaded Kernel source code by giving command:

apt-get source linux-source

This was the replica of the Kernel source running on hardware, however I could not locate only .dtsi file inside arch/arm64 folder.

Document link you provided has the details on how to get Kernel source , editing .dtsi files and rebuild Kernel?.

I assume you have a x86-64 Linux computer and already have debian running on your target(dragonboard). The following steps should allow you to replace the kernel by a custom one:

Prepare Toolchain environment

In order to (cross-)compile software for your target (armv8/aarch64) you need some building tools, you can find toolchains at If you build your software on a Intel(x86) 64-bit computer (host) for your dragonboard (target) you need to use the gcc-xxxx-x86_64_aarch64-linux-gnu toolchain.

$ wget -q0- ~/Downloads/
$ tar -xf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
$ export ARCH=arm64
$ export CROSS_COMPILE=pwd/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-

Download Linux source code

You can retrieve Dragonboard Linux source from the following Linaro git repository: git://, the current branch to use is origin/release/qcomlt-4.14.
$ git clone git:// -b origin/release/qcomlt-4.14

Apply changes on kernel or device-tree.

Build Linux Kernel (and device-tree)

$ cd kernel
$ make defconfig
$ make -j 4

Create new boot image

We are going to use abootimg tool, install it.

Copy your kernel and dtb(device-tree) into a boot directory
$ mkdir boot
$ cp arch/arm64/boot/Image boot/
$ cp arch/arm64/boot/dts/qcom/apq8016-sbc.dtb boot/
$ cd boot

Zip the kernel and append the DTB.
$ gzip -c Image > Image.gz
$ cat Image.gz apq8016-sbc.dtb > Image.gz+dtb

abootimg tool requests a ramdisk image, but we actually does not use it, create a dummy one:
$ echo "notaninitrd" > initrd.img

Generate the boot image.
$ abootimg --create boot.img -k Image.gz+dtb -r initrd.img -c "pagesize=2048" -c "kerneladdr=0x80008000" -c "ramdiskaddr=0x82000000" -c "cmdline=root=/dev/mmcblk0p10 rootwait rw console=ttyMSM0,115200n8"


Replace the boot partition with your own, reboot with S4 pressed and flash:
$ fastboot flash boot boot.img
You can now reboot on your new kernel/dtb…

Install new Modules

I’s very likely you have to update Linux modules as well, which are not part of the bootimage but usually on the root file system (lib/modules). When you change/upgrade your kernel with a different one, kernel modules are no more compatible and need to be updated as well.

On your dragonboard, you can check kernel version with:
$ uname -r

Go back to the kernel directory and install modules
$ cd ../
$ make modules_install INSTALL_MOD_PATH=./boot

You should now have a boot/lib/modules/4.14.0-000xxxx directory containing all modules and aligned with your kernel version, you need to copy this in your dragonboard /lib/modules/ dir. You can use network (scp) or usb/sdcard support for the transfer.

After building the kernel again and install the new modules. In the terminal I get the following error:

dmesg | grep ov5645

[ 4.286594] ov5645 4-003b: ov5645_write_reg_to: write reg error -5 on addr 0x3c: reg=0x3100, val=0x76
[ 4.286597] ov5645 4-003b: could not change i2c address
[ 4.286613] ov5645 4-003b: could not power up OV5645
[ 4.286877] ov5645: probe of 4-003b failed with error -5
[ 4.338468] ov5645 4-003a: ov5645_write_reg_to: write reg error -5 on addr 0x3c: reg=0x3100, val=0x74
[ 4.338471] ov5645 4-003a: could not change i2c address
[ 4.338486] ov5645 4-003a: could not power up OV5645
[ 4.338736] ov5645: probe of 4-003a failed with error -5

Where can I find more information about this? Please.