From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Jai Luthra <jai.luthra@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Alexander Shiyan <eagle.alexander923@gmail.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: [PATCH v2 11/13] media: sony-starvis2: Add support for IMX832
Date: Tue, 13 Oct 2026 16:17:10 +0100 [thread overview]
Message-ID: <20261013-media-starvis2-v2-11-3670722d250a@raspberrypi.com> (raw)
In-Reply-To: <20261013-media-starvis2-v2-0-3670722d250a@raspberrypi.com>
IMX832 is replacing IMX662, and it follows the same pattern as all the
Starvis2 sensors.
Add the sensor specific configuration for it.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/media/i2c/sony-starvis2.c | 118 ++++++++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
diff --git a/drivers/media/i2c/sony-starvis2.c b/drivers/media/i2c/sony-starvis2.c
index 084c7772abad..1a2a5d45bcc5 100644
--- a/drivers/media/i2c/sony-starvis2.c
+++ b/drivers/media/i2c/sony-starvis2.c
@@ -12,6 +12,8 @@
* pixels.
* IMX675: Diagonal 6.53mm (Type 1/2.8) CMOS image sensor with 5.12 M effective
* pixels.
+ * IMX832: Diagonal 6.45mm (Type 1/2.8) CMOS image sensor with 2.12 M effective
+ * pixels.
*
* Copyright (C) 2026 Ideas On Board Oy.
*
@@ -982,6 +984,99 @@ const struct starvis2_variant imx675_variant_def = {
.hmax_min_pixel_array = 528,
};
+static const struct cci_reg_sequence imx832_common_regs[] = {
+ { CCI_REG8(0x3460), 0x21 },
+ { CCI_REG8(0x3a94), 0x75 },
+ { CCI_REG8(0x3a96), 0x69 },
+ { CCI_REG8(0x3a98), 0x1e },
+ { CCI_REG8(0x3a9a), 0x1e },
+ { CCI_REG8(0x3b58), 0xeb },
+ { CCI_REG8(0x3b5c), 0xeb },
+ { CCI_REG8(0x3b88), 0xeb },
+ { CCI_REG8(0x3b8c), 0xeb },
+ { CCI_REG8(0x3c40), 0x06 },
+ { CCI_REG8(0x3cae), 0x79 },
+ { CCI_REG8(0x3cbc), 0x7b },
+ { CCI_REG8(0x4508), 0x00 },
+ { CCI_REG8(0x4509), 0x02 },
+ { CCI_REG8(0x450a), 0x41 },
+ { CCI_REG8(0x450b), 0x03 },
+ { CCI_REG8(0x4660), 0x12 },
+ { CCI_REG8(0x4661), 0x00 },
+ { CCI_REG8(0x4662), 0x29 },
+ { CCI_REG8(0x4664), 0x12 },
+ { CCI_REG8(0x4665), 0x00 },
+ { CCI_REG8(0x4666), 0x25 },
+ { CCI_REG8(0x4667), 0x03 },
+ { CCI_REG8(0x46c0), 0x13 },
+ { CCI_REG8(0x46c1), 0x00 },
+ { CCI_REG8(0x46c2), 0x28 },
+ { CCI_REG8(0x46c4), 0x13 },
+ { CCI_REG8(0x46c5), 0x00 },
+ { CCI_REG8(0x46c6), 0x24 },
+ { CCI_REG8(0x46c7), 0x03 },
+ { CCI_REG8(0x4720), 0x07 },
+ { CCI_REG8(0x4721), 0x00 },
+ { CCI_REG8(0x4722), 0x23 },
+ { CCI_REG8(0x4723), 0x03 },
+ { CCI_REG8(0x4724), 0x14 },
+ { CCI_REG8(0x4725), 0x00 },
+ { CCI_REG8(0x4726), 0x2a },
+ { CCI_REG8(0x4750), 0x1e },
+ { CCI_REG8(0x4752), 0x22 },
+ { CCI_REG8(0x4753), 0x03 },
+ { CCI_REG8(0x4754), 0x25 },
+ { CCI_REG8(0x4755), 0x00 },
+ { CCI_REG8(0x4756), 0x29 },
+ { CCI_REG8(0x4780), 0x08 },
+ { CCI_REG8(0x4781), 0x00 },
+ { CCI_REG8(0x4782), 0x1d },
+ { CCI_REG8(0x4783), 0x03 },
+ { CCI_REG8(0x4784), 0x15 },
+ { CCI_REG8(0x4785), 0x00 },
+ { CCI_REG8(0x4786), 0x24 },
+ { STARVIS2_REG_WDMODE, 0x00 },
+ { STARVIS2_REG_MDBIT, 0x01 },
+ { STARVIS2_REG_XXS_DRV, 0x00 },
+};
+
+static const u16 imx832_min_hmax_2lane[] = {
+ [STARVIS2_LINK_FREQ_297MHZ] = 1980,
+ [STARVIS2_LINK_FREQ_360MHZ] = 1980,
+ [STARVIS2_LINK_FREQ_445MHZ] = 1188,
+ [STARVIS2_LINK_FREQ_594MHZ] = 990,
+ [STARVIS2_LINK_FREQ_720MHZ] = 990,
+ [STARVIS2_LINK_FREQ_891MHZ] = 990,
+ [STARVIS2_LINK_FREQ_1039MHZ] = 990,
+ [STARVIS2_LINK_FREQ_1188MHZ] = 990,
+};
+
+const struct starvis2_variant imx832_variant_def = {
+ .name = "imx832",
+ .id_reg = CCI_REG16_LE(0x4d1c),
+ .id_mask = 0x3ff,
+ .id_value = 0x340,
+ .native_area = {
+ .top = 0,
+ .left = 0,
+ .width = 1937,
+ .height = 1101,
+ },
+ .active_area = {
+ .top = 0,
+ .left = 0,
+ .width = 1936,
+ .height = 1096,
+ },
+ .pixel_rate = 222750000,
+ .pix_per_clk = 3,
+ .common_regs = imx832_common_regs,
+ .num_common_regs = ARRAY_SIZE(imx832_common_regs),
+ .vmax_default = 1136,
+ .hmax_min_link_freq = imx832_min_hmax_2lane,
+ .hmax_min_pixel_array = 990,
+};
+
struct starvis2_model_info {
enum starvis2_type type;
const u32 *codes;
@@ -1052,6 +1147,26 @@ static const struct starvis2_model_info imx675_autodetect_info = {
.auto_detect_mono = &imx675_aamr_info,
};
+static const struct starvis2_model_info imx832_aqr_info = {
+ .type = STARVIS2_COLOR,
+ .codes = codes_bayer,
+ .num_codes = ARRAY_SIZE(codes_bayer),
+ .variant = &imx832_variant_def,
+};
+
+static const struct starvis2_model_info imx832_amr_info = {
+ .type = STARVIS2_MONOCHROME,
+ .codes = codes_monochrome,
+ .num_codes = ARRAY_SIZE(codes_monochrome),
+ .variant = &imx832_variant_def,
+};
+
+static const struct starvis2_model_info imx832_autodetect_info = {
+ .variant = &imx832_variant_def,
+ .auto_detect_colour = &imx832_aqr_info,
+ .auto_detect_mono = &imx832_amr_info,
+};
+
static const char * const starvis2_supply_name[] = {
"avdd", /* Analog (3.3V) supply */
"dvdd", /* Digital Core (1.1V) supply */
@@ -1864,10 +1979,13 @@ static const struct of_device_id starvis2_of_match[] = {
{ .compatible = "sony,imx675-aaqr", .data = &imx675_aaqr_info },
{ .compatible = "sony,imx662-aamr", .data = &imx662_aamr_info },
{ .compatible = "sony,imx662-aaqr", .data = &imx662_aaqr_info },
+ { .compatible = "sony,imx832-amr", .data = &imx832_amr_info },
+ { .compatible = "sony,imx832-aqr", .data = &imx832_aqr_info },
/* for non-conforming DTs that rely on runtime check */
{ .compatible = "sony,imx678", .data = &imx678_autodetect_info },
{ .compatible = "sony,imx675", .data = &imx675_autodetect_info },
{ .compatible = "sony,imx662", .data = &imx662_autodetect_info },
+ { .compatible = "sony,imx832", .data = &imx832_autodetect_info },
{ /* sentinel */ }
};
--
2.34.1
next prev parent reply other threads:[~2026-10-13 15:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 15:16 [PATCH v2 00/13] Update imx678 to act as a common Sony Starvis 2 driver Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 01/13] media: imx678: Rework into generic Starvis 2 sensor driver Dave Stevenson
2026-10-14 22:01 ` kernel test robot
2026-10-13 15:17 ` [PATCH v2 02/13] media: sony-starvis2: Reorder link frequencies to remove lookup Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 03/13] media: sony-starvis2: Always program the sensor in window mode Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 04/13] media: sony-starvis2: Parameterise the configuration to allow for other models Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 05/13] media: sony-starvis2: Rework 2 lane support for higher link freqs Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 06/13] media: sony-starvis2: Allow runtime control of link frequency Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 07/13] media: sony-starvis2: Correct the minimum exposure Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 08/13] media: dt-bindings: sony,imx678: Add other Starvis 2 family members Dave Stevenson
2026-10-14 11:27 ` Krzysztof Kozlowski
2026-10-13 15:17 ` [PATCH v2 09/13] media: sony-starvis2: Add support for IMX662 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 10/13] media: sony-starvis2: Add support for IMX675 Dave Stevenson
2026-10-13 15:17 ` Dave Stevenson [this message]
2026-10-13 15:17 ` [PATCH v2 12/13] media: sony-starvis2: Only update bits for window mode Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 13/13] media: sony-starvis2: Add support for IMX585 Dave Stevenson
2026-10-14 13:50 ` Jai Luthra
2026-10-14 14:06 ` 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=20261013-media-starvis2-v2-11-3670722d250a@raspberrypi.com \
--to=dave.stevenson@raspberrypi.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eagle.alexander923@gmail.com \
--cc=jai.luthra@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.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
all inboxes | Powered by JetHome®