linux.git
6 years agoMLK-18535-9 ARM64: defconfig: enable 'IMX_SEC_DSIM' config
Fancy Fang [Sun, 3 Jun 2018 16:04:13 +0000 (00:04 +0800)]
MLK-18535-9 ARM64: defconfig: enable 'IMX_SEC_DSIM' config

Enable the 'IMX_SEC_DSIM' config by default in ARM64
defconfig.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 3a1bb280c4b5338dfb9c8a8b24929e02b7803aee)

6 years agoMLK-18535-8 drm/imx: sec_mipi_dsim-imx: add DSIM host driver
Fancy Fang [Wed, 6 Jun 2018 15:46:37 +0000 (23:46 +0800)]
MLK-18535-8 drm/imx: sec_mipi_dsim-imx: add DSIM host driver

The Samsung DSIM host driver mainly focuses on the config
related with soc platforms. And the controller itself config
has been moved to the sec-dsim bridge driver.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 941ef8c5fc870b72d18c1ec5abc69c5523647cba)

6 years agoMLK-18535-7 drm/bridge: sec-dsim: add bridge driver support
Fancy Fang [Wed, 6 Jun 2018 15:32:56 +0000 (23:32 +0800)]
MLK-18535-7 drm/bridge: sec-dsim: add bridge driver support

This is the abstracted bridge driver for Samsung MIPI DSIM
controller. This driver only foucses on the DSIM controller
itself configurations and never care about any config about
the platforms. So it can be shared by different platforms
without any modifications.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit beb9d163c755fe7ae960b79d85c0c1436a8dc057)

6 years agoMLK-18535-6 drm/imx: core: add LCDIF support
Fancy Fang [Wed, 6 Jun 2018 15:20:43 +0000 (23:20 +0800)]
MLK-18535-6 drm/imx: core: add LCDIF support

Allows the LCDIF to be one of the supported client
components. And set the 'legacyfb_depth' of LCDIF
to be 32.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit dae914b351853add6d506925cc0c9742ee698bc4)

6 years agoMLK-18535-5 drm/imx: add LCDIF DRM/KMS driver
Fancy Fang [Wed, 6 Jun 2018 14:52:35 +0000 (22:52 +0800)]
MLK-18535-5 drm/imx: add LCDIF DRM/KMS driver

This is a new DRM/KMS driver for LCDIF which conforms
to the IMX DRM Core framework. It provides support for
CRTCs, Planes and mode config of KMS.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit a104e928da7281a3089ff31afb2df979f35716b8)

6 years agoMLK-18535-4 ARM64: defconfig: enable 'IMX_LCDIF_CORE' config
Fancy Fang [Sun, 27 May 2018 08:40:13 +0000 (16:40 +0800)]
MLK-18535-4 ARM64: defconfig: enable 'IMX_LCDIF_CORE' config

Enable the 'IMX_LCDIF_CORE' config by default in ARM64
defconfig.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 09f1d5639676712f813cec99254abe29175ff9b3)

6 years agoMLK-18535-3 gpu: imx: add LCDIF core driver
Fancy Fang [Wed, 6 Jun 2018 14:26:28 +0000 (22:26 +0800)]
MLK-18535-3 gpu: imx: add LCDIF core driver

The LCDIF core driver is responsible to provide controller
registers configuration and create the platform devices for
the child port nodes. And the platform devices later will
attach to the corresponding DRM/KMS drivers via name match.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit ca168846dcfe6d498d33f4a977b21b25ca5c6c41)

6 years agoMLK-21257-5: arm64: dts: fix warnning when complie dts
Guoniu.Zhou [Wed, 27 Mar 2019 06:33:59 +0000 (14:33 +0800)]
MLK-21257-5: arm64: dts: fix warnning when complie dts

Because ov5640 device node has been in fsl-imx8qxp-mek-ov5640-rpmsg.dts,
so there is no need to another one.

In 4.19 kernel dts, local endpoint need to match one remote endpoint,
not for two or more, so delete redundant node.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-21257-4: arm64: dts: change compatible string for i2c node of mipi csi
Guoniu.Zhou [Wed, 27 Mar 2019 03:15:50 +0000 (11:15 +0800)]
MLK-21257-4: arm64: dts: change compatible string for i2c node of mipi csi

Because "fsl,imx8qm-lpi2c" was remove from of_device_id structure in
i2c-imx-lpi2c.c driver, so add "fsl,imx7ulp-lpi2c" in compatible string
of i2c node.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-21257-3: media: isi: fix some conflicts when do upgrade
Guoniu.Zhou [Wed, 27 Mar 2019 03:10:51 +0000 (11:10 +0800)]
MLK-21257-3: media: isi: fix some conflicts when do upgrade

Fix some conflicts when do kernel 4.19 upgrade

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20923: ISI: improve ISI memory to memory performance
Guoniu.Zhou [Wed, 13 Feb 2019 10:50:39 +0000 (18:50 +0800)]
MLK-20923: ISI: improve ISI memory to memory performance

