Camera bring-up with imx95

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

Camera bring-up with imx95

Jump to solution
506 Views
Rathore-pioneer
Contributor III

Hi All,

 

I am using the imx95 SVS setup

imx95[SOC] + MX95MBDES01[MAX96724] ===> {mx95mbcam[0x03C10+MAX96717F]+mx95mbcam[0x03C10+MAX96717F]+mx95mbcam[0x03C10+MAX96717F]+custom_cam[0x03H10+MAX96717]}

So basically, the entire setup is the same as SVS, but just changed the cam3 with a custom camera module [0x03H10+MAX96717].

I am making driver modifications but am facing an issue with the GMSL link lock.
My custom camera module runs with this configuration:
I2C Address: 0x84;Xtal Configuration
Coax-Pixel Mode,6Gbps

 

I can only see cam0-3:
root@imx95-19x19-lpddr5-evk:~# i2cdetect -l
i2c-1 i2c 44350000.i2c I2C adapter
i2c-2 i2c 42530000.i2c I2C adapter
i2c-3 i2c 42540000.i2c I2C adapter
i2c-4 i2c 426b0000.i2c I2C adapter
i2c-5 i2c 426c0000.i2c I2C adapter
i2c-6 i2c 426d0000.i2c I2C adapter
i2c-8 i2c i2c-2-mux (chan_id 0) I2C adapter
i2c-9 i2c i2c-2-mux (chan_id 1) I2C adapter
i2c-10 i2c i2c-2-mux (chan_id 2) I2C adapter

Please suggest a solution.

 

 

Tags (1)
0 Kudos
Reply
1 Solution
308 Views
yipingwang
NXP TechSupport
NXP TechSupport

For i.MX95 ISP, the tuning .bin (DTP database) files are not generated automatically from the BSP. According to the internal i.MX95 Camera Porting Guide and ISP training material:

  • Sensor-specific tuning files are generated using the MMS Tuning Tool.
  • The output is a tuning database file named like:

database_<sensor>_<mode>_<resolution>_<bitdepth>.bin

 

Example:

database_os08a20_SDR_3840-2160_12bpp.bin

 

These files are installed under:

/usr/share/libcamera/ipa/nxp/neo/uguzzi/

and are referenced by the IPA configuration

View solution in original post

0 Kudos
Reply
8 Replies
289 Views
db16122
Contributor IV

clear the camera without dust in the front; modify the background light and make the image more clean; modify the brightness and contrastness and check the result; modify the cable connect and make the joint robust

btw, the MAX96717F and MAX96717 may have some parameter difference with serdes configuration

0 Kudos
Reply
394 Views
Rathore-pioneer
Contributor III

I got this fixed by running a correct SerDes config.
Now, the camera is up, but getting too white video data.
How can I do Image tunning?
Attached a video for reference.


 

0 Kudos
Reply
380 Views
Rathore-pioneer
Contributor III

I got the image as output. How do I do image tuning:
Attached the image and data which I have used.

0 Kudos
Reply
384 Views
yipingwang
NXP TechSupport
NXP TechSupport

First check: Is ISP actually being used?

Run:

libcamera-hello --list-cameras

or

media-ctl -p

and verify the stream is going through:

Sensor

-> ISI

-> ISP

-> libcamera

If you're bypassing the ISP and displaying RAW data directly, image quality will look very poor. The i.MX95 camera subsystem is designed to use the ISP for RAW Bayer sensors.

Common cause #1: Wrong Bayer pattern

You replaced the SVS sensor:

OX03C10

with:

OX03H10

One of the first things to verify is:

BGGR

RGGB

GRBG

GBRG

If the Bayer order configured in the driver differs from the sensor output format, the image often appears:

  • extremely bright
  • wrong colors
  • pink/magenta tint
  • green tint

Check the sensor mode table and DT endpoint configuration.

 

Common cause #2: Exposure too high

Try forcing exposure manually.

For example:

v4l2-ctl -d /dev/v4l-subdevX --all

``

Check:

exposure

analog gain

digital gain

