I2c address of CSI camera

Hi all,

I tried to modify the register of IMX219 camera for analog pixel binning
To modify the register, I tried to find I2C address of the camera

But there was no camera detected by the i2cdetect command.
Could you give me some advice?

“sudo i2cdetect -y -r 0”

. 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –

“sudo i2cdetect -y -r 1”

. 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –

hello riul5627k,

you may check sysnode for details. i.e. /proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_a@10

it’s GPIO-based i2c bus multiplexer to route the i2c signals,
here’s device tree sources, it’s based-on i2c7.

 	cam_i2cmux {
 		i2c-parent = <&i2c7>;
 		i2c@0 {
 			rbpcv2_imx219_a@10 {
 		i2c@1 {
 			rbpcv2_imx219_e@10 {

I have little knowledge about modifying the register.
What is sysnode?
How can I modify the register with the i2c multiplexer?

Is “i2c7” the address of the CSI cam?
Can I now use the below command?

i2cset -f -y 7 0x0174 0x03
i2cset -f -y 7 0x0175 0x03

Could you give me some advice?

hello riul5627k,

yeah… I misunderstanding your question.

your actual use-case is modify the register values in sensor init table to change the binning modes, right?
why don’t you modify the settings directly,
for example,
$public_sources/kernel_src/kernel/nvidia/drivers/media/i2c/imx219_mode_tbls.h

I didn’t know that I can modify the register directly. 😂
where can I find the kernel?
I cannot find “public_sources” folder

I also tried to apporach
usr/src/nvidia/drivers/media/i2c/imx219_mode_tbls.h
But there is no drivers folder in this case

hello riul5627k,

please visit Jetson Linux Archive | NVIDIA Developer for the Jetson Linux Driver Package, you should download the same L4T version as you’re using, it’s [Driver Package (BSP) Sources] to contain all public sources.
for example, please check $ cat /etc/nv_tegra_release to confirm your target release version.

Thank you for the advice.
I downloaded the driver package at the Jetson Linux Archive NVIDIA Developer page and modified imx219_mode_tbls.h. Then I installed the modified kernel at Jetson.

However, the image becomes strange.
Do I something wrong during the driver modification?
I don’t know what the problem was.
Could you give me some advice?

this is imx219_mode_tbls.h

static imx219_reg imx219_mode_3264x2464_21fps = {
/* capture settings /
{0x0157, 0x00}, /
ANALOG_GAIN_GLOBAL[7:0] /
{0x015A, 0x09}, /
COARSE_INTEG_TIME[15:8] /
{0x015B, 0xbd}, /
COARSE_INTEG_TIME[7:0] /
/
format settings /
{0x0160, 0x09}, /
FRM_LENGTH[15:8] /
{0x0161, 0xC1}, /
FRM_LENGTH[7:0] /
{0x0162, 0x0D}, /
LINE_LENGTH[15:8] /
{0x0163, 0x78}, /
LINE_LENGTH[7:0] */
{0x0164, 0x00},
{0x0165, 0x08},
{0x0166, 0x0C},
{0x0167, 0xC7},
{0x0168, 0x00},
{0x0169, 0x00},
{0x016A, 0x09},
{0x016B, 0x9F},
{0x016C, 0x0C},
{0x016D, 0xC0},
{0x016E, 0x09},
{0x016F, 0xA0},
{0x0170, 0x01},
{0x0171, 0x01},
{0x0174, 0x03}, ← I modified here
{0x0175, 0x03}, ← I modified here

This is my pipeline (I attached my pipeline just in case). It works well before pixel binning

def pip_video(exp):
return “nvarguscamerasrc wbmode=1 aelock=true awblock=true exposuretimerange = "”+ str(exp)+" “+str(exp)+”" ispdigitalgainrange="1 1" gainrange="13 13" ! video/x-raw(memory:NVMM), width=(int)1632, height=(int)1232,format=(string)NV12, framerate=(fraction)21/1, exposurecompensation=0 ! tee name=t t. ! queue ! nvvidconv ! videobalance brightness=0 saturation=1 contrast=1 ! video/x-raw, format=(string)I420, width=1632, height=1232 ! appsink sync=0 ";

hello riul5627k,

do you have sensor specification? usually the frame-length and line-length should also updated by changing the binning.
may I know what’s actual use-case? besides modify sensor binning mode, how about using VIC engine to crop/rescale the capture frames?

The thing I want to do is analog pixel binning to capture the dim light.
Should I also modify the imx219.c file?

hello riul5627k,

you should understand the whole register settings to configure it as binning mode correctly.

I found that there are 2 frame length parameters(0x0160 and 0x0161) and 2 line length parameters (0x0162, 0x0163).
What is the difference between them?
Where can I get information about the whole register settings?

hello riul5627k,

sensor specification should mentioned all of them,
please see-also similar topics to modify the mode settings.
for example,
120fps with IMX219 and binned modes
Image binning in LI-IMX219-MIPI-FF-NANO-H136 v1.3 (Leopard's Imaging IMX219 camera)

Thank you JerryChang.
The links are helpful.

I have another problem to modify the mode.
I will open the new topics.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.