All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
	jacopo@jmondi.org, paul.j.murphy@intel.com,
	daniele.alessandrelli@intel.com, mchehab@kernel.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v3 4/5] media: i2c: imx412: Add imx477 compatible string
Date: Fri, 16 Sep 2022 14:03:11 +0300	[thread overview]
Message-ID: <YyRX78PH/3zSCdCU@valkosipuli.retiisi.eu> (raw)
In-Reply-To: <e29e5573-13b6-0a29-20c7-ba780d825a37@linaro.org>

Hi Bryan,

On Fri, Sep 16, 2022 at 01:32:06AM +0100, Bryan O'Donoghue wrote:
> On 15/09/2022 23:03, Dave Stevenson wrote:
> > Hi Bryan
> > 
> > On Thu, 15 Sept 2022 at 01:36, Bryan O'Donoghue
> > <bryan.odonoghue@linaro.org> wrote:
> > > 
> > > The Sony imx477 uses the same silicon enabling reference code from Sony in
> > > the available examples provided.
> > 
> > Have you had any conversations with Sony on whether the same register
> > settings are genuinely valid for all of these sensors?
> 
> There's alot to unpack here but... this shows me the main thing
> 
> https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/media/i2c/imx477.c#L37
> 
> The vendor driver reference code I have expects 0x0577. I've discussed with
> Daniele previously - that imx412 and imx577 both return 0x0577 in the chip
> id field and this imx412.c driver won't work with any chip reporting
> anything else.
> 
> Your chip though is returning 0x0477 so it will need to have its own
> upstream driver anyway.

That doesn't matter. What does however matter is what that sensor does and
how it's controlled. It is entirely possible that earlier versions of such
a sensor simply report a wrong ID.

> 
> So the conclusion I drew from the Nvidia/Leopard stack is wrong they call
> the driver imx477 but pointedly and suspiciously comment out the check for
> chip id.
> 
> And its pretty clear why, its so the "imx477" driver they have with work
> with chips identifying as 0x0577 and 0x0477.

I wouldn't be so worried about the model ID *if* the registers (and their
values) programmed to the sensor are otherwise the same.

And even if you have small differences in the registers you'll need to
write there, you can still differentiate between the sensors based on the
compatible string.

I don't have strong opinion on the grey areas though. Still if the register
set is exactly the same, then the driver should also be the same.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2022-09-16 11:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  0:35 [PATCH v3 0/5] Add imx577 and imx477 compatible to imx412 Bryan O'Donoghue
2022-09-15  0:35 ` [PATCH v3 1/5] media: dt-bindings: imx412: Add imx477 compatible string Bryan O'Donoghue
2022-09-15  0:35 ` [PATCH v3 2/5] media: dt-bindings: imx412: Add imx577 " Bryan O'Donoghue
2022-09-15  0:35 ` [PATCH v3 3/5] media: i2c: imx412: Assign v4l2 device subname based on compat string Bryan O'Donoghue
2022-09-15 20:54   ` Sakari Ailus
2022-09-15  0:35 ` [PATCH v3 4/5] media: i2c: imx412: Add imx477 compatible string Bryan O'Donoghue
2022-09-15 22:03   ` Dave Stevenson
2022-09-16  0:32     ` Bryan O'Donoghue
2022-09-16 11:03       ` Sakari Ailus [this message]
2022-09-16 11:14         ` Bryan O'Donoghue
2022-09-16 11:18           ` Bryan O'Donoghue
2022-09-15  0:35 ` [PATCH v3 5/5] media: i2c: imx412: Add imx577 " Bryan O'Donoghue
2022-09-15 20:55   ` 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=YyRX78PH/3zSCdCU@valkosipuli.retiisi.eu \
    --to=sakari.ailus@iki.fi \
    --cc=bryan.odonoghue@linaro.org \
    --cc=daniele.alessandrelli@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=jacopo@jmondi.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=paul.j.murphy@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.