All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: media: i2c: Add IMX296 CMOS sensor binding
Date: Wed, 22 Dec 2021 00:47:11 +0200	[thread overview]
Message-ID: <YcJZb2bd+c2hru2g@pendragon.ideasonboard.com> (raw)
In-Reply-To: <YcJW+EZhDkxk2u2w@paasikivi.fi.intel.com>

Hi Sakari,

On Wed, Dec 22, 2021 at 12:36:40AM +0200, Sakari Ailus wrote:
> On Mon, Dec 20, 2021 at 12:09:47AM +0200, Laurent Pinchart wrote:
> > From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > 
> > 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>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > Changes since v4:
> > 
> > - Rename to sony,imx296.yaml
> > - Add Laurent Pinchart as maintainer
> > - Rename power supplies
> > - Rename clock to INCK
> > - Drop clock-frequency property
> > - Reference OF graph DT schema
> > - Mention reset GPIO pin name
> > - Fix schema $id
> > - Fix port
> > ---
> >  .../bindings/media/i2c/sony,imx296.yaml       | 95 +++++++++++++++++++
> >  MAINTAINERS                                   |  8 ++
> >  2 files changed, 103 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx296.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx296.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx296.yaml
> > new file mode 100644
> > index 000000000000..e8f9a73bf2db
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx296.yaml
> > @@ -0,0 +1,95 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/i2c/sony,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>
> > +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > +
> > +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 (37.125 MHz, 54 MHz or 74.25 MHz)
> > +    items:
> > +      - const: inck
> 
> As the driver only gets the frequency, should we require assigned-clock-*
> stuff here?
> 
> Virtually all other sensors have a wide range of supported frequencies.

I don't like requiring assigned-clock-* in DT bindings for a particular
device, as it's a way to force a specific clock tree configuration, not
a description of that device. For instance, on my board, the clock is
provided by a fixed-frequency oscillator, so assigning a clock rate
would be redundant.

I believe it should be up to the DT author to ensure that the clock has
the right frequency, using one of the available means to do so.

> > +
> > +  avdd-supply:
> > +    description: Analog power supply (3.3V)
> > +
> > +  dvdd-supply:
> > +    description: Digital power supply (1.2V)
> > +
> > +  ovdd-supply:
> > +    description: Interface power supply (1.8V)
> > +
> > +  reset-gpios:
> > +    description: Sensor reset (XCLR) GPIO
> > +    maxItems: 1
> > +
> > +  port:
> > +    $ref: /schemas/graph.yaml#/properties/port
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - clocks
> > +  - clock-names
> > +  - avdd-supply
> > +  - dvdd-supply
> > +  - ovdd-supply
> > +  - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        imx296: camera-sensor@1a {
> > +            compatible = "sony,imx296";
> > +            reg = <0x1a>;
> > +
> > +            pinctrl-names = "default";
> > +            pinctrl-0 = <&camera_rear_default>;
> > +
> > +            clocks = <&gcc 90>;
> > +            clock-names = "inck";
> > +
> > +            avdd-supply = <&camera_vdda_3v3>;
> > +            dvdd-supply = <&camera_vddd_1v2>;
> > +            ovdd-supply = <&camera_vddo_1v8>;
> > +
> > +            reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
> > +
> > +            port {
> > +                imx296_ep: endpoint {
> > +                    remote-endpoint = <&csiphy0_ep>;
> > +                };
> > +            };
> > +        };
> > +    };
> > +
> > +...
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 43007f2d29e0..1b20f2b90aec 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -17752,6 +17752,14 @@ T:	git git://linuxtv.org/media_tree.git
> >  F:	Documentation/devicetree/bindings/media/i2c/imx290.txt
> >  F:	drivers/media/i2c/imx290.c
> >  
> > +SONY IMX296 SENSOR DRIVER
> > +M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > +M:	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > +L:	linux-media@vger.kernel.org
> > +S:	Maintained
> > +T:	git git://linuxtv.org/media_tree.git
> > +F:	Documentation/devicetree/bindings/media/i2c/sony,imx296.yaml
> > +
> >  SONY IMX319 SENSOR DRIVER
> >  M:	Bingbu Cao <bingbu.cao@intel.com>
> >  L:	linux-media@vger.kernel.org

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2021-12-21 22:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-19 22:09 [PATCH v2 0/2] media: i2c: IMX296 camera sensor support Laurent Pinchart
2021-12-19 22:09 ` [PATCH v2 1/2] dt-bindings: media: i2c: Add IMX296 CMOS sensor binding Laurent Pinchart
2021-12-21 22:36   ` Sakari Ailus
2021-12-21 22:47     ` Laurent Pinchart [this message]
2021-12-22 17:36   ` Rob Herring
2021-12-19 22:09 ` [PATCH v2 2/2] media: i2c: IMX296 camera sensor driver Laurent Pinchart
2021-12-21 12:54   ` Sakari Ailus
2021-12-21 15:56     ` Laurent Pinchart
2021-12-21 22:41       ` Sakari Ailus
2021-12-21 22:53         ` Laurent Pinchart
2021-12-22  9:31           ` Sakari Ailus
2021-12-29 16:37             ` Laurent Pinchart
  -- strict thread matches above, loose matches on Subject: below --
2019-10-25 17:51 [PATCH v2 0/2] Add IMX296 CMOS image sensor support Manivannan Sadhasivam
2019-10-25 17:51 ` [PATCH v2 1/2] dt-bindings: media: i2c: Add IMX296 CMOS sensor binding Manivannan Sadhasivam
2019-10-25 17:51   ` Manivannan Sadhasivam

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=YcJZb2bd+c2hru2g@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.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.