All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: kieran.bingham+renesas@ideasonboard.com,
	laurent.pinchart+renesas@ideasonboard.com,
	niklas.soderlund+renesas@ragnatech.se, mchehab@kernel.org
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>,
	Hans Verkuil <hverkuil@xs4all.nl>, Hyun Kwon <hyunk@xilinx.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: [PATCH 0/2] media: i2c: Add support for RDACM21 camera module
Date: Wed, 16 Sep 2020 17:43:36 +0200	[thread overview]
Message-ID: <20200916154338.159747-1-jacopo+renesas@jmondi.org> (raw)

Hello,
   this series introduces support for the RDACM21 camera module, an automotive
camera module based on GMSL technology.

The camera module integrates a MAX9271 serializer, and OV10640 image sensor
coupled with an OV490 ISP. The image sensor and the ISP are programmed loading
the content of an EEPROM chip integrated in the camera module package and
are configured to produce images in 1280x1080 YUYV8 format.

The camera module driver uses the max9271 library to control the serializer,
as the RDACM20 does, to maximize code reuse.

And that's for patch 2/2: it's all unicorns and rainbows!

Patch 1/2 is the less nice one, and is sent as RFC to trigger discussions.

The camera module is connected to a MAXIM development board which integrates a
MAX9286 deserializer. The same expansion board is used with the RDACM20 camera
module and the max9286 driver is meant to work with both cameras without
modifications.

Unfortunately, each camera module has its own characteristics, in details:

- the RDACM20 module integrates a micro-controller unit that pre-programs the
  embedded max9271 serializer at power-up time. The serializer then operates
  with the GMSL reverse channel towards the de-serializer with electrical
  noise immunity feature enabled ("high-threshold" as per chip manual), and
  requires the de-serializer to communicate with the camera module with the
  reverse channel amplitude compensated to 170mV.

- the RDACM21 module is not pre-programmed by any micro-controller, and requires
  the de-serializer to initially maintain the reverse channel amplitude to
  100mV, then after the remote ends have been probed and have enabled the noise
  immunity feature on their reverse channels to increase the amplitude to 170mV
  to guarantee stability of the communications.

For that reason, a mechanism to control the reverse channel amplitude of the
GMSL channel is required. The channel amplitude is controlled by the
de-serializer, but depends on the properties of the remote serializer.

We have explored a few solutions in the past:
1) A dt property that specifies the initial reverse channel amplitude (or simply
   a boolean property that specifies if any channel pre-compensation is
   required). Issue is that the property should be set in the de-serializer
   but depends on the remote side configuration and on which camera module
   is currently connected.

2) Use get_mbus_config to retrieve the GMSL channel configuration. Hyun has
   added to get_mbus_config support for GMSL parameters to control the signal
   polarities[1]. This seems nice, but the channel amplitude has to be set
   -before- the remote end is probed and no subdev operation can be called
   until the remote sub-device have registered.

In this initial version, [1/2] simply adjust the reverse channel after all
remotes have probed, allowing support for RDACM21 but breaking compatibility
with RDACM20.

Any comment on how this should better be handled ?

Thanks
  j

[1] https://github.com/xlnx-hyunkwon/linux-xlnx/commits/hyunk/vision-wip-5.4-next

Jacopo Mondi (2):
  RFC: media: i2c: max9286: Compensate reverse channel
  media: i2c: Add driver for RDACM21 camera module

 MAINTAINERS                 |  12 +
 drivers/media/i2c/Kconfig   |  13 +
 drivers/media/i2c/Makefile  |   2 +
 drivers/media/i2c/max9286.c |   8 +-
 drivers/media/i2c/rdacm21.c | 541 ++++++++++++++++++++++++++++++++++++
 5 files changed, 574 insertions(+), 2 deletions(-)
 create mode 100644 drivers/media/i2c/rdacm21.c

--
2.28.0


             reply	other threads:[~2020-09-16 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 15:43 Jacopo Mondi [this message]
2020-09-16 15:43 ` [PATCH 1/2] RFC: media: i2c: max9286: Compensate reverse channel Jacopo Mondi
2020-09-16 15:43 ` [PATCH 2/2] media: i2c: Add driver for RDACM21 camera module Jacopo Mondi

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=20200916154338.159747-1-jacopo+renesas@jmondi.org \
    --to=jacopo+renesas@jmondi.org \
    --cc=hverkuil@xs4all.nl \
    --cc=hyunk@xilinx.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=sakari.ailus@iki.fi \
    /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.