Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Lachlan Michael <Lachlan.Michael@sony.com>,
	Ryuichi Tadano <Ryuichi.Tadano@sony.com>,
	Kengo Hayasaka <Kengo.Hayasaka@sony.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: media: i2c: Add Sony IMX678
Date: Wed, 20 May 2026 23:04:16 +0100	[thread overview]
Message-ID: <20260520-during-rocklike-a7436513d559@spud> (raw)
In-Reply-To: <177929757691.2341049.18374545669142492074@selene>

[-- Attachment #1: Type: text/plain, Size: 5275 bytes --]

On Wed, May 20, 2026 at 07:19:36PM +0200, Jai Luthra wrote:
> Hi Conor,
> 
> Thank you for the review.
> 
> Quoting Conor Dooley (2026-05-20 17:56:29)
> > On Wed, May 20, 2026 at 05:17:25PM +0200, Jai Luthra wrote:
> > > Sony IMX678 is an 8.4 Megapixel (3856x2180) CMOS sensor, that can output
> > > pixels over MIPI CSI-2 bus. Add bindings for it.
> > > 
> > > Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> > > ---
> > > Changes in v3:
> > > - Use `reset-gpios`, mentioning the sensor XCLR acts like RESETN, instead of `xclr-gpios`
> > > Changes in v2:
> > > - Add per-variant compatibles for mono and colour, alongside the
> > >   generic fallback, so the variant can be declared without powering
> > >   the sensor at probe.
> > > - Rename reset GPIO to xclr as that's what it's called in the
> > >   datasheet, and how it behaves
> > > - Reference the generic video interface devices schema and switch to
> > >   unevaluatedProperties.
> > > - Drop "link-frequencies: true"
> > > - Drop the T: entry for media.git from MAINTAINERS.
> > > ---
> > >  .../devicetree/bindings/media/i2c/sony,imx678.yaml | 129 +++++++++++++++++++++
> > >  MAINTAINERS                                        |   6 +
> > >  2 files changed, 135 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> > > new file mode 100644
> > > index 000000000000..d85745ddbefd
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> > > @@ -0,0 +1,129 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +# Copyright (C) 2026 Ideas on Board Oy
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/media/i2c/sony,imx678.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Sony IMX678 Sensor
> > > +
> > > +maintainers:
> > > +  - Jai Luthra <jai.luthra@ideasonboard.com>
> > > +
> > > +description:
> > > +  Sony IMX678 diagonal 8.86 mm (Type 1/1.8) CMOS active pixel type solid-state
> > > +  image sensor with a square pixel array and 8.40M (3856x2180) effective pixels.
> > > +
> > > +allOf:
> > > +  - $ref: /schemas/media/video-interface-devices.yaml#
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - sony,imx678
> > > +      - sony,imx678-aamr
> > > +      - sony,imx678-aaqr
> > > +    description:
> > > +      The IMX678 sensor exists in a colour variant (IMX678-AAQR) and a mono
> > > +      variant (IMX678-AAMR). An internal register can also help detect this at
> > > +      runtime.
> > 
> > I don't understand the compatibles here. If aaqr is tge colour variant,
> > and aamr is mono, what does the suffix-less compatible represent?
> 
> Sorry, I had seen Laurent's comment on this area in v2 but forgot to update
> it in this revision.
> 
> The suffix-less compatible is for the cases where a product comes in two
> variants with the sensor being either mono or color.

This response is very weird. It's worded in a really generic way that
barely seems to be a response to my mail. We aren't talking about
"a product" here, we are specifically talking about the imx678, and we
know it comes it these variants. There are no "cases" involved.

> It allows sharing DT blobs amongst the two variants, where the driver
> powers the sensor on and reads the register to figure out if it is mono
> or color.

To be honest, I don't really get why the driver uses the specific
compatibles at all, if it can just determine if it is colour or mono at
runtime. Seems to me like this should be
compatible:
  items:
    - enum:
       - imx678-aamr
       - imx678-aaqr
    - const: imx678

Or just entirely drop the suffixed compatibles from the binding, since
you can detect mono v colour at runtime. The justification for the
aamr/aaqr compatibles seems to be that it avoids powering on the device
to check, but it looks like you unconditionally power it on and check
which variant it is, so that argument holds no water.

> It allows sharing DT blobs amongst the two variants, where the driver
> powers the sensor on and reads the register to figure out if it is mono
> or color.

Why would you want to share the dtb anyway? That makes no sense to
me as a usecase in the first place. If the sensor isn't part of the
board, you should be using an overlay or something similar to apply it,
because if you can swap the sensor you can also have no sensor!

Also doesn't your driver print a warning if you did this anyway?

> > Your commit message says:
> > > - Add per-variant compatibles for mono and colour, alongside the
> > >   generic fallback, so the variant can be declared without powering
> > >   the sensor at probe.
> > But that's not what you have permitted in the binding, you've described
> > 3 different variants and using the one with no suffix as a fallback will
> > produce validation errors.
> > 
> 
> "fallback" was a wrong choice of word, I'll update the description in v4.
> 
> > I think this probably is
> > pw-bot: changes-requested
> > 
> > Thanks,
> > Conor.
> 
> Thanks,
>     Jai

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-05-20 22:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 15:17 [PATCH v3 0/2] media: Add bindings and driver for Sony IMX678 Jai Luthra
2026-05-20 15:17 ` [PATCH v3 1/2] dt-bindings: media: i2c: Add " Jai Luthra
2026-05-20 15:56   ` Conor Dooley
2026-05-20 17:19     ` Jai Luthra
2026-05-20 22:04       ` Conor Dooley [this message]
2026-05-21  7:30         ` Jai Luthra
2026-05-21  9:30           ` Conor Dooley
2026-05-20 15:17 ` [PATCH v3 2/2] media: i2c: imx678: Add driver for " Jai Luthra
2026-05-20 16:06   ` sashiko-bot
2026-05-21 11:12   ` Sakari Ailus
2026-05-25 14:25     ` Jai Luthra
2026-05-22 17:01   ` Tarang Raval
2026-05-25 13:58     ` Jai Luthra
2026-05-26  6:03       ` Tarang Raval

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=20260520-during-rocklike-a7436513d559@spud \
    --to=conor@kernel.org \
    --cc=Kengo.Hayasaka@sony.com \
    --cc=Lachlan.Michael@sony.com \
    --cc=Ryuichi.Tadano@sony.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jai.luthra@ideasonboard.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox