Commit Graph

226 Commits

Author SHA1 Message Date
Arnd Bergmann 60a031b649 media: i2c: thp7312: select CONFIG_FW_LOADER
The recently added driver uses the firmware loader mechanism but causes
a link failure when that is in a loadable module while thp7312 itself
is built-in:

arm-linux-gnueabi-ld: drivers/media/i2c/thp7312.o: in function `thp7312_probe':
thp7312.c:(.text+0x4164): undefined reference to `firmware_upload_register'

Select the required Kconfig symbol. Note that the driver specifically
needs the firmware upload interface that is controlled by CONFIG_FW_UPLOAD,
but there is no link failure when that is disabled because the interfaces
are stubbed out here.

Link: https://lore.kernel.org/linux-media/20240103155811.4092035-1-arnd@kernel.org
Fixes: 7a52ab415b ("media: i2c: Add driver for THine THP7312")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-01-11 18:43:04 +01:00
Jacopo Mondi 03d93f8ed7 media: i2c: Add driver for OmniVision OV64A40
Add a driver for the OmniVision OV64A40 image sensor.

Co-developed-by: Lee Jackson <lee.jackson@arducam.com>
Signed-off-by: Lee Jackson <lee.jackson@arducam.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13 13:21:21 +01:00
Sebastian Reichel 3ae52083b5 media: i2c: gc0308: new driver
Introduce new driver for GalaxyCore GC0308, which is a cheap
640x480 with an on-chip ISP sensor sold since 2010. Data is
provided via parallel bus.

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
[Sakari Ailus: Changed MAINTAINERS to match GC2145 entry.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13 13:21:21 +01:00
Tommaso Merciai 0a7af87291 media: i2c: Add support for alvium camera
The Alvium camera is shipped with sensor + isp in the same housing.
The camera can be equipped with one out of various sensor and abstract
the user from this. Camera is connected via MIPI CSI-2.

Most of the camera module features are supported, with the main exception
being fw update.

The driver provides all mandatory, optional and recommended V4L2 controls
for maximum compatibility with libcamera

References:
 - https://www.alliedvision.com/en/products/embedded-vision-solutions

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
[Sakari Ailus: Assign ret before using it in probe and squash Tommaso's
	       other fixes.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: alvium-csi2.h: SPDX must use /* */ instead of //]
2023-12-13 13:21:20 +01:00
Mehdi Djait 918b14a26b media: i2c: Introduce a driver for the Techwell TW9900 decoder
The Techwell video decoder supports PAL, NTSC standards and
has a parallel BT.656 output interface.

This commit adds support for this device, with basic support
for NTSC and PAL, along with brightness and contrast controls.

The TW9900 is capable of automatic standard detection. This
driver is implemented with support for PAL and NTSC
autodetection.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Mehdi Djait <mehdi.djait@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13 11:04:45 +01:00
Alain Volmat 6223dafa3c media: i2c: st-mipid02: use cci_* helpers for register access.
Use cci_read & cci_write functions for accessing registers.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-04 10:37:47 +01:00
Paul Elder 7a52ab415b media: i2c: Add driver for THine THP7312
The THP7312 is an external camera ISP from THine. Add a V4L2 subdev
driver for it.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Co-developed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Sakari Ailus: squash a patch to fix missing mutex_unlock by Laurent.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-04 10:37:46 +01:00
Alain Volmat 03cc7fefbb media: i2c: gc2145: Galaxy Core GC2145 sensor support
Addition of support for the Galaxy Core GC2145 XVGA sensor.
The sensor supports both DVP and CSI-2 interfaces however for
the time being only CSI-2 is implemented.

Configurations are currently based on initialization scripts
coming from Galaxy Core and so for that purpose only 3 static
resolutions are supported:
 - 640x480
 - 1280x720
 - 1600x1200

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-04 10:37:46 +01:00
Laurent Pinchart 852798cc8a media: i2c: imx219: Convert to CCI register access helpers
Use the new common CCI register access helpers to replace the private
register access helpers in the imx219 driver. This simplifies the driver
by reducing the amount of code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-10-07 10:55:46 +02:00
Laurent Pinchart 24d756e914 media: i2c: Add driver for onsemi MT9M114 camera sensor
The MT9M114 is a CMOS camera sensor that combines a 1296x976 pixel array
with a 10-bit dynamic range together with an internal ISP. The driver
exposes two subdevs, one for the pixel array and one for the ISP (named
IFP for Image Flow Processor). Major supported features are

- Full configuration of analog crop and binning in the pixel array
- Full configuration of scaling in the ISP
- Automatic exposure and white balance
- Manual exposure and analog gain
- Horizontal and vertical flip

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-10-07 10:55:46 +02:00
Hans de Goede 9289998ea5 media: ov2680: Convert to new CCI register access helpers
Use the new comon CCI register access helpers to replace the private
register access helpers in the ov2680 driver.

Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-14 20:27:56 +02:00
Daniel Scally fed60fc552 media: i2c: Add driver for DW9719 VCM
Add a driver for the DW9719 VCM. The driver creates a v4l2 subdevice
and registers a control to set the desired focus.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-10 07:58:41 +02:00
Hans de Goede af73323b97 media: imx290: Convert to new CCI register access helpers
Use the new comon CCI register access helpers to replace the private
register access helpers in the imx290 driver.

[Sakari Ailus: Squashed the patch to address a merge issue in Kconfig]

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-10 07:58:39 +02:00
Hans de Goede f3a5e2ccb9 media: ov5693: Convert to new CCI register access helpers
Use the new comon CCI register access helpers to replace the private
register access helpers in the ov5693 driver.

[Sakari Ailus: Squashed the patch to address a merge issue in Kconfig]

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-10 07:58:39 +02:00
Sakari Ailus 11ec2c45b5 media: i2c: Remove common dependencies from sensor drivers
As selecting V4L2_FWNODE, MEDIA_CONTROLLER and VIDEO_V4L2_SUBDEV_API are
now selected by the top level menu, they can be dropped from the
individual drivers. Also dropped selecting V4L2_ASYNC for a single driver
as this is already implied by V4L2_FWNODE.

Similarly, the I2C dependency is now also in the top level menu, so remove
it, as well as VIDEO_DEV which isn't needed by camera sensor drivers.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-10 07:58:38 +02:00
Sakari Ailus 7d3c7d2a29 media: i2c: Add a camera sensor top level menu
Select V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API for all sensor drivers. This
also adds the options to drivers that don't specifically need them, these
are still seldom used drivers using old APIs. The upside is that these
should now all compile --- many drivers have had missing dependencies.

The "menu" is replaced by selectable "menuconfig" to select the needed
V4L2_FWNODE and VIDEO_V4L2_SUBDEV_API options.

Also select MEDIA_CONTROLLER which VIDEO_V4L2_SUBDEV_API effectively
depends on, and add the I2C dependency to the menu.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org # for >= 6.1
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-08-10 07:58:38 +02:00
Tomi Valkeinen 6363db1c9d media: i2c: add DS90UB953 driver
Add driver for TI DS90UB953 FPD-Link III Serializer.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-07-14 13:20:03 +02:00
Tomi Valkeinen c158d0d4ff media: i2c: add DS90UB913 driver
Add driver for TI DS90UB913 FPD-Link III Serializer.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-07-14 13:19:31 +02:00
Tomi Valkeinen afe267f2d3 media: i2c: add DS90UB960 driver
Add driver for TI DS90UB960 FPD-Link III Deserializer.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-07-14 13:18:56 +02:00
Arnd Bergmann 582d4ad468 media: tc358746: select CONFIG_GENERIC_PHY
The tc358746 driver selects CONFIG_GENERIC_PHY_MIPI_DPHY and links to
that, but this fails when CONFIG_GENERIC_PHY is disabled, because Kbuild
then never enters the drivers/phy directory for building object files:

ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk" [drivers/media/i2c/tc358746.ko] undefined!

Add an explicit 'select GENERIC_PHY' here to ensure that the directory
is entered, and add another dependency on that symbol so make it
more obvious what is going on if another driver has the same problem,
as this will produce a Kconfig warning.

Link: https://lore.kernel.org/linux-media/20230623152318.2276816-1-arnd@kernel.org
Fixes: 80a21da360 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-06-28 11:08:42 +02:00
Bingbu Cao 0827b58dab media: i2c: add ov01a10 image sensor driver
Add v4l2 device driver for OmniVision ov01a10 image sensor, ov01a10
image sensor can deliver 1280x800 resolution BGGR10 images at 60 fps.

Signed-off-by: Yating Wang <yating.wang@intel.com>
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-05-25 16:21:23 +02:00
Laurent Pinchart 4db7f7a0e5 media: i2c: Drop unused vs6624 camera sensor driver
The vs6624 camera sensor driver doesn't support DT and relies on
platform data. The last board files supplying platform data for that
device have been removed from the kernel in v4.17. The driver hasn't
been used since them. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:57:22 +01:00
Laurent Pinchart 6a692b059c media: i2c: Drop unused sr030pc30 camera sensor driver
The sr030pc30 camera sensor driver doesn't support DT and relies on
platform data. No board file has ever provided platform data for that
device. The driver has thus never been used in the mainline kernel since
its introduction in v2.6.37. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:56:49 +01:00
Laurent Pinchart 56ac4aa4ed media: i2c: Drop unused s5k6aa camera sensor driver
The s5k6aa camera sensor driver doesn't support DT and relies on
platform data. The last board files supplying platform data for that
device have been removed from the kernel in v3.11. The driver hasn't
been used since them. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:56:18 +01:00
Laurent Pinchart 4604236d67 media: i2c: Drop unused noon010pc30 camera sensor driver
The noon010pc30 camera sensor driver doesn't support DT and relies on
platform data. The last board files supplying platform data for that
device have been removed from the kernel in v3.16. A device tree file
referencing the device has been added in v3.17, but without
corresponding DT bindings, and with DT support in the driver. The driver
thus hasn't been used since v316. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:43:17 +01:00
Laurent Pinchart 95a9ea8a13 media: i2c: Drop unused mt9t001 camera sensor driver
The mt9t001 camera sensor driver doesn't support DT and relies on
platform data. No board file has ever provided platform data for that
device. The driver has thus never been used in the mainline kernel since
its introduction in v3.2. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:38:21 +01:00
Laurent Pinchart a22eabc825 media: i2c: Drop unused mt9m032 camera sensor driver
The mt9m032 camera sensor driver doesn't support DT and relies on
platform data. No board file has ever provided platform data for that
device. The driver has thus never been used in the mainline kernel since
its introduction in v3.4. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:36:10 +01:00
Laurent Pinchart c77d3da12e media: i2c: Drop unused m5mols camera sensor driver
The m5mols camera sensor driver doesn't support DT and relies on
platform data. The last board files supplying platform data for that
device have been removed from the kernel in v3.11. The driver hasn't
been used since them. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:34:55 +01:00
Laurent Pinchart db24aa0411 media: i2c: Drop unused ad9389b video encoder driver
The ad9389b video encoder driver doesn't support DT and relies on
platform data. No board file has ever provided platform data for that
device. The driver has thus never been used in the mainline kernel since
its introduction in v3.7. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-15 09:33:37 +01:00
Sakari Ailus 71937240a4 media: ov2685: Select VIDEO_V4L2_SUBDEV_API
VIDEO_V4L2_SUBDEV_API is required for v4l2_subdev_get_pad_*() functions.
Select it.

Fixes: ("media: i2c: ov2685: Add .get_selection() support")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-03-20 16:32:18 +01:00
Gerald Loacker 14cd15e7a1 media: i2c: add imx415 cmos image sensor driver
Add driver for the Sony IMX415 CMOS image sensor.

Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
Co-developed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-02-06 08:52:39 +01:00
Laurent Pinchart cb33db2b6c media: i2c: IMX296 camera sensor driver
The IMX296LLR is a monochrome 1.60MP CMOS sensor from Sony. The driver
supports cropping and binning (but not both at the same time due to
hardware limitations) and exposure, gain, vertical blanking and test
pattern controls.

Preliminary support is also included for the color IMX296LQR sensor.

[Sakari Ailus: Make driver's remove function return void]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-02-06 08:41:36 +01:00
Nicholas Roth e14d3ac81b media: i2c: Add driver for OmniVision OV8858
Add a driver for OmniVision OV8858 image sensor.

The driver currently supports operations with 2 and 4 data lanes, in
full resolution and half-binned resolution modes.

The driver has been upported from the PinephonePro BSP available at
https://gitlab.com/pine64-org/linux.git
at commit 8c4a90c12dc2 ("media: i2c: ov8858: Use default subdev
name").

Signed-off-by: Nicholas Roth <nicholas@rothemail.net>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-02-06 08:26:29 +01:00
Linus Walleij 5e2ac9aac7 media: s5k4ecgx: Delete driver
This driver was until the previous patch unused in the kernel
and depended on platform data that no board was defining.
As no users can be proven to exist, delete the driver.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2022-12-07 17:58:47 +01:00
Lukas Bulwahn b99d744b3d media: i2c: refer to config VIDEO_DEV to make ov08x40 image sensor driver usable
Commit 9958d30f38 ("media: Kconfig: cleanup VIDEO_DEV dependencies")
removes the config VIDEO_V4L2 as it is merged with config VIDEO_DEV.

Long after this change, commit 38fc5136ac ("media: i2c: Add ov08x40 image
sensor driver") introduces and refers to the removed config VIDEO_V4L2,
basically making this driver impossible to build, test and use due to
dependencies that cannot be met.

Refer to config VIDEO_DEV instead to make this driver usable.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Fixes: 38fc5136ac ("media: i2c: Add ov08x40 image sensor driver")
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-11-25 08:50:39 +00:00
Marco Felsch 67bfe08f82 media: tc358746: drop selecting COMMON_CLK
Still there are archs/platforms which do not support the common clk
framework. If such a platform is used in combination with the module
enabled the compiler will throw an error. Since the clock has stubs if
not selected we can drop it, so it is up to the arch/platform to select
the correct clock framework.

Fixes: 80a21da360 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-11-25 08:37:34 +00:00
Marco Felsch 80a21da360 media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver
Adding support for the TC358746 parallel <-> MIPI CSI bridge. This chip
supports two operating modes:
  1st) parallel-in -> mipi-csi out
  2nd) mipi-csi in -> parallel out

This patch only adds the support for the 1st mode.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Sakari Ailus: remove() now returns void]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2022-10-27 14:48:40 +03:00
Benjamin Mugnier 153e4ad44d media: i2c: Add driver for ST VGXY61 camera sensor
The VGXY61 has a quad lanes CSI-2 output port running at 800mbps per
lane, and supports RAW8, RAW10, RAW12, RAW14 and RAW16 formats.
The driver handles both sensor types:
- VG5661 and VG6661: 1.6 Mpx (1464 x 1104) 75fps.
- VG5761 and VG6761: 2.3 Mpx (1944 x 1204) 60 fps.
The driver supports:
- HDR linearize mode, HDR substraction mode, and no HDR
- GPIOs LEDs strobing
- Digital binning and analog subsampling
- Horizontal and vertical flip
- Manual exposure
- Analog and digital gains
- Test patterns

Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
[Sakari Ailus: remove() now returns void]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2022-10-27 14:37:38 +03:00
Mikhail Rudenko 32a437db49 media: i2c: add support for OV4689
Add a V4L2 sub-device driver for OmniVision OV4689 image sensor. This
is a 4 Mpx image sensor using the I2C bus for control and the CSI-2
bus for data.

This driver supports following features:
- manual exposure and analog gain control support
- test pattern support
- media controller support
- runtime PM support
- support following resolutions:
  + 2688x1520 at 30 fps

The driver provides all mandatory V4L2 controls for compatibility with
libcamera. The sensor supports 1/2/4-lane CSI-2 modes, but the driver
implements 4 lane mode only at this moment.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2022-10-25 14:38:31 +03:00
Shawn Tu 38fc5136ac media: i2c: Add ov08x40 image sensor driver
Add a V4L2 sub-device driver for Omnivision ov08X40 image sensor.
This is a camera sensor using the I2C bus for control and the
CSI-2 bus for data.

This driver supports following features:
- manual exposure and analog/digital gain control support
- vblank/hblank control support
- test pattern support
- media controller support
- runtime PM support
- support following resolutions:
  + 3856x2464 at 30FPS
  + 1928x1208 at 30FPS

Signed-off-by: Jason Chen <jason.z.chen@intel.com>
Signed-off-by: Shawn Tu <shawnx.tu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2022-10-25 14:38:31 +03:00
Hans Verkuil dbae22e200 media: ar0521: fix Kconfig: VIDEO_V4L2 -> VIDEO_DEV
VIDEO_V4L2 no longer exists, instead use VIDEO_DEV. Without this change
this driver cannot be selected.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-15 15:20:16 +01:00
Laurent Pinchart 817819b27e media: Replace dependency on VIDEO_V4L2_SUBDEV_API with select
The VIDEO_V4L2_SUBDEV_API Kconfig symbol is mostly selected
automatically, with a a handful of drivers still using it as a
dependency. Fix them to use selection, and drop the symbol title text to
not expose it for manual selection.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-15 15:19:48 +01:00
Krzysztof Hałasa 852b50aeed media: On Semi AR0521 sensor driver
The driver has been extensively tested in an i.MX6-based system.
AR0521 is a 5.7 mm x 4.3 mm, 5 MPix RGGB MIPI/HiSPi BSI CMOS sensor
from On Semiconductor.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-08 16:03:20 +01:00
Randy Dunlap 81e005842d media: isl7998x: select V4L2_FWNODE to fix build error
Fix build error when VIDEO_ISL7998X=y and V4L2_FWNODE=m
by selecting V4L2_FWNODE.

microblaze-linux-ld: drivers/media/i2c/isl7998x.o: in function `isl7998x_probe':
(.text+0x8f4): undefined reference to `v4l2_fwnode_endpoint_parse'

Cc: stable@vger.kernel.org # 5.18 and above
Fixes: 51ef2be546 ("media: i2c: isl7998x: Add driver for Intersil ISL7998x")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-05 10:59:14 +01:00
Mike Pagano 8429b35897 media: i2c: ov2640: Depend on V4L2_ASYNC
Add V4L2_ASYNC as a dependency to match other drivers and prevent failures
when compile testing.

Fixes: ff3cc65cad ("media: v4l: async, fwnode: Improve module organisation")
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-05-17 09:17:10 +02:00
Mauro Carvalho Chehab d94304f2c3 media: i2c: Kconfig: move camera drivers to the top
The camera drivers are the ones that suffer additions/changes
on those days. Place them on the top of the I2C drivers.

Suggested-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18 05:58:35 +01:00
Mauro Carvalho Chehab 6cdc31b2d7 media: media/*/Kconfig: sort entries
Currently, the idems inside media Kconfig are out of order.
Sort them using the script below:

<script>
use strict;
use warnings;

my %config;
my @source;
my $out;

sub flush_config()
{
	if (scalar %config) {
		for my $c (sort keys %config) {
			$out .= $config{$c} . "\n";
		}
		%config = ();
	}

	return if (!scalar @source);

	$out .= "\n";
	for my $s (sort @source) {
		$out .= $s;
	}
	$out .= "\n";

	@source = ();
}

sub sort_kconfig($)
{
	my $fname = shift;
	my $cur_config = "";

	@source = ();
	$out = "";
	%config = ();

	open IN, $fname or die;
	while (<IN>) {
		if (m/^config\s+(.*)/) {
			$cur_config = $1;
			$config{$cur_config} .= $_;
		} elsif (m/^source\s+(.*)/) {
			push @source, $_;
		} elsif (m/^\s+/) {
			if ($cur_config eq "") {
				$out .= $_;
			} else {
				$config{$cur_config} .= $_;
			}
		} else {
			flush_config();
			$cur_config = "";
			$out .= $_;
		}
	}
	close IN or die;

	flush_config();

	$out =~ s/\n\n+/\n\n/g;
	$out =~ s/\n+$/\n/;

	open OUT, ">$fname";
	print OUT $out;
	close OUT;
}

for my $fname(@ARGV) {
	sort_kconfig $fname
}
</script>

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18 05:58:35 +01:00
Mauro Carvalho Chehab 9958d30f38 media: Kconfig: cleanup VIDEO_DEV dependencies
media Kconfig has two entries associated to V4L API:
VIDEO_DEV and VIDEO_V4L2.

On Kernel 2.6.x, there were two V4L APIs, each one with its own flag.
VIDEO_DEV were meant to:
	1) enable Video4Linux and make its Kconfig options to appear;
	2) it makes the Kernel build the V4L core.

while VIDEO_V4L2 where used to distinguish between drivers that
implement the newer API and drivers that implemented the former one.

With time, such meaning changed, specially after the removal of
all V4L version 1 drivers.

At the current implementation, VIDEO_DEV only does (1): it enables
the media options related to V4L, that now has:

	menu "Video4Linux options"
		visible if VIDEO_DEV

	source "drivers/media/v4l2-core/Kconfig"
	endmenu

but it doesn't affect anymore the V4L core drivers.

The rationale is that the V4L2 core has a "soft" dependency
at the I2C bus, and now requires to select a number of other
Kconfig options:

	config VIDEO_V4L2
		tristate
		depends on (I2C || I2C=n) && VIDEO_DEV
		select RATIONAL
		select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE
		default (I2C || I2C=n) && VIDEO_DEV

In the past, merging them would be tricky, but it seems that it is now
possible to merge those symbols, in order to simplify V4L dependencies.

Let's keep VIDEO_DEV, as this one is used on some make *defconfig
configurations.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for meson-vdec & meson-ge2d
Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Acked-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18 05:58:35 +01:00
Marek Vasut 51ef2be546 media: i2c: isl7998x: Add driver for Intersil ISL7998x
Add driver for the Intersil ISL7998x Analog to MIPI CSI-2/BT656 decoder.
This chip supports 1/2/4 analog video inputs and converts them into
1/2/4 VCs in MIPI CSI2 stream.

This driver currently supports ISL79987 and both 720x480 and 720x576
resolutions, however as per specification, all inputs must use the
same resolution and standard. The only supported pixel format is now
YUYV/YUV422. The chip should support RGB565 on the CSI2 as well, but
this is currently unsupported.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
To: linux-media@vger.kernel.org
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[Sakari Ailus: Always call pm_runtime_get_and_resume in pre_streamon]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2022-03-04 00:27:10 +02:00
Shawn Tu 472377febf media: Add a driver for the og01a1b camera sensor
Add a V4L2 sub-device driver for Omnivision og01a1b b&w
image sensor. This is a camera sensor using the I2C bus
for control and the CSI-2 bus for data.

This driver supports following features:
- manual exposure and analog/digital gain control support
- vblank/hblank control support
- test pattern support
- media controller support
- runtime PM support
- support following resolutions:
  + 1280x1024 at 120FPS

Signed-off-by: Shawn Tu <shawnx.tu@intel.com>
[Sakari Ailus: Update according to recent v4l2-async API changes]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2022-03-04 00:27:05 +02:00