Skip to content

Commit

Permalink
[media] media: platform: add VPFE capture driver support for AM437X
Browse files Browse the repository at this point in the history
This patch adds Video Processing Front End (VPFE) driver for
AM437X family of devices
Driver supports the following:
- V4L2 API using MMAP buffer access based on videobuf2 api
- Asynchronous sensor/decoder sub device registration
- DT support

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
[hans.verkuil@cisco.com: swapped two lines to fix vpfe_release() & add pinctrl include]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Benoit Parrot authored and Mauro Carvalho Chehab committed Dec 23, 2014
1 parent 3b1635e commit 417d2e5
Show file tree
Hide file tree
Showing 11 changed files with 3,411 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Documentation/devicetree/bindings/media/ti-am437x-vpfe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Texas Instruments AM437x CAMERA (VPFE)
--------------------------------------

The Video Processing Front End (VPFE) is a key component for image capture
applications. The capture module provides the system interface and the
processing capability to connect RAW image-sensor modules and video decoders
to the AM437x device.

Required properties:
- compatible: must be "ti,am437x-vpfe"
- reg: physical base address and length of the registers set for the device;
- interrupts: should contain IRQ line for the VPFE;
- ti,am437x-vpfe-interface: can be one of the following,
0 - Raw Bayer Interface.
1 - 8 Bit BT656 Interface.
2 - 10 Bit BT656 Interface.
3 - YCbCr 8 Bit Interface.
4 - YCbCr 16 Bit Interface.

VPFE supports a single port node with parallel bus. It should contain one
'port' child node with child 'endpoint' node. Please refer to the bindings
defined in Documentation/devicetree/bindings/media/video-interfaces.txt.

Example:
vpfe: vpfe@f0034000 {
compatible = "ti,am437x-vpfe";
reg = <0x48328000 0x2000>;
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;

pinctrl-names = "default", "sleep";
pinctrl-0 = <&vpfe_pins_default>;
pinctrl-1 = <&vpfe_pins_sleep>;

port {
#address-cells = <1>;
#size-cells = <0>;

vpfe0_ep: endpoint {
remote-endpoint = <&ov2659_1>;
ti,am437x-vpfe-interface = <0>;
bus-width = <8>;
hsync-active = <0>;
vsync-active = <0>;
};
};
};

i2c1: i2c@4802a000 {

ov2659@30 {
compatible = "ti,ov2659";
reg = <0x30>;

port {
ov2659_1: endpoint {
remote-endpoint = <&vpfe0_ep>;
bus-width = <8>;
mclk-frequency = <12000000>;
};
};
};
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8745,6 +8745,15 @@ S: Maintained
F: drivers/media/platform/davinci/
F: include/media/davinci/

TI AM437X VPFE DRIVER
M: Lad, Prabhakar <prabhakar.csengg@gmail.com>
L: linux-media@vger.kernel.org
W: http://linuxtv.org/
Q: http://patchwork.linuxtv.org/project/linux-media/list/
T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git
S: Maintained
F: drivers/media/platform/am437x/

SIS 190 ETHERNET DRIVER
M: Francois Romieu <romieu@fr.zoreil.com>
L: netdev@vger.kernel.org
Expand Down
1 change: 1 addition & 0 deletions drivers/media/platform/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ config VIDEO_S3C_CAMIF
source "drivers/media/platform/soc_camera/Kconfig"
source "drivers/media/platform/exynos4-is/Kconfig"
source "drivers/media/platform/s5p-tv/Kconfig"
source "drivers/media/platform/am437x/Kconfig"

endif # V4L_PLATFORM_DRIVERS

Expand Down
2 changes: 2 additions & 0 deletions drivers/media/platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ obj-$(CONFIG_VIDEO_RENESAS_VSP1) += vsp1/

obj-y += omap/

obj-$(CONFIG_VIDEO_AM437X_VPFE) += am437x/

ccflags-y += -I$(srctree)/drivers/media/i2c
11 changes: 11 additions & 0 deletions drivers/media/platform/am437x/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config VIDEO_AM437X_VPFE
tristate "TI AM437x VPFE video capture driver"
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
depends on SOC_AM43XX || COMPILE_TEST
select VIDEOBUF2_DMA_CONTIG
help
Support for AM437x Video Processing Front End based Video
Capture Driver.

To compile this driver as a module, choose M here. The module
will be called am437x-vpfe.
3 changes: 3 additions & 0 deletions drivers/media/platform/am437x/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Makefile for AM437x VPFE driver

obj-$(CONFIG_VIDEO_AM437X_VPFE) += am437x-vpfe.o
Loading

0 comments on commit 417d2e5

Please sign in to comment.