Jetson (linux) MIPI - CSI2 driver for a LiDAR device

I am trying to write a Linux driver for a LiDAR device. I am working with a NVIDIA Jetson. It looks like the MIPI CSI2 interface has the necessary throughput to support our device. This will be my first Linux driver. :).

Would the proper approach be to write a driver that interfaces with the V4L2 subsystems? Our device does not have standard video characteristics but I guess I could try to work out some way to encode our data into a video format. That seems wrong. It would be easier if there were some kind of general purpose IO I could put on the CSI lanes but I don’t know how to directly access the hardware. (OR even if I want to). Does anyone have an opinion on how to approach this problem? Even better would be a link to a GPIO - over MIPI CSI2 driver implementation. I have looked hard and can’t find anything.

It’s better to use USB LiDAR device.
Otherwise have a reference to below document to implement a CSI sensor driver.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fcamera_dev.html%23

Thank you for that link. It looks like exactly what I need.

Our LiDAR system has a mode where it can produce 12 Gbps of data that can be postprocessed in a GPU resulting in new type of information for autonomous driving. We can make this happen with 4 lanes of CSI2