Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion drivers/media/i2c/max9x/serdes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/intel/ipu-acpi-pdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 7 additions & 0 deletions drivers/media/platform/intel/ipu-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand All @@ -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
{},
};
Expand Down
24 changes: 24 additions & 0 deletions include/media/i2c/ar0820.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2014 - 2022 Intel Corporation */

#ifndef __AR0820_H
#define __AR0820_H

#include <linux/types.h>

#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 */
4 changes: 4 additions & 0 deletions include/media/serdes-pdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include <media/i2c/isx031.h>
#endif

#if IS_ENABLED(CONFIG_VIDEO_AR0820)
#include <media/i2c/ar0820.h>
#endif

struct serdes_subdev_info {
struct i2c_board_info board_info;
int i2c_adapter_id;
Expand Down