Skip to content

Commit 0cda7cb

Browse files
committed
gc0308: update sensor defaults according to Linux kernel driver
1 parent 871b7aa commit 0cda7cb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sensors/private_include/gc0308_settings.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static const uint8_t gc0308_sensor_default_regs[][2] = {
2222
{0x11, 0x0d},
2323
{0x12, 0x2a},
2424
{0x13, 0x00},
25-
{0x14, 0x11},
25+
{0x14, 0x10}, // Linux kernel: CISCTL_MODE1 = 0x10 (no mirror/flip by default)
2626
{0x15, 0x0a},
2727
{0x16, 0x05},
2828
{0x17, 0x01},
@@ -56,12 +56,16 @@ static const uint8_t gc0308_sensor_default_regs[][2] = {
5656
{0x3d, 0x00},
5757
{0x3e, 0x00},
5858
{0x3f, 0x00},
59-
{0x50, 0x14}, // 0x14
59+
{0x50, 0x14}, // GLOBAL_GAIN = 0x14 (default gain)
6060
{0x52, 0x41},
6161
{0x53, 0x80},
6262
{0x54, 0x80},
6363
{0x55, 0x80},
6464
{0x56, 0x80},
65+
// AWB Gain initialization (from Linux kernel driver)
66+
{0x5a, 0x56}, // AWB_R_GAIN: Red gain for auto white balance
67+
{0x5b, 0x40}, // AWB_G_GAIN: Green gain for auto white balance
68+
{0x5c, 0x4a}, // AWB_B_GAIN: Blue gain for auto white balance
6569
{0x8b, 0x20},
6670
{0x8c, 0x20},
6771
{0x8d, 0x20},

0 commit comments

Comments
 (0)