Refer to ISI validataion code, there is no need to enable ISI
mem2mem read done interrupt and driver can handle buffers in
frame received interrupt service

Remove 50ms delay when enable ISI AXI read, it will improve
performance obviously

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit bdabe035cd5c57d713f824e61f120213ed9357ba)
(cherry picked from commit 7dd4c6affaaceefd80e6b4a033c21f6b26303902)

6 years agoMLK-20595-2: camera: check camera's running state before suspend
Guoniu.Zhou [Mon, 17 Dec 2018 02:16:55 +0000 (10:16 +0800)]
MLK-20595-2: camera: check camera's running state before suspend

Check camera's running state before suspend for imx8qm/qxp
and don't support suspend when camera's running

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19957-1: ISI: clean isi status before enable interrupt
Guoniu.Zhou [Wed, 17 Oct 2018 02:16:08 +0000 (10:16 +0800)]
MLK-19957-1: ISI: clean isi status before enable interrupt

Because ISI can't restore to default state after software
reset, the status value of exit will be maintained. If not
cleared, ISI will triggle fake interrupt after enableing irq,
but there is not ready for data.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 932af3df1745f5afb0b9433d3355b2e24b177f4e)

6 years agoMLK-19901: ISI: manually clean isi status register
Guoniu.Zhou [Fri, 12 Oct 2018 02:55:41 +0000 (10:55 +0800)]
MLK-19901: ISI: manually clean isi status register

When QM run two linux and divide ISI resource into two
parts, channel 0-3 for one linux and channel 4-7 for the
other. If dom0 destroy domU which camera is running, then
restart domU. ISI will trigger interrupt immediately after
register irq handler when driver probe. The reason for this
is that status register of ISI isn't cleared. ISI have no
ablility to reset its register to defautl value expcept power
off all resource of ISI, but it can't be done in two os. So
manually clean status before registering irq when driver probe.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit b84601aaef15870c80f684b1881b22e9dd2ba9a3)

6 years agoMLK-19514-2: ISI: use ping-pong buffer of ISI
Guoniu.Zhou [Tue, 4 Sep 2018 10:05:38 +0000 (18:05 +0800)]
MLK-19514-2: ISI: use ping-pong buffer of ISI

1. Use ping-pong buffer of isi.
2. Add multi-plane support for m2m out queue. When
V4L2 m2m device support multi-plane, it should be
applied for both input and output, so add it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-19111: ISI: fix module installation fail issue
Guoniu.Zhou [Tue, 31 Jul 2018 09:41:20 +0000 (17:41 +0800)]
MLK-19111: ISI: fix module installation fail issue

If build ISI driver as module and insmod it after system
boot up, it will fail. Because lack of MODULE_LICENSE("GPL")
,insmod isi driver will print many unknown symbol messages

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-19108: ISI: fix isi hang issue when open it many times
Guoniu.Zhou [Tue, 31 Jul 2018 07:58:41 +0000 (15:58 +0800)]
MLK-19108: ISI: fix isi hang issue when open it many times

When one ISI channel is receiving data, if an other process
just open it at the same time and then close, it will lead
to this channel hang. The reason is soft reset in release
callback, so it make the channel stop work. Add an counter
for open isi channel and really soft reset the channel when
the counter equal to zero.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18517-1: ISI: fix system reboot stress test from nfs fail
Guoniu.Zhou [Thu, 28 Jun 2018 01:47:54 +0000 (09:47 +0800)]
MLK-18517-1: ISI: fix system reboot stress test from nfs fail

1. System will dump painc message and hang when do system
reboot stress test. It caused by ISI HW reset function. When
user open the video device, it will get the device and driver
will turn on ISI power domain, but after that, ISI HW reset
will first turn off and then turn on it's power. During this
time, the process which open ISI channel 0 maybe sleep and
the other process which open other ISI channel will active but
the other channel power domain depend on channel 0. It leads to
system panic. So change msleep to udelay and move HW reset to
other place.

2. Refine ISI system and runtime suspend/resume.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-18482: ISI: fix isi resume fail issue
Guoniu.Zhou [Tue, 12 Jun 2018 08:56:14 +0000 (16:56 +0800)]
MLK-18482: ISI: fix isi resume fail issue

Driver enable clock will fail in isi system power resume
callback because isi power domain is power off after system
power suspend so driver need to get device before disable
clock in system power suspend/resume callback and then put
device after disable clock.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 668fdea95ff9b4588f02a5c4285d56b90e05ccb4)

6 years agoMLK-17230-8: camera: add CI_PI in camera device framework
Guoniu.Zhou [Mon, 5 Feb 2018 08:26:38 +0000 (16:26 +0800)]
MLK-17230-8: camera: add CI_PI in camera device framework

Add CI_PI and ov5640 camera sensor support in camera device
framework. The data flow is "ov5640->ci_pi->isi_ch0". Disable
the other channels of ISI.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 37bc5d225e8a3eeb21fef5d94335d1edb2036988)

