platform/kernel/linux-rpi.git
5 years agofirmware: raspberrypi: Report the fw variant during probe
Dave Stevenson [Thu, 10 Jan 2019 17:58:06 +0000 (17:58 +0000)]
firmware: raspberrypi: Report the fw variant during probe

The driver already reported the firmware build date during probe.
The mailbox calls have been extended to also report the variant
 1 = standard start.elf
 2 = start_x.elf (includes camera stack)
 3 = start_db.elf (includes assert logging)
 4 = start_cd.elf (cutdown version for smallest memory footprint).
Log the variant during probe.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agogpio-ir: change default pull configuration to up
Matthias Reichl [Wed, 9 Jan 2019 13:51:01 +0000 (14:51 +0100)]
gpio-ir: change default pull configuration to up

IR receivers like the TSOP series from Vishay and compatible ones
have active-low open collector outputs with an internal pull up of
about 30k (according to the TSOP datasheets).

Activating a pull-down resistor on the GPIO will make it work against
the pull-up in the IR receiver and brings the idle input voltage down
to about 1.9V (measured on a RPi3B+ with a TSOP4438). While that's
usually enough to make the RPi see a high signal it's certainly not
optimal and may even fail when using an IR receiver with a weaker pull-up.

Switching the default GPIO pull to "up" results in an input voltage
level of about 3.3V and ensures that an idle state (high signal) will
be detected if no IR receiver is attached.

