I’m using AGX Orin devkit and JetPack version is 5.0.2 (L4T 35.1).
Does ‘full flash log’ mean the log of flash.sh in Linux_for_Tegra? If so, flashing will delete my rootfs so it is hard to check flashing log. I’m sorry.
So I decompiled /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb. But I couldn’t find any tegra234-cdi-tsc related line.
I added DT info to hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dts and modified CONFIG_VIDEO_CDI=m->y in defconfig but /sys/kernel/debug/tsc_sig_gen@XXX/generator@XXX doesn’t exist.
you may see-also AGX Orin’s device tree, which already has TSC Signal Generators defined. $public_sources/kernel_src/hardware/nvidia/platform/t23x/common/kernel-dts/t234-common-cvb/tegra234-pwm.dtsi
note, the compatible is… nvidia,tegra234-cam-cdi-tsc for using NVIDIA tegra cdi-tsc driver. $public_soruces/kernel_src/kernel/nvidia/drivers/media/platform/tegra/cdi/cam_cdi_tsc.c
FYI, r35.1 is quite old, and there’re several bugs.
if that’s possible, please moving to the latest rel-35 release version, (i.e. l4t-r35.5.0) for development.
I installed JetPack 5.1.3 and L4T 35.5.0. I have several questions.
To enable cam-cdi-tsc.c, I modified CONFIG_VIDEO_CDI, CONFIG_NV_DESER_MAX96712, and CONFIG_NV_VIDEO_HAWK_OWL in tegra_defconfig from m to y. I’m using max9296 and other image sensors but I modified these files because of compile error. Is it correct?
How can I check the signal release of of CAM_FRSYNC? I tried to access /sys/kernel/debug/tsc_sig_gen@XXX/ but this path doesn’t exist.
what’s the camera modules you’re using, you may add the driver and enable its config manually.
please also check whether you’ve build the CDI TSC signal generation driver.
and… you should insert the cdi_tsc.ko kernel module, i.e. $ sudo insmod cdi_tsc.ko
I did insmod cam_cdi_tsc.ko and I found /sys/kernel/debug/tsc_sig_gen@c6a0000 is generated. Thanks a lot.
I have one more question. Is there any possible way to check this signal generator is working or not?
Thank you for your answer.
We used oscilloscope to check FRSYNC but the signal is not emitted.
I have a question in cam_cdi_tsc.c.
This code uses Hawk Owl releated codes like,
extern int Hawk_Owl_Fsync_program(int fsync_type);
static int cdi_tsc_chardev_open(struct inode* inode, struct file* file)
{
pr_info("%s:Device opened\n",__func__);
/* Set External Fsync */
Hawk_Owl_Fsync_program(EXTERNAL_FSYNC);
return 0;
}
static int cdi_tsc_chardev_release(struct inode* inode, struct file* file)
{
pr_info("%s:Device closed\n",__func__);
/* Set back to Internal Fsync */
Hawk_Owl_Fsync_program(INTERNAL_FSYNC);
return 0;
}
The function Hawk_Owl_Fsync_program is defined in nv_hawk_owl.c, which is a sensor module driver. This function calls max96712_fsync_program function, which calls max96712_write_reg_Dser. In conclusion, a table Owl_QuadLink_Dser_ExFsync is written into max96712. If I don’t add hawk owl and max96712 driver in Makefile and defconfig, compile error occurs when building the kernel.
I was wondering that it is necessary to enable max96712 and hawk owl sensor driver to just enable FRSYNC signal. This signal is emitted from CSI 120-pin and I think it is not related to serdes or sensor module.
Is insmod cam_cdi_tsc.c enough to enable FRSYNC without hawk owl and max96712?
I found cdi_tsc_start_generators function and it is called by cdi_tsc_chardev_ioctl. I thought that just insmod is enough but it looks I need more procedure to generate signal. Could you give me some guide for this?
To enable TSC sync/lock to PTP (primary) source, you need to update TSC register with value corresponding to network interface. Currently, the value is chosen based on the interface name passed in nvpps device tree. i.e. interface = "eth0"; .
In the kernel/nvidia/drivers/nvpps/nvpps_main.c, the compatible is “nvidia,tegra194-nvpps”. However, there is no “nvidia,tegra194-nvpps” in any device tree. It looks like I need to add nvpps in device tree. I found the examples in kernel/nvidia/Documentation/devicetree/bindings/nvpps/nvpps.txt However there are four example cases and I don’t know what and where(dt file path) I should add.
I have another question. You mentioned I need to update TSC register. I want to know how to update(busybox devmem?) and what is the address(and value) of this register.
I tried insmod nvpps.ko but nothing happened in dmesg.
it looks functional, please also test with pps utility, $ sudo apt install pps-tools
here’s sample test command, $ sudo ppstest /dev/pps0 to check whether you’re able to get one timer trigger for each pulse.