From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: "Togorean, Bogdan" <Bogdan.Togorean@analog.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Jacopo Mondi <jacopo+renesas@jmondi.org>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
YueHaibing <yuehaibing@huawei.com>,
Bingbu Cao <bingbu.cao@intel.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Shawn Tu <shawnx.tu@intel.com>,
Dongchun Zhu <dongchun.zhu@mediatek.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Cozma, Andrei" <Andrei.Cozma@analog.com>
Subject: Re: [PATCH 1/2] media: i2c: Add driver for the Analog Devices ADDI9036 ToF front-end
Date: Fri, 11 Sep 2020 16:49:02 +0300 [thread overview]
Message-ID: <20200911134902.GH26842@paasikivi.fi.intel.com> (raw)
In-Reply-To: <DM6PR03MB5274FF37BB02D98691BB43289B240@DM6PR03MB5274.namprd03.prod.outlook.com>
Hi Bogdan,
On Fri, Sep 11, 2020 at 01:32:39PM +0000, Togorean, Bogdan wrote:
> Hi Laurent,
>
> > Hi Bogdan,
> >
> > Thank you for the patch.
>
> Thank you for review!
>
> >
> > On Thu, Sep 10, 2020 at 07:24:06PM +0300, Bogdan Togorean wrote:
> > > The ADDI9036 is a complete, 45 MHz, front-end solution for charge
> > > coupled device (CCD) time of flight (TOF) imaging applications.
> > >
> > > It has 2-lane MIPI CSI-2 RAW12 data output and i2c control interface.
> > >
> > > The programming of calibration and firmware is performed by userspace
> > > SDK through CID_USER class IOCTLs.
> >
> > I'm afraid that's not acceptable. The firmware should be loaded using
> > the Linux kernel firmware API. As for calibration, is it static data ?
> > How is it generated ?
>
> Calibration data is static data, generated at production and stored on and EEPROM
> memory on camera board. The camera board consists mainly of ADDI9036 processor
> + CCD image sensor + EEPROM.
>
> The firmware is a set of (address, data) tuples that are written via I2C.
> We want this driver to be a generic one and support all implementations
> of ADDI9036 ToF processor. Now the problem is that some implementations
> store firmware + calibration on external EEPROM and some store just calibration
> data on EEPROM and firmware is loaded from a file stored in SDK. With the help
> of the 2 custom controls we move the camera model detection, firmware
> and calibration fetching from driver to user space SDK.
Can you figure out by reading EEPROM which one of these is the case?
Alternatively you could add a custom DT property IMO.
The calibration data could be loaded using request_firmware(), too. I'd use
a specific directory for just this purpose.
>
> Also an important point is that the ToF processor has 3 operating modes
> (near, medium and far). At each mode change a new set of firmware +
> calibration data is loaded into ADDI9036 chip. If we move the firmware loading
> in driver we would still need a custom enumeration control to select the working mode.
I don't see there being an issue having such a control.
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2020-09-11 15:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 16:24 [PATCH 1/2] media: i2c: Add driver for the Analog Devices ADDI9036 ToF front-end Bogdan Togorean
2020-09-10 16:24 ` [PATCH 2/2] media: dt-bindings: media: i2c: Add bindings for ADDI9036 Bogdan Togorean
2020-09-11 22:54 ` Rob Herring
2020-09-10 22:01 ` [PATCH 1/2] media: i2c: Add driver for the Analog Devices ADDI9036 ToF front-end Laurent Pinchart
2020-09-11 13:32 ` Togorean, Bogdan
2020-09-11 13:49 ` Sakari Ailus [this message]
2020-09-15 21:23 ` Laurent Pinchart
2020-09-17 7:06 ` Togorean, Bogdan
2020-09-17 12:12 ` Laurent Pinchart
2020-09-18 6:12 ` Togorean, Bogdan
[not found] ` <ff1762fb-749a-a0a3-e90d-dbbc8c388893@linux.intel.com>
2020-09-17 7:09 ` Togorean, Bogdan
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=20200911134902.GH26842@paasikivi.fi.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=Andrei.Cozma@analog.com \
--cc=Bogdan.Togorean@analog.com \
--cc=bingbu.cao@intel.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dongchun.zhu@mediatek.com \
--cc=jacopo+renesas@jmondi.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawnx.tu@intel.com \
--cc=yuehaibing@huawei.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