Video device not being created

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Video device not being created

808 Views
vrtacnikj
Contributor I

Hello!

We are having trouble with making the video device show up using a custom camera.

We are basing the driver off of other drivers and after probing, we can confirm I2C communication with the camera works and we can also interface with the V4L2 subdevice.

The /dev/videoX device is not being created. The problem is we could not find any information online abut how this mechanism works (does the MIPI CSI driver handle this? as far as I understand you need the raw output from that device so you can then pipe it through the ISP media server) and we are looking for some guidance on how to debug / what steps we should take for the char device to be created successfully.

&i2c3 {
	/delete-node/ov5640_mipi@3c;

	og02b10: og02b10@60 {
		compatible = "ovti,og02b10";
		reg = <0x60>;
		status = "okay";

		csi_id = <1>;
		mipi_csi;

		clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
		clock-names = "xvclk";
		assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
		assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
		assigned-clock-rates = <24000000>;

		//avdd-supply = <&reg_2v8>;
		//dovdd-supply = <&reg_1v8>;
		//dvdd-supply = <&reg_1v2>;

		//powerdown-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
		//reset-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;

		// camera mount properties
		rotation = <0>;
		orientation = <2>;

		port {
			og02b10_ep: endpoint {
				clock-lanes = <1>;
				data-lanes = <1 2>;

				link-frequencies = /bits/ 64 <750000000>;
				max-lane-frequency = /bits/ 64 <750000000>;
				max-pixel-frequency = /bits/ 64 <266000000>;
				max-data-rate = /bits/ 64 <0>;

				remote-endpoint = <&mipi_csi1_ep>;
			};
		};
	};
};

&pcie_phy {
	status = "okay";
};

&mipi_csi_1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@1 {
		reg = <1>;

		mipi_csi1_ep: endpoint {
			remote-endpoint = <&og02b10_ep>;
			data-lanes = <2>;
			csis-hs-settle = <16>;
            csis-clk-settle = <2>;
            csis-wclk;
		};
	};
};

&cameradev {
	status = "okay";
};

&isi_0 {
	status = "disabled";
};

&isi_1 {
	status = "disabled";
};

&isp_0 {
	status = "okay";
};

&isp_1 {
	status = "okay";
};

 Thank you in advance for all the help!

0 Kudos
Reply
4 Replies

773 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

usually this could be due to incorrect configuration on the driver, even if the I2C does find it as a device in the bus it may not be functioning correctly.

Best regards/Saludos,
Aldo.

0 Kudos
Reply

689 Views
vrtacnikj
Contributor I

Thank you for your response, how can I debug this further?

It seems that the first half of the media pipeline is now successfully created but now I have trouble linking the isp, as it seems to be created under an entirely different media device. How do I proceed? Thanks in advance!

graph.png

graph.png

0 Kudos
Reply

636 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

The sensor driver must use the V4L2 sub-device framework, and the media control API. The Linux kernel provides examples for multiple camera sensor drivers in the /drivers/media/i2c folder.

Also, you may take a look to the following Documents:
https://www.nxp.com/docs/en/application-note/AN13712.pdf
https://www.nxp.com/docs/en/user-guide/UG10168.pdf

Best regards/Saludos,
Aldo.

0 Kudos
Reply

434 Views
vrtacnikj
Contributor I
Hello,

I do use all of the above, the problem is, the specific problem is that the isp subdevice is created under the vvcam-video media device while the camera and csi subdevice are created under the imx8-media-dev media device. Because they are created under different devices they cannot be linked.
What am I missing?

