Imx Driver for i.MX8 quad

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

Imx Driver for i.MX8 quad

661 Views
kamalesh
Contributor I

Hi,

I got a i2c universal driver from my vendor for video bridge processing. Now i have integrated with nxp bsp and loaded corresponding device tree also. Video node is not created and I have seen all the driver informations in dmesg Kernel messages.
 

Why it is happening?

I have used imx-image-multimedia-imx8mqevk.wic image from LF_v5.10.72-2.2.3_images_IMX8MQEVK.zip package. I have followed some procedure to flash. Please refer below link for additional information.


https://community.nxp.com/t5/i-MX-Processors/Require-guidance-to-create-wic-image-with-my-Customisin...

 

Could you please tell me how to moved forward here?

Regards,
kamalesh

0 Kudos
Reply
13 Replies

642 Views
AldoG
NXP TechSupport
NXP TechSupport
Hello,

Please stop at uboot level and check if the device tree being used is the correct one, this by printing the environmental variable fdtfile:
> printenv fdtfile

This should output the same file name you are using, if not please change it by using the setenv command:
> setenv fdtfile <your device tree name>.dtb

Best regards/Saludos,
Aldo.
0 Kudos
Reply

631 Views
kamalesh
Contributor I
Hi,
Sorry for the late reply.
Actually I have given the command printenv fdtfile, it is giving like imx8mq-evk.dtb. I have changed this file only. I have given below working and modification procedures. Please review and give comments.

I am using Universal driver for LT9211 which I have received from vendor itself.
Added device tree details.
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi1_sensor_ep: endpoint@0 {
remote-endpoint = <&lt9211c_mipi1_ep>;
data-lanes = < 0 1 2 3 >;
bus-type = <4>;
};

csi1_mipi_ep: endpoint@1 {
remote-endpoint = <&csi1_ep>;
};
};
};

&i2c2 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";

lt9211c_mipi: lt9211c_mipi@2d {
compatible = "lontium,lt9211c";
reg = <0x2d>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1_pwn>;
clocks = <&clk IMX8MQ_CLK_CLKO2>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MQ_CLK_CLKO2>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_200M>;
assigned-clock-rates = <20000000>;
csi_id = <0>;
reset-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
mclk = <20000000>;
mclk_source = <0>;
port {
lt9211c_mipi1_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
};
};
};
};


1) I have downloaded the linux-imx directory from github.
2) I have added my driver file(LT9211.c), Makefile and Kconfig files under /kernel/media/i2c/ and made configurations in menuconfig file.
3) I have modified or included my lt9211 details in /arch/arm64/boot/dts/freescale/ directory. (imx8mq-evk.dts file)
4) Finally i have compiled for image, modules, dtbs and drivers.
5) After this I have flashed the raw image.wic from Downloaded file of LF_v5.10.72-2.2.3_images_IMX8MQEVK.zip.
6) Then i have replaced the kernel(rootfs), Image and dts file.

Please help to create node.

Another thing my driver uploaded and I have seen kernel messages related to this lt9211. In this universal driver they have done i2c related parts. If anything i have to do to register this video node in driver.

Could you please do help to move forward?

I awaiting for your response.
Thanks.
Regards,
Kamalesh
0 Kudos
Reply

620 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please share the log so I can have a look, also I would suggest to check that the I2C is detect correctly be it on the dmseg or using i2cdetect.

Best regards/Saludos,
Aldo.

0 Kudos
Reply

613 Views
kamalesh
Contributor I

Hi,

Yes please find the attachment of  kernel message after driver loading.

I have checked the i2cdetect. I2c detected as UU, because i have used in device tree. I have attached the picture also.

WhatsApp Image 2025-02-15 at 10.23.11 AM.jpeg


Please give response to solve this issue.

Thanks.

Regards,
Kamalesh

0 Kudos
Reply

611 Views
kamalesh
Contributor I
Hi,

NOTE:- Flashed image is imx-image-multimedia-imx8mqevk.wic

Thanks.
0 Kudos
Reply

578 Views
kamalesh
Contributor I

Hi,

Now i have flashed the imx-full-imx8mqevk.wic. But there is no video node creation. Actually i have seen already 4 video node created. Video0 and  video1 based on mx6s-csi. Is this driver is overwriting my device tree details?

I have attached my final dts, please check i have updated my details in correct place or not?

Regards,
Kamalesh

0 Kudos
Reply

560 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Have you tried with any of those video nodes?
Also, have you tested using gstreamer?

Best regards/Saludos,
Aldo.

0 Kudos
Reply

544 Views
kamalesh
Contributor I

Hi AldoG,

Sorry for the late reply.

I have successfully registered my driver under the csi1_bridge and given the device tree details in main imx8mq-evk.dts. I have seen the kernel message as well as my driver information in kernel message. But still the video0 node information is still empty.

Is there any guide to load new camera driver and device tree details?
If you share something, It will be very useful for us.

Regards,
Kamalesh

0 Kudos
Reply

538 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

There is no specific documentation for the i.MX8MQ, but you may take an App Note that we have for the i.MX8MPlus as reference for this:
https://www.nxp.com/webapp/Download?colCode=IMX8MPCSPUG&location=null

Best regards/Saludos,
Aldo.

0 Kudos
Reply

524 Views
kamalesh
Contributor I
Hi AldoG,
Thanks for your reply.
Where we need to load the driver and where we have to add the device tree details.
Requirement:- I have connected my 4 lane camera with mipi csi 1 connector of imx8m quad dev kit board.

Could you please direct me to the right way?

Regards,
Kamalesh
0 Kudos
Reply

503 Views
kamalesh
Contributor I
Hi,
Is there any update for us?

Regards,
Kamalesh
0 Kudos
Reply

484 Views
kamalesh
Contributor I
Hi,
Update:-
I have successfully loaded my driver and device tree. In dmesg, I have seen my driver is registered under mipi_csi_bridge_1. But i am not able to receive video data.

What are all the debug techniques to analyze the issue?

I am not getting any support anywhere. Please respond as soon as possible.

Regards,
Kamalesh
0 Kudos
Reply

321 Views
kamalesh
Contributor I

Hi,

Is there any reply for me?

Regards,
kamalesh

0 Kudos
Reply