From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Spencer Hill <shill@d3engineering.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Spencer Hill <shill@d3engineering.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/2] media: i2c: Add driver for Sony IMX728
Date: Mon, 01 Jul 2024 11:25:01 +0200 [thread overview]
Message-ID: <5802879.DvuYhMxLoT@steina-w> (raw)
In-Reply-To: <20240628-imx728-driver-v2-2-80efa6774286@d3engineering.com>
Hi,
Am Freitag, 28. Juni 2024, 23:17:01 CEST schrieb Spencer Hill:
> Add a driver for the Sony IMX728 image sensor.
>
> Signed-off-by: Spencer Hill <shill@d3engineering.com>
> ---
> drivers/media/i2c/Kconfig | 11 +
> drivers/media/i2c/Makefile | 1 +
> drivers/media/i2c/imx728.c | 4660 ++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 4672 insertions(+)
>
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index c6d3ee472d81..46b6463c558a 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -233,6 +233,17 @@ config VIDEO_IMX415
> To compile this driver as a module, choose M here: the
> module will be called imx415.
>
> +config VIDEO_IMX728
> + tristate "Sony IMX728 sensor support"
> + depends on OF_GPIO
> + select V4L2_CCI_I2C
> + help
> + This is a Video4Linux2 sensor driver for the Sony
> + IMX728 camera.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called imx728.
> +
> config VIDEO_MAX9271_LIB
> tristate
>
> diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
> index dfbe6448b549..1188420ee1b4 100644
> --- a/drivers/media/i2c/Makefile
> +++ b/drivers/media/i2c/Makefile
> @@ -56,6 +56,7 @@ obj-$(CONFIG_VIDEO_IMX335) += imx335.o
> obj-$(CONFIG_VIDEO_IMX355) += imx355.o
> obj-$(CONFIG_VIDEO_IMX412) += imx412.o
> obj-$(CONFIG_VIDEO_IMX415) += imx415.o
> +obj-$(CONFIG_VIDEO_IMX728) += imx728.o
> obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
> obj-$(CONFIG_VIDEO_ISL7998X) += isl7998x.o
> obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
> diff --git a/drivers/media/i2c/imx728.c b/drivers/media/i2c/imx728.c
> new file mode 100644
> index 000000000000..190f54aaf4e9
> --- /dev/null
> +++ b/drivers/media/i2c/imx728.c
> @@ -0,0 +1,4660 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Sony IMX728 CMOS Image Sensor Driver
> + *
> + * Copyright (c) 2024 Define Design Deploy Corp
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/clk.h>
> +#include <linux/gpio/consumer.h>
> +#include <linux/i2c.h>
> +#include <linux/types.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/v4l2-mediabus.h>
> +#include <linux/videodev2.h>
> +#include <media/v4l2-subdev.h>
> +#include <media/v4l2-ctrls.h>
> +#include <media/v4l2-event.h>
> +#include <media/v4l2-cci.h>
> +
> +#define IMX728_FRAMERATE_MAX 30
Bindings state the framerate is up to 45 fps, to this should be
set accordingly.
> +#define IMX728_FRAMERATE_DEFAULT 30
> +#define IMX728_FRAMERATE_MIN 10
> +
> +#define IMX728_PIXEL_ARRAY_WIDTH 3857
> +#define IMX728_PIXEL_ARRAY_HEIGHT 2177
> +#define IMX728_PIXEL_ARRAY_MARGIN_TOP 9
> +#define IMX728_PIXEL_ARRAY_MARGIN_LEFT 8
> +#define IMX728_PIXEL_ARRAY_RECORDING_WIDTH 3840
> +#define IMX728_PIXEL_ARRAY_RECORDING_HEIGHT 2160
> +
> +#define IMX728_PIXEL_RATE 248832000
> +#define IMX728_LINK_FREQ 800000000
> +
> +#define IMX728_EXPOSURE_DEFAULT 10000
> +
> +#define IMX728_PM_IDLE_TIMEOUT 1000
> +
> +#define IMX728_REG_STATE CCI_REG8(0x2CAC)
> +#define IMX728_REG_PG_00 CCI_REG16_LE(0x1A2A)
> +#define IMX728_REG_PG_01 CCI_REG24_LE(0x1A30)
> +#define IMX728_REG_PG_02 CCI_REG24_LE(0x1A38)
> +#define IMX728_REG_PG_03 CCI_REG8(0xB58F)
> +#define IMX728_REG_PG_04 CCI_REG8(0xB6C5)
> +#define IMX728_REG_PG_05 CCI_REG16_LE(0x1A2C)
> +#define IMX728_REG_PG_06 CCI_REG8(0xB58E)
> +#define IMX728_REG_PG_07 CCI_REG8(0xB6C4)
> +#define IMX728_REG_EXPOSURE_00 CCI_REG32_LE(0x98DC)
> +#define IMX728_REG_EXPOSURE_01 CCI_REG32_LE(0x98E4)
> +#define IMX728_REG_EXPOSURE_02 CCI_REG32_LE(0x98EC)
> +#define IMX728_REG_AGAIN_00 CCI_REG32_LE(0x98F8)
> +#define IMX728_REG_AGAIN_01 CCI_REG32_LE(0x98FC)
> +#define IMX728_REG_AGAIN_02 CCI_REG32_LE(0x9900)
> +#define IMX728_REG_AGAIN_03 CCI_REG32_LE(0x9904)
> +#define IMX728_REG_AGAIN_04 CCI_REG32_LE(0x9908)
> +#define IMX728_REG_FLIP CCI_REG8(0x9651)
> +#define IMX728_REG_HFLIP CCI_REG8(0xB67C)
> +#define IMX728_REG_VFLIP CCI_REG8(0xB67D)
> +#define IMX728_REG_VMINOR CCI_REG8(0x6000)
> +#define IMX728_REG_VMAJOR CCI_REG8(0x6002)
> +#define IMX728_REG_RESET_0 CCI_REG8(0xB661)
> +#define IMX728_REG_RESET_1 CCI_REG8(0x95C5)
> +#define IMX728_REG_INCK_0 CCI_REG8(0x1B20)
> +#define IMX728_REG_INCK_1 CCI_REG8(0x1B1C)
> +#define IMX728_REG_SLEEP CCI_REG8(0x1B05)
> +#define IMX728_REG_REGMAP CCI_REG8(0xFFFF)
> +#define IMX728_REG_HDR_00 CCI_REG32_LE(0x9C60)
> +#define IMX728_REG_HDR_01 CCI_REG32_LE(0x9C6C)
> +#define IMX728_REG_HDR_02 CCI_REG32_LE(0x9C64)
> +#define IMX728_REG_HDR_03 CCI_REG32_LE(0x9C70)
> +#define IMX728_REG_HDR_04 CCI_REG16_LE(0x9C68)
> +#define IMX728_REG_HDR_05 CCI_REG16_LE(0x9C74)
> +#define IMX728_REG_HDR_06 CCI_REG16_LE(0x9C6A)
> +#define IMX728_REG_HDR_07 CCI_REG16_LE(0x9C76)
> +#define IMX728_REG_AE_MODE CCI_REG8(0x98AC)
> +#define IMX728_REG_AWBMODE CCI_REG8(0xA248)
> +#define IMX728_REG_AWB_EN CCI_REG8(0x1808)
> +#define IMX728_REG_UNIT_00 CCI_REG8(0x98E0)
> +#define IMX728_REG_UNIT_01 CCI_REG8(0x98E8)
> +#define IMX728_REG_UNIT_02 CCI_REG8(0x98F0)
> +#define IMX728_REG_MD_00 CCI_REG8(0x1708)
> +#define IMX728_REG_MD_01 CCI_REG8(0x1709)
> +#define IMX728_REG_MD_02 CCI_REG8(0x170A)
> +#define IMX728_REG_MD_03 CCI_REG8(0x1B40)
> +#define IMX728_REG_MODE_SEL CCI_REG16_LE(0x9728)
> +#define IMX728_REG_OUT_MODE CCI_REG8(0xEC7E)
> +#define IMX728_REG_OB_0 CCI_REG16_LE(0xEC12)
> +#define IMX728_REG_OB_1 CCI_REG8(0xEC14)
> +#define IMX728_REG_SKEW CCI_REG8(0x1761)
> +#define IMX728_REG_SUBP_0 CCI_REG8(0x9714)
> +#define IMX728_REG_SUBP_1 CCI_REG8(0xB684)
> +#define IMX728_REG_STREAM_00 CCI_REG8(0x9789)
> +#define IMX728_REG_STREAM_01 CCI_REG8(0x95C1)
> +#define IMX728_REG_STREAM_02 CCI_REG8(0x1B04)
Can you sort them by register address?
> +#define IMX728_REG_CTRL_POINT_X(i) CCI_REG32(0xA198 + (i) * 8)
> +#define IMX728_REG_CTRL_POINT_Y(i) (IMX728_REG_CTRL_POINT_X(i) + 4)
>[snip]
Best regards,
Alexander
> --
> 2.43.0
>
> Please be aware that this email includes email addresses outside of the organization.
>
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
next prev parent reply other threads:[~2024-07-01 9:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 21:16 [PATCH v2 0/2] media: i2c: Add driver for Sony IMX728 Spencer Hill
2024-06-28 21:17 ` [PATCH v2 1/2] media: dt-bindings: Add " Spencer Hill
2024-07-01 9:36 ` Krzysztof Kozlowski
2024-07-02 6:56 ` Krzysztof Kozlowski
2024-07-01 19:28 ` Rob Herring (Arm)
2024-06-28 21:17 ` [PATCH v2 2/2] media: i2c: Add driver for " Spencer Hill
2024-06-29 20:51 ` Kieran Bingham
2024-06-30 6:15 ` Markus Elfring
2024-07-01 9:25 ` Alexander Stein [this message]
2024-07-01 14:00 ` Dave Stevenson
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=5802879.DvuYhMxLoT@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sakari.ailus@linux.intel.com \
--cc=shawnguo@kernel.org \
--cc=shill@d3engineering.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