Regards, Jakob
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2320101%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EVideo%20device%20not%20being%20created%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2320101%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello!%3C%2FP%3E%3CP%3EWe%20are%20having%20trouble%20with%20making%20the%20video%20device%20show%20up%20using%20a%20custom%20camera.%3C%2FP%3E%3CP%3EWe%20are%20basing%20the%20driver%20off%20of%20other%20drivers%20and%20after%20probing%2C%20we%20can%20confirm%20I2C%20communication%20with%20the%20camera%20works%20and%20we%20can%20also%20interface%20with%20the%20V4L2%20subdevice.%3C%2FP%3E%3CP%3EThe%20%2Fdev%2FvideoX%20device%20is%20not%20being%20created.%20The%20problem%20is%20we%20could%20not%20find%20any%20information%20online%20abut%20how%20this%20mechanism%20works%20(does%20the%20MIPI%20CSI%20driver%20handle%20this%3F%20as%20far%20as%20I%20understand%20you%20need%20the%20raw%20output%20from%20that%20device%20so%20you%20can%20then%20pipe%20it%20through%20the%20ISP%20media%20server)%20and%20we%20are%20looking%20for%20some%20guidance%20on%20how%20to%20debug%20%2F%20what%20steps%20we%20should%20take%20for%20the%20char%20device%20to%20be%20created%20successfully.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%26amp%3Bi2c3%20%7B%0A%09%2Fdelete-node%2Fov5640_mipi%403c%3B%0A%0A%09og02b10%3A%20og02b10%4060%20%7B%0A%09%09compatible%20%3D%20%22ovti%2Cog02b10%22%3B%0A%09%09reg%20%3D%20%26lt%3B0x60%26gt%3B%3B%0A%09%09status%20%3D%20%22okay%22%3B%0A%0A%09%09csi_id%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09%09mipi_csi%3B%0A%0A%09%09clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_IPP_DO_CLKO2%26gt%3B%3B%0A%09%09clock-names%20%3D%20%22xvclk%22%3B%0A%09%09assigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_IPP_DO_CLKO2%26gt%3B%3B%0A%09%09assigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MP_CLK_24M%26gt%3B%3B%0A%09%09assigned-clock-rates%20%3D%20%26lt%3B24000000%26gt%3B%3B%0A%0A%09%09%2F%2Favdd-supply%20%3D%20%26lt%3B%26amp%3Breg_2v8%26gt%3B%3B%0A%09%09%2F%2Fdovdd-supply%20%3D%20%26lt%3B%26amp%3Breg_1v8%26gt%3B%3B%0A%09%09%2F%2Fdvdd-supply%20%3D%20%26lt%3B%26amp%3Breg_1v2%26gt%3B%3B%0A%0A%09%09%2F%2Fpowerdown-gpios%20%3D%20%26lt%3B%26amp%3Bgpio4%201%20GPIO_ACTIVE_HIGH%26gt%3B%3B%0A%09%09%2F%2Freset-gpios%20%3D%20%26lt%3B%26amp%3Bgpio4%200%20GPIO_ACTIVE_LOW%26gt%3B%3B%0A%0A%09%09%2F%2F%20camera%20mount%20properties%0A%09%09rotation%20%3D%20%26lt%3B0%26gt%3B%3B%0A%09%09orientation%20%3D%20%26lt%3B2%26gt%3B%3B%0A%0A%09%09port%20%7B%0A%09%09%09og02b10_ep%3A%20endpoint%20%7B%0A%09%09%09%09clock-lanes%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09%09%09%09data-lanes%20%3D%20%26lt%3B1%202%26gt%3B%3B%0A%0A%09%09%09%09link-frequencies%20%3D%20%2Fbits%2F%2064%20%26lt%3B750000000%26gt%3B%3B%0A%09%09%09%09max-lane-frequency%20%3D%20%2Fbits%2F%2064%20%26lt%3B750000000%26gt%3B%3B%0A%09%09%09%09max-pixel-frequency%20%3D%20%2Fbits%2F%2064%20%26lt%3B266000000%26gt%3B%3B%0A%09%09%09%09max-data-rate%20%3D%20%2Fbits%2F%2064%20%26lt%3B0%26gt%3B%3B%0A%0A%09%09%09%09remote-endpoint%20%3D%20%26lt%3B%26amp%3Bmipi_csi1_ep%26gt%3B%3B%0A%09%09%09%7D%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%0A%0A%26amp%3Bpcie_phy%20%7B%0A%09status%20%3D%20%22okay%22%3B%0A%7D%3B%0A%0A%26amp%3Bmipi_csi_1%20%7B%0A%09%23address-cells%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09%23size-cells%20%3D%20%26lt%3B0%26gt%3B%3B%0A%09status%20%3D%20%22okay%22%3B%0A%0A%09port%401%20%7B%0A%09%09reg%20%3D%20%26lt%3B1%26gt%3B%3B%0A%0A%09%09mipi_csi1_ep%3A%20endpoint%20%7B%0A%09%09%09remote-endpoint%20%3D%20%26lt%3B%26amp%3Bog02b10_ep%26gt%3B%3B%0A%09%09%09data-lanes%20%3D%20%26lt%3B2%26gt%3B%3B%0A%09%09%09csis-hs-settle%20%3D%20%26lt%3B16%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20csis-clk-settle%20%3D%20%26lt%3B2%26gt%3B%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20csis-wclk%3B%0A%09%09%7D%3B%0A%09%7D%3B%0A%7D%3B%0A%0A%26amp%3Bcameradev%20%7B%0A%09status%20%3D%20%22okay%22%3B%0A%7D%3B%0A%0A%26amp%3Bisi_0%20%7B%0A%09status%20%3D%20%22disabled%22%3B%0A%7D%3B%0A%0A%26amp%3Bisi_1%20%7B%0A%09status%20%3D%20%22disabled%22%3B%0A%7D%3B%0A%0A%26amp%3Bisp_0%20%7B%0A%09status%20%3D%20%22okay%22%3B%0A%7D%3B%0A%0A%26amp%3Bisp_1%20%7B%0A%09status%20%3D%20%22okay%22%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BThank%20you%20in%20advance%20for%20all%20the%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2320101%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGraphics%20%26amp%3B%20Display%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%208%20Family%20%7C%20i.MX%208QuadMax%20(8QM)%20%7C%208QuadPlus%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMultimedia%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2320388%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Video%20device%20not%20being%20created%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2320388%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3Eusually%20this%20could%20be%20due%20to%20incorrect%20configuration%20on%20the%20driver%2C%20even%20if%20the%20I2C%20does%20find%20it%20as%20a%20device%20in%20the%20bus%20it%20may%20not%20be%20functioning%20correctly.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2FSaludos%2C%3CBR%20%2F%3EAldo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2323782%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Video%20device%20not%20being%20created%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2323782%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20your%20response%2C%20how%20can%20I%20debug%20this%20further%3F%3C%2FP%3E%3CP%3EIt%20seems%20that%20the%20first%20half%20of%20the%20media%20pipeline%20is%20now%20successfully%20created%20but%20now%20I%20have%20trouble%20linking%20the%20isp%2C%20as%20it%20seems%20to%20be%20created%20under%20an%20entirely%20different%20media%20device.%20How%20do%20I%20proceed%3F%20Thanks%20in%20advance!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20193px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20193px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20193px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377897i475700D07BCC39AE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22graph.png%22%20alt%3D%22graph.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E2%80%83%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22graph.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377896iE74B05DFEF078C9C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22graph.png%22%20alt%3D%22graph.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E2%80%83%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2325775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Video%20device%20not%20being%20created%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2325775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20sensor%20driver%20must%20use%20the%20V4L2%20sub-device%20framework%2C%20and%20the%20media%20control%20API.%20The%20Linux%20kernel%20provides%20examples%20for%20multiple%20camera%20sensor%20drivers%20in%20the%20%2Fdrivers%2Fmedia%2Fi2c%20folder.%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%2C%20you%20may%20take%20a%20look%20to%20the%20following%20Documents%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN13712.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN13712.pdf%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FUG10168.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FUG10168.pdf%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2FSaludos%2C%3CBR%20%2F%3EAldo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2330734%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Video%20device%20not%20being%20created%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2330734%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20do%20use%20all%20of%20the%20above%2C%20the%20problem%20is%2C%20the%20specific%20problem%20is%20that%20the%20isp%20subdevice%20is%20created%20under%20the%20vvcam-video%20media%20device%20while%20the%20camera%20and%20csi%20subdevice%20are%20created%20under%20the%20imx8-media-dev%20media%20device.%20Because%20they%20are%20created%20under%20different%20devices%20they%20cannot%20be%20linked.%3CBR%20%2F%3EWhat%20am%20I%20missing%3F%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%2C%20Jakob%3C%2FLINGO-BODY%3E