linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cosmin Tanislav <demonsingur@gmail.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Jakub Kostiw <jakub.kostiw@videtronic.com>
Cc: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
	"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Julien Massot" <julien.massot@collabora.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Bjorn Andersson" <quic_bjorande@quicinc.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Taniya Das" <quic_tdas@quicinc.com>,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Nícolas F . R . A . Prado" <nfraprado@collabora.com>,
	"Eric Biggers" <ebiggers@google.com>,
	"Javier Carrasco" <javier.carrasco@wolfvision.net>,
	"Ross Burton" <ross.burton@arm.com>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Zhi Mao" <zhi.mao@mediatek.com>,
	"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
	"Dongcheng Yan" <dongcheng.yan@intel.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
	"Tommaso Merciai" <tomm.merciai@gmail.com>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Ihor Matushchak" <ihor.matushchak@foobox.net>,
	"Laurentiu Palcu" <laurentiu.palcu@oss.nxp.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-gpio@vger.kernel.org
Subject: Re: [RFC PATCH v2 12/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
Date: Wed, 7 May 2025 14:38:36 +0300	[thread overview]
Message-ID: <b825ab7e-dbf6-4dcc-a35b-3fef0f0c4969@gmail.com> (raw)
In-Reply-To: <CAPY8ntCtycm+fha9yuJyr2_9obq8cq6xjYJT7acnFPgh_sCi8Q@mail.gmail.com>



On 5/7/25 2:22 PM, Dave Stevenson wrote:
> Hi Jakub and Cosmin
> 
> On Tue, 6 May 2025 at 19:34, Jakub Kostiw <jakub.kostiw@videtronic.com> wrote:
>>
>> Hi Cosmin
>>
>> Awesome work. The initiative to establish a common framework for GMSL
>> devices is a great idea.
>>
>> I believe that we have found few bugs:
>>
>>> +#define MAX9296A_BACKTOP22(x)                        (0x31d * (x) * 0x3)
>>
>> The first multiplication is wrong and should be replaced with addition:
>>
>> +#define MAX9296A_BACKTOP22(x)                  (0x31d + (x) * 0x3)
>>
>> The same goes for MAX96724 equivalent macro:
>>
>>> +#define MAX96724_BACKTOP22(x)                        (0x415 * (x) * 0x3)
>>
>> In MAX96714 driver there is an issue with setting up lane-polarities.
>>
>>> +static const struct max9296a_chip_info max96714_info = {
>>> +     .max_register = 0x5011,
>>> +     .set_pipe_stream_id = max96714_set_pipe_stream_id,
>>> +     .set_pipe_enable = max96714_set_pipe_enable,
>>> +     .set_pipe_tunnel_enable = max96714_set_pipe_tunnel_enable,
>>> +     .phys_configs = {
>>> +             .num_configs = ARRAY_SIZE(max96714_phys_configs),
>>> +             .configs = max96714_phys_configs,
>>> +     },
>>> +     .polarity_on_physical_lanes = true,
>>> +     .supports_phy_log = true,
>>> +     .adjust_rlms = true,
>>> +     .num_pipes = 1,
>>> +     .pipe_hw_ids = { 1 },
>>> +     .num_phys = 1,
>>> +     .phy_hw_ids = { 1 },
>>> +     .num_links = 1,
>>> +};
>>
>> In order to make thing work we had to set
>>
>>> +     .polarity_on_physical_lanes = true,
>>
>> To false. So this field is either improperly set for MAX96714, or handling of this case is wrong:
>>
>>> +             if (priv->info->polarity_on_physical_lanes)
>>> +                     map = phy->mipi.data_lanes[i];
>>> +             else
>>> +                     map = i;
>>
>> Upon mentioned changes we have successfully tested two GMSL2
>> combinations on Raspberry 5 platform:
>>
>> 1. MAX96724 + MAX96717 (only 2 MIPI-CSI2 lanes with single camera due to
>> hardware limitations)
>>
>> 2. MAX96714 + MAX96717
> 
> Feel free to shout if you want help on the Pi side.
> 
> Pi5 should be able to extract multiple virtual channels to support
> several sensors simultaneously (up to 4 VC/DT combinations). It does
> need a rework so the CFE runs from memory rather than being fed data
> directly from the CSI-2 receiver, but I believe that is pencilled in
> as future work with libcamera already.
> 

Hi Dave, thanks for your input! I'm glad this is getting some traction.

I'm currently testing using Tomi's pyv4l2 tool, which already contains
RPi5 GMSL configs.

I've tested the multi-camera simultaneously streaming usecase already,
all is working well, and I was able to get 4 separate camera image
streams (or 2 image and 2 meta), streaming to the RPi5, and then to
a remote host (where debayer is feasible to do without the help of an
ISP).

Last time I tried libcamera it was not able to properly configure all
entities, so testing with just the mainline CFE using pyv4l2 makes it
much simpler, since we're only interested in getting our hardware
supported.

> Unless things have regressed, libcamera should report all connected
> sensors to SerDes setups, and set up Media Controller appropriately to
> use them one at a time. I know I've had that working with simple CSI-2
> multiplexers and thought I'd had it working with TI FPD-Link III
> SerDes (Arducam's IMX219 V3Link kit, modded to remove their MCU). I
> don't have any GMSL hardware to test with.
> 
> We're also fairly open to merging drivers and overlays for 3rd party
> hardware into the downstream Pi kernel. If they've been reviewed and
> merged upstream then that is the ideal, but if you're prepared to
> support them, then it saves the user the headache of having to build
> out-of-tree modules.
> 
> Cheers
>    Dave


  reply	other threads:[~2025-05-07 11:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-09  8:47 [RFC PATCH v2 00/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers Cosmin Tanislav
2025-03-09  8:47 ` [RFC PATCH v2 01/16] dt-bindings: media: i2c: max96717: add myself as maintainer Cosmin Tanislav
2025-03-11 18:06   ` Rob Herring (Arm)
2025-03-09  8:47 ` [RFC PATCH v2 02/16] dt-bindings: media: i2c: max96717: reflow text Cosmin Tanislav
2025-03-11 18:09   ` Rob Herring
2025-03-09  8:47 ` [RFC PATCH v2 03/16] dt-bindings: media: i2c: max96717: add support for I2C ATR Cosmin Tanislav
2025-03-11 18:15   ` Rob Herring
2025-03-09  8:47 ` [RFC PATCH v2 04/16] dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf Cosmin Tanislav
2025-03-11 18:23   ` Rob Herring
2025-03-09  8:47 ` [RFC PATCH v2 05/16] dt-bindings: media: i2c: max96717: add support for MAX9295A Cosmin Tanislav
2025-03-11 18:28   ` Rob Herring
2025-03-09  8:47 ` [RFC PATCH v2 06/16] dt-bindings: media: i2c: max96717: add support for MAX96793 Cosmin Tanislav
2025-03-11 18:30   ` Rob Herring (Arm)
2025-03-13 12:25   ` Sakari Ailus
2025-03-09  8:47 ` [RFC PATCH v2 07/16] dt-bindings: media: i2c: max96712: add myself as maintainer Cosmin Tanislav
2025-03-11 18:54   ` Rob Herring (Arm)
2025-03-09  8:48 ` [RFC PATCH v2 08/16] dt-bindings: media: i2c: max96712: use pattern properties for ports Cosmin Tanislav
2025-03-11 19:00   ` Rob Herring
2025-03-09  8:48 ` [RFC PATCH v2 09/16] dt-bindings: media: i2c: max96712: add support for I2C MUX Cosmin Tanislav
2025-03-11 19:01   ` Rob Herring (Arm)
2025-03-09  8:48 ` [RFC PATCH v2 10/16] dt-bindings: media: i2c: max96712: add support for POC supplies Cosmin Tanislav
2025-03-11 19:02   ` Rob Herring (Arm)
2025-03-09  8:48 ` [RFC PATCH v2 11/16] dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A Cosmin Tanislav
2025-03-11 19:07   ` Rob Herring
2025-03-11 22:26     ` Cosmin Tanislav
2025-03-09  8:48 ` [RFC PATCH v2 12/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers Cosmin Tanislav
2025-05-06 18:33   ` Jakub Kostiw
2025-05-06 19:01     ` Cosmin Tanislav
2025-05-06 19:15       ` Jakub Kostiw
2025-05-06 19:46         ` Cosmin Tanislav
2025-05-07  7:28           ` Jakub Kostiw
2025-05-07  8:49             ` Cosmin Tanislav
2025-05-07  9:02               ` Jakub Kostiw
2025-05-07 11:22     ` Dave Stevenson
2025-05-07 11:38       ` Cosmin Tanislav [this message]
2025-05-07 11:41       ` Jakub Kostiw
2025-03-09  8:48 ` [RFC PATCH v2 13/16] arm64: defconfig: disable deprecated MAX96712 driver Cosmin Tanislav
2025-03-09  8:48 ` [RFC PATCH v2 14/16] staging: media: remove " Cosmin Tanislav
2025-03-09  8:48 ` [RFC PATCH v2 15/16] media: i2c: remove MAX96717 driver Cosmin Tanislav
2025-03-09  8:48 ` [RFC PATCH v2 16/16] media: i2c: remove MAX96714 driver Cosmin Tanislav

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=b825ab7e-dbf6-4dcc-a35b-3fef0f0c4969@gmail.com \
    --to=demonsingur@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnd@arndb.de \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=cosmin.tanislav@analog.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dongcheng.yan@intel.com \
    --cc=ebiggers@google.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=ihor.matushchak@foobox.net \
    --cc=jakub.kostiw@videtronic.com \
    --cc=javier.carrasco@wolfvision.net \
    --cc=julien.massot@collabora.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=laurentiu.palcu@oss.nxp.com \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=nfraprado@collabora.com \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=quic_bjorande@quicinc.com \
    --cc=quic_tdas@quicinc.com \
    --cc=robh@kernel.org \
    --cc=ross.burton@arm.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tomm.merciai@gmail.com \
    --cc=will@kernel.org \
    --cc=zhi.mao@mediatek.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;
as well as URLs for NNTP newsgroup(s).