User`s guide

Supporting the i.MX53 Camera Sensor Interface CSI0
i.MX53 System Development User’s Guide, Rev. 1
20-4 Freescale Semiconductor
$ gedit Kconfig &
3. Add the entry where you want it to appear:
config MXC_IPUV3_CSI0_TEST_MODE
tristate "IPUv3 CSI0 test mode camera support"
depends on !VIDEO_MXC_EMMA_CAMERA
---help---
If you plan to use the IPUv3 CSI0 in test mode with your MXC system, say Y here.
20.4.2 Creating the Camera Sensor File
The camera sensor file enables camera initialization, reset signal generation, power settings, CSI
configuration and all sensor-specific code. Because power settings are handled by the PMIC among other
voltage regulators, camera drivers must configure the PMIC during its initialization in order to set up the
power voltage configuration unless this has already been done. The reset waveform and the initialization
routine must also be included somewhere, usually on the probe function.
WARNING
Before connecting a camera sensor to the i.MX53 board, you must check
whether the sensor is powered with the proper supply voltages and also
whether the sensor data interface has the correct VIO value. Power supply
mismatches can damage either the CMOS or the i.MX53.
Create a file with the required panel-specific functions in the following path:
<ltib dir>/rpm/BUILD/linux/drivers/media/video/mxc/capture/
The camera file—ipuv3_csi0_chess.c—must include the functions described in Table 20-2 and may
include additional functions and macros required for your driver.
Table 20-2. Required Functions
Function name Function declaration Description
ioctl_g_ifparm static int ioctl_g_ifparm(struct
v4l2_int_device *s, struct v4l2_ifparm
*p)
V4L2 sensor interface handler for VIDIOC_G_PARM ioctl
ioctl_s_power static int ioctl_s_power(struct
v4l2_int_device *s, int on)
V4L2 sensor interface handler for VIDIOC_S_POWER ioctl. Sets
sensor module power mode (on or off)
ioctl_g_parm static int ioctl_g_parm(struct
v4l2_int_device *s, struct
v4l2_streamparm *a)
V4L2 sensor interface handler for VIDIOC_G_PARM ioctl. Get
streaming parameters.
ioctl_s_parm static int ioctl_s_parm(struct
v4l2_int_device *s, struct
v4l2_streamparm *a)
V4L2 sensor interface handler for VIDIOC_S_PARM ioctl. Set
streaming parameters.
ioctl_g_fmt_cap static int ioctl_g_fmt_cap(struct
v4l2_int_device *s, struct v4l2_format *f)
Returns the sensor's current pixel format in the v4l2_format
parameter.
ioctl_g_ctrl static int ioctl_g_ctrl(struct
v4l2_int_device *s, struct v4l2_control
*vc)
V4L2 sensor interface handler for VIDIOC_G_CTRL. If the
requested control is supported, returns the control's current value
from the video_control[] array. Otherwise, returns -EINVAL if the
control is not supported.