From 733b04d2ae2fc20978c2cd9d927bc6c10cc0e7dd Mon Sep 17 00:00:00 2001 From: Izzul Irfan Date: Tue, 6 Jan 2026 09:39:22 +0800 Subject: [PATCH 1/3] media: i2c: max9x: Add FSIN GPIO support for sensor synchronization Introduce support for the FSIN (Frame Synchronization Input) GPIO in the MAX9x serdes driver. Add a new GPIO lookup entry for FSIN (GPIO 7) with active low polarity. Ensure the FSIN GPIO is registered with the correct chip label, similar to the reset GPIO. This enables external frame synchronization for image sensors, improving multi-sensor alignment and timing. Signed-off-by: Izzul Irfan --- drivers/media/i2c/max9x/serdes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/max9x/serdes.c b/drivers/media/i2c/max9x/serdes.c index bc41b77e2637..7e100c0effd6 100644 --- a/drivers/media/i2c/max9x/serdes.c +++ b/drivers/media/i2c/max9x/serdes.c @@ -1824,13 +1824,16 @@ static int max9x_registered(struct v4l2_subdev *sd) .table = { GPIO_LOOKUP("", 0, "reset", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("", 7, "fsin", + GPIO_ACTIVE_LOW), {} }, }; sensor_gpios.dev_id = dev_id; sensor_gpios.table[0].key = common->gpio_chip.label; - + sensor_gpios.table[1].key = common->gpio_chip.label; + gpiod_add_lookup_table(&sensor_gpios); struct v4l2_subdev *subdev = From 9ba57e09ab7cc419f3a70e39e58e573112c00714 Mon Sep 17 00:00:00 2001 From: Izzul Irfan Date: Tue, 6 Jan 2026 09:46:25 +0800 Subject: [PATCH 2/3] media: platform: intel: Add AR0820 sensor support to IPU ACPI device table Register the AR0820 sensor in the supported_devices array when CONFIG_VIDEO_AR0820 is enabled. Add the AR0820 ACPI HID to the ipu_acpi_match table for proper device detection. Enables platform integration and detection of the SENSING AR0820 sensor via ACPI. Signed-off-by: Tay, Boon Wooi Signed-off-by: Izzul Irfan --- Makefile | 4 ++++ drivers/media/platform/intel/ipu-acpi.c | 7 +++++++ include/media/i2c/ar0820.h | 24 ++++++++++++++++++++++++ include/media/serdes-pdata.h | 4 ++++ 4 files changed, 39 insertions(+) create mode 100644 include/media/i2c/ar0820.h diff --git a/Makefile b/Makefile index ac0466c26459..96b1b8ddf59e 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ export CONFIG_VIDEO_AR0234 = m # kernel version >= 6.12.15 export CONFIG_VIDEO_ISX031=m export CONFIG_VIDEO_MAX9X=m +export CONFIG_VIDEO_AR0820=m obj-y += drivers/media/i2c/ @@ -75,6 +76,9 @@ subdir-ccflags-$(CONFIG_INTEL_SKL_INT3472) += \ subdir-ccflags-$(CONFIG_VIDEO_ISX031) += \ -DCONFIG_VIDEO_ISX031 +subdir-ccflags-$(CONFIG_VIDEO_AR0820) += \ + -DCONFIG_VIDEO_AR0820 + subdir-ccflags-y += $(subdir-ccflags-m) all: diff --git a/drivers/media/platform/intel/ipu-acpi.c b/drivers/media/platform/intel/ipu-acpi.c index 8b94dc307735..ccb331852c38 100644 --- a/drivers/media/platform/intel/ipu-acpi.c +++ b/drivers/media/platform/intel/ipu-acpi.c @@ -63,6 +63,10 @@ static const struct ipu_acpi_devices supported_devices[] = { { "INTC031M", ISX031_NAME, get_sensor_pdata, NULL, 0, TYPE_SERDES, "max9x", ISX031_I2C_ADDRESS, 1600 }, // D3 ISX031 HID #endif +#if IS_ENABLED(CONFIG_VIDEO_AR0820) + { "AR0820", AR0820_NAME, get_sensor_pdata, NULL, 0, TYPE_SERDES, "max9x", + AR0820_I2C_ADDRESS, 1600 }, // SENSING AR0820 HID +#endif #endif }; @@ -88,6 +92,9 @@ static const struct acpi_device_id ipu_acpi_match[] = { #if IS_ENABLED(CONFIG_VIDEO_ISX031) { "INTC1031", 0 }, // ISX031 HID { "INTC031M", 0 }, // D3CMC68N-115-084 ISX031 HID +#endif +#if IS_ENABLED(CONFIG_VIDEO_AR0820) + { "AR0820", 0 }, // AR0820 HID #endif {}, }; diff --git a/include/media/i2c/ar0820.h b/include/media/i2c/ar0820.h new file mode 100644 index 000000000000..b1e5949cd040 --- /dev/null +++ b/include/media/i2c/ar0820.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2014 - 2022 Intel Corporation */ + +#ifndef __AR0820_H +#define __AR0820_H + +#include + +#define AR0820_NAME "ar0820" + +#define AR0820_I2C_ADDRESS 0x6D // Sensing ISP I2C Address is 0xDA >> 1 + +struct ar0820_platform_data { + unsigned int port; + unsigned int lanes; + uint32_t i2c_slave_address; + int irq_pin; + unsigned int irq_pin_flags; + char irq_pin_name[16]; + char suffix; + int gpios[4]; +}; + +#endif /* __AR0820_H */ diff --git a/include/media/serdes-pdata.h b/include/media/serdes-pdata.h index 829f730140b1..63acfbe210d6 100644 --- a/include/media/serdes-pdata.h +++ b/include/media/serdes-pdata.h @@ -8,6 +8,10 @@ #include #endif +#if IS_ENABLED(CONFIG_VIDEO_AR0820) +#include +#endif + struct serdes_subdev_info { struct i2c_board_info board_info; int i2c_adapter_id; From ceb8e1025ea05f797f26415dd90730323b482c22 Mon Sep 17 00:00:00 2001 From: Izzul Irfan Date: Fri, 9 Jan 2026 11:16:22 +0800 Subject: [PATCH 3/3] media: platform: intel: ipu_acpi: Update MAX9295 I2C address for LI ISX031 sensor support Change the default I2C physical address for the MAX9295 serializer from 0x40 to 0x62 to support the LI ISX031 sensor. The generic ISX031 model works with address 0x40, but the LI ISX031 sensor requires address 0x62 for proper communication. This update ensures correct initialization and operation of the LI ISX031 sensor in supported platforms. Signed-off-by: Izzul Irfan --- drivers/media/platform/intel/ipu-acpi-pdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/intel/ipu-acpi-pdata.c b/drivers/media/platform/intel/ipu-acpi-pdata.c index 8488693f0068..e7bbefdf8c10 100644 --- a/drivers/media/platform/intel/ipu-acpi-pdata.c +++ b/drivers/media/platform/intel/ipu-acpi-pdata.c @@ -638,7 +638,7 @@ static int set_serdes_subdev(struct ipu_isys_subdev_info **serdes_sd, snprintf(serdes_sdinfo[i].suffix, sizeof(serdes_sdinfo[i].suffix), "%c-%d", SUFFIX_BASE + i, port); #if IS_ENABLED(CONFIG_VIDEO_ISX031) - serdes_sdinfo[i].ser_phys_addr = 0x40; + serdes_sdinfo[i].ser_phys_addr = 0x62; serdes_sdinfo[i].sensor_dt = 0x1e; #endif }