If exposure is fixed at a large value, the image will become completely white.

 

Common cause #3: AE/AWB not working

The i.MX95 ISP uses calibration/tuning information and IPA algorithms for:

  • AE (Auto Exposure)
  • AWB (Auto White Balance)
  • Color correction
  • Denoise
  • Gamma

The camera porting guide states that a sensor-specific configuration and calibration database must be created for a new sensor.

If you simply copied the OX03C10 driver and changed the sensor ID, the ISP may still be loading OX03C10 tuning parameters, which are incorrect for OX03H10.

 

Common cause #4: Wrong DTP / calibration database

For i.MX95, tuning parameters are stored in sensor-specific database files:

database_<sensor>_<mode>_<resolution>_<bitdepth>.bin

The porting guide states that a dedicated calibration file must be created for a new sensor and installed through the IPA configuration.

Without proper calibration:

  • exposure can be unstable
  • white balance can be wrong
  • colors can be inaccurate
  • image may appear washed out
0 Kudos
Reply
379 Views
Rathore-pioneer
Contributor III

How to generate tuning bin files?

0 Kudos
Reply
309 Views
yipingwang
NXP TechSupport
NXP TechSupport

For i.MX95 ISP, the tuning .bin (DTP database) files are not generated automatically from the BSP. According to the internal i.MX95 Camera Porting Guide and ISP training material:

  • Sensor-specific tuning files are generated using the MMS Tuning Tool.
  • The output is a tuning database file named like:

database_<sensor>_<mode>_<resolution>_<bitdepth>.bin

 

Example:

database_os08a20_SDR_3840-2160_12bpp.bin

 

These files are installed under:

/usr/share/libcamera/ipa/nxp/neo/uguzzi/

and are referenced by the IPA configuration

0 Kudos
Reply
394 Views
Rathore-pioneer
Contributor III

Yes, that's correct

0 Kudos
Reply
474 Views
db16122
Contributor IV

