[PATCH v2] media: i2c: ov5645: Correct Y_OFFSET value at 2592x1944 resolution

From: Changwei Zou

Date: Sat Apr 18 2026 - 23:19:45 EST


The Y_OFFSET register at (0x3812, 0x3813) is set to 6, which is
inconsistent with the OV5645 datasheet and the X_OFFSET setting.
For consistency and clarity, change the value from 6 to 4.

height = (Y_ADDR_END - Y_OFFSET * 2 - Y_ADDR_START) + 1
= (V(0x3806, 0x3807) - V(0x3812, 0x3813) * 2 - V(0x3802, 0x3803)) + 1
= (0x079F - 4 * 2 - 0) + 1
= (1951 - 8 - 0) + 1
= 1943 + 1
= 1944

Signed-off-by: Changwei Zou <changwei.zou@xxxxxxxxxxxxx>
---
drivers/media/i2c/ov5645.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
index b10d408034a1..0af1b12c0989 100644
--- a/drivers/media/i2c/ov5645.c
+++ b/drivers/media/i2c/ov5645.c
@@ -479,7 +479,7 @@ static const struct reg_value ov5645_setting_full[] = {
{ 0x380d, 0x1c },
{ 0x380e, 0x07 },
{ 0x380f, 0xb0 },
- { 0x3813, 0x06 },
+ { 0x3813, 0x04 },
{ 0x3814, 0x11 },
{ 0x3815, 0x11 },
{ 0x3820, 0x47 },
--
2.43.0