Skip to content

Commit 4546b86

Browse files
6by9pelwell
authored andcommitted
media: i2c: imx290: Add configuration for IMX462
Commit c699b6c upstream. IMX462 is the successor to IMX290, and wants very minor changes to the register setup. Add the relevant configuration to support it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 4be2a1a commit 4546b86

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

drivers/media/i2c/imx290.c

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ enum imx290_model {
172172
IMX290_MODEL_IMX290LQR,
173173
IMX290_MODEL_IMX290LLR,
174174
IMX290_MODEL_IMX327LQR,
175+
IMX290_MODEL_IMX462LQR,
176+
IMX290_MODEL_IMX462LLR,
175177
};
176178

177179
struct imx290_model_info {
@@ -318,6 +320,50 @@ static const struct cci_reg_sequence imx290_global_init_settings_290[] = {
318320
{ CCI_REG8(0x33b3), 0x04 },
319321
};
320322

323+
static const struct cci_reg_sequence imx290_global_init_settings_462[] = {
324+
{ CCI_REG8(0x300f), 0x00 },
325+
{ CCI_REG8(0x3010), 0x21 },
326+
{ CCI_REG8(0x3011), 0x02 },
327+
{ CCI_REG8(0x3016), 0x09 },
328+
{ CCI_REG8(0x3070), 0x02 },
329+
{ CCI_REG8(0x3071), 0x11 },
330+
{ CCI_REG8(0x309b), 0x10 },
331+
{ CCI_REG8(0x309c), 0x22 },
332+
{ CCI_REG8(0x30a2), 0x02 },
333+
{ CCI_REG8(0x30a6), 0x20 },
334+
{ CCI_REG8(0x30a8), 0x20 },
335+
{ CCI_REG8(0x30aa), 0x20 },
336+
{ CCI_REG8(0x30ac), 0x20 },
337+
{ CCI_REG8(0x30b0), 0x43 },
338+
{ CCI_REG8(0x3119), 0x9e },
339+
{ CCI_REG8(0x311c), 0x1e },
340+
{ CCI_REG8(0x311e), 0x08 },
341+
{ CCI_REG8(0x3128), 0x05 },
342+
{ CCI_REG8(0x313d), 0x83 },
343+
{ CCI_REG8(0x3150), 0x03 },
344+
{ CCI_REG8(0x317e), 0x00 },
345+
{ CCI_REG8(0x32b8), 0x50 },
346+
{ CCI_REG8(0x32b9), 0x10 },
347+
{ CCI_REG8(0x32ba), 0x00 },
348+
{ CCI_REG8(0x32bb), 0x04 },
349+
{ CCI_REG8(0x32c8), 0x50 },
350+
{ CCI_REG8(0x32c9), 0x10 },
351+
{ CCI_REG8(0x32ca), 0x00 },
352+
{ CCI_REG8(0x32cb), 0x04 },
353+
{ CCI_REG8(0x332c), 0xd3 },
354+
{ CCI_REG8(0x332d), 0x10 },
355+
{ CCI_REG8(0x332e), 0x0d },
356+
{ CCI_REG8(0x3358), 0x06 },
357+
{ CCI_REG8(0x3359), 0xe1 },
358+
{ CCI_REG8(0x335a), 0x11 },
359+
{ CCI_REG8(0x3360), 0x1e },
360+
{ CCI_REG8(0x3361), 0x61 },
361+
{ CCI_REG8(0x3362), 0x10 },
362+
{ CCI_REG8(0x33b0), 0x50 },
363+
{ CCI_REG8(0x33b2), 0x1a },
364+
{ CCI_REG8(0x33b3), 0x04 },
365+
};
366+
321367
#define IMX290_NUM_CLK_REGS 2
322368
static const struct cci_reg_sequence xclk_regs[][IMX290_NUM_CLK_REGS] = {
323369
[IMX290_CLK_37_125] = {
@@ -1455,6 +1501,20 @@ static const struct imx290_model_info imx290_models[] = {
14551501
.max_analog_gain = 98,
14561502
.name = "imx327",
14571503
},
1504+
[IMX290_MODEL_IMX462LQR] = {
1505+
.colour_variant = IMX290_VARIANT_COLOUR,
1506+
.init_regs = imx290_global_init_settings_462,
1507+
.init_regs_num = ARRAY_SIZE(imx290_global_init_settings_462),
1508+
.max_analog_gain = 98,
1509+
.name = "imx462",
1510+
},
1511+
[IMX290_MODEL_IMX462LLR] = {
1512+
.colour_variant = IMX290_VARIANT_MONO,
1513+
.init_regs = imx290_global_init_settings_462,
1514+
.init_regs_num = ARRAY_SIZE(imx290_global_init_settings_462),
1515+
.max_analog_gain = 98,
1516+
.name = "imx462",
1517+
},
14581518
};
14591519

14601520
static int imx290_parse_dt(struct imx290 *imx290)
@@ -1650,6 +1710,12 @@ static const struct of_device_id imx290_of_match[] = {
16501710
}, {
16511711
.compatible = "sony,imx327lqr",
16521712
.data = &imx290_models[IMX290_MODEL_IMX327LQR],
1713+
}, {
1714+
.compatible = "sony,imx462lqr",
1715+
.data = &imx290_models[IMX290_MODEL_IMX462LQR],
1716+
}, {
1717+
.compatible = "sony,imx462llr",
1718+
.data = &imx290_models[IMX290_MODEL_IMX462LLR],
16531719
},
16541720
{ /* sentinel */ },
16551721
};

0 commit comments

Comments
 (0)