6 years agoMLK-16549-2: ISI: fix suspend/resume error issue
Guoniu.Zhou [Fri, 8 Dec 2017 11:32:34 +0000 (19:32 +0800)]
MLK-16549-2: ISI: fix suspend/resume error issue

Because ISI runtime suspend has disable clock before system
suspend. If driver does not know that and disable clock again
in system suspend callback. It will lead to isi clk count mis-
match.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-16823-2: mipi_csi: Add runtime suspend/resume
Guoniu.Zhou [Wed, 15 Nov 2017 12:13:30 +0000 (20:13 +0800)]
MLK-16823-2: mipi_csi: Add runtime suspend/resume

Add runtime suspend/resume support for ISI. For saving
power, the ISI turn off it's power domain after probe.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d0cf6f32660c5b03fda5083fee578579f22c4d3b)

6 years agoMLK-17019 Correct Copyright
Peng Fan [Wed, 29 Nov 2017 03:48:04 +0000 (11:48 +0800)]
MLK-17019 Correct Copyright

Correct Copyright

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMLK-16695-3: mipi_csi: Change printk to dev_dbg
Guoniu.Zhou [Fri, 10 Nov 2017 03:09:21 +0000 (11:09 +0800)]
MLK-16695-3: mipi_csi: Change printk to dev_dbg

Messages in ISI irq handler are for debugging, so
change printk to dev_dbg for this purpose.

The width and height of image information need output
in debug process.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e254c8408f69eca9b668af58d911f27a4fefc121)

6 years agoMLK-16695-2: mipi_csi: Add pm suspend and resume support
Guoniu.Zhou [Fri, 10 Nov 2017 03:01:46 +0000 (11:01 +0800)]
MLK-16695-2: mipi_csi: Add pm suspend and resume support

Add power manager suspend and resume support for ISI

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-16062-2: i.MX8 imaging: Add debug log to imaging SS driver
Sandor Yu [Fri, 28 Jul 2017 03:08:27 +0000 (11:08 +0800)]
MLK-16062-2: i.MX8 imaging: Add debug log to imaging SS driver

Add debug log to imaging SS drivers.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem
Guoniu.Zhou [Fri, 9 Nov 2018 10:48:13 +0000 (18:48 +0800)]
MLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem

Eanble horizonal and vertical flip for memory to memory function
of ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19514-2: ISI: use ping-pong buffer of ISI
Guoniu.Zhou [Tue, 4 Sep 2018 10:05:38 +0000 (18:05 +0800)]
MLK-19514-2: ISI: use ping-pong buffer of ISI

1. Use ping-pong buffer of isi.
2. Add multi-plane support for m2m out queue. When
V4L2 m2m device support multi-plane, it should be
applied for both input and output, so add it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18517-1: ISI: fix system reboot stress test from nfs fail
Guoniu.Zhou [Thu, 28 Jun 2018 01:47:54 +0000 (09:47 +0800)]
MLK-18517-1: ISI: fix system reboot stress test from nfs fail

1. System will dump painc message and hang when do system
reboot stress test. It caused by ISI HW reset function. When
user open the video device, it will get the device and driver
will turn on ISI power domain, but after that, ISI HW reset
will first turn off and then turn on it's power. During this
time, the process which open ISI channel 0 maybe sleep and
the other process which open other ISI channel will active but
the other channel power domain depend on channel 0. It leads to
system panic. So change msleep to udelay and move HW reset to
other place.

2. Refine ISI system and runtime suspend/resume.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-16823-2: mipi_csi: Add runtime suspend/resume
Guoniu.Zhou [Wed, 15 Nov 2017 12:13:30 +0000 (20:13 +0800)]
MLK-16823-2: mipi_csi: Add runtime suspend/resume

Add runtime suspend/resume support for ISI. For saving
power, the ISI turn off it's power domain after probe.

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d0cf6f32660c5b03fda5083fee578579f22c4d3b)

6 years agoMLK-16695-2: mipi_csi: Add pm suspend and resume support
Guoniu.Zhou [Fri, 10 Nov 2017 03:01:46 +0000 (11:01 +0800)]
MLK-16695-2: mipi_csi: Add pm suspend and resume support

Add power manager suspend and resume support for ISI

Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-21257-2: media: mipi_csi_yav: fix build error for imx8mq mipi csi driver
Guoniu.Zhou [Wed, 27 Mar 2019 02:43:27 +0000 (10:43 +0800)]
MLK-21257-2: media: mipi_csi_yav: fix build error for imx8mq mipi csi driver

In the 4.19 kernel, v4l2 async framework move async subdev notifier operations
to a separate structure and simplify v4l2_async_subdev structure. So adapt to
the change in our driver.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19362: media: csi: Fix "Hresponse" and "Rx fifo overflow" camera errors
Mirela Rabulea [Wed, 12 Sep 2018 08:50:54 +0000 (11:50 +0300)]
MLK-19362: media: csi: Fix "Hresponse" and "Rx fifo overflow" camera errors

