[media] media: platform: rcar_drif: Add DRIF support

This patch adds Digital Radio Interface (DRIF) support to R-Car Gen3 SoCs.
The driver exposes each instance of DRIF as a V4L2 SDR device. A DRIF
device represents a channel and each channel can have one or two
sub-channels respectively depending on the target board.

DRIF supports only Rx functionality. It receives samples from a RF
frontend tuner chip it is interfaced with. The combination of DRIF and the
tuner device, which is registered as a sub-device, determines the receive
sample rate and format.

In order to be compliant as a V4L2 SDR device, DRIF needs to bind with
the tuner device, which can be provided by a third party vendor. DRIF acts
as a slave device and the tuner device acts as a master transmitting the
samples. The driver allows asynchronous binding of a tuner device that
is registered as a v4l2 sub-device. The driver can learn about the tuner
it is interfaced with based on port endpoint properties of the device in
device tree. The V4L2 SDR device inherits the controls exposed by the
tuner device.

The device can also be configured to use either one or both of the data
pins at runtime based on the master (tuner) configuration.

Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Ramesh Shanmugasundaram 2017-06-12 10:26:19 -03:00 committed by Mauro Carvalho Chehab
parent 54a707ea01
commit 7625ee981a
3 changed files with 1524 additions and 0 deletions

View File

@ -550,3 +550,28 @@ config VIDEO_STM32_HDMI_CEC
between compatible devices.
endif #CEC_PLATFORM_DRIVERS
menuconfig SDR_PLATFORM_DRIVERS
bool "SDR platform devices"
depends on MEDIA_SDR_SUPPORT
default n
---help---
Say Y here to enable support for platform-specific SDR Drivers.
if SDR_PLATFORM_DRIVERS
config VIDEO_RCAR_DRIF
tristate "Renesas Digitial Radio Interface (DRIF)"
depends on VIDEO_V4L2 && HAS_DMA
depends on ARCH_RENESAS || COMPILE_TEST
select VIDEOBUF2_VMALLOC
---help---
Say Y if you want to enable R-Car Gen3 DRIF support. DRIF is Digital
Radio Interface that interfaces with an RF front end chip. It is a
receiver of digital data which uses DMA to transfer received data to
a configured location for an application to use.
To compile this driver as a module, choose M here; the module
will be called rcar_drif.
endif # SDR_PLATFORM_DRIVERS

View File

@ -54,6 +54,7 @@ obj-$(CONFIG_VIDEO_SH_VOU) += sh_vou.o
obj-$(CONFIG_SOC_CAMERA) += soc_camera/
obj-$(CONFIG_VIDEO_RCAR_DRIF) += rcar_drif.o
obj-$(CONFIG_VIDEO_RENESAS_FCP) += rcar-fcp.o
obj-$(CONFIG_VIDEO_RENESAS_FDP1) += rcar_fdp1.o
obj-$(CONFIG_VIDEO_RENESAS_JPU) += rcar_jpu.o

File diff suppressed because it is too large Load Diff