From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-media@vger.kernel.org, kyungmin.park@samsung.com,
m.szyprowski@samsung.com, riverful.kim@samsung.com,
sw0312.kim@samsung.com, devicetree-discuss@lists.ozlabs.org,
linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com
Subject: Re: [RFC/PATCH 02/13] media: s5p-csis: Add device tree support
Date: Tue, 17 Jul 2012 20:16:23 +0200 [thread overview]
Message-ID: <5005ABF7.6020008@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1207161031000.12302@axis700.grange>
Hi Guennadi,
On 07/16/2012 10:55 AM, Guennadi Liakhovetski wrote:
> Hi Sylwester
>
> Thanks for your comments to my RFC and for pointing out to this your
> earlier patch series. Unfortunately, I missed in in May, let me try to
> provide some thoughts about this, we should really try to converge our
> proposals. Maybe a discussion at KS would help too.
Thank you for the review. I was happy to see your RFC, as previously
there seemed to be not much interest in DT among the media guys.
Certainly, we need to work on a common approach to ensure interoperability
of existing drivers and to avoid having people inventing different
bindings for common features. I would also expect some share of device
specific bindings, as diversity of media devices is significant.
I'd be great to discuss these things at KS, especially support for
proper suspend/resume sequences. Also having common sessions with
other subsystems folks, like ASoC, for example, might be a good idea.
I'm not sure if I'll be travelling to the KS though. :)
> On Fri, 25 May 2012, Sylwester Nawrocki wrote:
>
>> s5p-csis is platform device driver for MIPI-CSI frontend to the FIMC
>> (camera host interface DMA engine and image processor). This patch
>> adds support for instantiating the MIPI-CSIS devices from DT and
>> parsing all SoC and board specific properties from device tree.
>> The MIPI DPHY control callback is now called directly from within
>> the driver, the platform code must ensure this callback does the
>> right thing for each SoC.
>>
>> The cell-index property is used to ensure proper signal routing,
>> from physical camera port, through MIPI-CSI2 receiver to the DMA
>> engine (FIMC?). It's also helpful in exposing the device topology
>> in user space at /dev/media? devnode (Media Controller API).
>>
>> This patch also defines a common property ("data-lanes") for MIPI-CSI
>> receivers and transmitters.
>>
>> Signed-off-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>> ---
>> Documentation/devicetree/bindings/video/mipi.txt | 5 +
>> .../bindings/video/samsung-mipi-csis.txt | 47 ++++++++++
>> drivers/media/video/s5p-fimc/mipi-csis.c | 97 +++++++++++++++-----
>> drivers/media/video/s5p-fimc/mipi-csis.h | 1 +
>> 4 files changed, 126 insertions(+), 24 deletions(-)
>> create mode 100644 Documentation/devicetree/bindings/video/mipi.txt
>> create mode 100644 Documentation/devicetree/bindings/video/samsung-mipi-csis.txt
>>
>> diff --git a/Documentation/devicetree/bindings/video/mipi.txt b/Documentation/devicetree/bindings/video/mipi.txt
>> new file mode 100644
>> index 0000000..5aed285
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/video/mipi.txt
>> @@ -0,0 +1,5 @@
>> +Common properties of MIPI-CSI1 and MIPI-CSI2 receivers and transmitters
>> +
>> + - data-lanes : number of differential data lanes wired and actively used in
>> + communication between the transmitter and the receiver, this
>> + excludes the clock lane;
>
> Wouldn't it be better to use the standard "bus-width" DT property?
I can't see any problems with using "bus-width". It seems sufficient
and could indeed be better, without a need to invent new MIPI-CSI
specific names. That was my first RFC on that and my perspective
wasn't probably broad enough. :)
>> diff --git a/Documentation/devicetree/bindings/video/samsung-mipi-csis.txt b/Documentation/devicetree/bindings/video/samsung-mipi-csis.txt
>> new file mode 100644
>> index 0000000..7bce6f4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/video/samsung-mipi-csis.txt
>> @@ -0,0 +1,47 @@
>> +Samsung S5P/EXYNOS SoC MIPI-CSI2 receiver (MIPI CSIS)
>> +-----------------------------------------------------
>> +
>> +Required properties:
>> +
>> +- compatible - one of :
>> + "samsung,s5pv210-csis",
>> + "samsung,exynos4210-csis",
>> + "samsung,exynos4212-csis",
>> + "samsung,exynos4412-csis";
>> +- reg : physical base address and size of the device memory mapped registers;
>> +- interrupts : should contain MIPI CSIS interrupt; the format of the
>> + interrupt specifier depends on the interrupt controller;
>> +- cell-index : the hardware instance index;
>
> Not sure whether this is absolutely needed... Wouldn't it be sufficient to
> just enumerate them during probing?
As Grant pointed to me, the "cell-index" property is something that we should
be avoiding. But I needed something like this in the driver,
to differentiate between the multiple IP instances. I cannot simply assign
the indexes in random way to the hardware instances. Each of the MIPI-CSI
Slaves has different properties (e.g. supporting max. 2 or 4 data lanes).
Additionally, a particular MIPI-CSI Slave instance is hard-wired inside the
SoC to the FIMC input mux (cross-bar) and physical video port. IOW, an image
sensor/video port/MIPI-CSIS instance assignment is fixed. If two MIPI-CSI
image sensors are connected, one of them will work only with MIPI-CSIS0, and
the other only with MIPI-CSIS1.
So the driver must be able to identify it's physical device (IO region +
IRQ) precisely.
That said, I found out recently that a proper entries in the "aliases"
could be used instead, and I could finally abandon the "cell-index" idea.
Not sure how aliases approach is better but from what I can see it is
a preferred way to handle things like the above.
Please see Documentation/devicetree/bindings/sound/mxs-saif.txt and users
of of_alias_get_id() for more details.
So to summarize, the indexes are needed, but the current implementation
is not necessarily good, and AFAICT the aliases approach could be the way
to go.
>> +- clock-frequency : The IP's main (system bus) clock frequency in Hz, the default
>> + value when this property is not specified is 166 MHz;
>> +- data-lanes : number of physical MIPI-CSI2 lanes used;
>
> ditto - bus-width?
Yes, agreed. Let's drop it in favour of "bus-width".
--
Regards,
Sylwester
next prev parent reply other threads:[~2012-07-17 18:16 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 19:47 [RFC/PATCH 0/13] Add device tree support for s5p-fimc SoC camera host interface driver Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 01/13] ARM: Samsung: Extend MIPI PHY callback with an index argument Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 02/13] media: s5p-csis: Add device tree support Sylwester Nawrocki
2012-07-16 8:55 ` Guennadi Liakhovetski
2012-07-17 18:16 ` Sylwester Nawrocki [this message]
2012-07-26 14:38 ` Laurent Pinchart
2012-07-26 19:51 ` Sylwester Nawrocki
2012-07-26 22:35 ` Laurent Pinchart
2012-07-31 10:58 ` Guennadi Liakhovetski
[not found] ` <Pine.LNX.4.64.1207311257020.27888-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2012-07-31 11:05 ` Laurent Pinchart
2012-07-31 12:38 ` Sylwester Nawrocki
2012-07-31 21:37 ` Laurent Pinchart
2012-07-31 9:34 ` Guennadi Liakhovetski
2012-05-25 19:52 ` [RFC/PATCH 03/13] ARM: Samsung: Remove unused fields from FIMC and CSIS platform data Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 04/13] devicetree: Add common video devices bindings documentation Sylwester Nawrocki
2012-07-16 9:09 ` Guennadi Liakhovetski
2012-07-18 16:58 ` Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 05/13] media: s5p-fimc: Add device tree support for FIMC devices Sylwester Nawrocki
2012-07-16 9:13 ` Guennadi Liakhovetski
2012-07-17 20:15 ` Sylwester Nawrocki
2012-07-18 8:17 ` Guennadi Liakhovetski
2012-07-18 19:53 ` Sylwester Nawrocki
2012-07-26 14:54 ` Laurent Pinchart
2012-07-30 21:35 ` Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 06/13] media: s5p-fimc: Add device tree support for FIMC-LITE Sylwester Nawrocki
2012-07-16 9:15 ` Guennadi Liakhovetski
[not found] ` <Pine.LNX.4.64.1207161114130.12302-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2012-07-17 18:55 ` Sylwester Nawrocki
2012-07-18 7:57 ` Guennadi Liakhovetski
2012-07-18 17:46 ` Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 07/13] media: s5p-fimc: Enable device tree based media device instantiation Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 08/13] ARM: dts: Add FIMC and MIPI-CSIS devices to Exynos4210 DT source Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 09/13] media: s5k6aa: Add support for device tree based instantiation Sylwester Nawrocki
2012-07-16 9:42 ` Guennadi Liakhovetski
2012-07-18 9:18 ` Sylwester Nawrocki
2012-07-26 15:09 ` Laurent Pinchart
2012-07-31 9:56 ` Guennadi Liakhovetski
2012-07-31 10:57 ` Laurent Pinchart
2012-07-31 11:14 ` Guennadi Liakhovetski
2012-07-31 11:22 ` Laurent Pinchart
2012-07-31 11:29 ` Guennadi Liakhovetski
2012-07-31 11:48 ` Laurent Pinchart
2012-07-31 12:26 ` Guennadi Liakhovetski
2012-07-31 12:46 ` Sylwester Nawrocki
2012-07-31 12:59 ` Guennadi Liakhovetski
2012-07-31 13:28 ` Sylwester Nawrocki
2012-07-31 21:46 ` Laurent Pinchart
2012-07-26 15:21 ` Laurent Pinchart
2012-07-26 20:39 ` Sylwester Nawrocki
2012-07-26 22:50 ` Laurent Pinchart
2012-08-19 10:02 ` Sakari Ailus
2012-05-25 19:52 ` [RFC/PATCH 10/13] ARM: dts: Add camera devices to exynos4210-nuri.dts Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 11/13] media: s5p-fimc: Keep local copy of sensors platform data Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 12/13] media: s5p-fimc: Add device tree based sensors registration Sylwester Nawrocki
2012-07-16 9:51 ` Guennadi Liakhovetski
2012-07-18 17:28 ` Sylwester Nawrocki
2012-05-25 19:52 ` [RFC/PATCH 13/13] media: s5p-fimc: Add parallel video port pin configuration Sylwester Nawrocki
2012-05-25 19:52 ` [PATCH 14/14] s5p-fimc: Add FIMC and MIPI-CSIS devices to CAM power domain Sylwester Nawrocki
2012-07-26 14:42 ` [RFC/PATCH 01/13] ARM: Samsung: Extend MIPI PHY callback with an index argument Laurent Pinchart
2012-07-26 20:15 ` Sylwester Nawrocki
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=5005ABF7.6020008@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=g.liakhovetski@gmx.de \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=riverful.kim@samsung.com \
--cc=s.nawrocki@samsung.com \
--cc=sw0312.kim@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).