Skip to content

Commit 03b267b

Browse files
committed
media: i2c: imx290: Add configuration for IMX462
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 <[email protected]>
1 parent 010cbe3 commit 03b267b

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
@@ -180,6 +180,8 @@ enum imx290_model {
180180
IMX290_MODEL_IMX290LQR,
181181
IMX290_MODEL_IMX290LLR,
182182
IMX290_MODEL_IMX327LQR,
183+
IMX290_MODEL_IMX462LQR,
184+
IMX290_MODEL_IMX462LLR,
183185
};
184186

185187
struct imx290_model_info {
@@ -326,6 +328,50 @@ static const struct cci_reg_sequence imx290_global_init_settings_290[] = {
326328
{ CCI_REG8(0x33b3), 0x04 },
327329
};
328330

331+
static const struct cci_reg_sequence imx290_global_init_settings_462[] = {
332+
{ CCI_REG8(0x300f), 0x00 },
333+
{ CCI_REG8(0x3010), 0x21 },
334+
{ CCI_REG8(0x3011), 0x00 },
335+
{ CCI_REG8(0x3016), 0x09 },
336+
{ CCI_REG8(0x3070), 0x02 },
337+
{ CCI_REG8(0x3071), 0x11 },
338+
{ CCI_REG8(0x309b), 0x10 },
339+
{ CCI_REG8(0x309c), 0x22 },
340+
{ CCI_REG8(0x30a2), 0x02 },
341+
{ CCI_REG8(0x30a6), 0x20 },
342+
{ CCI_REG8(0x30a8), 0x20 },
343+
{ CCI_REG8(0x30aa), 0x20 },
344+
{ CCI_REG8(0x30ac), 0x20 },
345+
{ CCI_REG8(0x30b0), 0x43 },
346+
{ CCI_REG8(0x3119), 0x9e },
347+
{ CCI_REG8(0x311c), 0x1e },
348+
{ CCI_REG8(0x311e), 0x08 },
349+
{ CCI_REG8(0x3128), 0x05 },
350+
{ CCI_REG8(0x313d), 0x83 },
351+
{ CCI_REG8(0x3150), 0x03 },
352+
{ CCI_REG8(0x317e), 0x00 },
353+
{ CCI_REG8(0x32b8), 0x50 },
354+
{ CCI_REG8(0x32b9), 0x10 },
355+
{ CCI_REG8(0x32ba), 0x00 },
356+
{ CCI_REG8(0x32bb), 0x04 },
357+
{ CCI_REG8(0x32c8), 0x50 },
358+
{ CCI_REG8(0x32c9), 0x10 },
359+
{ CCI_REG8(0x32ca), 0x00 },
360+
{ CCI_REG8(0x32cb), 0x04 },
361+
{ CCI_REG8(0x332c), 0xd3 },
362+
{ CCI_REG8(0x332d), 0x10 },
363+
{ CCI_REG8(0x332e), 0x0d },
364+
{ CCI_REG8(0x3358), 0x06 },
365+
{ CCI_REG8(0x3359), 0xe1 },
366+
{ CCI_REG8(0x335a), 0x11 },
367+
{ CCI_REG8(0x3360), 0x1e },
368+
{ CCI_REG8(0x3361), 0x61 },
369+
{ CCI_REG8(0x3362), 0x10 },
370+
{ CCI_REG8(0x33b0), 0x50 },
371+
{ CCI_REG8(0x33b2), 0x1a },
372+
{ CCI_REG8(0x33b3), 0x04 },
373+
};
374+
329375
#define IMX290_NUM_CLK_REGS 2
330376
static const struct cci_reg_sequence xclk_regs[][IMX290_NUM_CLK_REGS] = {
331377
[IMX290_CLK_37_125] = {
@@ -1459,6 +1505,20 @@ static const struct imx290_model_info imx290_models[] = {
14591505
.max_analog_gain = 98,
14601506
.name = "imx327",
14611507
},
1508+
[IMX290_MODEL_IMX462LQR] = {
1509+
.colour_variant = IMX290_VARIANT_COLOUR,
1510+
.init_regs = imx290_global_init_settings_290,
1511+
.init_regs_num = ARRAY_SIZE(imx290_global_init_settings_290),
1512+
.max_analog_gain = 98,
1513+
.name = "imx462",
1514+
},
1515+
[IMX290_MODEL_IMX462LLR] = {
1516+
.colour_variant = IMX290_VARIANT_MONO,
1517+
.init_regs = imx290_global_init_settings_462,
1518+
.init_regs_num = ARRAY_SIZE(imx290_global_init_settings_462),
1519+
.max_analog_gain = 98,
1520+
.name = "imx462",
1521+
},
14621522
};
14631523

14641524
static int imx290_parse_dt(struct imx290 *imx290)
@@ -1654,6 +1714,12 @@ static const struct of_device_id imx290_of_match[] = {
16541714
}, {
16551715
.compatible = "sony,imx327lqr",
16561716
.data = &imx290_models[IMX290_MODEL_IMX327LQR],
1717+
}, {
1718+
.compatible = "sony,imx462lqr",
1719+
.data = &imx290_models[IMX290_MODEL_IMX462LQR],
1720+
}, {
1721+
.compatible = "sony,imx462llr",
1722+
.data = &imx290_models[IMX290_MODEL_IMX462LLR],
16571723
},
16581724
{ /* sentinel */ },
16591725
};

0 commit comments

Comments
 (0)