so the orginal setup has 4 camera modules with MAX96724,right now you change one of the module cam3 with custom camera module MAX96717 and you can not find it. The module is chan_id 3,right?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2388796%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECamera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388796%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20am%20using%20the%20imx95%20SVS%20setup%3C%2FP%3E%3CP%3Eimx95%5BSOC%5D%20%2B%20MX95MBDES01%5BMAX96724%5D%20%3D%3D%3D%26gt%3B%20%7Bmx95mbcam%5B0x03C10%2BMAX96717F%5D%2Bmx95mbcam%5B0x03C10%2BMAX96717F%5D%2Bmx95mbcam%5B0x03C10%2BMAX96717F%5D%2Bcustom_cam%5B0x03H10%2BMAX96717%5D%7D%3C%2FP%3E%3CP%3ESo%20basically%2C%20the%20entire%20setup%20is%20the%20same%20as%20SVS%2C%20but%20just%20changed%20the%20cam3%20with%20a%20custom%20camera%20module%26nbsp%3B%5B0x03H10%2BMAX96717%5D.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20making%20driver%20modifications%20but%20am%20facing%20an%20issue%20with%20the%20GMSL%20link%20lock.%3CBR%20%2F%3EMy%20custom%20camera%20module%20runs%20with%20this%20configuration%3A%3CBR%20%2F%3EI2C%20Address%3A%200x84%3BXtal%20Configuration%3CBR%20%2F%3ECoax-Pixel%20Mode%2C6Gbps%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20can%20only%20see%20cam0-3%3A%3CBR%20%2F%3Eroot%40imx95-19x19-lpddr5-evk%3A~%23%20i2cdetect%20-l%3CBR%20%2F%3Ei2c-1%20i2c%2044350000.i2c%20I2C%20adapter%3CBR%20%2F%3Ei2c-2%20i2c%2042530000.i2c%20I2C%20adapter%3CBR%20%2F%3Ei2c-3%20i2c%2042540000.i2c%20I2C%20adapter%3CBR%20%2F%3Ei2c-4%20i2c%20426b0000.i2c%20I2C%20adapter%3CBR%20%2F%3Ei2c-5%20i2c%20426c0000.i2c%20I2C%20adapter%3CBR%20%2F%3Ei2c-6%20i2c%20426d0000.i2c%20I2C%20adapter%3CBR%20%2F%3Ei2c-8%20i2c%20i2c-2-mux%20(chan_id%200)%20I2C%20adapter%3CBR%20%2F%3Ei2c-9%20i2c%20i2c-2-mux%20(chan_id%201)%20I2C%20adapter%3CBR%20%2F%3Ei2c-10%20i2c%20i2c-2-mux%20(chan_id%202)%20I2C%20adapter%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EPlease%20suggest%20a%20solution.%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2388908%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388908%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Eso%20the%20orginal%20setup%20has%204%20camera%20modules%20with%26nbsp%3B%3CSPAN%3EMAX96724%EF%BC%8Cright%20now%20you%20change%20one%20of%20the%20module%20cam3%20with%26nbsp%3Bcustom%20camera%20module%20MAX96717%20and%20you%20can%20not%20find%20it.%20The%20module%20is%26nbsp%3Bchan_id%203%EF%BC%8Cright%EF%BC%9F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2389806%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2389806%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20that's%20correct%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2389808%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2389808%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20got%20this%20fixed%20by%20running%20a%20correct%20SerDes%20config.%3CBR%20%2F%3ENow%2C%20the%20camera%20is%20up%2C%20but%20getting%20too%20white%20video%20data.%3CBR%20%2F%3EHow%20can%20I%20do%20Image%20tunning%3F%3CBR%20%2F%3EAttached%20a%20video%20for%20reference.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2390413%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390413%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20got%20the%20image%20as%20output.%20How%20do%20I%20do%20image%20tuning%3A%3CBR%20%2F%3EAttached%20the%20image%20and%20data%20which%20I%20have%20used.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2390193%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390193%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSTRONG%3EFirst%20check%3A%20Is%20ISP%20actually%20being%20used%3F%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ERun%3A%3C%2FP%3E%0A%3CP%3Elibcamera-hello%20--list-cameras%3C%2FP%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CP%3Emedia-ctl%20-p%3C%2FP%3E%0A%3CP%3Eand%20verify%20the%20stream%20is%20going%20through%3A%3C%2FP%3E%0A%3CP%3ESensor%3C%2FP%3E%0A%3CP%3E-%26gt%3B%20ISI%3C%2FP%3E%0A%3CP%3E-%26gt%3B%20ISP%3C%2FP%3E%0A%3CP%3E-%26gt%3B%20libcamera%3C%2FP%3E%0A%3CP%3EIf%20you're%20bypassing%20the%20ISP%20and%20displaying%20RAW%20data%20directly%2C%20image%20quality%20will%20look%20very%20poor.%20The%20i.MX95%20camera%20subsystem%20is%20designed%20to%20use%20the%20ISP%20for%20RAW%20Bayer%20sensors.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ECommon%20cause%20%231%3A%20Wrong%20Bayer%20pattern%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EYou%20replaced%20the%20SVS%20sensor%3A%3C%2FP%3E%0A%3CP%3EOX03C10%3C%2FP%3E%0A%3CP%3Ewith%3A%3C%2FP%3E%0A%3CP%3EOX03H10%3C%2FP%3E%0A%3CP%3EOne%20of%20the%20first%20things%20to%20verify%20is%3A%3C%2FP%3E%0A%3CP%3EBGGR%3C%2FP%3E%0A%3CP%3ERGGB%3C%2FP%3E%0A%3CP%3EGRBG%3C%2FP%3E%0A%3CP%3EGBRG%3C%2FP%3E%0A%3CP%3EIf%20the%20Bayer%20order%20configured%20in%20the%20driver%20differs%20from%20the%20sensor%20output%20format%2C%20the%20image%20often%20appears%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Eextremely%20bright%3C%2FLI%3E%0A%3CLI%3Ewrong%20colors%3C%2FLI%3E%0A%3CLI%3Epink%2Fmagenta%20tint%3C%2FLI%3E%0A%3CLI%3Egreen%20tint%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ECheck%20the%20sensor%20mode%20table%20and%20DT%20endpoint%20configuration.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ECommon%20cause%20%232%3A%20Exposure%20too%20high%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ETry%20forcing%20exposure%20manually.%3C%2FP%3E%0A%3CP%3EFor%20example%3A%3C%2FP%3E%0A%3CP%3Ev4l2-ctl%20-d%20%2Fdev%2Fv4l-subdevX%20--all%3C%2FP%3E%0A%3CP%3E%60%60%3C%2FP%3E%0A%3CP%3ECheck%3A%3C%2FP%3E%0A%3CP%3Eexposure%3C%2FP%3E%0A%3CP%3Eanalog%20gain%3C%2FP%3E%0A%3CP%3Edigital%20gain%3C%2FP%3E%0A%3CP%3EIf%20exposure%20is%20fixed%20at%20a%20large%20value%2C%20the%20image%20will%20become%20completely%20white.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ECommon%20cause%20%233%3A%20AE%2FAWB%20not%20working%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThe%20i.MX95%20ISP%20uses%20calibration%2Ftuning%20information%20and%20IPA%20algorithms%20for%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAE%20(Auto%20Exposure)%3C%2FLI%3E%0A%3CLI%3EAWB%20(Auto%20White%20Balance)%3C%2FLI%3E%0A%3CLI%3EColor%20correction%3C%2FLI%3E%0A%3CLI%3EDenoise%3C%2FLI%3E%0A%3CLI%3EGamma%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%20camera%20porting%20guide%20states%20that%20a%20sensor-specific%20configuration%20and%20calibration%20database%20must%20be%20created%20for%20a%20new%20sensor.%3C%2FP%3E%0A%3CP%3EIf%20you%20simply%20copied%20the%20OX03C10%20driver%20and%20changed%20the%20sensor%20ID%2C%20the%20ISP%20may%20still%20be%20loading%20OX03C10%20tuning%20parameters%2C%20which%20are%20incorrect%20for%20OX03H10.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ECommon%20cause%20%234%3A%20Wrong%20DTP%20%2F%20calibration%20database%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EFor%20i.MX95%2C%20tuning%20parameters%20are%20stored%20in%20sensor-specific%20database%20files%3A%3C%2FP%3E%0A%3CP%3Edatabase_%3CSENSOR%3E_%3CMODE%3E_%3CRESOLUTION%3E_%3CBITDEPTH%3E.bin%3C%2FBITDEPTH%3E%3C%2FRESOLUTION%3E%3C%2FMODE%3E%3C%2FSENSOR%3E%3C%2FP%3E%0A%3CP%3EThe%20porting%20guide%20states%20that%20a%20dedicated%20calibration%20file%20must%20be%20created%20for%20a%20new%20sensor%20and%20installed%20through%20the%20IPA%20configuration.%3C%2FP%3E%0A%3CP%3EWithout%20proper%20calibration%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Eexposure%20can%20be%20unstable%3C%2FLI%3E%0A%3CLI%3Ewhite%20balance%20can%20be%20wrong%3C%2FLI%3E%0A%3CLI%3Ecolors%20can%20be%20inaccurate%3C%2FLI%3E%0A%3CLI%3Eimage%20may%20appear%20washed%20out%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2390414%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390414%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHow%20to%20generate%20tuning%20bin%20files%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2391469%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Camera%20bring-up%20with%20imx95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2391469%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Eclear%20the%20camera%20without%20dust%20in%20the%20front%3B%20modify%20the%20background%20light%20and%20make%20the%20image%20more%20clean%3B%20modify%20the%20brightness%20and%20contrastness%20and%20check%20the%20result%3B%20modify%20the%20cable%20connect%20and%20make%20the%20joint%20robust%3C%2FP%3E%3CP%3Ebtw%2C%20the%26nbsp%3B%3CSPAN%3EMAX96717F%20and%20MAX96717%20may%20have%20some%20parameter%20difference%20with%20serdes%20configuration%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E