When the register setting for fifo_send_level is set to high, some residual
data of a frame which cannot fill up to the send_level, will be sent with
the next frame data. In this case, for CSI receive dma, sometimes,
the vertical blanking is too short to finish the storage of the previous
frame before the next frame start, depending on the system bandwidth.

Tested on imx8mq-evk rev B4 and B3, with OV5640 camera.

This patch was proposed by Tom Zheng <haidong.zheng@nxp.com>

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
6 years agoMLK-17116-2 media: mipi_csi: Adjust hs_settle and send_level for low resolution
Robby Cai [Thu, 7 Dec 2017 07:05:42 +0000 (15:05 +0800)]
MLK-17116-2 media: mipi_csi: Adjust hs_settle and send_level for low resolution

Change the hs_settle and fifo_send_level setting for 640x480 and 720x480 input
resolution.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
(cherry picked from commit 3c081af366e250ff011319d80c5706ae7b8e38ca)

6 years agoMLK-16977-2 media: v4l_cap: don't support suspend when camera is running
Robby Cai [Fri, 24 Nov 2017 10:52:54 +0000 (18:52 +0800)]
MLK-16977-2 media: v4l_cap: don't support suspend when camera is running

Don't support suspend/resume by checking if camera is running.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
6 years agoMLK-16977-1 media: v4l_cap: implement S_FMT ioctl
Robby Cai [Fri, 24 Nov 2017 10:39:13 +0000 (18:39 +0800)]
MLK-16977-1 media: v4l_cap: implement S_FMT ioctl

gsteamer uses S_FMT ioctl to set the resolution instead of using
S_PARM ioctl. The S_PARM ioctl depends on the capture mode which is
not in the common way.
This patch uses a common method to set the picture resulotion.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
6 years agoMLK-16943 mipi-csi: Add run time pm support
Robby Cai [Wed, 22 Nov 2017 10:58:59 +0000 (18:58 +0800)]
MLK-16943 mipi-csi: Add run time pm support

Add run time PM support for MIPI CSI (tested on iMX8MQ)

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ
Robby Cai [Tue, 21 Nov 2017 20:59:06 +0000 (04:59 +0800)]
MLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ

Add a new version (yet another version) driver for MIPI CSI2.
The reason we use a separate version is that PHY setting is quit different,
and the existing MIPI CSI2 driver uses new Media Framework, while the camera
and CSI driver not yet. After convert all drivers to new Media Framework,
consider combine these two versions.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-21257-1: media: fix build error for QM/QXP camera driver
Guoniu.Zhou [Wed, 27 Mar 2019 02:31:25 +0000 (10:31 +0800)]
MLK-21257-1: media: fix build error for QM/QXP camera driver

In the 4.19 kernel, v4l2 async framework move async subdev notifier operations
to a separate structure and simplify v4l2_async_subdev structure. So adapt to
the change in our driver.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb
Guoniu.Zhou [Fri, 20 Apr 2018 08:23:09 +0000 (16:23 +0800)]
MLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb

1. Divide ov5640_v3.c into two parts, one for parallel csi driver
   and the other for mipi csi driver

2. Add parallel and mipi support in one dtb file. User can select
   one of them without changing the dtb file

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17230-6: sensor: add driver for ov5640 camera sensor
Guoniu.Zhou [Mon, 5 Feb 2018 07:58:39 +0000 (15:58 +0800)]
MLK-17230-6: sensor: add driver for ov5640 camera sensor

Add version3.0 driver for ov5640 camera sensor. It works on DVP
mode

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 64d7dd18ac3c768480df8390ab02a35142a220cd)

6 years agoMLK-17230-5: CI_PI: enable CI_PI SS
Guoniu.Zhou [Mon, 5 Feb 2018 07:43:23 +0000 (15:43 +0800)]
MLK-17230-5: CI_PI: enable CI_PI SS

Add driver for CI_PI controller.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 980ac5f965bd8e94cce8a8c3fa78b1062dbd1727)

6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb
Guoniu.Zhou [Fri, 20 Apr 2018 08:23:09 +0000 (16:23 +0800)]
MLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb

1. Divide ov5640_v3.c into two parts, one for parallel csi driver
   and the other for mipi csi driver

2. Add parallel and mipi support in one dtb file. User can select
   one of them without changing the dtb file

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17230-6: sensor: add driver for ov5640 camera sensor
Guoniu.Zhou [Mon, 5 Feb 2018 07:58:39 +0000 (15:58 +0800)]
MLK-17230-6: sensor: add driver for ov5640 camera sensor

Add version3.0 driver for ov5640 camera sensor. It works on DVP
mode

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 64d7dd18ac3c768480df8390ab02a35142a220cd)

6 years agoMLK-17230-5: CI_PI: enable CI_PI SS
Guoniu.Zhou [Mon, 5 Feb 2018 07:43:23 +0000 (15:43 +0800)]
MLK-17230-5: CI_PI: enable CI_PI SS

