Hello,
I am struggling to enable driver for imx462 for my costume board, that is muxed after tca9548.
the camera works if I don’t “use” the mux. and make if pass the i2c signal by manually write the register of the mux.
Attached the dtsi of that the camera works, but not with the mux: tegra194-camera-jakku-eimx462_working.dtsi (8.3 KB)
Thanks @JerryChang
I been looking at that post when trying to solve the issue. and couldn’t find my answer there.
the only thing that I am not sure about is the i2c-parent, but I think its relevant for i2c-mux-gpio only.
how I can assure that devname is correct? and proc-device-tree?
also, when the system boot and search the tree, how it does the search and find the compatible = "nvidia,eimx462"? it possible that the search doesn’t goes deep enough? or stops of some reason on one of the labels (i2c@31e0000 / tca9548_70: tca9548@70 / i2c@0)?
i2c-parent meant which i2c address it’s actually used.
you may also check below for reference, $public_sources/kernel_src/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc/tegra194-soc-i2c.dtsi cam_i2c: i2c@3180000{...}
for reference drivers, such as IMX219 dual-camera settings on Xavier NX,
they’re based-on i2c@3180000, and using cam_i2cmux for sharing i2c address.
for example,
hence, proc-device-tree should define as same as the device nodes are registered.
it will be… proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/rbpcv2_imx219_a@10"; proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/rbpcv2_imx219_c@10";
you may also looking for device tree for other reference driver that using tca9548. for example, dual IMX274 on AGX Xavier platforms,
furthermore, compatible property is used as device identifier. the Linux kernel uses this keyword to bind the device driver to a specific device.
you should have your camera driver with the same string, compatible = "nvidia,eimx462",
it’s kernel driver looking for this string for process, you may also adding some debug prints for confirmation.
Thanks again. I have looked at the referace you pointed. And the dtsi i attached based in them. Can you look at the attached files to understand where the error hide?
it seems that cam_i2cmux used when its i2c-mux-gpio, not for tca9548. I took my example from
/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-e3333-a00.dtsi.
Note that I don’t use i2c@3180000 , but i2c@31e0000
the tca6424_22_a is part of the camera it self. not part of the board. so its after the tca9548_70.
as you can see in the i2cdetect -r -y 8 replay above, its not being detected if not opening the mux to its port number 0.
yes, the device tree loaded properly. I can see it on /proc/device-tree (is that what you meant by sysnode?)
on one point i thought it might be related to ‘tegra-camera-platform’ not even trying to load the camera.
maybe issue with naming here:?
is the sensor probing process detect imx462 during boot-up?
may I know what’s your kernel init logs, please gather the logs for reference, i.e. $ dmesg > klog.txt
FYI,
as long as your sensor driver, (i.e. imx462.c) has the same compatible property, linux kernel uses this keyword to bind the device driver to a specific device.
Hi @JerryChang,
No its not being detected, nor even trying to probe.
Attached two dmesg files. one without the tca9548 mux running (but I had to open the mux in the previus reboot): dmesg_imxworks.txt (61.5 KB)
this on has:
[ 6.313602] pca953x 8-0022: using AI
(this is the i2c IO EXPENDER (tca6424_22_a) ! not the mux)
and:
The dmesg I sent was before changing to 80.
you can see in my second thread that I changed it from 0x1e (30) to 80.
it doesn’t work either way. when I start the bus in 30, and devname = "eimx462 30-0042";
or when I start at 80 and devname = "eimx462 80-0042";
I have added printf to this functions.
and there is no printing of any when the imx is inside the pca9548.
Do you know how the scanning of the device tree works? for example, does the tegra-camera-platform try to find only cameras that are on proc-device-tree.
Or if there other method that might be debugged to understand the process and when it fails?
there’ll be error reported once registration has failed.
FYI,
there’s Jetson V4L2 Camera Framework to register sensor device as V4L2 sub-device.
and… it initialize an instance of camera device (i.e. tc_dev) and calling those common operations as point-out in comment #19.
is the video node, /dev/video* created?
please running below to examine media controller settings, $ sudo media-ctl -p -d /dev/media0