ADV7280m configuration

Dear @hoanganhv1svm ,
Could you please send me the driver of this ADV7280m that works for Nvidia Jetson to linux4es@gmail.com, please?

Thanks very much in advance,
K.

Hi khang,

Some file had been modified for adv7280m. You can compare with your code.

adv7280m.zip (17.3 KB)

Sorry late reply,

this is my driver

adv7280m.zip (17.3 KB)

Dear @hoanganhv1svm ,

Thanks very much. I have more question : should I still modify the VI source code for hard-coding 1 lane, resolution as well as apply the patch in following discussion : TX2-4GB NVCSI/VI error with JetPack 4.3 ?

Best regards,
Khang

Our project has been released. It’s work with jetpack 4.2. Not test with jetpack 4.3!
Your question: If you using more device with same hw (1lane), hard-code NVCSI will woking well, if you using some device with diffrent hw, you must sent params to vi driver each device.

Hi, can i use the same driver for adv7282m also ?

i applied your dt and code but notable to detect device
issue is discussed here ; Adv7282 PAL to MIPI CSI Linux Driver Development - Jetson & Embedded Systems / Jetson Xavier NX - NVIDIA Developer Forums
Kindly help

Can you please help me in know where exactly i am doing wrong ?

Sr bro,
Our project has been released. Nothing changed from attachment above.
Please verify with your BSP.
Thanks

also can you let me know how to apply the device tree that you have made, rest all i was able to do
why is the device tree i2c register value 0x21 for both devices , isnt it should be 7282 device address ?

You can flash your device tree binary on jetson nano directly.

1st: transfer your device tree binary to nano kit
scp bootloader/signed/tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt nano@192.168.55.1:/home/nano

2nd: on nano, using dd command, copy all data to device tree partition
sudo dd if=tegra210-p3448-0000-p3449-0000-a02.dtb.encrypt of=/dev/mmcblk0p10

3rd: reboot

With i2c address, you can detect real address by i2cdetect command.

Thanks for the response,

the device is responding to i2cget -y 2 0x21 , but not for i2c detect
i understood that the adv devices mostly wont respond to i2cdetect as they need write followed by read (assumption)
leaving i2cdetect issue aside

i went forward , i was able to see the appearance of video0 node in /dev
i went to see dmesg | grep 7282 the log is as follows

Line 594: [    2.158727] adv7282 9-0021: chip found @ 0x21 (i2c-2-mux (chan_id 0))
Line 607: [    2.176037] adv7282: probe of 9-0021 failed with error -121
Line 608: [    2.176116] adv7282 10-0021: chip found @ 0x21 (i2c-2-mux (chan_id 1))
Line 610: [    2.197643] adv7282 10-0021: adv7282-m probed!
Line 610: [    2.197643] adv7282 10-0021: adv7282-m probed!
Line 816: [    3.179292] tegra194-vi5 15c10000.vi: subdev adv7282 10-0021 bound

so i can clearly see the device is probed sucessfully and video node is created

i went forward to see whether i can open the cheese app,it crashed
the dmesg then read with latest error as below

Line 1057: [  126.993369] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 0, err_data 64

Also tried running V4l2-ctl command to see what happened, below is log.

