linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cosmin Tanislav <demonsingur@gmail.com>
To: "Julien Massot" <julien.massot@collabora.com>,
	"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
	"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Linus Walleij" <linus.walleij@linaro.org>
Cc: 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: [PATCH v5 18/24] media: i2c: maxim-serdes: add MAX96717 driver
Date: Thu, 3 Jul 2025 15:31:58 +0300	[thread overview]
Message-ID: <5fad0945-27a5-4c49-8f20-59c197fc1ba0@gmail.com> (raw)
In-Reply-To: <b591e7daf1e351fbfee181fcce399db08b28faf9.camel@collabora.com>



On 7/3/25 3:16 PM, Julien Massot wrote:
> On Wed, 2025-07-02 at 16:20 +0300, Cosmin Tanislav wrote:
>> Add a new MAX96717 driver that also supports MAX9295A, MAX96717F and
>> MAX96793.
>>
>> Integrate it with the common serializer framework, while keeping
>> compatibility with existing usecases, avoiding code duplication, and
>> also enabling more features across all chips.
>>
>> Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
>> ---
>>   drivers/media/i2c/maxim-serdes/Kconfig    |   16 +
>>   drivers/media/i2c/maxim-serdes/Makefile   |    1 +
>>   drivers/media/i2c/maxim-serdes/max96717.c | 1685 +++++++++++++++++++++
>>   3 files changed, 1702 insertions(+)
>>   create mode 100644 drivers/media/i2c/maxim-serdes/max96717.c
>>
>> diff --git a/drivers/media/i2c/maxim-serdes/Kconfig b/drivers/media/i2c/maxim-serdes/Kconfig
>> index cae1d5a1293e..648cb891eefe 100644
>> --- a/drivers/media/i2c/maxim-serdes/Kconfig
>> +++ b/drivers/media/i2c/maxim-serdes/Kconfig
>> @@ -14,3 +14,19 @@ config VIDEO_MAXIM_SERDES
>>   
>>   	  To compile this driver as a module, choose M here: the module
>>   	  will be called max_serdes.
>> +
>> +config VIDEO_MAX96717
>> +	tristate "Maxim MAX96717 Serializer support"
>> +	depends on COMMON_CLK
>> +	select VIDEO_MAXIM_SERDES
>> +	select GENERIC_PINCONF
>> +	select GENERIC_PINCTRL_GROUPS
>> +	select GENERIC_PINMUX_FUNCTIONS
>> +	select GPIOLIB
>> +	help
>> +	  This driver supports the Maxim MAX9295A, MAX96717, MAX96717F,
>> +	  MAX96793 Serializers, which receive video on a MIPI CSI-2
>> +	  interface and output it on a GMSL2/3 link.
>> +
>> +	  To compile this driver as a module, choose M here: the module
>> +	  will be called max96717.
>> diff --git a/drivers/media/i2c/maxim-serdes/Makefile b/drivers/media/i2c/maxim-serdes/Makefile
>> index b54326a5c81b..04abda6a5437 100644
>> --- a/drivers/media/i2c/maxim-serdes/Makefile
>> +++ b/drivers/media/i2c/maxim-serdes/Makefile
>> @@ -1,3 +1,4 @@
>>   # SPDX-License-Identifier: GPL-2.0
>>   max-serdes-objs := max_serdes.o max_ser.o max_des.o
>>   obj-$(CONFIG_VIDEO_MAXIM_SERDES) += max-serdes.o
>> +obj-$(CONFIG_VIDEO_MAX96717) += max96717.o
>> diff --git a/drivers/media/i2c/maxim-serdes/max96717.c b/drivers/media/i2c/maxim-serdes/max96717.c
>> new file mode 100644
>> index 000000000000..60b285e547b7
>> --- /dev/null
>> +++ b/drivers/media/i2c/maxim-serdes/max96717.c
>> @@ -0,0 +1,1685 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Maxim MAX96717 GMSL2 Serializer Driver
>> + *
>> + * Copyright (C) 2025 Analog Devices Inc.
>> + */
>> +
>> +#include <linux/clk.h>
>> +#include <linux/clk-provider.h>
>> +#include <linux/gpio/driver.h>
>> +#include <linux/pinctrl/pinctrl.h>
>> +#include <linux/pinctrl/pinmux.h>
>> +#include <linux/pinctrl/pinconf.h>
>> +#include <linux/pinctrl/pinconf-generic.h>
>> +#include <linux/regmap.h>
>> +
>> +#include "max_ser.h"
>> +
>> +#define MAX96717_REG0				0x0
>> +
>> +#define MAX96717_REG2				0x2
>> +#define MAX96717_REG2_VID_TX_EN_P(p)		BIT(4 + (p))
>> +
>> +#define MAX96717_REG3				0x3
>> +#define MAX96717_REG3_RCLKSEL			GENMASK(1, 0)
>> +#define MAX96717_REG3_RCLK_ALT			BIT(2)
>> +
>> +#define MAX96717_REG6				0x6
>> +#define MAX96717_REG6_RCLKEN			BIT(5)
>> +
>> +#define MAX96717_I2C_2(x)			(0x42 + (x) * 0x2)
>> +#define MAX96717_I2C_2_SRC			GENMASK(7, 1)
>> +
>> +#define MAX96717_I2C_3(x)			(0x43 + (x) * 0x2)
>> +#define MAX96717_I2C_3_DST			GENMASK(7, 1)
>> +
>> +#define MAX96717_TX3(p)				(0x53 + (p) * 0x4)
>> +#define MAX96717_TX3_TX_STR_SEL			GENMASK(1, 0)
>> +
>> +#define MAX96717_VIDEO_TX0(p)			(0x100 + (p) * 0x8)
> This is a bit confusing, looks like this register address is valid for MAX9295a VIDEO_TX0
> but not for MAX96717, VIDEO_TX0 (Z) is at 0x110.
> 

