From: Cosmin Tanislav <demonsingur@gmail.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,
"Cosmin Tanislav" <demonsingur@gmail.com>
Subject: [RFC PATCH v2 00/16] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
Date: Sun, 9 Mar 2025 10:47:52 +0200 [thread overview]
Message-ID: <20250309084814.3114794-1-demonsingur@gmail.com> (raw)
This series adds new drivers for multiple Maxim GMSL2 and GMSL3 devices,
replacing the few GMSL2 drivers already in upstream, and introducing a
common framework that can be used to implement such GMSL chips, which
avoids code duplication while also adding support for previously
unsupported features.
While the normally acceptable and polite way would be to extend the
current mainline drivers, the choice was made here to add a totally new
set of drivers. The current drivers support only a small subset of the
possible features, and only a few devices, so the end result after
extending them would in any case be essentially fully rewritten, new
drivers.
This series depends on these two series:
* https://lore.kernel.org/lkml/20250306-fpc202-v9-0-2779af6780f6@bootlin.com
* https://lore.kernel.org/lkml/20250228151730.1874916-1-demonsingur@gmail.com
The following deserializers are supported:
* MAX96712 (already exists in staging)
* MAX96714 (already exists)
* MAX96716 (GMSL2)
* MAX96724 (part of existing MAX96712 driver)
* MAX9296A (GMSL2)
* MAX96792A (GMSL3)
The following serializers are supported:
* MAX96717 (already exists)
* MAX9295A (GMSL2)
* MAX96793 (GMSL3)
Missing features:
* The current TPG implementation makes use of the V4L2_CID_TEST_PATTERN
V4L2 control. With V4L2 streams support added, we would like to hook
up TPG using the internal pad feature which has not been accepted
upstream yet. We decided to leave TPG out for the moment and add it
back after internal pads have been accepted.
Known backward compatibility breakages:
* No default routing. Default routing has been intentionally ommitted
as the devices support quite complex routing and it would be
unfeasible to provide sane defaults for multi-link deserialziers.
It is expected that userspace programs would set appropritate
routing.
The following list enumerates new features that are supported by the
common framework and their respective chip-specific drivers:
* Full Streams API support. Most deserializers have support for more
than one link, and more than one PHY. Streams support allows
configuration of routing between these links and PHYs.
* .get_frame_desc() support. Both the serializers and deserializers
implement this to query and provide frame descriptor data. This is
used in features explained in-depth below.
* .get_mbus_config() support. The deserializers implement this to allow
upstream devices to query the link frequency of its pads.
* Address translation with I2C ATR for the serializers.
* I2C MUX where supported by the hardware for deserializers, otherwise
I2C ATR translation - some deserializers cannot do muxing since I2C
communication channel masking is not available per-link, and the only
other way to select links is to turn them off, causing link resets.
For such cases, I2C ATR is used to change the address of
the serializers at probe time.
* Automatic VC remapping on the deserializers. VCs are picked so that
if they were unique on the sink pad, they will end up as unique on
the source pad they are routed to too, prioritizing using the same
VC ID as the sink pad, to facilitate the possibility of using tunnel
mode.
* Automatic pixel mode / tunnel mode selection. Tunnel mode is used
when VC IDs do not need to be changed and all hardware supports
tunnel mode, otherwise, pixel mode is used. The serializers are
automatically switched between the two by using a private API.
* Automatic double mode selection. In pixel mode, double mode can be
used to pack two pixels into a single data unit, optimizing bandwidth
usage. The serializers are automatically set up to support the double
modes determined by the deserializers using a private API.
* Automatic data padding. In pixel mode, if the data being transferred
uses two different BPPs, data needs to be padded. The serializers
automatically set this up depending on the configured double mode
settings and incoming data types.
* Logging. Both the deserializers and serializers implement the V4L2
.log_status() ops to allow debugging of the internal state and
important chip status registers.
* PHY modes. Deserializer chips commonly have more than a single PHY.
The firmware ports are parsed to determine the modes in which to
configure the PHYs (2x4, 4x2, 1x4+2x2, 2x2+1x4, and variations using
fewer lanes).
* Serializer pinctrl. Serializers implement pinctrl to allow setting
configs which would otherwise be inaccessible through GPIO: TX/RX via
GMSL link, pull-up & pull-down (with strength), open-drain &
push-pull, slew rate, RCLK pin selection.
The drivers have been tested on the following hardware combinations, but
further testing is welcome to ensure no / minimal breakage:
* Raspberry Pi 5 + MAX96724 + 4xMAX96717 + 4xIMX219
* Raspberry Pi 5 + MAX96792A + 1xMAX96793 + 1xMAX96717 + 2xIMX219
* Raspberry Pi 5 + MAX96792A + 2xMAX96717 + 2xIMX219
* Renesas V4H + MAX96712 + 2xMAX96717 + 2xIMX219
Analog Devices is taking responsibility for the maintenance of these
drivers and common framework, and plans to add support for new
broad-market chips on top of them.
Special thanks go to Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
for testing the drivers, helping debug and coming up with ideas /
implementations for various features.
V2:
* add missing compatible for MAX96717F
* fix embarrassing dt-bindings mistakes
* move MAX9296A/MAX96716/MAX96792A to a separate file as they have two
links / PHYs, and adding those conditionally seems impossible
Cosmin Tanislav (16):
dt-bindings: media: i2c: max96717: add myself as maintainer
dt-bindings: media: i2c: max96717: reflow text
dt-bindings: media: i2c: max96717: add support for I2C ATR
dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf
dt-bindings: media: i2c: max96717: add support for MAX9295A
dt-bindings: media: i2c: max96717: add support for MAX96793
dt-bindings: media: i2c: max96712: add myself as maintainer
dt-bindings: media: i2c: max96712: use pattern properties for ports
dt-bindings: media: i2c: max96712: add support for I2C MUX
dt-bindings: media: i2c: max96712: add support for POC supplies
dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A
media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers
arm64: defconfig: disable deprecated MAX96712 driver
staging: media: remove MAX96712 driver
media: i2c: remove MAX96717 driver
media: i2c: remove MAX96714 driver
.../bindings/media/i2c/maxim,max9296a.yaml | 281 ++
.../bindings/media/i2c/maxim,max96712.yaml | 47 +-
.../media/i2c/maxim,max96717-pinctrl.yaml | 71 +
.../bindings/media/i2c/maxim,max96717.yaml | 80 +-
MAINTAINERS | 13 +-
arch/arm64/configs/defconfig | 1 -
drivers/media/i2c/Kconfig | 34 +-
drivers/media/i2c/Makefile | 3 +-
drivers/media/i2c/max96714.c | 1024 --------
drivers/media/i2c/max96717.c | 1103 --------
drivers/media/i2c/maxim-serdes/Kconfig | 53 +
drivers/media/i2c/maxim-serdes/Makefile | 6 +
drivers/media/i2c/maxim-serdes/max9296a.c | 1146 ++++++++
drivers/media/i2c/maxim-serdes/max96717.c | 1501 +++++++++++
drivers/media/i2c/maxim-serdes/max96724.c | 905 +++++++
drivers/media/i2c/maxim-serdes/max_des.c | 2321 +++++++++++++++++
drivers/media/i2c/maxim-serdes/max_des.h | 135 +
drivers/media/i2c/maxim-serdes/max_ser.c | 1584 +++++++++++
drivers/media/i2c/maxim-serdes/max_ser.h | 132 +
drivers/media/i2c/maxim-serdes/max_serdes.c | 302 +++
drivers/media/i2c/maxim-serdes/max_serdes.h | 88 +
drivers/staging/media/Kconfig | 2 -
drivers/staging/media/Makefile | 1 -
drivers/staging/media/max96712/Kconfig | 14 -
drivers/staging/media/max96712/Makefile | 2 -
drivers/staging/media/max96712/max96712.c | 487 ----
26 files changed, 8634 insertions(+), 2702 deletions(-)
create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml
create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max96717-pinctrl.yaml
delete mode 100644 drivers/media/i2c/max96714.c
delete mode 100644 drivers/media/i2c/max96717.c
create mode 100644 drivers/media/i2c/maxim-serdes/Kconfig
create mode 100644 drivers/media/i2c/maxim-serdes/Makefile
create mode 100644 drivers/media/i2c/maxim-serdes/max9296a.c
create mode 100644 drivers/media/i2c/maxim-serdes/max96717.c
create mode 100644 drivers/media/i2c/maxim-serdes/max96724.c
create mode 100644 drivers/media/i2c/maxim-serdes/max_des.c
create mode 100644 drivers/media/i2c/maxim-serdes/max_des.h
create mode 100644 drivers/media/i2c/maxim-serdes/max_ser.c
create mode 100644 drivers/media/i2c/maxim-serdes/max_ser.h
create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.c
create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.h
delete mode 100644 drivers/staging/media/max96712/Kconfig
delete mode 100644 drivers/staging/media/max96712/Makefile
delete mode 100644 drivers/staging/media/max96712/max96712.c
--
2.48.1
next reply other threads:[~2025-03-09 8:48 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 8:47 Cosmin Tanislav [this message]
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
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=20250309084814.3114794-1-demonsingur@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=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=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).