Add driver for CI_PI controller.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 980ac5f965bd8e94cce8a8c3fa78b1062dbd1727)

6 years agoMLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ
Robby Cai [Tue, 21 Nov 2017 20:59:06 +0000 (04:59 +0800)]
MLK-16919-5 media: v4l2: add mipi csi driver on iMX8MQ

Add a new version (yet another version) driver for MIPI CSI2.
The reason we use a separate version is that PHY setting is quit different,
and the existing MIPI CSI2 driver uses new Media Framework, while the camera
and CSI driver not yet. After convert all drivers to new Media Framework,
consider combine these two versions.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-15124-04: image ss: Add mx8 image subsystem driver
Sandor Yu [Tue, 20 Jun 2017 07:37:16 +0000 (15:37 +0800)]
MLK-15124-04: image ss: Add mx8 image subsystem driver

Add mxc media device driver.
Add mx8 isi device driver.
Add mx8 mipi csi device driver.
Add max9286 sensor driver.
mxc isi driver support CSC and scaling function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-15124-06: defconfig: Add mx8 image subsystem
Sandor Yu [Tue, 20 Jun 2017 07:45:25 +0000 (15:45 +0800)]
MLK-15124-06: defconfig: Add mx8 image subsystem

Add mx8 image subsystem and v4l2 device.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20694: media: m2m: add control for querying minimum buffer for capture and output
Guoniu.Zhou [Tue, 19 Mar 2019 09:29:01 +0000 (17:29 +0800)]
MLK-20694: media: m2m: add control for querying minimum buffer for capture and output

Add V4L2_CID_MIN_BUFFERS_FOR_CAPTURE and V4L2_CID_MIN_BUFFERS_FOR_OUTPUT control
ID for querying minimum buffer for capture and output

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20924-2: ISI: add checking for the number of requested buffer
Guoniu.Zhou [Thu, 14 Feb 2019 02:48:03 +0000 (10:48 +0800)]
MLK-20924-2: ISI: add checking for the number of requested buffer

For the number of requested source buffer, driver need one at least.
For the number of requested destination buffer, driver need three at least.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit c3d33d6ad971b2e03c034e14696d64549245f918)
(cherry picked from commit 36e36d3c529a16b7b00faddf967bfbf828309a56)

6 years agoMLK-20924-1: ISI: fix potential dead lock issue
Guoniu.Zhou [Thu, 14 Feb 2019 02:23:10 +0000 (10:23 +0800)]
MLK-20924-1: ISI: fix potential dead lock issue

Fix potential dead lock issue

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 322beb5215ea921dd30c0974cd17465de306927b)
(cherry picked from commit aa04582b28aabcd6ec8e5dd5ad0a2310f2111ff0)

6 years agoMLK-20923: ISI: improve ISI memory to memory performance
Guoniu.Zhou [Wed, 13 Feb 2019 10:50:39 +0000 (18:50 +0800)]
MLK-20923: ISI: improve ISI memory to memory performance

Refer to ISI validataion code, there is no need to enable ISI
mem2mem read done interrupt and driver can handle buffers in
frame received interrupt service

Remove 50ms delay when enable ISI AXI read, it will improve
performance obviously

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit bdabe035cd5c57d713f824e61f120213ed9357ba)
(cherry picked from commit 7dd4c6affaaceefd80e6b4a033c21f6b26303902)

6 years agoMLK-20888: m2m: add checking for userspace input parameters
Guoniu.Zhou [Mon, 11 Feb 2019 10:05:54 +0000 (18:05 +0800)]
MLK-20888: m2m: add checking for userspace input parameters

Checking parameters from userspace befor applying for different format

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 47ff54238f138be015756a45afb0af58b52e5a02)
(cherry picked from commit 5a52bef34e084943ac5ca8c4c27ca4e0c97a4263)

6 years agoMLK-20724: m2m: add RGBA to exend V4L2 standard format for android usage
Guoniu.Zhou [Mon, 14 Jan 2019 06:23:03 +0000 (14:23 +0800)]
MLK-20724: m2m: add RGBA to exend V4L2 standard format for android usage

Android has RGBA format output but V4L2 framework do not have this format
.In order to support this in our mem2mem driver, we need to extend V4L2
format.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20192-4: m2m: Coverity: remove the dead code
Guoniu.Zhou [Thu, 20 Dec 2018 02:48:17 +0000 (10:48 +0800)]
MLK-20192-4: m2m: Coverity: remove the dead code

Because the address of an object is never null and the if
statement will never true so remove the dead code

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-4: ISI: enable alpha insertion for mem2mem
Guoniu.Zhou [Fri, 9 Nov 2018 10:57:32 +0000 (18:57 +0800)]
MLK-20326-4: ISI: enable alpha insertion for mem2mem

