diff --git a/drivers/media/i2c/imx477.c b/drivers/media/i2c/imx477.c index e73c55e75468c..feedf033caeca 100644 --- a/drivers/media/i2c/imx477.c +++ b/drivers/media/i2c/imx477.c @@ -634,6 +634,70 @@ static const struct imx477_reg mode_4056x3040_regs[] = { {0x3f57, 0xae}, }; +/* 12 mpix cropped to 16:9 10fps */ +static const struct imx477_reg mode_4056x2160_regs[] = { + {0x0344, 0x00}, + {0x0345, 0x00}, + {0x0346, 0x01}, + {0x0347, 0xb8}, + {0x0348, 0x0f}, + {0x0349, 0xd7}, + {0x034a, 0x0a}, + {0x034b, 0x27}, + {0x00e3, 0x00}, + {0x00e4, 0x00}, + {0x00fc, 0x0a}, + {0x00fd, 0x0a}, + {0x00fe, 0x0a}, + {0x00ff, 0x0a}, + {0x0900, 0x00}, + {0x0901, 0x11}, + {0x3c01, 0x03}, + {0x3c02, 0xa2}, + {0x3f0d, 0x01}, + {0x5748, 0x07}, + {0x5749, 0xff}, + {0x574a, 0x00}, + {0x574b, 0x00}, + {0x7b75, 0x0a}, + {0x7b76, 0x0c}, + {0x7b77, 0x07}, + {0x7b78, 0x06}, + {0x7b79, 0x3c}, + {0x7b53, 0x01}, + {0x9369, 0x5a}, + {0x936b, 0x55}, + {0x936d, 0x28}, + {0x9304, 0x00}, + {0x9305, 0x00}, + {0xa2a9, 0x60}, + {0xa2b7, 0x00}, + {0x0401, 0x00}, + {0x0404, 0x00}, + {0x0405, 0x10}, + {0x0408, 0x00}, + {0x0409, 0x00}, + {0x040a, 0x00}, + {0x040b, 0x00}, + {0x040c, 0x0f}, + {0x040d, 0xd8}, + {0x040e, 0x08}, + {0x040f, 0x70}, + {0x034c, 0x0f}, + {0x034d, 0xd8}, + {0x034e, 0x08}, + {0x034f, 0x70}, + {0x0305, 0x04}, + {0x0306, 0x01}, + {0x0307, 0x5e}, + {0xe04c, 0x00}, + {0xe04d, 0x7f}, + {0xe04e, 0x00}, + {0xe04f, 0x1f}, + {0x3f56, 0x02}, + {0x3f57, 0xae}, +}; + /* 2x2 binned. 40fps */ static const struct imx477_reg mode_2028x1520_regs[] = { {0x0112, 0x0c}, @@ -845,6 +909,23 @@ static const struct imx477_mode supported_modes_12bit[] = { .regs = mode_4056x3040_regs, }, }, + { + /* 12MPix cropped 16:9 mode */ + .width = 4056, + .height = 2160, + .line_length_pix = { 24000, 20000 }, + .crop = { + .left = IMX477_PIXEL_ARRAY_LEFT, + .top = IMX477_PIXEL_ARRAY_TOP + 440, + .width = 4056, + .height = 3040, + }, + .framerate_default = 10, + .reg_list = { + .num_of_regs = ARRAY_SIZE(mode_4056x2160_regs), + .regs = mode_4056x2160_regs, + }, + }, { /* 2x2 binned 40fps mode */ .width = 2028,