]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: ov08x40: Separate the lane configuration and PLL settings
authorJason Chen <jason.z.chen@intel.com>
Wed, 23 Apr 2025 17:56:31 +0000 (01:56 +0800)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 6 May 2025 11:06:30 +0000 (13:06 +0200)
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 <jason.z.chen@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/ov08x40.c

index 54575eea3c49069ff0a0af5996473352e1ae6405..4991fcb02a91249880a99d39e6077d4eac013bb7 100644 (file)
@@ -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},