Enable global alpha insertion for memory to memory function
of ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem
Guoniu.Zhou [Fri, 9 Nov 2018 10:48:13 +0000 (18:48 +0800)]
MLK-20326-2: ISI: enable horizonal and vertical flip for mem2mem

Eanble horizonal and vertical flip for memory to memory function
of ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19291: ISI: correct color mapping between V4L2 and ISI
Guoniu.Zhou [Thu, 8 Nov 2018 11:25:44 +0000 (19:25 +0800)]
MLK-19291: ISI: correct color mapping between V4L2 and ISI

Correct color mapping between V4L2 and ISI

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20046-2: ISI: add YUV444M format support
Guoniu.Zhou [Thu, 25 Oct 2018 03:14:52 +0000 (11:14 +0800)]
MLK-20046-2: ISI: add YUV444M format support

add YUV444M format support

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e424d16926d0320b31850bdd293e77c164a80661)

6 years agoMMFMWK-8296: ISI: return error code when user try to do upscale
Guoniu.Zhou [Mon, 22 Oct 2018 07:48:00 +0000 (15:48 +0800)]
MMFMWK-8296: ISI: return error code when user try to do upscale

Return error code when user try to do upscale since isi don't support.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 59949e29dcd996c50cae43bc5ff3f89907761c1b)

6 years agoMMFMWK-8297: ISI: return error when ISI chan0 is busy
Guoniu.Zhou [Mon, 22 Oct 2018 07:19:27 +0000 (15:19 +0800)]
MMFMWK-8297: ISI: return error when ISI chan0 is busy

When ISI channel0 is used to recevice camera data, it can
not be used to mem2mem. So return -EBUSY error code when
user try to use them at the same time.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit c6d5bf866819deaaf4900ae47d575c5a36d30a66)

6 years agoMLK-19915: m2m: correct V4L2_PIX_FMT_RGB32 to V4L2_PIX_FMT_XRGB32
Guoniu.Zhou [Fri, 12 Oct 2018 10:42:18 +0000 (18:42 +0800)]
MLK-19915: m2m: correct V4L2_PIX_FMT_RGB32 to V4L2_PIX_FMT_XRGB32

Because V4L2_PIX_FMT_RGB32 is deprecated and must not
be used by new drivers. V4L2_PIX_FMT_XRGB32 is used to
replace it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit e9e5c58dbea63bad8be43c924d35d499499b1804)

6 years agoMLK-19597: ISI: fix m2m hang issue after receiving 254 frames
Guoniu.Zhou [Thu, 13 Sep 2018 10:23:08 +0000 (18:23 +0800)]
MLK-19597: ISI: fix m2m hang issue after receiving 254 frames

In order to use ISI ping-pong buffer, driver add another list
for V4L2 m2m cap_q queue and add new list member to it from
cap_q default list without decreasing the related counter, so
it leads to overflow when run 254 times. So correct it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19514-2: ISI: use ping-pong buffer of ISI
Guoniu.Zhou [Tue, 4 Sep 2018 10:05:38 +0000 (18:05 +0800)]
MLK-19514-2: ISI: use ping-pong buffer of ISI

1. Use ping-pong buffer of isi.
2. Add multi-plane support for m2m out queue. When
V4L2 m2m device support multi-plane, it should be
applied for both input and output, so add it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19514-1: ISI: correct capture and output meaning
Guoniu.Zhou [Mon, 3 Sep 2018 07:20:10 +0000 (15:20 +0800)]
MLK-19514-1: ISI: correct capture and output meaning

According to V4L2 doc, cap_q_ctx is for "output to memory"
queue and out_q_ctx is for "input from memory", so capature
should represent for output of ISI and output should represent
for ISI's input. But I reversed their relationship, so correct
it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-19343: ISI: add memory to memory support for qm and qxp
Guoniu.Zhou [Mon, 27 Aug 2018 10:28:23 +0000 (18:28 +0800)]
MLK-19343: ISI: add memory to memory support for qm and qxp

Add memory to memory support for qm and qxp. Because only
ISI channel0 can support memory to memory feature so this
feature only support one channel. User can use channel 0
as other function when it isn't used for m2m.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-20595-1: camera: fix camera hang issue after resume
Guoniu.Zhou [Fri, 14 Dec 2018 10:08:25 +0000 (18:08 +0800)]
MLK-20595-1: camera: fix camera hang issue after resume

The reset pin of ov5640 will power down when system suspend and
it will lead to reset ov5640, so driver need to reinitialize the
sensor before streaming

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20404: sensor: fix potential memory leaks for ov5640
Guoniu.Zhou [Mon, 19 Nov 2018 07:14:05 +0000 (15:14 +0800)]
MLK-20404: sensor: fix potential memory leaks for ov5640

Driver does not free memory when it's removed or encounter
an error in probe. So fix potential memory leaks.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20335: ov5640: add QVGA resolution support for mipi ov5640
Guoniu.Zhou [Tue, 13 Nov 2018 03:01:14 +0000 (11:01 +0800)]
MLK-20335: ov5640: add QVGA resolution support for mipi ov5640