See pipe_hw_ids field of max96717_chip_info.
MAX9295A has pipes 0, 1, 2, 3, MAX96717 has pipe 2 only.
Registers and strides are the same, just pipes are missing.

> 
> 


  reply	other threads:[~2025-07-03 12:32 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 13:20 [PATCH v5 00/24] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 01/24] media: mc: Add INTERNAL pad flag Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 02/24] dt-bindings: media: i2c: max96717: add myself as maintainer Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 03/24] dt-bindings: media: i2c: max96717: add support for I2C ATR Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 04/24] dt-bindings: media: i2c: max96717: add support for pinctrl/pinconf Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 05/24] dt-bindings: media: i2c: max96717: add support for MAX9295A Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 06/24] dt-bindings: media: i2c: max96717: add support for MAX96793 Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 07/24] dt-bindings: media: i2c: max96712: add myself as maintainer Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 08/24] dt-bindings: media: i2c: max96712: use pattern properties for ports Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 09/24] dt-bindings: media: i2c: max96712: add support for I2C ATR Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 10/24] dt-bindings: media: i2c: max96712: add support for POC supplies Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 11/24] dt-bindings: media: i2c: max96712: add support for MAX96724F/R Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 12/24] dt-bindings: media: i2c: max96714: add myself as maintainer Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 13/24] dt-bindings: media: i2c: max96714: add support for MAX96714R Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 14/24] dt-bindings: media: i2c: add MAX9296A, MAX96716A, MAX96792A Cosmin Tanislav
2025-07-02 16:14   ` Rob Herring (Arm)
2025-07-02 13:20 ` [PATCH v5 15/24] media: i2c: add Maxim GMSL2/3 serializer and deserializer framework Cosmin Tanislav
2025-07-03 12:08   ` Julien Massot
2025-07-03 12:21     ` Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 16/24] media: i2c: add Maxim GMSL2/3 serializer framework Cosmin Tanislav
2025-07-03 12:10   ` Julien Massot
2025-07-03 12:24     ` Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 17/24] media: i2c: add Maxim GMSL2/3 deserializer framework Cosmin Tanislav
2025-07-03 12:13   ` Julien Massot
2025-07-03 12:29     ` Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 18/24] media: i2c: maxim-serdes: add MAX96717 driver Cosmin Tanislav
2025-07-03 12:16   ` Julien Massot
2025-07-03 12:31     ` Cosmin Tanislav [this message]
2025-07-03 14:03       ` Julien Massot
2025-07-02 13:20 ` [PATCH v5 19/24] media: i2c: maxim-serdes: add MAX96724 driver Cosmin Tanislav
2025-07-02 14:45   ` Niklas Söderlund
2025-07-02 13:20 ` [PATCH v5 20/24] media: i2c: maxim-serdes: add MAX9296A driver Cosmin Tanislav
2025-07-03 12:19   ` Julien Massot
2025-07-02 13:20 ` [PATCH v5 21/24] arm64: defconfig: disable deprecated MAX96712 driver Cosmin Tanislav
2025-07-02 14:48   ` Niklas Söderlund
2025-07-02 13:20 ` [PATCH v5 22/24] staging: media: remove " Cosmin Tanislav
2025-07-02 14:54   ` Niklas Söderlund
2025-07-02 13:20 ` [PATCH v5 23/24] media: i2c: remove MAX96717 driver Cosmin Tanislav
2025-07-02 13:20 ` [PATCH v5 24/24] media: i2c: remove MAX96714 driver Cosmin Tanislav
2025-07-03 12:07 ` [PATCH v5 00/24] media: i2c: add Maxim GMSL2/3 serializer and deserializer drivers Julien Massot
2025-07-03 12:17   ` Cosmin Tanislav
2025-07-03 13:54     ` Julien Massot
2025-07-03 14:46       ` Cosmin Tanislav
2025-07-04  7:11         ` Julien Massot
2025-07-16 18:54 ` vivekana

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=5fad0945-27a5-4c49-8f20-59c197fc1ba0@gmail.com \
    --to=demonsingur@gmail.com \
    --cc=cosmin.tanislav@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=julien.massot@collabora.com \
    --cc=laurent.pinchart@ideasonboard.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=niklas.soderlund@ragnatech.se \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen+renesas@ideasonboard.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).