TechNexion / linux-tn-imx

i.MX Linux kernel maintained by TechNexion
Other
20 stars 26 forks source link

i2c errors with NXP 8MPLUSLPD4-EVK dev kit and TEVI-AR0144 camera #10

Closed ldevuser closed 3 months ago

ldevuser commented 3 months ago

I installed the prebuilt ubuntu image on a SD card (https://download.technexion.com/demo_software/EVK/NXP/IMX8MP-LPDDR4/imx8mp-lpddr4-evk_ubuntu-22.04_20230810.zip)

TEVI-AR0144 is connected to CSI1 connector on the EVK. After following the instructions from https://developer.technexion.com/docs/nxp-8mpluslpd4-evk-board-tevi-camera-usage-guide I don't get working camera. Instead I have i2c errors in dmesg:

dmesg |grep tevi [ 8.771665] tevi-ap1302 1-003d: sensor_probe() device node: tevi_ap1302@3d [ 8.815804] tevi-ap1302 1-003d: i2c transfer error. [ 8.822383] tevi-ap1302 1-003d: sensor_try_on() try on failed [ 8.859692] tevi-ap1302 1-003d: find not otp flash setting [ 8.865250] tevi-ap1302 1-003d: otp flash init failed [ 8.881121] tevi-ap1302: probe of 1-003d failed with error -22 [ 8.881342] tevi-ap1302 2-003d: sensor_probe() device node: tevi_ap1302@3d [ 8.923816] tevi-ap1302 2-003d: i2c transfer error. [ 8.928927] tevi-ap1302 2-003d: sensor_try_on() try on failed [ 8.963630] tevi-ap1302 2-003d: find not otp flash setting [ 8.969583] tevi-ap1302 2-003d: otp flash init failed [ 8.975041] tevi-ap1302: probe of 2-003d failed with error -22

Are there some steps missing from the instructions perhaps?

Update: Same error also happens with the latest yokto image (https://download.technexion.com/demo_software/EVK/NXP/IMX8MP-LPDDR4/imx8mp-lpddr4-evk_yocto-4.0-qt6_20240220.zip)

jigoku1206 commented 3 months ago

Hi @ldevuser We reconfirmed the image (https://download.technexion.com/demo_software/EVK/NXP/IMX8MP-LPDDR4/imx8mp-lpddr4-evk_ubuntu-22.04_20230810.zip)) and we are sure that TEVI-AR0144 can work.

We only replicated your problem when we didn't connect any cameras.

Could you check if your camera works on other boards? Or could you check if your camera is correctly connected to CSI connector?

ldevuser commented 3 months ago

![Uploading 20240417094302.jpg…]()

Hi! I noticed that I am using a TEVI-NXP-EVK module which has TEVS-AR0144 camera sensor board attached. Does the tevi_ap1302 driver work with TEVS-AR0144 camera? If not how can I make it work with 8MPLUSLPD4-EVK

jigoku1206 commented 3 months ago

Hi @ldevuser

You need the driver 'tevs' not 'tevi-ap1302'. You can try the image and confirm if the camera can work. (https://download.technexion.com/demo_software/EVK/NXP/IMX8MP-LPDDR4/imx8mp-lpddr4-evk_yocto-4.0-qt6_20240220.zip)

ldevuser commented 3 months ago

thanks for the advice. With this image I now loaded imx8mp-evk-tevs.dtb device tree file and both cameras got initialized:

TEVS-AR0522: dmesg | grep tevs [ 0.000000] Machine model: NXP i.MX8MPlus EVK board with TechNexion TEVS camera [ 2.189307] tevs 1-0048: tevs_probe() device node: tevs@48 [ 2.466243] tevs 1-0048: Version:24.1.0.2 [ 2.474777] tevs 1-0048: Product:TEVS-AR0522, HeaderVer:3, MIPI_Rate:800 [ 2.662754] tevs 1-0048: probe success [ 2.710294] imx8mp-pinctrl 30330000.pinctrl: could not request pin 46 (MX8MP_IOMUXC_SD1_STROBE) from group tevs_csi1_pwn_grp on device 30330000.pinctrl [ 2.723956] tevs 2-0048: Error applying setting, reverse things back [ 7.584127] mx8-img-md: Registered sensor subdevice: tevs 1-0048 (1) [ 7.638323] mx8-img-md: created link [tevs 1-0048] => [mxc-mipi-csi2.0]

TEVS-AR0144: dmesg | grep tevs [ 0.000000] Machine model: NXP i.MX8MPlus EVK board with TechNexion TEVS camera [ 2.223148] tevs 1-0048: tevs_probe() device node: tevs@48 [ 2.502157] tevs 1-0048: Version:24.1.0.2 [ 2.556683] tevs 1-0048: Product:TEVS-AR0144, HeaderVer:3, MIPI_Rate:800 [ 2.793850] tevs 1-0048: probe success [ 2.847510] imx8mp-pinctrl 30330000.pinctrl: could not request pin 46 (MX8MP_IOMUXC_SD1_STROBE) from group tevs_csi1_pwn_grp on device 30330000.pinctrl [ 2.861165] tevs 2-0048: Error applying setting, reverse things back [ 6.780364] mx8-img-md: Registered sensor subdevice: tevs 1-0048 (1) [ 6.817875] mx8-img-md: created link [tevs 1-0048] => [mxc-mipi-csi2.0]