From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Jai Luthra <jai.luthra@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Alexander Shiyan <eagle.alexander923@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Subject: Re: [PATCH v4 10/16] media: dt-bindings: sony,imx678: Add other Starvis 2 family members
Date: Wed, 21 Oct 2026 15:18:31 +0300 [thread overview]
Message-ID: <atitlzogStoHJ0E3@kekkonen.localdomain> (raw)
In-Reply-To: <CAPY8ntD2C-7UTKX2Srusn_Tzx5KS3tnUtPP+piMYbUKZP91Rpg@mail.gmail.com>
Hi Dave,
On Tue, Oct 20, 2026 at 03:39:52PM +0100, Dave Stevenson wrote:
> Hi Sakari
>
> Thanks for the review
>
> On Tue, 20 Oct 2026 at 11:07, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> >
> > Hi Dave,
> >
> > On Thu, Oct 15, 2026 at 04:57:36PM +0100, Dave Stevenson wrote:
> > > There are multiple members of the Sony Starvis 2 image sensor family
> > > that have the same hardware requirements as imx678.
> > > Add them as options to the imx678 binding, rather than duplicating it.
> > >
> > > Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> > > ---
> > > .../devicetree/bindings/media/i2c/sony,imx678.yaml | 38 ++++++++++++++++++----
> > > 1 file changed, 32 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> > > index 098f72544216..027872a134f2 100644
> > > --- a/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> > > +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> > > @@ -5,7 +5,7 @@
> > > $id: http://devicetree.org/schemas/media/i2c/sony,imx678.yaml#
> > > $schema: http://devicetree.org/meta-schemas/core.yaml#
> > >
> > > -title: Sony IMX678 Sensor
> > > +title: Sony IMX678 and Starvis 2 Sensors
> > >
> > > maintainers:
> > > - Jai Luthra <jai.luthra@ideasonboard.com>
> > > @@ -13,21 +13,47 @@ maintainers:
> > > 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.
> >
> > You could rewrap this while at it.
> >
> > > + It is part of the Starvis 2 family of sensors.
> > > + Other members of the Starvis 2 have the same hardware requirements, and
> > > + therefore share this binding.
> >
> > This paragraph could be rewrapped, too -- the limit is 80 characters per
> > line.
>
> OK, I'll rephrase it so that it makes sense as one reflowed paragraph.
>
> > >
> > > allOf:
> > > - $ref: /schemas/media/video-interface-devices.yaml#
> > >
> > > properties:
> > > compatible:
> > > - items:
> > > - - enum:
> > > - - sony,imx678-aamr
> > > - - sony,imx678-aaqr
> > > - - const: sony,imx678
> > > + oneOf:
> > > + - items:
> > > + - enum:
> > > + - sony,imx585-aamj
> > > + - sony,imx585-aaqj
> > > + - const: sony,imx585
> > > + - items:
> > > + - enum:
> > > + - sony,imx662-aamr
> > > + - sony,imx662-aaqr
> > > + - const: sony,imx662
> > > + - items:
> > > + - enum:
> > > + - sony,imx675-aamr
> > > + - sony,imx675-aaqr
> > > + - const: sony,imx675
> > > + - items:
> > > + - enum:
> > > + - sony,imx678-aamr
> > > + - sony,imx678-aaqr
> > > + - const: sony,imx678
> > > + - items:
> > > + - enum:
> > > + - sony,imx832-amr
> > > + - sony,imx832-aqr
> > > + - const: sony,imx832
> >
> > Should we also have a sony,starvis2 compatible? Just wondering.
>
> I deliberately didn't based on the discussions Jai had with DT
> maintainers when upstreaming the original binding [1], particularly
> Conor's comment:
> "Remember, having distinct multiple compatibles for the same hardware so
> that you can induce different software behaviour is not something we
> typically permit. While we do want to support all use cases, it isn't
> always the case that devicetree is the right place to do it."
>
> Sorry, but when time is limited, IMHO debating dtbindings just isn't
> worth it. I've therefore taken the simple option.
The DT bindings are important to get right from the beginning, that's why I
asked. But I see this has been considered so I'm fine with it.
>
> I do have patches that implement that compatible and fully autodetect
> the sensor[2], but I'll keep them downstream.
> Doing so means that we have one common overlay for connecting any of
> the supported Starvis2 sensors to a Pi.
>
> [1] https://patchwork.linuxtv.org/project/linux-media/patch/20260520-imx678-v3-1-8b5f9676486e@ideasonboard.com/
> [2] Currently the top 2 commits on
> https://github.com/6by9/linux/tree/mainline_starvis2_v2, but that
> branch will get rebased/reworked.
>
> > The driver isn't generic still as it requires sensor specific information
> > to be passed to it. CCS solves this with CCS static data (via firmware
> > loading mechanism) so there are no driver changes even if the capability
> > and limit information can't be obtained from device's registers or the
> > device requires MSRs.
>
> I'm assuming you're referring to the patchset as a whole as I don't
> believe I've used the term generic in this patch. I'm happy to swap to
> "common Starvis 2 driver" where appropriate within the patchset
> instead.
>
> IMHO Pushing the config to firmware files doesn't help, particularly
> as these sensors don't have a common ID register and so identification
> isn't trivial. It also makes life more involved for a distribution
> maintainer to ensure they're picking up the relevant files, and that's
> assuming that someone is curating them.
>
> My aim with the series was to reuse as much common code as possible,
> rather than submitting 5 separate drivers which are identical other
> than constants and arrays of registers. Jai now has IMX676 working
> with this driver, so that would make it 6 variants. Refactoring to use
> a firmware file adds complexity for minimal gain, and you'd have to
> special case IMX678 so it worked without a firmware file to avoid
> regressions.
>
> I guess the common core could be refactored to be a library, so that
> you could minimise module size by having the sensor specific config in
> a module that depends on the library. You're talking of saving a few
> kB uncompressed though, so that would be quite extreme. I'd be more
> tempted to have individual Kconfig entries and use #if
> IS_ENABLED(CONFIG_IMXxxx) to conditionally compile in the config to a
> common module.
Fair points. CCS was made to scale and obviously the number of Starvis 2
(or 3) sensors will be somewhat limited in any case. The identification
information could also be put to DT, that's something we should do for CCS
as some devices are simply missing the information.
While we can proceed with this approach I guess this is something to
consider in the future.
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2026-10-21 12:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 15:57 [PATCH v4 00/16] Update imx678 to act as a common Sony Starvis 2 driver Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 01/16] media: imx678: Rework into generic Starvis 2 sensor driver Dave Stevenson
2026-10-15 16:15 ` sashiko-bot
2026-10-20 9:12 ` Sakari Ailus
2026-10-15 15:57 ` [PATCH v4 02/16] media: sony-starvis2: Reorder link frequencies to remove lookup Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 03/16] media: sony-starvis2: Always program the sensor in window mode Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 04/16] media: sony-starvis2: Parameterise the configuration to allow for other models Dave Stevenson
2026-10-15 16:13 ` sashiko-bot
2026-10-20 9:34 ` Sakari Ailus
2026-10-21 13:59 ` Dave Stevenson
2026-10-22 8:23 ` Sakari Ailus
2026-10-15 15:57 ` [PATCH v4 05/16] media: sony-starvis2: Rework 2 lane support for higher link freqs Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 06/16] media: sony-starvis2: Allow runtime control of link frequency Dave Stevenson
2026-10-15 16:12 ` sashiko-bot
2026-10-20 9:59 ` Sakari Ailus
2026-10-15 15:57 ` [PATCH v4 07/16] media: sony-starvis2: Correct the exposure range Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 08/16] media: sony-starvis2: Put module into standby after identify Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 09/16] media: sony-starvis2: Use pm_runtime_autosuspend Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 10/16] media: dt-bindings: sony,imx678: Add other Starvis 2 family members Dave Stevenson
2026-10-15 20:17 ` Rob Herring
2026-10-20 10:07 ` Sakari Ailus
2026-10-20 14:39 ` Dave Stevenson
2026-10-21 12:18 ` Sakari Ailus [this message]
2026-10-21 21:46 ` Laurent Pinchart
2026-10-15 15:57 ` [PATCH v4 11/16] media: sony-starvis2: Add support for IMX662 Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 12/16] media: sony-starvis2: Add support for IMX675 Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 13/16] media: sony-starvis2: Add support for IMX832 Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 14/16] media: sony-starvis2: Only update bits for window mode Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 15/16] media: sony-starvis2: Parameterise exposure min and step Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 16/16] media: sony-starvis2: Add support for IMX585 Dave Stevenson
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=atitlzogStoHJ0E3@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=eagle.alexander923@gmail.com \
--cc=jai.luthra@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--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 \
/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