From: Jason Chen Date: Wed, 23 Apr 2025 17:56:31 +0000 (+0800) Subject: media: ov08x40: Separate the lane configuration and PLL settings X-Git-Tag: v6.16-rc1~145^2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dc513cf7db712108885fa50ef7a800fd26667ff;p=thirdparty%2Flinux.git media: ov08x40: Separate the lane configuration and PLL settings To prepare upcoming support of multiple sensor modes, this change separates the lane configuration and PLL settings from the original mode-specific settings. Signed-off-by: Jason Chen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c index 54575eea3c490..4991fcb02a912 100644 --- a/drivers/media/i2c/ov08x40.c +++ b/drivers/media/i2c/ov08x40.c @@ -168,17 +168,7 @@ static const struct ov08x40_reg mipi_data_rate_800mbps[] = { {0x5a1f, 0x0e}, {0x5a27, 0x0e}, {0x6002, 0x2e}, -}; - -static const struct ov08x40_reg mode_3856x2416_regs[] = { - {0x5000, 0x5d}, - {0x5001, 0x20}, - {0x5008, 0xb0}, - {0x50c1, 0x00}, - {0x53c1, 0x00}, - {0x5f40, 0x00}, - {0x5f41, 0x40}, - {0x0300, 0x3a}, + {0x0300, 0x3a}, /* PLL CTRL */ {0x0301, 0xc8}, {0x0302, 0x31}, {0x0303, 0x03}, @@ -211,6 +201,17 @@ static const struct ov08x40_reg mode_3856x2416_regs[] = { {0x032f, 0xa0}, {0x0350, 0x00}, {0x0360, 0x01}, + {0x3012, 0x41}, /* MIPI SC Lanes */ +}; + +static const struct ov08x40_reg mode_3856x2416_regs[] = { + {0x5000, 0x5d}, + {0x5001, 0x20}, + {0x5008, 0xb0}, + {0x50c1, 0x00}, + {0x53c1, 0x00}, + {0x5f40, 0x00}, + {0x5f41, 0x40}, {0x1216, 0x60}, {0x1217, 0x5b}, {0x1218, 0x00}, @@ -690,39 +691,6 @@ static const struct ov08x40_reg mode_1928x1208_regs[] = { {0x53c1, 0x00}, {0x5f40, 0x00}, {0x5f41, 0x40}, - {0x0300, 0x3a}, - {0x0301, 0xc8}, - {0x0302, 0x31}, - {0x0303, 0x03}, - {0x0304, 0x01}, - {0x0305, 0xa1}, - {0x0306, 0x04}, - {0x0307, 0x01}, - {0x0308, 0x03}, - {0x0309, 0x03}, - {0x0310, 0x0a}, - {0x0311, 0x02}, - {0x0312, 0x01}, - {0x0313, 0x08}, - {0x0314, 0x66}, - {0x0315, 0x00}, - {0x0316, 0x34}, - {0x0320, 0x02}, - {0x0321, 0x03}, - {0x0323, 0x05}, - {0x0324, 0x01}, - {0x0325, 0xb8}, - {0x0326, 0x4a}, - {0x0327, 0x04}, - {0x0329, 0x00}, - {0x032a, 0x05}, - {0x032b, 0x00}, - {0x032c, 0x00}, - {0x032d, 0x00}, - {0x032e, 0x02}, - {0x032f, 0xa0}, - {0x0350, 0x00}, - {0x0360, 0x01}, {0x1216, 0x60}, {0x1217, 0x5b}, {0x1218, 0x00},