Add QVGA resolution support for mipi ov5640

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20123-1: camera: add automatic selection mode for mipi ov5640
Guoniu.Zhou [Tue, 30 Oct 2018 06:58:48 +0000 (14:58 +0800)]
MLK-20123-1: camera: add automatic selection mode for mipi ov5640

There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for mipi interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4c560890906f7df33e68a65372f60778cb1406b7)

6 years agoMLK-19007-2: camera: add "NTSC, 720P, QSXGA" for mipi ov5640
Guoniu.Zhou [Wed, 25 Jul 2018 03:20:04 +0000 (11:20 +0800)]
MLK-19007-2: camera: add "NTSC, 720P, QSXGA" for mipi ov5640

1. Use ISI channel 2 instead of 1 for mipi ov5640 because if
image line resolution is more than 2k, isi line buffer need
to chain to recevice line data

2. Add 15fps QSXGA, 30fps NTSC and 720P support for mipi ov5640

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18130: camera: add two ov5640 sensor support for QM
Guoniu.Zhou [Wed, 25 Apr 2018 09:28:32 +0000 (17:28 +0800)]
MLK-18130: camera: add two ov5640 sensor support for QM

Add two ov5640 sensors support for QM since it has two
MIPI CSI controller.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb
Guoniu.Zhou [Fri, 20 Apr 2018 08:23:09 +0000 (16:23 +0800)]
MLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb

1. Divide ov5640_v3.c into two parts, one for parallel csi driver
   and the other for mipi csi driver

2. Add parallel and mipi support in one dtb file. User can select
   one of them without changing the dtb file

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20595-1: camera: fix camera hang issue after resume
Guoniu.Zhou [Fri, 14 Dec 2018 10:08:25 +0000 (18:08 +0800)]
MLK-20595-1: camera: fix camera hang issue after resume

The reset pin of ov5640 will power down when system suspend and
it will lead to reset ov5640, so driver need to reinitialize the
sensor before streaming

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20469: ov5640: correct parallel ov5640 QVGA frame rate setting
Guoniu.Zhou [Tue, 27 Nov 2018 06:42:48 +0000 (14:42 +0800)]
MLK-20469: ov5640: correct parallel ov5640 QVGA frame rate setting

Register setting for ov5640 30fps is the same with 15fps, so
correct it

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20123-2: camera: add automatic selection mode for parallel ov5640
Guoniu.Zhou [Tue, 30 Oct 2018 07:10:58 +0000 (15:10 +0800)]
MLK-20123-2: camera: add automatic selection mode for parallel ov5640

There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for parallel interface of ov5640 sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 8eb46dab84dd589ba0e6f997e28fa9ff3bbbcd63)

6 years agoMLK-19007-1: camera: add "QCIF, QVGA, NTSC, PAL, XGA, QSXGA" support
Guoniu.Zhou [Wed, 25 Jul 2018 02:46:00 +0000 (10:46 +0800)]
MLK-19007-1: camera: add "QCIF, QVGA, NTSC, PAL, XGA, QSXGA" support

1. add resolution "QCIF, QVGA, NTSC, PAL, XGA, QSXGA" support for
parallel camera sensor driver

2. enable ISI channel line buffer chain when image having higher
than 2048 horizontal resolution

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb
Guoniu.Zhou [Fri, 20 Apr 2018 08:23:09 +0000 (16:23 +0800)]
MLK-18098: camera: add MIPI and PARALLEL CSI support in one dtb

1. Divide ov5640_v3.c into two parts, one for parallel csi driver
   and the other for mipi csi driver

2. Add parallel and mipi support in one dtb file. User can select
   one of them without changing the dtb file

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17790-2: CI_PI: add system and runtime suspend/resume
Guoniu.Zhou [Tue, 13 Mar 2018 10:08:16 +0000 (18:08 +0800)]
MLK-17790-2: CI_PI: add system and runtime suspend/resume

1. For QXP, after system suspend and resume, parent of pixel
and per clk will drop, so driver need to restore it. The rate
of pixel and per clk also will miss, so driver have to set it
in resume callback again.

2. I have to power off CI_PI subsystem power domain in resume
callback, otherwise setting clock parent will fail.

3. Driver need free gpio resouce after device do not use it.

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 986098a52e62b89d6f6f7afdb75d17d77649db59)

6 years agoMLK-17741-2: media: add ov5640 mipi driver
Guoniu.Zhou [Fri, 9 Mar 2018 08:19:37 +0000 (16:19 +0800)]
MLK-17741-2: media: add ov5640 mipi driver

Add driver for ov5640 mipi csi interface.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 860dab368735dcbf248da7b74163ce6048a57514)

6 years agoMLK-17230-12: camera: fixed enum frame interval issue
Guoniu.Zhou [Tue, 6 Feb 2018 03:34:13 +0000 (11:34 +0800)]
MLK-17230-12: camera: fixed enum frame interval issue