[  126.982514] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[  126.993369] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 0, err_data 64
[  127.094630] [RCE] WARNING: t194/isp5.c:901 [config_channel] "All error notifications not enabled: correctable=0x00 uncorrectable=0x00"
[ 1010.279683] tegradc 15200000.nvdisplay: blank - powerdown
[ 1010.340088] extcon-disp-state external-connection:disp-state: cable 47 state 0
[ 1010.340093] Extcon AUX1(HDMI) disable
[ 1010.362677] tegra_nvdisp_handle_pd_disable: Powergated Head1 pd
[ 1010.363213] tegra_nvdisp_handle_pd_disable: Powergated Head0 pd
[ 1250.786347] tegradc 15200000.nvdisplay: unblank
[ 1250.789496] tegra_nvdisp_handle_pd_enable: Unpowergated Head0 pd
[ 1250.790038] tegra_nvdisp_handle_pd_enable: Unpowergated Head1 pd
[ 1250.799203] Parent Clock set for DC plld2
[ 1250.803686] tegradc 15200000.nvdisplay: hdmi: tmds rate:148500K prod-setting:prod_c_hdmi_111m_223m
[ 1250.805107] tegradc 15200000.nvdisplay: hdmi: get YCC quant from EDID.
[ 1250.841632] extcon-disp-state external-connection:disp-state: cable 47 state 1
[ 1250.841637] Extcon AUX1(HDMI) enable
[ 1250.860333] tegradc 15200000.nvdisplay: unblank
[ 1250.860349] tegradc 15210000.nvdisplay: blank - powerdown
[ 1637.863589] tegra194-vi5 15c10000.vi: =================  START STATUS  =================
[ 1637.863597] tegra194-vi5 15c10000.vi: ==================  END STATUS  ==================
[ 1637.867148] adv7282 10-0021: adv7180_g_dv_timings():
[ 1637.874207] Unable to handle kernel NULL pointer dereference at virtual address 000001e8
[ 1637.874379] Mem abort info:
[ 1637.874435]   ESR = 0x96000005
[ 1637.874491]   Exception class = DABT (current EL), IL = 32 bits
[ 1637.874590]   SET = 0, FnV = 0
[ 1637.874645]   EA = 0, S1PTW = 0
[ 1637.874702] Data abort info:
[ 1637.874753]   ISV = 0, ISS = 0x00000005
[ 1637.874819]   CM = 0, WnR = 0
[ 1637.874879] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc1330a6000
[ 1637.875089] [00000000000001e8] *pgd=0000000000000000, *pud=0000000000000000
[ 1637.875235] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 1637.875338] Modules linked in: fuse zram overlay bnep rtl8822ce rtk_btusb btusb btrtl btbcm btintel cfg80211 spidev userspace_alert nvgpu bluedroid_pm ip_tables x_tables
[ 1637.875756] CPU: 0 PID: 11880 Comm: v4l2-compliance Tainted: G        W       4.9.201-tegra #12
[ 1637.876404] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[ 1637.876897] task: ffffffc1908cc600 task.stack: ffffffc1516d8000
[ 1637.877364] PC is at tegra_vi5_g_volatile_ctrl+0x48/0x120
[ 1637.881784] LR is at tegra_vi5_g_volatile_ctrl+0x2c/0x120
[ 1637.887034] pc : [<ffffff8008b49268>] lr : [<ffffff8008b4924c>] pstate: 40400145
[ 1637.894644] sp : ffffffc1516dbac0
[ 1637.897623] x29: ffffffc1516dbac0 x28: ffffffc1e0fd2800 
[ 1637.903229] x27: 000000000f000000 x26: 0000000000000000 
[ 1637.908820] x25: ffffff800a01f750 x24: 0000000000000047 
[ 1637.914067] x23: 0000000000000001 x22: 0000000000000018 
[ 1637.919141] x21: ffffffc1516dbb60 x20: ffffffc1e2aaf820 
[ 1637.924827] x19: ffffffc1e0fd2800 x18: 0000000000000001 
[ 1637.930429] x17: 0000007f83021530 x16: ffffff8008272650 
[ 1637.935867] x15: ffffffffffffffff x14: ffffffc1516dbac0 
[ 1637.941555] x13: ffffffc1516db9c5 x12: 0000000000000000 
[ 1637.947491] x11: ffffffc1516db980 x10: ffffffc1516db980 
[ 1637.953181] x9 : 0000000000000002 x8 : 0000000000000002 
[ 1637.958954] x7 : ffffff8008fc7100 x6 : 0000000000000090 
[ 1637.964215] x5 : 000000000000008d x4 : 0000000000000001 
[ 1637.969804] x3 : 00000000009a2033 x2 : 0000000000000000 
[ 1637.975140] x1 : ffffffc1908cc600 x0 : 00000000009a2032

I assume the problem is at timings ?