From: Steve Longerbeam <steve_longerbeam@mentor.com>
To: Rob Herring <robh@kernel.org>, Steve Longerbeam <slongerbeam@gmail.com>
Cc: shawnguo@kernel.org, kernel@pengutronix.de,
fabio.estevam@nxp.com, mark.rutland@arm.com,
linux@armlinux.org.uk, linus.walleij@linaro.org,
gnurou@gmail.com, mchehab@kernel.org, gregkh@linuxfoundation.org,
p.zabel@pengutronix.de, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-media@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: [PATCH 11/20] media: Add i.MX media core driver
Date: Tue, 3 Jan 2017 21:23:17 -0800 [thread overview]
Message-ID: <5a263ef7-13bd-5aaa-8e34-93f5defa3604@mentor.com> (raw)
In-Reply-To: <20170103211755.a3a3g5woi272cexe@rob-hp-laptop>
[-- Attachment #1: Type: text/plain, Size: 8270 bytes --]
Hi Rob,
On 01/03/2017 01:17 PM, Rob Herring wrote:
> On Thu, Dec 29, 2016 at 02:27:26PM -0800, Steve Longerbeam wrote:
>> Add the core media driver for i.MX SOC.
>>
>> Signed-off-by: Steve Longerbeam<steve_longerbeam@mentor.com>
>> ---
>> Documentation/devicetree/bindings/media/imx.txt | 205 +++++
>> Documentation/media/v4l-drivers/imx.rst | 429 ++++++++++
>> drivers/staging/media/Kconfig | 2 +
>> drivers/staging/media/Makefile | 1 +
>> drivers/staging/media/imx/Kconfig | 8 +
>> drivers/staging/media/imx/Makefile | 6 +
>> drivers/staging/media/imx/TODO | 18 +
>> drivers/staging/media/imx/imx-media-common.c | 981 ++++++++++++++++++++++
>> drivers/staging/media/imx/imx-media-dev.c | 479 +++++++++++
>> drivers/staging/media/imx/imx-media-fim.c | 508 +++++++++++
>> drivers/staging/media/imx/imx-media-internal-sd.c | 456 ++++++++++
>> drivers/staging/media/imx/imx-media-of.c | 291 +++++++
>> drivers/staging/media/imx/imx-media-of.h | 25 +
>> drivers/staging/media/imx/imx-media.h | 290 +++++++
>> include/media/imx.h | 15 +
>> include/uapi/Kbuild | 1 +
>> include/uapi/linux/v4l2-controls.h | 4 +
>> include/uapi/media/Kbuild | 2 +
>> include/uapi/media/imx.h | 30 +
>> 19 files changed, 3751 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/media/imx.txt
>> create mode 100644 Documentation/media/v4l-drivers/imx.rst
>> create mode 100644 drivers/staging/media/imx/Kconfig
>> create mode 100644 drivers/staging/media/imx/Makefile
>> create mode 100644 drivers/staging/media/imx/TODO
>> create mode 100644 drivers/staging/media/imx/imx-media-common.c
>> create mode 100644 drivers/staging/media/imx/imx-media-dev.c
>> create mode 100644 drivers/staging/media/imx/imx-media-fim.c
>> create mode 100644 drivers/staging/media/imx/imx-media-internal-sd.c
>> create mode 100644 drivers/staging/media/imx/imx-media-of.c
>> create mode 100644 drivers/staging/media/imx/imx-media-of.h
>> create mode 100644 drivers/staging/media/imx/imx-media.h
>> create mode 100644 include/media/imx.h
>> create mode 100644 include/uapi/media/Kbuild
>> create mode 100644 include/uapi/media/imx.h
>>
>> diff --git a/Documentation/devicetree/bindings/media/imx.txt b/Documentation/devicetree/bindings/media/imx.txt
>> new file mode 100644
>> index 0000000..3593354
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/imx.txt
>> @@ -0,0 +1,205 @@
>> +Freescale i.MX Media Video Devices
>> +
>> +Video Media Controller node
>> +---------------------------
>> +
>> +This is the parent media controller node for video capture support.
>> +
>> +Required properties:
>> +- compatible : "fsl,imx-media";
>> +- ports : Should contain a list of phandles pointing to camera
>> + sensor interface ports of IPU devices
>> +
>> +
>> +fim child node
>> +--------------
>> +
>> +This is an optional child node of the ipu_csi port nodes. It can be used
>> +to modify the default control values for the video capture Frame
>> +Interval Monitor. Refer to Documentation/media/v4l-drivers/imx.rst for
>> +more info on the Frame Interval Monitor.
>> +
>> +Optional properties:
>> +- enable : enable (1) or disable (0) the FIM;
> "status" property doesn't work for you?
The use of the status property could make sense in this case, i.e.
status = "disabled" would mean the FIM is disabled permanently (can
never be enabled at run-time). But the "enable" property, and all the
other FIM properties, are meant to override the v4l2 control default
values. So "enable = <0>" means the FIM is disabled by default but
can be enabled using the v4l2 control.
>> +- num-avg : how many frame intervals the FIM will average;
>> +- num-skip : how many frames the FIM will skip after a video
>> + capture restart before beginning to sample frame
>> + intervals;
>> +- tolerance-range : a range of tolerances for the averaged frame
>> + interval error, specified as <min max>, in usec.
>> + The FIM will signal a frame interval error if
>> + min < error < max. If the max is <= min, then
>> + tolerance range is disabled (interval error if
>> + error > min).
> Needs a unit suffix (see property-units.txt).
right, thanks.
>> +- input-capture-channel: an input capture channel and channel flags,
> These all need vendor prefix.
Ok.
>> + specified as <chan flags>. The channel number
>> + must be 0 or 1. The flags can be
>> + IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, or
>> + IRQ_TYPE_EDGE_BOTH, and specify which input
>> + capture signal edge will trigger the event. If
>> + an input capture channel is specified, the FIM
>> + will use this method to measure frame intervals
>> + instead of via the EOF interrupt. The input capture
>> + method is much preferred over EOF as it is not
>> + subject to interrupt latency errors. However it
>> + requires routing the VSYNC or FIELD output
>> + signals of the camera sensor to one of the
>> + i.MX input capture pads (SD1_DAT0, SD1_DAT1),
>> + which also gives up support for SD1.
>> +
>> +
>> +mipi_csi2 node
>> +--------------
>> +
>> +This is the device node for the MIPI CSI-2 Receiver, required for MIPI
>> +CSI-2 sensors.
>> +
>> +Required properties:
>> +- compatible : "fsl,imx-mipi-csi2";
> This needs to be an SoC specific compatible string.
changed to "fsl,imx6-mipi-csi2".
>> +- reg : physical base address and length of the register set;
>> +- clocks : the MIPI CSI-2 receiver requires three clocks: hsi_tx
>> + (the DPHY clock), video_27m, and eim_sel;
>> +- clock-names : must contain "dphy_clk", "cfg_clk", "pix_clk";
> "_clk" is redundant.
fixed.
>> +
>> +Optional properties:
>> +- interrupts : must contain two level-triggered interrupts,
>> + in order: 100 and 101;
>> +
>> +
>> +video mux node
>> +--------------
>> +
>> +This is the device node for the video multiplexer. It can control
>> +either the i.MX internal video mux that selects between parallel image
>> +sensors and MIPI CSI-2 virtual channels, or an external mux controlled
>> +by a GPIO. It must be a child device of the syscon GPR device.
> These sound like 2 completely separate things and should not both be
> "imx-video-mux".
I ended up bringing in Philipp Zabel's patch that adds the OF graph for
video capture. In his version, the video mux device is a child of the
gpr device, and the gpr device is made a multi-function device
("simple-mfd").
I had my own version of an OF graph for imx video capture that did not
do this
but referred to the controlling gpr device by phandle. To clear things
up I could
simply restate that it is "a child device of the syscon GPR
multi-function device".
Or go back to referring to the gpr by phandle. Or maybe I misunderstood your
comment.
>> +
>> +Required properties:
>> +- compatible : "imx-video-mux";
> Needs to be SoC specific.
Actually, the video mux subdev has no imx specifics. It uses generic
syscon regmap or gpio to do its work. The video mux subdev driver
from Philipp that I brought in is an old one. He just posted a new one
that explicitly makes the video mux driver a generic subdev, which
I agree makes sense and will bring in.
>
> <snip>
>> +- mux-gpios : if reg is not specified, this must exist to define
>> + a GPIO to control an external mux;
>> +
>> +
>> +SabreLite Quad with OV5642 and OV5640
>> +-------------------------------------
> Don't put board specifics in here. I assume these sensors are already
> documented?
The adv7180 is documented already at
Documentation/devicetree/bindings/media/i2c/adv7180.txt, so I'll add
some missing properties to that.
There is no binding docs yet for the OV564x. Part of work to be done
is to combine, clean up, and move the ov5640/ov5642 subdevs in
drivers/media/i2c. Once that is done the binding docs for ov564x
can be created under Documentation/devicetree/bindings/media/i2c.
Steve
[-- Attachment #2: Type: text/html, Size: 10685 bytes --]
next prev parent reply other threads:[~2017-01-04 5:23 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 22:27 [PATCH 00/20] i.MX Media Driver Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 01/20] ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 02/20] ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their connections Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 03/20] ARM: dts: imx6qdl: add media device Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 04/20] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 05/20] ARM: dts: imx6-sabresd: " Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 06/20] ARM: dts: imx6-sabreauto: create i2cmux for i2c3 Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 07/20] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 08/20] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 09/20] ARM: dts: imx6-sabreauto: add the ADV7180 video decoder Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 10/20] gpio: pca953x: Add optional reset gpio control Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-30 7:06 ` Lothar Waßmann
2016-12-30 7:06 ` Lothar Waßmann
2016-12-30 7:06 ` Lothar Waßmann
2016-12-30 13:17 ` Linus Walleij
2016-12-30 13:17 ` Linus Walleij
2016-12-30 13:17 ` Linus Walleij
2016-12-30 18:03 ` Steve Longerbeam
2016-12-30 18:03 ` Steve Longerbeam
2016-12-30 18:03 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 11/20] media: Add i.MX media core driver Steve Longerbeam
[not found] ` <1483050455-10683-12-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-01-03 21:17 ` Rob Herring
2017-01-03 21:17 ` Rob Herring
2017-01-03 21:17 ` Rob Herring
2017-01-04 5:23 ` Steve Longerbeam [this message]
2016-12-29 22:27 ` [PATCH 12/20] media: imx: Add CSI subdev driver Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 13/20] media: imx: Add SMFC " Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 14/20] media: imx: Add IC subdev drivers Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 15/20] media: imx: Add Camera Interface subdev driver Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
[not found] ` <1483050455-10683-1-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2016-12-29 22:27 ` [PATCH 16/20] media: imx: Add MIPI CSI-2 Receiver " Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 20/20] ARM: imx_v6_v7_defconfig: Enable staging video4linux drivers Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 17/20] media: imx: Add video switch subdev driver Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 18/20] media: imx: Add MIPI CSI-2 OV5640 sensor " Steve Longerbeam
2016-12-29 22:27 ` Steve Longerbeam
2016-12-29 22:27 ` [PATCH 19/20] media: imx: Add Parallel OV5642 " Steve Longerbeam
2017-01-02 21:09 ` [PATCH 00/20] i.MX Media Driver Fabio Estevam
2017-01-02 21:09 ` Fabio Estevam
2017-01-02 21:09 ` Fabio Estevam
[not found] ` <CAOMZO5DM4aRwzCWkRoZLmbCxn155YL+CUR_gJyDh+FjzSKD3PQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-03 20:50 ` Steve Longerbeam
2017-01-03 20:50 ` Steve Longerbeam
2017-01-03 20:50 ` Steve Longerbeam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a263ef7-13bd-5aaa-8e34-93f5defa3604@mentor.com \
--to=steve_longerbeam@mentor.com \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.org \
--cc=slongerbeam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.