Sony EV9500M MIPI camera on JP6(36.3)

I can use the Sony EV9500M MIPI camera on Orin nx 16G, the L4T version is 35.4.1.
I use the Ting’s rules to change the device tree from Jetpack 5 to 6.

But I can’t get the video devices, the version is 36.3.0.
Please help to verify my device tree, thanks.
sony_ev9500m.zip (349.8 KB)

hello jb035.cheng,

you may see-also Camera Driver Porting to examine your sensor driver,
please refer to Approaches for Validating and Testing the V4L2 Driver, please use V4L2 IOCTL to verify basic camera functionality.
besides, may I know what’s the error has reported.

I use meia-ctl -p -d /dev/media0 to get the topology of media0. It loooks like the device tree is not correct, and pads don’t create correctly when the L4T is 36.3.0

hello jb035.cheng,

is this camera driver verified on previous Jetpack release version before?
please see-also Topic 310858 for some known camera device tree changes when porting DTS from JP-5 to JP-6.

Yes, the driver is working on JP5.12./L4T35.4.1.
I follow the Ting’s rules of “Top 310858” to migrate from JP5 to JP6, and this is the result.

hello jb035.cheng,

BTW,
there’re several bug fixes, is it possible for moving forward to latest JP-6 public release version? i.e. jetson-linux-r3640

The result is the same, it still can’t generate the video device after driver finishes probe() function.
r36_4.zip (146.7 KB)

hello jb035.cheng,

re-cap the kernel logs, it looks camera driver probing has done.

[   11.771082] ev9500m 2-0010: tegracam sensor driver:ev9500m_v2.0.6
[   11.771086] ev9500m 2-0010: ev9500m_board_setup:540
[   11.771089] ev9500m 2-0010: ev9500m_power_on:378
[   11.771092] ev9500m 2-0010: ev9500m_power_on:470
[   11.771110] ev9500m 2-0010: detected ev9500m sensor

here’re erroneous of NVCSI and VI,
for instance,

	tegra-capture-vi {
		ports {
			port@0 {
				endpoint {
					bus-width = <0x02>;
					port-index = <0x01>;
			nvcsi@15a00000 {
				channel@0 {
					ports {
						port@0 {
							endpoint@0 {
								bus-width = <0x02>;
								port-index = <0x01>;

						port@1 {
							endpoint@1 {

you must have correct port bindings for Sensor/NVCSI/VI.
please revise the NVCSI and VI port bindings as… bus-width = <4>; and port-index = <0>; since it’s a 4-lane camera for using CSI-A.

I check the tegra234-camera-mp740n2_r3630_ev9500m_n1.dtsi, the settings of bus-width and port-index are correct. But they are not correct of export device tree. If I modify the bus-width and port-index of overlay/tegra234-camera-rbpcv2-imx219.dtsi, these two properties are correct of the export device tree, but video device is still not created.
1.Why the export device tree does not correct when these two properties are correct of tegra234-camera-mp740n2_r3630_ev9500m_n1.dtsi ?
2.Is tegra234-camera-rbpcv2-imx219.dtsi the base for Orin camera ?

hello jb035.cheng,

that’s due to you must create a device tree overlay to register camera module.
please see-also r36.3 release note, and refer to [4.2. Device Registration] for detalis.

I overwrite the device tree configurations of ev9500m to dts of camera imx219(tegra234-p3768-camera-rbpcv2-imx219.dtsi, and tegra234-camera-rbpcv2-imx219.dtsi), then the video devices are created. I use the gstreamer script to display the video, but only get 4 fps for 1080p60 input. I get same result by using version r36.3 and r36.4, the error messages from dmesg list below
[ 296.536913] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 262144
[ 299.252387] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 299.252406] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 299.253405] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
Please help to check it, thanks.
r36_4_ev9500m_0113.zip (148.7 KB)

hello jb035.cheng,

according to below…

it looks you’re now bringup the camera stream, but there’re some stability/performance issues, right?

please double check Sensor Pixel Clock, which must be set correctly to avoid potential issues.
you may refer to Topic 318537 to debug discarding frame corr_err messages.

besides,
you may also give it a try to boost all the VI/CSI/ISP clocks with below for testing.

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

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