From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
mchehab@kernel.org, robh+dt@kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
c.barrett@framos.com, a.brela@framos.com,
peter.griffin@linaro.org
Subject: Re: [PATCH v4 1/2] dt-bindings: media: i2c: Add IMX296 CMOS sensor binding
Date: Thu, 31 Oct 2019 18:54:44 +0200 [thread overview]
Message-ID: <20191031165444.GE5018@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20191031142817.GK6253@valkosipuli.retiisi.org.uk>
Hi Sakari,
On Thu, Oct 31, 2019 at 04:28:17PM +0200, Sakari Ailus wrote:
> On Thu, Oct 31, 2019 at 04:11:41PM +0200, Laurent Pinchart wrote:
> > On Thu, Oct 31, 2019 at 07:15:12PM +0530, Manivannan Sadhasivam wrote:
> >> On Thu, Oct 31, 2019 at 03:15:38PM +0200, Laurent Pinchart wrote:
> >>> On Wed, Oct 30, 2019 at 03:19:01PM +0530, Manivannan Sadhasivam wrote:
> >>>> Add YAML devicetree binding for IMX296 CMOS image sensor. Let's also
> >>>> add MAINTAINERS entry for the binding and driver.
> >>>>
> >>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >>>> ---
> >>>> .../devicetree/bindings/media/i2c/imx296.yaml | 94 +++++++++++++++++++
> >>>> MAINTAINERS | 8 ++
> >>>> 2 files changed, 102 insertions(+)
> >>>> create mode 100644 Documentation/devicetree/bindings/media/i2c/imx296.yaml
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/media/i2c/imx296.yaml b/Documentation/devicetree/bindings/media/i2c/imx296.yaml
> >>>> new file mode 100644
> >>>> index 000000000000..c04ec2203268
> >>>> --- /dev/null
> >>>> +++ b/Documentation/devicetree/bindings/media/i2c/imx296.yaml
> >>>> @@ -0,0 +1,94 @@
> >>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>>> +%YAML 1.2
> >>>> +---
> >>>> +$id: http://devicetree.org/schemas/media/i2c/imx296.yaml#
> >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>>> +
> >>>> +title: Sony IMX296 1/2.8-Inch CMOS Image Sensor
> >>>> +
> >>>> +maintainers:
> >>>> + - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >>>> +
> >>>> +description: |-
> >>>> + The Sony IMX296 is a 1/2.9-Inch active pixel type CMOS Solid-state image
> >>>> + sensor with square pixel array and 1.58 M effective pixels. This chip
> >>>> + features a global shutter with variable charge-integration time. It is
> >>>> + programmable through I2C and 4-wire interfaces. The sensor output is
> >>>> + available via CSI-2 serial data output (1 Lane).
> >>>> +
> >>>> +properties:
> >>>> + compatible:
> >>>> + const: sony,imx296
> >>>> +
> >>>> + reg:
> >>>> + maxItems: 1
> >>>> +
> >>>> + clocks:
> >>>> + maxItems: 1
> >>>> +
> >>>> + clock-names:
> >>>> + description:
> >>>> + Input clock for the sensor.
> >>>> + items:
> >>>> + - const: mclk
> >>>
> >>> The pin is named INCK, let's name the clock accordingly.
> >>
> >> Okay, I thought generic names are preferred here!
> >>
> >>>> + clock-frequency:
> >>>> + description:
> >>>> + Frequency of the mclk clock in Hertz.
> >>>
> >>> This shouldn't be needed, you can retrieve the clock frequency at
> >>> runtime from the clock source.
> >>
> >> Unless the clock source is a fixed one! What if the clock source comes from
> >> SoC? We need to set the rate, right?
> >
> > In that case, if you want to hardcode the clock in DT, the preferred way
> > is to use the assigned-clock-rates property. Otherwise, if the driver
> > requires a specific clock frequency, it's better to hardcode it in the
> > driver itself. In this specific case, I think assigned-clock-rates is
> > best as the device can support three different clock frequencies.
>
> Just note that if ACPI support is added to the sensor driver, you'll need
> the clock-frequency property again, for that's the only way how the driver
> will get the clock frequency.
Why is so ? Why can't we implement of assigned-clock-rates for ACPI ?
> This is certainly not something that has to be taken into account in DT
> bindings, but in any case it'll add some lines of code in the driver which
> are not very useful.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2019-10-31 16:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 9:49 [PATCH v4 0/2] Add IMX296 CMOS image sensor support Manivannan Sadhasivam
2019-10-30 9:49 ` [PATCH v4 1/2] dt-bindings: media: i2c: Add IMX296 CMOS sensor binding Manivannan Sadhasivam
2019-10-30 11:53 ` Sakari Ailus
2019-10-30 12:01 ` Manivannan Sadhasivam
2019-11-05 1:43 ` Rob Herring
2019-10-31 13:15 ` Laurent Pinchart
2019-10-31 13:45 ` Manivannan Sadhasivam
2019-10-31 14:11 ` Laurent Pinchart
2019-10-31 14:28 ` Sakari Ailus
2019-10-31 16:54 ` Laurent Pinchart [this message]
2019-10-31 17:08 ` Sakari Ailus
2019-11-04 19:02 ` Laurent Pinchart
2019-11-04 21:30 ` Sakari Ailus
2019-11-04 22:00 ` Laurent Pinchart
2019-10-31 14:58 ` Manivannan Sadhasivam
2019-10-30 9:49 ` [PATCH v4 2/2] media: i2c: Add IMX296 CMOS image sensor driver Manivannan Sadhasivam
2019-10-31 13:16 ` [PATCH v4 0/2] Add IMX296 CMOS image sensor support Laurent Pinchart
2019-10-31 13:23 ` Manivannan Sadhasivam
2019-10-31 13:28 ` Laurent Pinchart
2019-10-31 15:48 ` Sakari Ailus
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=20191031165444.GE5018@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=a.brela@framos.com \
--cc=c.barrett@framos.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mchehab@kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
/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).