Signed-off-by: Matthias Reichl <hias@horus.com>
5 years agostaging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER (#2782)
6by9 [Tue, 11 Dec 2018 15:18:02 +0000 (15:18 +0000)]
staging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER (#2782)

When handling for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER was added
the firmware would reject the setting if H264 hadn't already been
selected. This was fixed in the firmware at that point, but to
enable backwards compatibility the returned error was ignored.

That was Dec 2013, so the chances of having a firmware that still
has that issue is so close to zero that the workaround can be
removed.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agooverlays: Update README with removal of lirc-rpi
Phil Elwell [Wed, 5 Dec 2018 11:56:40 +0000 (11:56 +0000)]
overlays: Update README with removal of lirc-rpi

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoASoC: add driver for 3Dlab Nano soundcard (#2758)
dev-3Dlab [Wed, 5 Dec 2018 09:59:11 +0000 (10:59 +0100)]
ASoC: add driver for 3Dlab Nano soundcard (#2758)

Signed-off-by: GT <dev@3d-lab-av.com>
5 years agoRevert "staging: bcm2835-audio: Drop DT dependency"
Dave Stevenson [Tue, 4 Dec 2018 20:41:19 +0000 (20:41 +0000)]
Revert "staging: bcm2835-audio: Drop DT dependency"

This reverts commit 933bc853bb764e476b0b0f633588f46d20f1f76a.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoRevert "staging: vchiq_arm: Register a platform device for the audio driver"
Dave Stevenson [Tue, 4 Dec 2018 19:40:12 +0000 (19:40 +0000)]
Revert "staging: vchiq_arm: Register a platform device for the audio driver"

This reverts commit ab59590ed562b89db51fe46cee5db96b9bc5abd8.

Issues have been observed in LibreElec as this was unconditionally
loading the audio driver instead of having the DT parameter to
enable it.

Includes a partial revert of 2147700eb7a1b9e55e0684f0749114ce35d61571
which fixed up the error handling.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoAdd overlay for SLB9760 Iridium /LetsTrust TPM
Peter Huewe [Thu, 14 Jun 2018 20:51:24 +0000 (22:51 +0200)]
Add overlay for SLB9760 Iridium /LetsTrust TPM

Device Tree overlay for the Infineon SLB9670 Trusted Platform Module add-on
boards, which can be used as a secure key storage and hwrng.
available as "Iridium SLB9670" by Infineon and "LetsTrust TPM" by
pi3g.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
5 years agoEnable TPM TIS SPI support for TPM1.2 and TPM2.0 chips
Peter Huewe [Thu, 14 Jun 2018 20:42:18 +0000 (22:42 +0200)]
Enable TPM TIS SPI support for TPM1.2 and TPM2.0 chips

This patch enables the support for SPI TPMs which follow the TCG TIS
FIFO/PTP specification like the SLB9670.
In order to decrease ram usage the weak dependency on CONFIG_SECURITFS
is explictly set to 'n'.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
5 years agotpm: Make SECURITYFS a weak dependency
Peter Huewe [Mon, 3 Sep 2018 19:51:51 +0000 (21:51 +0200)]
tpm: Make SECURITYFS a weak dependency

commit 2f7d8dbb11287cbe9da6380ca14ed5d38c9ed91f upstream.

While having SECURITYFS enabled for the tpm subsystem is beneficial in
most cases, it is not strictly necessary to have it enabled at all.
Especially on platforms without any boot firmware integration of the TPM
(e.g. raspberry pi) it does not add any value for the tpm subsystem,
as there is no eventlog present.

By turning it from 'select' to 'imply' it still gets selected per
default, but enables users who want to save some kb of ram by turning
SECURITYFS off.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
5 years agomedia: vb2: Allow reqbufs(0) with "in use" MMAP buffers
John Sheu [Thu, 15 Oct 2015 09:05:25 +0000 (18:05 +0900)]
media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

Videobuf2 presently does not allow VIDIOC_REQBUFS to destroy outstanding
buffers if the queue is of type V4L2_MEMORY_MMAP, and if the buffers are
considered "in use".  This is different behavior than for other memory
types and prevents us from deallocating buffers in following two cases:

1) There are outstanding mmap()ed views on the buffer. However even if
   we put the buffer in reqbufs(0), there will be remaining references,
   due to vma .open/close() adjusting vb2 buffer refcount appropriately.
   This means that the buffer will be in fact freed only when the last
   mmap()ed view is unmapped.

2) Buffer has been exported as a DMABUF. Refcount of the vb2 buffer
   is managed properly by VB2 DMABUF ops, i.e. incremented on DMABUF
   get and decremented on DMABUF release. This means that the buffer
   will be alive until all importers release it.

Considering both cases above, there does not seem to be any need to
prevent reqbufs(0) operation, because buffer lifetime is already
properly managed by both mmap() and DMABUF code paths. Let's remove it
and allow userspace freeing the queue (and potentially allocating a new
one) even though old buffers might be still in processing.

Signed-off-by: John Sheu <sheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
5 years agostaging: bcm2835-camera: Fix stride on RGB3/BGR3 formats
Dave Stevenson [Fri, 30 Nov 2018 16:00:54 +0000 (16:00 +0000)]
staging: bcm2835-camera: Fix stride on RGB3/BGR3 formats

RGB3/BGR3 end up being 3 bytes per pixel, which meant that
the alignment code ended up trying to align using bitmasking
with a mask of 96.
That doesn't work, so switch to an arithmetic alignment for
those formats.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoconfig: Add bcm2835-codec to Pi defconfigs.
Dave Stevenson [Tue, 30 Oct 2018 12:23:26 +0000 (12:23 +0000)]
config: Add bcm2835-codec to Pi defconfigs.

Adds the V4L2 M2M codec driver to the config.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoARM: bcm2835_defconfig: Enable bcm2835-codec
Dave Stevenson [Mon, 29 Oct 2018 17:49:04 +0000 (17:49 +0000)]
ARM: bcm2835_defconfig: Enable bcm2835-codec

Enables the V4L2 M2M codec driver as a module.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vchiq_arm: Register vcsm-cma as a platform driver
Dave Stevenson [Fri, 26 Oct 2018 14:19:40 +0000 (15:19 +0100)]
staging: vchiq_arm: Register vcsm-cma as a platform driver

Following the same pattern as bcm2835-camera and bcm2835-audio,
register the vcsm-cma driver as a platform driver

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vchiq_arm: Register bcm2835-codec as a platform driver
Dave Stevenson [Fri, 26 Oct 2018 14:14:16 +0000 (15:14 +0100)]
staging: vchiq_arm: Register bcm2835-codec as a platform driver

Following the same pattern as bcm2835-camera and bcm2835-audio,
register the V4L2 codec driver as a platform driver

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc04_services: Add a V4L2 M2M codec driver
Dave Stevenson [Tue, 25 Sep 2018 13:53:49 +0000 (14:53 +0100)]
staging: vc04_services: Add a V4L2 M2M codec driver

This adds a V4L2 memory to memory device that wraps the MMAL
video decode and video_encode components for H264 and MJPEG encode
and decode, MPEG4, H263, and VP8 decode (and MPEG2 decode
if the appropriate licence has been purchased).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agomedia: videobuf2: Allow exporting of a struct dmabuf
Dave Stevenson [Mon, 29 Oct 2018 17:57:45 +0000 (17:57 +0000)]
media: videobuf2: Allow exporting of a struct dmabuf

videobuf2 only allowed exporting a dmabuf as a file descriptor,
but there are instances where having the struct dma_buf is
useful within the kernel.

Split the current implementation into two, one step which
exports a struct dma_buf, and the second which converts that
into an fd.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc04_services: Use vc-sm-cma to support zero copy
Dave Stevenson [Tue, 25 Sep 2018 15:07:55 +0000 (16:07 +0100)]
staging: vc04_services: Use vc-sm-cma to support zero copy

With the vc-sm-cma driver we can support zero copy of buffers between
the kernel and VPU. Add this support to vchiq-mmal.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc-sm-cma: Fixup driver for older VCHI APIs
Dave Stevenson [Tue, 30 Oct 2018 11:42:48 +0000 (11:42 +0000)]
staging: vc-sm-cma: Fixup driver for older VCHI APIs

Original patch was based off staging which included some cleanups
of the VCHI APIs. Those aren't present here, so switch back to
the older API.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc04_services: Add new vc-sm-cma driver
Dave Stevenson [Tue, 25 Sep 2018 09:27:11 +0000 (10:27 +0100)]
staging: vc04_services: Add new vc-sm-cma driver

This new driver allows contiguous memory blocks to be imported
into the VideoCore VPU memory map, and manages the lifetime of
those objects, only releasing the source dmabuf once the VPU has
confirmed it has finished with it.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc04_services: Fixup vchiq-mmal include ordering
Dave Stevenson [Tue, 25 Sep 2018 15:57:40 +0000 (16:57 +0100)]
staging: vc04_services: Fixup vchiq-mmal include ordering

There were dependencies on including the headers in the correct
order. Fix up the headers so that they include the other
headers that they depend on themselves.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc04_services: Support sending data to MMAL ports
Dave Stevenson [Mon, 24 Sep 2018 17:26:02 +0000 (18:26 +0100)]
staging: vc04_services: Support sending data to MMAL ports

Add the ability to send data to ports. This only supports
zero copy mode as the required bulk transfer setup calls
are not done.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: mmal-vchiq: Add support for event callbacks.
Dave Stevenson [Mon, 24 Sep 2018 17:15:38 +0000 (18:15 +0100)]
staging: mmal-vchiq: Add support for event callbacks.

(Preparation for the codec driver).
The codec uses the event mechanism to report things such as
resolution changes. It is signalled by the cmd field of the buffer
being non-zero.

Add support for passing this information out to the client.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: mmal-vchiq: Make a mmal_buf struct for passing parameters
Dave Stevenson [Mon, 24 Sep 2018 16:33:37 +0000 (17:33 +0100)]
staging: mmal-vchiq: Make a mmal_buf struct for passing parameters

The callback from vchi_mmal to the client was growing lots of extra
parameters. Consolidate them into a single struct instead of
growing the list further.
The struct is associated with the client buffer, therefore there
are various changes to setup various containers for the struct,
and pass the appropriate members.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: mmal-vchiq: Make timeout a defined parameter
Dave Stevenson [Mon, 24 Sep 2018 15:57:09 +0000 (16:57 +0100)]
staging: mmal-vchiq: Make timeout a defined parameter

The timeout period for VPU communications is a useful thing
to extend when debugging.
Set it via a define, rather than a magic number buried in the code.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: mmal-vchiq: Avoid use of bool in structures
Dave Stevenson [Mon, 29 Oct 2018 16:20:46 +0000 (16:20 +0000)]
staging: mmal-vchiq: Avoid use of bool in structures

Fixes up a checkpatch error "Avoid using bool structure members
because of possible alignment issues".

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: mmal-vchiq: Allocate and free components as required
Dave Stevenson [Mon, 24 Sep 2018 15:51:13 +0000 (16:51 +0100)]
staging: mmal-vchiq: Allocate and free components as required

The existing code assumed that there would only ever be 4 components,
and never freed the entries once used.
Allow arbitrary creation and destruction of components.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc04_services: Split vchiq-mmal into a module
Dave Stevenson [Mon, 24 Sep 2018 15:30:37 +0000 (16:30 +0100)]
staging: vc04_services: Split vchiq-mmal into a module

In preparation for adding a video codec V4L2 module which also
wants to use vchiq-mmal functions, split it out into an
independent module.
The minimum number of changes have been made to achieve this
(eg straight moves where possible) so existing checkpatch
errors will still be present.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Remove/amend some obsolete comments
Dave Stevenson [Fri, 28 Sep 2018 09:22:26 +0000 (10:22 +0100)]
staging: bcm2835-camera: Remove/amend some obsolete comments

Remove a todo which has been done.
Remove a template line that was redundant.
Make a comment clearer as to the non-obvious meaning of a field.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Correct V4L2_CID_COLORFX_CBCR behaviour
Dave Stevenson [Mon, 8 Oct 2018 17:26:15 +0000 (18:26 +0100)]
staging: bcm2835-camera: Correct V4L2_CID_COLORFX_CBCR behaviour

With V4L2_CID_COLORFX_CBCR calling ctrl_set_colfx it was incorrectly
assigning the colour values to the enable field of dev->colourfx
instead of the u and v fields.

Correct the assignments.

Reported as a Coverity issue
Detected by CoverityScan CID#1419711 ("Unused value")

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Use enums for max value in controls
Dave Stevenson [Fri, 28 Sep 2018 09:17:11 +0000 (10:17 +0100)]
staging: bcm2835-camera: Use enums for max value in controls

Controls of type MMAL_CONTROL_TYPE_STD_MENU call v4l2_ctrl_new_std_menu
with a max value and a mask. The max value is one of the defined
values for the control, however in the config array there are several
entries where raw numbers have been used instead. Replace these
with the appropriate enum.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix up all formatting in mmal-paramters.h
Dave Stevenson [Mon, 29 Oct 2018 16:08:41 +0000 (16:08 +0000)]
staging: bcm2835-camera: Fix up all formatting in mmal-paramters.h

Fixes up all checkpatch errors in mmal-parameters.h

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix multiple assignments should be avoided
Dave Stevenson [Mon, 29 Oct 2018 15:58:14 +0000 (15:58 +0000)]
staging: bcm2835-camera: Fix multiple assignments should be avoided

Clear checkpatch complaints of "multiple assignments should be avoided"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix alignment should match open parenthesis
Dave Stevenson [Mon, 29 Oct 2018 15:55:42 +0000 (15:55 +0000)]
staging: bcm2835-camera: Fix alignment should match open parenthesis

Fix up checkpatch "Alignment should match open parenthesis" errors

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoARM: bcm2835_defconfig: Enable bcm2835-camera
Dave Stevenson [Mon, 29 Oct 2018 15:50:50 +0000 (15:50 +0000)]
ARM: bcm2835_defconfig: Enable bcm2835-camera

Enables the V4L2 camera driver as a module.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Unify header inclusion defines
Dave Stevenson [Mon, 3 Dec 2018 13:15:20 +0000 (13:15 +0000)]
staging: bcm2835-camera: Unify header inclusion defines

Most of the headers use ifndef FOO_H, whilst mmal-parameters.h
used ifndef __FOO_H.

Revise mmal-parameters.h to drop the underscores and make the
headers all consistent.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Add multiple inclusion protection to headers
Dave Stevenson [Mon, 24 Sep 2018 15:21:06 +0000 (16:21 +0100)]
staging: bcm2835-camera: Add multiple inclusion protection to headers

mmal-common.h and mmal-msg.h didn't have the normal
ifndef FOO / define FOO / endif protection to stop it being
included multiple times. Add it.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Avoid unneeded internal declaration warning
Nathan Chancellor [Fri, 28 Sep 2018 00:50:39 +0000 (17:50 -0700)]
staging: bcm2835-camera: Avoid unneeded internal declaration warning

Clang warns:

drivers/staging/vc04_services/bcm2835-camera/controls.c:59:18: warning:
variable 'mains_freq_qmenu' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static const s64 mains_freq_qmenu[] = {
                 ^
1 warning generated.

This is because mains_freq_qmenu is currently only used in an ARRAY_SIZE
macro, which is a compile time evaluation in this case. Avoid this by
adding mains_freq_qmenu as the imenu member of this structure, which
matches all other controls that uses the ARRAY_SIZE macro in v4l2_ctrls.
This turns out to be a no-op because V4L2_CID_MPEG_VIDEO_BITRATE_MODE is
defined as a MMAL_CONTROL_TYPE_STD_MENU, which does not pass the imenu
definition along to v4l2_ctrl_new in bm2835_mmal_init_controls.

Link: https://github.com/ClangBuiltLinux/linux/issues/122
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: bcm2835-camera: Ensure timestamps never go backwards.
Dave Stevenson [Tue, 24 Jul 2018 11:08:29 +0000 (12:08 +0100)]
staging: bcm2835-camera: Ensure timestamps never go backwards.

There is an awkward situation with H264 header bytes. Currently
they are returned with a PTS of 0 because they aren't associated
with a timestamped frame to encode. These are handled by either
returning the timestamp of the last buffer to have been received,
or in the case of the first buffer the timestamp taken at
start_streaming.
This results in a race where the current frame may have started
before we take the start time, which results in the first encoded
frame having an earlier timestamp than the header bytes.

Ensure that we never return a negative delta to the user by checking
against the previous timestamp.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Set sequence number correctly
Dave Stevenson [Thu, 21 Jun 2018 16:02:14 +0000 (17:02 +0100)]
staging: bcm2835-camera: Set sequence number correctly

Set the sequence number in vb2_v4l2_buffer mainly so the
latest v4l2-ctl reports the frame rate correctly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Handle empty EOS buffers whilst streaming
Dave Stevenson [Thu, 5 Jul 2018 15:17:03 +0000 (16:17 +0100)]
staging: bcm2835-camera: Handle empty EOS buffers whilst streaming

The change to mapping V4L2 to MMAL buffers 1:1 didn't handle
the condition we get with raw pixel buffers (eg YUV and RGB)
direct from the camera's stills port. That sends the pixel buffer
and then an empty buffer with the EOS flag set. The EOS buffer
wasn't handled and returned an error up the stack.

Handle the condition correctly by returning it to the component
if streaming, or returning with an error if stopping streaming.

Fixes: 9384167 "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Remove check of the number of buffers supplied
Dave Stevenson [Wed, 4 Jul 2018 16:01:15 +0000 (17:01 +0100)]
staging: bcm2835-camera: Remove check of the number of buffers supplied

Before 9384167 there was a need to ensure that there were sufficient
buffers supplied from the user to cover those being sent to the VPU
(always 1).
With 9384167 the buffers are linked 1:1 between MMAL and V4L2,
therefore there is no need for that check, and indeed it is wrong
as there is no need to submit all the buffers before starting streaming.

Fixes: 9384167 "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835_camera: Ensure all buffers are returned on disable
Dave Stevenson [Thu, 28 Jun 2018 14:57:25 +0000 (15:57 +0100)]
staging: bcm2835_camera: Ensure all buffers are returned on disable

With the recent change to match MMAL and V4L2 buffers there
is a need to wait for all MMAL buffers to be returned during
stop_streaming.

Fixes: 9384167 "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix open parenthesis alignment
Dave Stevenson [Wed, 21 Feb 2018 15:53:59 +0000 (15:53 +0000)]
staging: bcm2835-camera: Fix open parenthesis alignment

Fix checkpatch "Alignment should match open parenthesis"
errors.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix logical continuation splits
Dave Stevenson [Wed, 21 Feb 2018 15:48:54 +0000 (15:48 +0000)]
staging: bcm2835-camera: Fix logical continuation splits

Fix checkpatch errors for "Logical continuations should be
on the previous line".

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix missing lines between items
Dave Stevenson [Wed, 21 Feb 2018 15:39:26 +0000 (15:39 +0000)]
staging: bcm2835-camera: Fix missing lines between items

Fix checkpatch errors for missing blank lines after variable
or structure declarations.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix brace style issues.
Dave Stevenson [Wed, 21 Feb 2018 15:37:11 +0000 (15:37 +0000)]
staging: bcm2835-camera: Fix brace style issues.

Fix mismatched or missing brace issues flagged by checkpatch.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix multiple line dereference errors
Dave Stevenson [Wed, 21 Feb 2018 15:28:07 +0000 (15:28 +0000)]
staging: bcm2835-camera: Fix multiple line dereference errors

Fix checkpatch errors "Avoid multiple line dereference"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Reduce length of enum names
Dave Stevenson [Wed, 21 Feb 2018 15:23:35 +0000 (15:23 +0000)]
staging: bcm2835-camera: Reduce length of enum names

We have numerous lines over 80 chars, or oddly split. Many
of these are due to using long enum names such as
MMAL_COMPONENT_CAMERA.
Reduce the length of these enum names.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix spacing around operators
Dave Stevenson [Wed, 21 Feb 2018 14:13:03 +0000 (14:13 +0000)]
staging: bcm2835-camera: Fix spacing around operators

Fix checkpatch warnings over spaces around operators.
Many were around operations that can be replaced with the
BIT(x) macro, so replace with that where appropriate.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Fix comment style violations.
Dave Stevenson [Wed, 21 Feb 2018 13:49:32 +0000 (13:49 +0000)]
staging: bcm2835-camera: Fix comment style violations.

Fix comment style violations in the header files.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Remove dead email addresses
Dave Stevenson [Fri, 10 Mar 2017 17:35:38 +0000 (17:35 +0000)]
staging: bcm2835-camera: Remove dead email addresses

None of the listed author email addresses were valid.
Keep list of authors and the companies they represented.
Update my email address.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Return early on errors
Dave Stevenson [Fri, 10 Mar 2017 17:27:56 +0000 (17:27 +0000)]
staging: bcm2835-camera: Return early on errors

Fix several instances where it is easier to return
early on error conditions than handle it as an else
clause.
As requested by Mauro.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Correctly denote key frames in encoded data
Dave Stevenson [Mon, 13 Feb 2017 13:11:41 +0000 (13:11 +0000)]
staging: bcm2835-camera: Correctly denote key frames in encoded data

Forward MMAL key frame flags to the V4L2 buffers.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp
Dave Stevenson [Mon, 29 Oct 2018 14:21:04 +0000 (14:21 +0000)]
staging: bcm2835-camera: Ensure H264 header bytes get a sensible timestamp

H264 header come from VC with 0 timestamps, which means they get a
strange timestamp when processed with VC/kernel start times,
particularly if used with the inline header option.
Remember the last frame timestamp and use that if set, or otherwise
use the kernel start time.

https://github.com/raspberrypi/linux/issues/1836

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835-camera: Do not bulk receive from service thread
Dave Stevenson [Wed, 14 Feb 2018 17:04:26 +0000 (17:04 +0000)]
staging: bcm2835-camera: Do not bulk receive from service thread

vchi_bulk_queue_receive will queue up to a default of 4
bulk receives on a connection before blocking.
If called from the VCHI service_callback thread, then
that thread is unable to service the VCHI_CALLBACK_BULK_RECEIVED
events that would enable the queue call to succeed.

Add a workqueue to schedule the call vchi_bulk_queue_receive
in an alternate context to avoid the lock up.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vchiq_arm: Improve error handling on loading drivers
Dave Stevenson [Mon, 3 Dec 2018 12:50:38 +0000 (12:50 +0000)]
staging: vchiq_arm: Improve error handling on loading drivers

The handling of loading platform drivers requires checking IS_ERR
for the pointer on unload.
If the driver fails to load, NULL the pointer during probe as
platform_device_unregister already checks for NULL.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: bcm2835: Don't probe if no camera is detected
Stefan Wahren [Mon, 22 Oct 2018 09:09:18 +0000 (11:09 +0200)]
staging: bcm2835: Don't probe if no camera is detected

It is a waste of resources to load the camera driver in case there isn't
a camera actually connected to the Raspberry Pi. This solution also
avoids a NULL ptr dereference of mmal instance on driver unload.

Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-camera: Add hint about possible faulty GPU mem config
Stefan Wahren [Sun, 21 Oct 2018 17:08:29 +0000 (19:08 +0200)]
staging: bcm2835-camera: Add hint about possible faulty GPU mem config

As per default the GPU memory config of the Raspberry Pi isn't sufficient
for the camera usage. Even worse the bcm2835 camera doesn't provide a
helpful error message in this case. So let's add a hint to point the user
to the likely cause.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-camera: Provide more specific probe error messages
Stefan Wahren [Sun, 21 Oct 2018 16:40:07 +0000 (18:40 +0200)]
staging: bcm2835-camera: Provide more specific probe error messages

Currently there is only a catch-all info message which print the
relevant error code without any context. So add more specific error
messages in order to narrow down possible issues.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-audio: Drop DT dependency
Stefan Wahren [Thu, 18 Oct 2018 17:54:01 +0000 (19:54 +0200)]
staging: bcm2835-audio: Drop DT dependency

Just like the bcm2835-video make this a platform driver which is probed
by vchiq. In order to change the number of channels use a module
parameter instead, but use the maximum as default.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-audio: use module_platform_driver() macro
Stefan Wahren [Thu, 18 Oct 2018 17:47:29 +0000 (19:47 +0200)]
staging: bcm2835-audio: use module_platform_driver() macro

There is not much value behind this boilerplate, so use
module_platform_driver() instead.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-audio: Enable compile test
Stefan Wahren [Sat, 13 Oct 2018 18:19:13 +0000 (20:19 +0200)]
staging: bcm2835-audio: Enable compile test

Enable the compilation test for bcm2835-audio.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: vchiq_arm: Register a platform device for the audio driver
Stefan Wahren [Sat, 20 Oct 2018 18:25:41 +0000 (20:25 +0200)]
staging: vchiq_arm: Register a platform device for the audio driver

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: vchiq_arm: Fix camera device registration
Stefan Wahren [Mon, 22 Oct 2018 13:16:51 +0000 (15:16 +0200)]
staging: vchiq_arm: Fix camera device registration

Since the camera driver isn't probed via DT, we need to properly setup DMA.

Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: vchiq_arm: Fix platform device unregistration
Stefan Wahren [Sat, 13 Oct 2018 18:51:23 +0000 (20:51 +0200)]
staging: vchiq_arm: Fix platform device unregistration

In error case platform_device_register_data would return an ERR_PTR
instead of NULL. So we better check this before unregistration.

Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-camera: Move module info to the end
Stefan Wahren [Sat, 20 Oct 2018 17:31:00 +0000 (19:31 +0200)]
staging: bcm2835-camera: Move module info to the end

In order to have this more consistent between the vc04 services move
the module information to the end of the file.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agostaging: bcm2835-camera: fix module autoloading
Stefan Wahren [Sat, 20 Oct 2018 17:26:18 +0000 (19:26 +0200)]
staging: bcm2835-camera: fix module autoloading

In order to make the module bcm2835-camera load automatically, we need to
add a module alias.

Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agomedia: tc358743: Return an appropriate colorspace from tc358743_set_fmt
Dave Stevenson [Thu, 22 Nov 2018 17:31:06 +0000 (17:31 +0000)]
media: tc358743: Return an appropriate colorspace from tc358743_set_fmt

When calling tc358743_set_fmt, the code was calling tc358743_get_fmt
to choose a valid format. However that sets the colorspace
based on what was read back from the chip. When you set the format,
then the driver would choose and program the colorspace based
on the format code.

The result was that if you called try or set format for UYVY
when the current format was RGB3 then you would get told sRGB,
and try RGB3 when current was UYVY and you would get told
SMPTE170M.

The value programmed into the chip is determined by this driver,
therefore there is no need to read back the value. Return the
colorspace based on the format set/tried instead.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agomedia: bcm2835-unicam: Pass through the colorspace on try_fmt
Dave Stevenson [Thu, 22 Nov 2018 17:28:02 +0000 (17:28 +0000)]
media: bcm2835-unicam: Pass through the colorspace on try_fmt

The current colorspace was always returned from try_fmt for no
good reason.
Return what the source subdevice returns instead.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agolirc-rpi: Remove in favour of gpio-ir
popcornmix [Fri, 30 Nov 2018 18:55:23 +0000 (18:55 +0000)]
lirc-rpi: Remove in favour of gpio-ir

5 years agodwc-otg: FIQ: Fix "bad mode in data abort handler"
Phil Elwell [Mon, 16 Jul 2018 13:40:13 +0000 (14:40 +0100)]
dwc-otg: FIQ: Fix "bad mode in data abort handler"

Create a semi-static mapping for the USB registers early in the boot
process, before additional kernel threads are started, so all threads
will have the mappings from the start. This avoids the need for
data aborts to lazily update them.

See: https://github.com/raspberrypi/linux/issues/2450

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
5 years agoBCM270X_DT: Mark eth_downshift_after as an integer
Phil Elwell [Thu, 29 Nov 2018 16:00:22 +0000 (16:00 +0000)]
BCM270X_DT: Mark eth_downshift_after as an integer

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoBCM270X_DT: Add new Ethernet DT parameters
Phil Elwell [Tue, 27 Nov 2018 16:56:50 +0000 (16:56 +0000)]
BCM270X_DT: Add new Ethernet DT parameters

Add "eth_downshift_after" DT parameter to allow the delay before the
downshift to be specified. The default is 2 auto-negotiation cycles,
and legal values are 2, 3, 4, 5 and 0 (disabled).

Add "eth_max_speed" DT parameter as a way of prohibiting 1000Mbps
links. This can be used to avoid the delay until the downshift mechanism
activates. Legal values are 10, 100 and 1000, where the default is
unlimited (effectively 1000Mbps).

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoARM: dts: bcm283x: Set downshift-after for Pi 3B+
Phil Elwell [Tue, 27 Nov 2018 16:55:14 +0000 (16:55 +0000)]
ARM: dts: bcm283x: Set downshift-after for Pi 3B+

Enable the auto-downshift feature on Raspberry Pi 3B+ so that a link
can eventually be established using a cable with pairs C and/or D
missing or broken in a 1000Mbps-capable port.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agodt-bindings: Document microchip,downshift-after
Phil Elwell [Wed, 28 Nov 2018 15:51:41 +0000 (15:51 +0000)]
dt-bindings: Document microchip,downshift-after

Document the optional downshift-after property of the lan78xx's PHY.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agonet: lan78xx: Support auto-downshift to 100Mb/s
Phil Elwell [Mon, 26 Nov 2018 19:46:58 +0000 (19:46 +0000)]
net: lan78xx: Support auto-downshift to 100Mb/s

Ethernet cables with faulty or missing pairs (specifically pairs C and
D) allow auto-negotiation to 1000Mbs, but do not support the successful
establishment of a link. Add a DT property, "microchip,downshift-after",
to configure the number of auto-negotiation failures after which it
falls back to 100Mbs. Valid values are 2, 3, 4, 5 and 0, where 0 means
never downshift.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoARM: dts: bcm283x: The lan7515 PHY node has moved
Phil Elwell [Tue, 27 Nov 2018 16:33:31 +0000 (16:33 +0000)]
ARM: dts: bcm283x: The lan7515 PHY node has moved

The DT node describing the LAN7800s PHY has now moved inside an "mdio"
node. Update the DT declarations accordingly.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoBCM2710_DT: fix gpio expander bindings
Nicolas Saenz Julienne [Tue, 27 Nov 2018 15:59:10 +0000 (16:59 +0100)]
BCM2710_DT: fix gpio expander bindings

The upstreamed driver for the GPIO expander expects to be a children of
the "firmware" node.

The patch also removes the "firmware" phandle as it's useless.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
5 years agoBCM2708_DT: update firmware node binding
Nicolas Saenz Julienne [Wed, 28 Nov 2018 09:36:01 +0000 (10:36 +0100)]
BCM2708_DT: update firmware node binding

The upstreamed version of the firmware node has been updated to present
it as a "simple-bus". We need to get this in order to accomodate other
device bindings, namely RPi's firmware based gpio expander.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
5 years agooverlays: Update upstream overlay
Phil Elwell [Mon, 26 Nov 2018 20:15:16 +0000 (20:15 +0000)]
overlays: Update upstream overlay

The vc4-kms-v3d overlay gained an extra fragment enabling the txp node,
so rebuild the upstream overlay to match.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agodtoverlays: Add i2c on 0&1 option to TC358743, ADV7282 and OV5647
Dave Stevenson [Mon, 26 Nov 2018 17:02:15 +0000 (17:02 +0000)]
dtoverlays: Add i2c on 0&1 option to TC358743, ADV7282 and OV5647

Adds the option of configuring i2c0 to be on GPIOs 0&1 as
this is of use on the Compute Module.

Also fixes the ov5647 overlay where the override enabled the wrong
fragments.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agorpi-wm8804-soundcard: configure wm8804 clocks only on rate change
Matthias Reichl [Sun, 18 Nov 2018 14:32:28 +0000 (15:32 +0100)]
rpi-wm8804-soundcard: configure wm8804 clocks only on rate change

This should avoid clicks when stopping and immediately afterwards
starting a stream with the same samplerate as before.

Signed-off-by: Matthias Reichl <hias@horus.com>
5 years agorpi-wm8804-soundcard: drop PWRDN register writes
Matthias Reichl [Sun, 18 Nov 2018 14:24:16 +0000 (15:24 +0100)]
rpi-wm8804-soundcard: drop PWRDN register writes

Since kernel 4.0 the PWRDN register bits are under DAPM
control from the wm8804 driver.

Drop code that modifies that register to avoid interfering
with DAPM.

Signed-off-by: Matthias Reichl <hias@horus.com>
5 years agoRevert "ASoC: wm8804: MCLK configuration options, 32-bit"
Matthias Reichl [Sun, 18 Nov 2018 12:21:26 +0000 (13:21 +0100)]
Revert "ASoC: wm8804: MCLK configuration options, 32-bit"

This reverts commit 3b12dcf797f5a4635aecd7f5c090dc507b124ffd.

Despite the commit message being wrong idle_bias changes
were already reverted in the 4.14 tree.

So drop the commit to bring the wm8804 driver back in line with
the rpi-4.14.y and upstream linux trees.

Signed-off-by: Matthias Reichl <hias@horus.com>
5 years agooverlays: Remove superfluous #address/size-cells
Phil Elwell [Wed, 14 Nov 2018 09:53:25 +0000 (09:53 +0000)]
overlays: Remove superfluous #address/size-cells

Newer versions of dtc warn about unnecessary usage of #address-cells
and #size-cells, so remove them.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoUpdate README (#2750)
James Hughes [Tue, 13 Nov 2018 16:51:21 +0000 (16:51 +0000)]
Update README (#2750)

Small update to the DT blob docs to include the axiperf option.

Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
5 years agovcsm: Fix an NULL dereference in the import_dmabuf error path
Dave Stevenson [Wed, 14 Nov 2018 11:54:46 +0000 (11:54 +0000)]
vcsm: Fix an NULL dereference in the import_dmabuf error path

resource was dereferenced even though it was NULL.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoMailbox firmware calls now use kmalloc (#2749)
James Hughes [Tue, 13 Nov 2018 17:27:00 +0000 (17:27 +0000)]
Mailbox firmware calls now use kmalloc (#2749)

A previous change moved away from variable stack
allocation of a data buffer to a fixed maximum size.
However, some mailbox calls use larger data buffers
than the maximum allowed. This change moves from
stack storage to kmalloc to ensure all sizes are
catered for.

Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
5 years agodtoverlays: Add support for ADV7280-M, ADV7281-M and ADV7281-MA chips.
Dave Stevenson [Wed, 31 Oct 2018 15:02:18 +0000 (15:02 +0000)]
dtoverlays: Add support for ADV7280-M, ADV7281-M and ADV7281-MA chips.

The driver that supports the ADV7282-M also supports the ADV7280-M,
ADV7281-M, and ADV7281-MA.
The 7280-M exposes 8 analogue inputs. The 7281-M doesn't have the
I2P deinterlacing block. The 7281-MA has 8 inputs but no I2P.
Otherwise they are the same as ADV7282-M.

Adds a new overlay "adv728x" that includes the existing adv7282
overlay but adds several parameters to modify the behaviour.

Adds a new addr parameter to allow the I2C address to be changed.
(the chip has an address select pin to change between 0x20 and 0x21).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoarm: dt: Add DT overlays for ADV7282M, OV5647, and TC358743
Dave Stevenson [Wed, 31 Oct 2018 15:01:59 +0000 (15:01 +0000)]
arm: dt: Add DT overlays for ADV7282M, OV5647, and TC358743

DT overlays to setup the above devices via i2c_arm and csi1.
(This currently does not use the i2c-mux-pinctrl driver to
dynamically switch the pinctrl)

tc358743 is tc358743 running at a default link frequency
of 972Mbit/s. This allows up to 1080P50 UYVY on 2 lanes.
There is a parameter to allow changing the link frequency,
but the only values supported by the driver are 297000000
for 594Mbit/s, and 486000000 for 972Mbit/s.
There is also a parameter to enable 4 lane mode (only
relevant to Compute Module (1 or 3) csi1).

tc358743-audio overlay enables I2S audio from the TC358743
to the Pi (SD to GPIO20, SCK to GPIO18, WFS to GPIO19).

ADV7282M is the Analog Devices analogue video to CSI bridge
chip.

OV5647 is the Pi V1.3 camera module. Currently the driver only
supports VGA 8bit Bayer and very few controls.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoBCM270X_DT: Add CSI defines for all the downstream Pi platforms
Dave Stevenson [Wed, 31 Oct 2018 15:00:45 +0000 (15:00 +0000)]
BCM270X_DT: Add CSI defines for all the downstream Pi platforms

Adds the CSI device includes for the bcm27xx platform DTS files

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoBCM283x DT: Add CSI nodes to the device tree.
Dave Stevenson [Wed, 31 Oct 2018 15:00:20 +0000 (15:00 +0000)]
BCM283x DT: Add CSI nodes to the device tree.

Adds CSI nodes to all the upstream device tree configs

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agomedia: adv7180: Nasty hack to allow input selection.
Dave Stevenson [Wed, 31 Oct 2018 15:00:04 +0000 (15:00 +0000)]
media: adv7180: Nasty hack to allow input selection.

Whilst the adv7180 driver support s_routing, nothing else
does, and there is a missing lump of framework code to
define the mapping from connectors on a board to the inputs
they represent on the ADV7180.

Add a nasty hack to take a module parameter that is passed in
to s_routing on any call to G_STD, or S_STD (or subdev
g_input_status call).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodefconfig: Enable Unicam driver and various sources on Pi platforms.
Dave Stevenson [Wed, 31 Oct 2018 14:59:51 +0000 (14:59 +0000)]
defconfig: Enable Unicam driver and various sources on Pi platforms.

Enable:
VIDEO_V4L2_SUBDEV_API=y
VIDEO_BCM2835_UNICAM=m
VIDEO_TC358743=m
VIDEO_ADV7180=m
VIDEO_OV5647=m
so that we can receive CSI data from these devices.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoMAINTAINERS: Add entry for BCM2835 Unicam driver
Dave Stevenson [Wed, 31 Oct 2018 14:59:40 +0000 (14:59 +0000)]
MAINTAINERS: Add entry for BCM2835 Unicam driver

Adds entry for the new BCM2835 Unicam (CSI-2 receiver) driver

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agomedia: bcm2835-unicam: Driver for CCP2/CSI2 camera interface
Dave Stevenson [Wed, 31 Oct 2018 14:59:22 +0000 (14:59 +0000)]
media: bcm2835-unicam: Driver for CCP2/CSI2 camera interface

Add driver for the Unicam camera receiver block on
BCM283x processors.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodt-bindings: Document BCM283x CSI2/CCP2 receiver
Dave Stevenson [Wed, 31 Oct 2018 14:59:06 +0000 (14:59 +0000)]
dt-bindings: Document BCM283x CSI2/CCP2 receiver

Document the DT bindings for the CSI2/CCP2 receiver peripheral
(known as Unicam) on BCM283x SoCs.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Acked-by: Rob Herring <robh@kernel.org>
5 years agomedia: videodev2: Add helper defines for printing FOURCCs
Dave Stevenson [Wed, 31 Oct 2018 14:58:08 +0000 (14:58 +0000)]
media: videodev2: Add helper defines for printing FOURCCs

New helper defines that allow printing of a FOURCC using
printf(V4L2_FOURCC_CONV, V4L2_FOURCC_CONV_ARGS(fourcc));

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>