when enum frame interval, kernel will be panic. It caused by
an null pointer, so correct the subdev data structure pointer.

ov5640 only support 15fps when mode is 1080P, so add this info
when user enum frame interval.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 4089120ce5fbcb253728a23102a62c849b71c88b)

6 years agoMLK-17230-6: sensor: add driver for ov5640 camera sensor
Guoniu.Zhou [Mon, 5 Feb 2018 07:58:39 +0000 (15:58 +0800)]
MLK-17230-6: sensor: add driver for ov5640 camera sensor

Add version3.0 driver for ov5640 camera sensor. It works on DVP
mode

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 64d7dd18ac3c768480df8390ab02a35142a220cd)

6 years agoMA-13914 [Android Auto] RVC do not work on imx_pi9.0
zhang sanshan [Tue, 8 Jan 2019 13:51:10 +0000 (21:51 +0800)]
MA-13914 [Android Auto] RVC do not work on imx_pi9.0

OV10635_15_FPS/OV10635_30_FPS should be set to 0/1.
to_ov10635_frame_rate is used by ov10635_mode_info_data.
the size of ov10635_mode_info_data is 2.

Change-Id: Ie2f19fd4332cd7b59cfdec5acbaa0b595dcf2f46
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
6 years agoMLK-20193: max9286: Coverity: fix potential dead code issue
Guoniu.Zhou [Thu, 20 Dec 2018 03:11:06 +0000 (11:11 +0800)]
MLK-20193: max9286: Coverity: fix potential dead code issue

Driver does not get the return value of function but the value
as the condition of if statement. It will never true, so fix it

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20192-1: max9286: Coverity: fix potential uninitialized scalar variable
Guoniu.Zhou [Thu, 20 Dec 2018 02:23:16 +0000 (10:23 +0800)]
MLK-20192-1: max9286: Coverity: fix potential uninitialized scalar variable

The variable maybe unassigned but used by function ,so fix potential
uninitialized scalar variable

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20403: max9286: add hardware reset for max9286
Guoniu.Zhou [Wed, 14 Nov 2018 05:53:38 +0000 (13:53 +0800)]
MLK-20403: max9286: add hardware reset for max9286

Add hardware reset for max9286 before initialization

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20123-3: camera: add automatic selection mode for ov10635
Guoniu.Zhou [Tue, 30 Oct 2018 07:13:02 +0000 (15:13 +0800)]
MLK-20123-3: camera: add automatic selection mode for ov10635

There is two methods to select different mode for camera sensor, one
is setting mode by VIDIOC_S_PARM ioctl and the other is automatic
selection through resolution. If resolution match one of camera sensor
supported, driver will select the corresponding mode. If not, driver
will select the max resolution supported by sensor and use ISI to
resize to the target resolution.

This patch is for ov10635 camera sensor

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 21680ebeebbd2deb0430e0e2df82e3b5ec95c08d)

6 years agoMLK-19107: ov10635: add "720P, WVGA, VGA, CIF, QVGA" support for ov10635
Guoniu.Zhou [Tue, 31 Jul 2018 06:06:01 +0000 (14:06 +0800)]
MLK-19107: ov10635: add "720P, WVGA, VGA, CIF, QVGA" support for ov10635

Add 30fps "720P, WVGA, VGA, CIF, QVGA" support for ov10635

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-19106: camera: add enable attribute to turn on/off color bar
Guoniu.Zhou [Thu, 26 Jul 2018 10:41:35 +0000 (18:41 +0800)]
MLK-19106: camera: add enable attribute to turn on/off color bar

Add analog_test_pattern device attribute for ov16035 in order
to turn on/off its color bar test pattern to debug

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
6 years agoMLK-18085 camera: Change the OV10635 to use 96 MHz timing.
Oliver Brown [Thu, 10 May 2018 14:22:20 +0000 (09:22 -0500)]
MLK-18085 camera: Change the OV10635 to use 96 MHz timing.

This issue changes the OV10635 to use the 96 MHz timing. In the one camera the configuration, the 72MHz timing was causing vsync and hsync errors. The 96 MHz timing will work for any number of cameras.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
6 years agoMLK-18053: camera: Refine VIDIOC_DBG_G_CHIP_IDENT ioctl
Guoniu.Zhou [Tue, 17 Apr 2018 06:48:13 +0000 (14:48 +0800)]
MLK-18053: camera: Refine VIDIOC_DBG_G_CHIP_IDENT ioctl

Driver only return camera name for max9286 before, but
the driver is now supporting ov5640. So refine this ioctl
implement and remove max9286 camera driver private data

Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-17230-9: max9286: delete redundant 15fps support
Guoniu.Zhou [Mon, 5 Feb 2018 08:50:08 +0000 (16:50 +0800)]
MLK-17230-9: max9286: delete redundant 15fps support

Delete redundant 15fps statements because max9286 does not
support.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 88089e8a6dd5f0d06c7c61562f5a1942840f23e3)