ISP drivers and Sensor drivers


1. ISP Sensor driver's compiling and loading

ISP and Sensor drivers are .ko files,Compiling method, please refer to“003-Compiling_Guide.md”。Before loading, first of all we need to load the tx-isp.ko,then load sensor_xxx.ko。

2. Sensor driver's configurations

Sensor drivers need to configure parameters such as GPIO,these parameters exist as module_param,If the hardware is done in accordance with the reference design,insmod doesn't require any parameter,it just uses the default value. If the hardware is different, insmod will need configuration parameters.

3. Sensor Driver configurations

Sensor Driver needs to configure GPIO's parameter, these parameters are considered as module_param. If the hardware is designed in accordance with the reference then insmod will not require any parameters(just use the default configurations), otherwise the parameters are needed in order to configure the insmod.

4. Sensor's detection and recognition

Sensor recognition driver is located in: drivers/misc/sensor_info's directory,users can use ioctl or proc interface to process the sensor model query. Please refer to sample_sinfo.c for further instructions.

5. Sensor Data Interface Configuration

There are many data Port's on cmos sensor. Now we support DVP and MIPI CSI-2. And we only support DVP on T10. Some sensors can support those two data interface at the same time. So we add the module paramrter named 'data_interface' to distinguish them. * MIPI CSI-2 Data Port's configuration: insmod sensor_xx.ko data_interface=1 data_inteface is the sensor data port configuration selection,1: MIPI CSI-2 2:DVP

6. Sensor max framerate set interface

Base on decreaing the consumption, we add a parameter named sensor_max_fps to set the max framerate. In general, we support the switching from 30/25fps to 15fps. * set sensor framerate to 15fps:

insmod sensor_xx.ko sensor_max_fps=15
sensor_max_fps is sensor framerate configuration selection. 15:set the sensor framerate to 15fps  25:set sensor framerate to 25fps. At default,the sensor_max_fps is set to 30/25 mode.
To decrease consumptin more, we can adjust the parameter (7) together.

7. ISP clock configuration

When the sensor input resolution is different, we need modify the isp core clock for consumption and stability. So we add the module parameter named isp_clk to support it. We can set the isp clock like the groups below: {960p@30fps, 60Mhz}, {1080p@30fps, 80Mhz}, {3M@25fps, 100Mhz}. In a general way, we only need to set this parameters when the sensor input resolution is 3M@25fps. * 3M@25fps configuration: insmod tx-isp.ko isp_clk=100000000 isp_clk is ISP's clock rate.