device tree overlay file for an image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings!!

I am working with an image sensor for which I have to create an overlay file and a driver. This image sensor is different from conventional cameras is that it is on a separate board with its own power supplies and clock. So I didn't need to any add details about the clock or power supply in the overlay file.
The aforementioned board (with the image sensor) is connected to a RPI 4B through I2C (on bus 10 at address 0x36) and MIPI. BTW, I had to change the sensor and vendor names before posting because I was asked to do so by the client.

I have attached the overlay file for your review. I was able to compile it (using dtc) and place the dtbo file in /boot/overlays directory.
When RPI boots, it is able to read the file and correctly loads the driver I have written. It even correctly runs the probe function.

However, when I run vcgencmd get_camera, it does not detect any cameras. I get the following response:
supported=1 detected=0, libcamera interfaces=1

what could be wrong? Please advise how to debug this. Thank you!

Please advise.






/dts-v1/;
/plugin/;


#include <dt-bindings/gpio/gpio.h>


/ {
    compatible = "brcm,bcm2835";


    fragment@0 {
        target = <&i2c0if>;
        __overlay__ {
            status = "okay";
        };
    };


    clk_frag: fragment@1 {
        target = <&cam1_clk>;
        __overlay__ {
            status = "okay";
            clock-frequency = <24000000>;
        };
    };


    fragment@2 {
        target = <&i2c0mux>;
        __overlay__ {
            status = "okay";
        };
    };


    fragment@3 {
        target-path = "/";
        __overlay__ {
            clk24mhz: clk24mhz {
                compatible = "fixed-clock";
                #clock-cells = <0>;
                clock-frequency = <24000000>;
            };
        };
    };


    i2c_frag: fragment@100 {
        target = <&i2c_csi_dsi>;
        __overlay__ {
            #address-cells = <1>;
            #size-cells = <0>;


            ims123: ims123@36 {
                compatible = "vendor,ims123";
                reg = <0x36>;
                clocks = <&clk24mhz>;


                clock-names = "xclk";
                status = "disabled";


                rotation = <180>;
                orientation = <2>;


                port {
                    cam_endpoint: endpoint {
                        clock-lanes = <0>;
                        data-lanes = <1 2>;
                        clock-noncontinuous;
                        link-frequencies = /bits/ 64 <60000000>;
                    };
                };
            };
        };
    };


    csi_frag: fragment@101 {
        target = <&csi1>;
        csi: __overlay__ {
            status = "okay";
            brcm,media-controller;


            port {
                csi_ep: endpoint {
                    remote-endpoint = <&cam_endpoint>;
                    clock-lanes = <0>;
                    data-lanes = <1 2>;
                    clock-noncontinuous;
                };
            };
        };
    };


    __overrides__ {
        rotation = <&ims123>,"rotation:0";
        orientation = <&ims123>,"orientation:0";
        media-controller = <&csi>,"brcm,media-controller?";
        cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
               <&csi_frag>, "target:0=",<&csi0>,
               <&clk_frag>, "target:0=",<&cam0_clk>,
               <&ims123>, "clocks:0=",<&cam0_clk>;
    };
};


&ims123 {
    status = "okay";
};


&cam_endpoint {
    remote-endpoint = <&csi_ep>;
};






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux