public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1
@ 2026-03-20  0:09 Thierry Chatard
  2026-03-20  0:09 ` [PATCH 1/5] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-20  0:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Dell Latitude 5285 2-in-1 has two cameras:

  Front: OV5670 (ACPI INT3479, CSI-2 receiver 0)
  Back:  OV8858 (ACPI INT3477, CSI-2 receiver 1)

Neither camera works on a stock kernel.  This series fixes four
independent problems that must all be resolved for both cameras to
function.

Problem 1 — I2C4 host adapter missing (front camera only)

The BIOS ACPI table exposes both an ACPI GEXP device and the I2C4
controller (INT3446) claiming the same MMIO region.  The kernel
rejects INT3446 with a resource conflict and the I2C bus that
carries the OV5670 is never brought up.  Patch 1 adds a DMI quirk
to apply QUIRK_IGNORE_RESOURCE_CONFLICTS for INT3446 on this machine.

Problem 2 — ACPI _DEP returns wrong dependency (front camera only)

With the I2C bus available, the OV5670 device is still not created
by ipu_bridge because _DEP on INT3479 returns the root PCI bus
handle instead of the INT3472 (PMIC) handle.  Root cause: the BIOS
leaves three GNVS fields (C0TP, L0CL, L1CL) initialised to zero.
Patch 2 patches these bytes to 0x02 in the TPS68470 probe path,
before ipu_bridge evaluates _DEP, restoring the correct dependency
chain.

The GNVS physical address is discovered at run time by scanning the
raw AML of the DSDT (and any SSDTs) for the GNVS SystemMemory
OperationRegion definition.  The parsed address is then mapped with
acpi_os_map_memory(), which is safe because ACPI NVS memory is
reserved by the firmware and already mapped by the OS.  No
hard-coded physical addresses are used.

Problem 3 — No TPS68470 board data for this platform (both cameras)

The int3472 driver has no entry for the Dell 5285, so it does not
configure the PMIC regulators and GPIOs for either camera.  Patch 3
adds the full supply map and GPIO lookup tables for both sensors.

A key detail: the OV8858 sits behind the TPS68470 secondary I2C
passthrough (S_I2C_CTL, register 0x43), which is gated by the VSIO
regulator.  VSIO is therefore marked always_on so the passthrough
is active from PMIC probe time.

Problem 4 — OV8858 not supported (back camera only)

Two driver-level gaps remain after the platform is configured:
  - ipu_bridge does not know INT3477, so it skips the sensor when
    enumerating CSI-2 receivers (patch 4).
  - The ov8858 driver has no ACPI match entry for INT3477 and does
    not request the vsio supply that enables S_I2C_CTL (patch 5).

Testing
-------
Tested on a Dell Latitude 5285 2-in-1 running Ubuntu 25.10 with
kernel 6.17.0-19-generic.  After applying all five patches:

  $ cam -l
  Available cameras:
  1: Internal front camera (\_SB_.PCI0.LNK0)   [OV5670 / INT3479]
  2: Internal back camera  (\_SB_.PCI0.LNK1)   [OV8858 / INT3477]

Relevant kernel log:
  int3472-tps68470: Dell 5285 GNVS fix at 0xaae22000: C0TP=0x02 L0CL=0x00 L1CL=0x00 -> 0x02
  ipu3-cio2: Connected 2 cameras
  ov8858: regulators enabled (avdd=1 dvdd=1 dovdd=1 vsio=1)
  ov8858: Detected OV8858 sensor, revision 0xb2

Patches 1–3 touch platform/x86 and mfd drivers; patches 4–5 touch
media drivers.  All five patches are needed for a fully working
system, but each patch is self-contained and bisect-safe.

Thierry Chatard (5):
  platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285
  platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
  platform/x86: int3472: tps68470: add board data for Dell Latitude 5285
  media: ipu-bridge: add sensor configuration for OV8858 (INT3477)
  media: ov8858: add ACPI device ID INT3477 and vsio power supply

 .../x86/intel/int3472/tps68470_board_data.c   | 163 ++++++++++++++++++
 drivers/media/i2c/ov8858.c                    |  10 ++++++++-
 drivers/media/pci/intel/ipu-bridge.c          |   2 ++
 drivers/mfd/intel-lpss-acpi.c                 |  32 +++++++++++++++++++++++++++++++
 drivers/platform/x86/intel/int3472/tps68470.c | 179 ++++++++++++++++++
 5 files changed, 386 insertions(+), 1 deletion(-)

--
2.51.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/5] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285
  2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
@ 2026-03-20  0:09 ` Thierry Chatard
  2026-03-20  0:09 ` [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-20  0:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Dell Latitude 5285 2-in-1 has a BIOS bug where the ACPI GEXP device
and the I2C4 controller (INT3446) both claim the same MMIO region via the
shared SB04 variable. This causes intel_lpss_acpi to fail binding to I2C4
with -EBUSY, preventing the front camera (OV5670) sensor from being
registered.

Add a DMI quirk that selects IGNORE_RESOURCE_CONFLICTS for INT3446 on this
machine, matching the existing pattern used by other LPSS quirks.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/mfd/intel-lpss-acpi.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 63406026d..7d0964848 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -13,6 +13,8 @@
 #include <linux/ioport.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
+#include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
@@ -52,6 +54,15 @@ static const struct intel_lpss_platform_info spt_i2c_info = {
 	.swnode = &spt_i2c_node,
 };
 
+/* Same as spt_i2c_info but with QUIRK_IGNORE_RESOURCE_CONFLICTS for Dell 5285
+ * where ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources.
+ */
+static const struct intel_lpss_platform_info spt_i2c_info_ignore_conflicts = {
+	.clk_rate = 120000000,
+	.swnode = &spt_i2c_node,
+	.quirks = QUIRK_IGNORE_RESOURCE_CONFLICTS,
+};
+
 static const struct property_entry uart_properties[] = {
 	PROPERTY_ENTRY_U32("reg-io-width", 4),
 	PROPERTY_ENTRY_U32("reg-shift", 2),
@@ -172,6 +183,16 @@ static const struct acpi_device_id intel_lpss_acpi_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, intel_lpss_acpi_ids);
 
+static const struct dmi_system_id dell5285_lpss_dmi[] = {
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+		},
+	},
+	{ }
+};
+
 static int intel_lpss_acpi_probe(struct platform_device *pdev)
 {
 	const struct intel_lpss_platform_info *data;
@@ -182,6 +203,17 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENODEV;
 
+	/* Apply IGNORE_RESOURCE_CONFLICTS for I2C4 on Dell Latitude 5285.
+	 * The ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources
+	 * due to a BIOS bug where both use the same SB04 variable.
+	 */
+	if (data == &spt_i2c_info &&
+	    acpi_dev_hid_uid_match(ACPI_COMPANION(&pdev->dev), "INT3446", NULL) &&
+	    dmi_check_system(dell5285_lpss_dmi)) {
+		dev_info(&pdev->dev, "Dell 5285: applying IGNORE_RESOURCE_CONFLICTS for I2C4\n");
+		data = &spt_i2c_info_ignore_conflicts;
+	}
+
 	info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);
 	if (!info)
 		return -ENOMEM;
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
  2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
  2026-03-20  0:09 ` [PATCH 1/5] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
@ 2026-03-20  0:09 ` Thierry Chatard
  2026-03-21  9:44   ` kernel test robot
  2026-03-20  0:09 ` [PATCH 3/5] platform/x86: int3472: tps68470: add board data " Thierry Chatard
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Thierry Chatard @ 2026-03-20  0:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Dell Latitude 5285 BIOS leaves the GNVS fields C0TP, L0CL, and L1CL
at zero at boot. The TPS68470 clock driver reads L0CL and L1CL to select
the output frequency; with both fields zero the clock outputs are disabled,
and neither camera sensor can communicate over I2C.

Additionally, when C0TP=0 the ACPI _DEP method on INT3479 returns PCI0 as
its dependency instead of CLP0 (the INT3472 device), causing ipu_bridge to
never create the i2c-INT3479:00 client for the front camera.

Add a DMI-gated fixup that runs at TPS68470 probe time and writes 0x02
(19.2 MHz) into C0TP, L0CL, and L1CL.

The GNVS physical address is discovered at run time by scanning the raw
AML of the DSDT (and any SSDTs) for the GNVS SystemMemory OperationRegion
definition (opcode sequence 0x5B 0x80 "GNVS" 0x00). The parsed address is
then mapped with acpi_os_map_memory(), which is safe because ACPI NVS
memory is reserved by the firmware and already mapped by the OS. No
hard-coded physical addresses are used.

Field byte offsets within the GNVS region (verified against DSDT
disassembly on this platform, region size 0x0725 bytes):
  C0TP: 0x43A   L0CL: 0x4F7   L1CL: 0x549

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/platform/x86/intel/int3472/tps68470.c | 179 ++++++++++++++++++
 1 file changed, 179 insertions(+)

diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
index a496075c0..5ffcb45c3 100644
--- a/drivers/platform/x86/intel/int3472/tps68470.c
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
@@ -2,8 +2,10 @@
 /* Author: Dan Scally <djrscally@gmail.com> */
 
 #include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
+#include <linux/unaligned.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/tps68470.h>
 #include <linux/platform_device.h>
@@ -140,6 +142,181 @@ skl_int3472_fill_clk_pdata(struct device *dev, struct tps68470_clk_platform_data
 	return n_consumers;
 }
 
+/* Dell Latitude 5285 GNVS fix
+ *
+ * The BIOS leaves GNVS fields C0TP, L0CL and L1CL at zero after POST.
+ * With C0TP=0 the ACPI _DEP on INT3479 resolves to PCI0 instead of CLP0
+ * (INT3472), so ipu_bridge never creates i2c-INT3479:00 (OV5670 front cam).
+ * With L0CL=L1CL=0 the TPS68470 clock driver disables all clock outputs,
+ * making both sensors unreachable over I2C.
+ *
+ * Fix: at TPS68470 probe time, locate the GNVS SystemMemory OperationRegion
+ * by scanning the DSDT/SSDTs for its AML definition, map the region, and
+ * write 0x02 (19.2 MHz) into C0TP, L0CL and L1CL.
+ *
+ * Field byte offsets (verified from DSDT disassembly, GNVS size 0x0725):
+ *   C0TP: 0x43A   L0CL: 0x4F7   L1CL: 0x549
+ */
+#define DELL5285_C0TP_OFF	0x43A
+#define DELL5285_L0CL_OFF	0x4F7
+#define DELL5285_L1CL_OFF	0x549
+/* Minimum GNVS region size: last field (L1CL) is 1 byte at 0x549 */
+#define DELL5285_GNVS_MIN_SIZE	(DELL5285_L1CL_OFF + 1)
+
+/* AML integer opcodes (ACPI 6.4, §20.2.3) */
+#define AML_ZERO_OP		0x00
+#define AML_ONE_OP		0x01
+#define AML_BYTE_PREFIX		0x0A
+#define AML_WORD_PREFIX		0x0B
+#define AML_DWORD_PREFIX	0x0C
+#define AML_QWORD_PREFIX	0x0E
+
+/**
+ * aml_parse_int - Parse one AML integer at @p, store value in @val.
+ * Returns number of bytes consumed, or 0 on failure.
+ */
+static int aml_parse_int(const u8 *p, const u8 *end, u64 *val)
+{
+	if (p >= end)
+		return 0;
+	switch (*p) {
+	case AML_ZERO_OP:  *val = 0; return 1;
+	case AML_ONE_OP:   *val = 1; return 1;
+	case AML_BYTE_PREFIX:
+		if (p + 2 > end) return 0;
+		*val = p[1]; return 2;
+	case AML_WORD_PREFIX:
+		if (p + 3 > end) return 0;
+		*val = get_unaligned_le16(p + 1); return 3;
+	case AML_DWORD_PREFIX:
+		if (p + 5 > end) return 0;
+		*val = get_unaligned_le32(p + 1); return 5;
+	case AML_QWORD_PREFIX:
+		if (p + 9 > end) return 0;
+		*val = get_unaligned_le64(p + 1); return 9;
+	}
+	return 0;
+}
+
+/**
+ * dell5285_gnvs_from_table - Scan one ACPI table for the GNVS OperationRegion.
+ *
+ * Searches the AML body of @tbl for the byte sequence:
+ *   ExtOp(0x5B) OpRegionOp(0x80) NameSeg("GNVS") RegionSpace(SystemMemory=0x00)
+ * followed by two AML integers (region address and length).
+ *
+ * Returns true and fills @addr / @size if found and plausible.
+ */
+static bool dell5285_gnvs_from_table(const struct acpi_table_header *tbl,
+				     phys_addr_t *addr, u32 *size)
+{
+	/* AML: ExtOp OpRegionOp NameSeg("GNVS") SystemMemory */
+	static const u8 sig[] = { 0x5B, 0x80, 'G', 'N', 'V', 'S', 0x00 };
+	const u8 *aml = (const u8 *)tbl + sizeof(*tbl);
+	const u8 *end = (const u8 *)tbl + tbl->length;
+	const u8 *p;
+
+	for (p = aml; p + sizeof(sig) < end; p++) {
+		u64 region_addr, region_size;
+		int consumed;
+
+		if (memcmp(p, sig, sizeof(sig)) != 0)
+			continue;
+
+		p += sizeof(sig);
+		consumed = aml_parse_int(p, end, &region_addr);
+		if (!consumed || !region_addr)
+			continue;
+
+		p += consumed;
+		consumed = aml_parse_int(p, end, &region_size);
+		if (!consumed || region_size < DELL5285_GNVS_MIN_SIZE)
+			continue;
+
+		*addr = (phys_addr_t)region_addr;
+		*size = (u32)region_size;
+		return true;
+	}
+	return false;
+}
+
+/**
+ * dell5285_gnvs_find - Locate the GNVS OperationRegion address by scanning
+ *                      DSDT and SSDTs.
+ */
+static bool dell5285_gnvs_find(phys_addr_t *addr, u32 *size)
+{
+	struct acpi_table_header *tbl;
+	u32 i;
+
+	/* DSDT */
+	if (ACPI_SUCCESS(acpi_get_table(ACPI_SIG_DSDT, 1, &tbl))) {
+		bool found = dell5285_gnvs_from_table(tbl, addr, size);
+
+		acpi_put_table(tbl);
+		if (found)
+			return true;
+	}
+
+	/* SSDTs (instance numbers start at 1, stop at first failure) */
+	for (i = 1; i <= 32; i++) {
+		bool found;
+
+		if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_SSDT, i, &tbl)))
+			break;
+		found = dell5285_gnvs_from_table(tbl, addr, size);
+		acpi_put_table(tbl);
+		if (found)
+			return true;
+	}
+
+	return false;
+}
+
+static const struct dmi_system_id dell5285_gnvs_dmi[] = {
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+		},
+	},
+	{ }
+};
+
+static void dell5285_gnvs_fix(void)
+{
+	phys_addr_t gnvs_addr;
+	u32 gnvs_size;
+	void *gnvs;
+
+	if (!dmi_check_system(dell5285_gnvs_dmi))
+		return;
+
+	if (!dell5285_gnvs_find(&gnvs_addr, &gnvs_size)) {
+		pr_err("int3472-tps68470: Dell 5285: GNVS OperationRegion not found in DSDT/SSDTs\n");
+		return;
+	}
+
+	gnvs = acpi_os_map_memory(gnvs_addr, gnvs_size);
+	if (!gnvs) {
+		pr_err("int3472-tps68470: Dell 5285: failed to map GNVS at %pa\n",
+		       &gnvs_addr);
+		return;
+	}
+
+	pr_info("int3472-tps68470: Dell 5285 GNVS fix at %pa: C0TP=0x%02x L0CL=0x%02x L1CL=0x%02x -> 0x02\n",
+		&gnvs_addr,
+		*(u8 *)(gnvs + DELL5285_C0TP_OFF),
+		*(u8 *)(gnvs + DELL5285_L0CL_OFF),
+		*(u8 *)(gnvs + DELL5285_L1CL_OFF));
+
+	*(u8 *)(gnvs + DELL5285_C0TP_OFF) = 0x02;
+	*(u8 *)(gnvs + DELL5285_L0CL_OFF) = 0x02;
+	*(u8 *)(gnvs + DELL5285_L1CL_OFF) = 0x02;
+
+	acpi_os_unmap_memory(gnvs, gnvs_size);
+}
+
 static int skl_int3472_tps68470_probe(struct i2c_client *client)
 {
 	struct acpi_device *adev = ACPI_COMPANION(&client->dev);
@@ -155,6 +332,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
 	if (!adev)
 		return -ENODEV;
 
+	dell5285_gnvs_fix();
+
 	n_consumers = skl_int3472_fill_clk_pdata(&client->dev, &clk_pdata);
 	if (n_consumers < 0)
 		return n_consumers;
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/5] platform/x86: int3472: tps68470: add board data for Dell Latitude 5285
  2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
  2026-03-20  0:09 ` [PATCH 1/5] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
  2026-03-20  0:09 ` [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
@ 2026-03-20  0:09 ` Thierry Chatard
  2026-03-20  0:09 ` [PATCH 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-20  0:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Dell Latitude 5285 2-in-1 has two cameras connected through a TPS68470
PMIC/clock/GPIO hub:

  Front: OV5670 (ACPI INT3479) on I2C4
  Back:  OV8858 (ACPI INT3477) on I2C2, daisy-chained behind TPS68470
         S_I2C port (controlled by reg 0x43 S_I2C_CTL)

GPIO mapping (TPS68470):
  INT3479 (OV5670): GPIO3 = reset (active-low), GPIO4 = powerdown (active-low)
  INT3477 (OV8858): GPIO9 = s_resetn (active-low), GPIO7 = s_enable (active-low)
    GPIO9 and GPIO7 are the TPS68470 secondary-port GPIOs (SGPO reg 0x22
    bits 2 and 0), not regular GPDO outputs.

Regulator mapping:
  CORE  -> dvdd  / INT3477
  ANA   -> avdd  / INT3477
  VIO   -> dovdd / INT3477
  VSIO  -> avdd  / INT3479 and vsio / INT3477 (always_on: keeps S_I2C_CTL
           non-zero from boot so OV8858 is reachable on I2C2 at any time)
  AUX1  -> dvdd  / INT3479
  AUX2  -> dovdd / INT3479

Marking VSIO always_on ensures the TPS68470 S_I2C passthrough is active
from the moment the PMIC driver probes, eliminating a timing dependency
between TPS68470 and ov8858 probe ordering.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 .../x86/intel/int3472/tps68470_board_data.c   | 163 ++++++++++++++++++
 1 file changed, 163 insertions(+)

diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
index 71357a036..a5b469dcb 100644
--- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
+++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
@@ -287,6 +287,162 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
 	},
 };
 
+/* Settings for Dell Latitude 5285 2-in-1 */
+
+static struct regulator_consumer_supply dell_5285_int3477_ana_consumer_supplies[] = {
+	REGULATOR_SUPPLY("avdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3477_core_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dvdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3477_vio_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dovdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_vsio_consumer_supplies[] = {
+	REGULATOR_SUPPLY("avdd", "i2c-INT3479:00"),
+	/* S_I2C_CTL: must be enabled for OV8858 I2C daisy-chain access */
+	REGULATOR_SUPPLY("vsio", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_aux1_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dvdd", "i2c-INT3479:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_aux2_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dovdd", "i2c-INT3479:00"),
+};
+
+static const struct regulator_init_data dell_5285_tps68470_core_reg_init_data = {
+	.constraints = {
+		.min_uV = 1200000,
+		.max_uV = 1200000,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_core_consumer_supplies),
+	.consumer_supplies = dell_5285_int3477_core_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_ana_reg_init_data = {
+	.constraints = {
+		.min_uV = 2815200,
+		.max_uV = 2815200,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_ana_consumer_supplies),
+	.consumer_supplies = dell_5285_int3477_ana_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vcm_reg_init_data = {
+	.constraints = {
+		.min_uV = 2815200,
+		.max_uV = 2815200,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = 0,
+	.consumer_supplies = NULL,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vio_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_vio_consumer_supplies),
+	.consumer_supplies = dell_5285_int3477_vio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vsio_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		/*
+		 * Keep S_I2C_CTL enabled from boot so OV8858 I2C daisy-chain
+		 * is accessible before ov8858 driver probes.
+		 */
+		.always_on = 1,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_vsio_consumer_supplies),
+	.consumer_supplies = dell_5285_int3479_vsio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_aux1_reg_init_data = {
+	.constraints = {
+		.min_uV = 1213200,
+		.max_uV = 1213200,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_aux1_consumer_supplies),
+	.consumer_supplies = dell_5285_int3479_aux1_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_aux2_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_aux2_consumer_supplies),
+	.consumer_supplies = dell_5285_int3479_aux2_consumer_supplies,
+};
+
+static const struct tps68470_regulator_platform_data dell_5285_tps68470_pdata = {
+	.reg_init_data = {
+		[TPS68470_CORE] = &dell_5285_tps68470_core_reg_init_data,
+		[TPS68470_ANA]  = &dell_5285_tps68470_ana_reg_init_data,
+		[TPS68470_VCM]  = &dell_5285_tps68470_vcm_reg_init_data,
+		[TPS68470_VIO]  = &dell_5285_tps68470_vio_reg_init_data,
+		[TPS68470_VSIO] = &dell_5285_tps68470_vsio_reg_init_data,
+		[TPS68470_AUX1] = &dell_5285_tps68470_aux1_reg_init_data,
+		[TPS68470_AUX2] = &dell_5285_tps68470_aux2_reg_init_data,
+	},
+};
+
+static struct gpiod_lookup_table dell_5285_int3477_gpios = {
+	.dev_id = "i2c-INT3477:00",
+	.table = {
+		/*
+		 * TPS68470 GPIO9 = s_resetn (secondary camera reset, active-low)
+		 * TPS68470 GPIO7 = s_enable (secondary camera enable/powerdown)
+		 * These logic outputs are specifically designed for secondary
+		 * camera control on the TPS68470. Matches Surface Go pattern.
+		 */
+		GPIO_LOOKUP("tps68470-gpio", 9, "reset", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("tps68470-gpio", 7, "powerdown", GPIO_ACTIVE_LOW),
+		{ }
+	}
+};
+
+static struct gpiod_lookup_table dell_5285_int3479_gpios = {
+	.dev_id = "i2c-INT3479:00",
+	.table = {
+		GPIO_LOOKUP("tps68470-gpio", 3, "reset", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("tps68470-gpio", 4, "powerdown", GPIO_ACTIVE_LOW),
+		{ }
+	}
+};
+
+static const struct int3472_tps68470_board_data dell_5285_tps68470_board_data = {
+	.dev_name = "i2c-INT3472:05",
+	.tps68470_regulator_pdata = &dell_5285_tps68470_pdata,
+	.n_gpiod_lookups = 2,
+	.tps68470_gpio_lookup_tables = {
+		&dell_5285_int3477_gpios,
+		&dell_5285_int3479_gpios,
+	},
+};
+
 static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
 	{
 		.matches = {
@@ -316,6 +472,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
 		},
 		.driver_data = (void *)&dell_7212_tps68470_board_data,
 	},
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR,   "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+		},
+		.driver_data = (void *)&dell_5285_tps68470_board_data,
+	},
 	{ }
 };
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477)
  2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
                   ` (2 preceding siblings ...)
  2026-03-20  0:09 ` [PATCH 3/5] platform/x86: int3472: tps68470: add board data " Thierry Chatard
@ 2026-03-20  0:09 ` Thierry Chatard
  2026-03-20  0:09 ` [PATCH 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
  5 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-20  0:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Omnivision OV8858 is used as the rear camera in several Intel
IPU3-based devices (e.g. Dell Latitude 5285 2-in-1). Its ACPI HID is
INT3477. Add a sensor configuration entry with a link frequency of
360 MHz to allow ipu_bridge to create the firmware node for this sensor.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/media/pci/intel/ipu-bridge.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index fc6608e33..f51749d0f 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -63,6 +63,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
 	IPU_SENSOR_CONFIG("INT33F0", 1, 384000000),
 	/* Omnivision OV2740 */
 	IPU_SENSOR_CONFIG("INT3474", 1, 180000000),
+	/* Omnivision OV8858 */
+	IPU_SENSOR_CONFIG("INT3477", 1, 360000000),
 	/* Omnivision OV5670 */
 	IPU_SENSOR_CONFIG("INT3479", 1, 422400000),
 	/* Omnivision OV8865 */
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply
  2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
                   ` (3 preceding siblings ...)
  2026-03-20  0:09 ` [PATCH 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
@ 2026-03-20  0:09 ` Thierry Chatard
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
  5 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-20  0:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Omnivision OV8858 appears in ACPI firmware under the HID INT3477 on
Intel IPU3-based platforms such as the Dell Latitude 5285 2-in-1. Add
INT3477 to the ACPI match table so the driver binds when instantiated by
ipu_bridge.

On the Dell Latitude 5285 the OV8858 is powered through a TPS68470 PMIC.
The TPS68470 VSIO regulator controls the S_I2C_CTL register (0x43) which
enables I2C passthrough to the sensor. The board data for this machine
maps VSIO to the supply name "vsio" for INT3477. Add "vsio" to
ov8858_supply_names[] so the driver requests this regulator at probe time.

The existing supply array had a duplicate "dvdd" entry; replace it with
the new "vsio" entry and reorder to: avdd, dvdd, dovdd, vsio.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/media/i2c/ov8858.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
index 3f45f7fab..5bfea237b 100644
--- a/drivers/media/i2c/ov8858.c
+++ b/drivers/media/i2c/ov8858.c
@@ -79,8 +79,9 @@
 
 static const char * const ov8858_supply_names[] = {
 	"avdd",		/* Analog power */
-	"dovdd",	/* Digital I/O power */
 	"dvdd",		/* Digital core power */
+	"dovdd",	/* Digital I/O power */
+	"vsio",		/* Secondary I2C / S_I2C_CTL enable */
 };
 
 struct regval {
@@ -1981,11 +1982,18 @@ static const struct of_device_id ov8858_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ov8858_of_match);
 
+static const struct acpi_device_id ov8858_acpi_ids[] = {
+	{ "INT3477" },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(acpi, ov8858_acpi_ids);
+
 static struct i2c_driver ov8858_i2c_driver = {
 	.driver = {
 		.name = "ov8858",
 		.pm = &ov8858_pm_ops,
 		.of_match_table = ov8858_of_match,
+		.acpi_match_table = ACPI_PTR(ov8858_acpi_ids),
 	},
 	.probe		= ov8858_probe,
 	.remove		= ov8858_remove,
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
  2026-03-20  0:09 ` [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
@ 2026-03-21  9:44   ` kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-03-21  9:44 UTC (permalink / raw)
  To: Thierry Chatard, linux-kernel
  Cc: oe-kbuild-all, linux-media, platform-driver-x86, lee, djrscally,
	hansg, ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi,
	nicholas, Thierry Chatard

Hi Thierry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linuxtv-media-pending/master]
[also build test WARNING on media-tree/master sailus-media-tree/master linus/master v7.0-rc4 next-20260320]
[cannot apply to sailus-media-tree/streams]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Thierry-Chatard/platform-x86-intel_lpss-add-resource-conflict-quirk-for-Dell-Latitude-5285/20260321-081146
base:   https://git.linuxtv.org/media-ci/media-pending.git master
patch link:    https://lore.kernel.org/r/20260320000937.9177-3-tchatard%40gmail.com
patch subject: [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
config: i386-randconfig-141-20260321 (https://download.01.org/0day-ci/archive/20260321/202603211747.Z6xudmNd-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9004-gb810ac53
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603211747.Z6xudmNd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603211747.Z6xudmNd-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:178 function parameter 'p' not described in 'aml_parse_int'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:178 function parameter 'end' not described in 'aml_parse_int'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:178 function parameter 'val' not described in 'aml_parse_int'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:211 function parameter 'tbl' not described in 'dell5285_gnvs_from_table'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:211 function parameter 'addr' not described in 'dell5285_gnvs_from_table'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:211 function parameter 'size' not described in 'dell5285_gnvs_from_table'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:247 function parameter 'addr' not described in 'dell5285_gnvs_find'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:247 function parameter 'size' not described in 'dell5285_gnvs_find'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:178 function parameter 'p' not described in 'aml_parse_int'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:178 function parameter 'end' not described in 'aml_parse_int'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:178 function parameter 'val' not described in 'aml_parse_int'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:211 function parameter 'tbl' not described in 'dell5285_gnvs_from_table'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:211 function parameter 'addr' not described in 'dell5285_gnvs_from_table'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:211 function parameter 'size' not described in 'dell5285_gnvs_from_table'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:247 function parameter 'addr' not described in 'dell5285_gnvs_find'
>> Warning: drivers/platform/x86/intel/int3472/tps68470.c:247 function parameter 'size' not described in 'dell5285_gnvs_find'

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1
  2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
                   ` (4 preceding siblings ...)
  2026-03-20  0:09 ` [PATCH 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
@ 2026-03-24 21:41 ` Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
                     ` (4 more replies)
  5 siblings, 5 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

Changes in v2:
- patch 2: split trailing statements in aml_parse_int() onto separate
  lines (checkpatch); add kernel-doc @param descriptions to
  aml_parse_int(), dell5285_gnvs_from_table(), and dell5285_gnvs_find()
  (kernel test robot); add Reported-by/Closes tags
- patch 3: wrap long lines in commit message (checkpatch)

The Dell Latitude 5285 2-in-1 has two cameras (OV5670 front, OV8858
rear) connected through a TPS68470 PMIC/clock/GPIO hub. All five patches
are required for a working system; each is self-contained and
bisect-safe.

Hardware topology
-----------------
  Front camera:  OV5670 (ACPI INT3479), I2C4 / INT3446
  Rear camera:   OV8858 (ACPI INT3477), I2C2 / i2c_designware.3
  PMIC:          TPS68470 (ACPI INT3472:05), addr 0x4D, on I2C2
  ISP:           Intel IPU3 (ipu3_cio2 + ipu3-imgu)

The OV8858 is daisy-chained behind the TPS68470 S_I2C passthrough port.
The TPS68470 VSIO regulator controls S_I2C_CTL (reg 0x43); marking it
always_on keeps the passthrough active from boot so OV8858 is reachable
on I2C2 at probe time.

Four problems must be fixed in combination:

patch 1/5 - intel_lpss: The BIOS claims the same MMIO region for both
  GEXP and INT3446 (I2C4). Without this quirk the kernel rejects INT3446
  as a resource conflict and the front camera's I2C bus never comes up.

patch 2/5 - GNVS fixup: With I2C4 available, ipu_bridge still does not
  create the front camera client because _DEP on INT3479 returns the
  root PCI bus instead of the INT3472 handle. Root cause: BIOS leaves
  GNVS fields C0TP, L0CL, L1CL at zero. Fix: scan DSDT/SSDTs for the
  GNVS OperationRegion at TPS68470 probe time and write 0x02 (19.2 MHz)
  into all three fields before ipu_bridge evaluates _DEP.

patch 3/5 - TPS68470 board data: No board data existed for this machine,
  so no PMIC regulators or GPIOs were configured for either sensor.

patch 4/5 - ipu-bridge: INT3477 (OV8858) was unknown to ipu_bridge, so
  it was skipped at CSI-2 enumeration.

patch 5/5 - ov8858 driver: No ACPI match for INT3477, and the driver did
  not request the vsio supply needed by the S_I2C passthrough.

Tested on Dell Latitude 5285 2-in-1, Ubuntu 25.10, kernel 6.17.0-19.
Both cameras appear in libcamera and are usable in applications.
Note: the IPU3 IMGU can only run one pipeline at a time, so front and
rear camera use is mutually exclusive.

Thierry Chatard (5):
  platform/x86: intel_lpss: add resource conflict quirk for Dell
    Latitude 5285
  platform/x86: int3472: tps68470: fix GNVS clock fields for Dell
    Latitude 5285
  platform/x86: int3472: tps68470: add board data for Dell Latitude 5285
  media: ipu-bridge: add sensor configuration for OV8858 (INT3477)
  media: ov8858: add ACPI device ID INT3477 and vsio power supply

 drivers/mfd/intel-lpss-acpi.c                 |  32 +++
 drivers/media/i2c/ov8858.c                    |  10 +-
 drivers/media/pci/intel/ipu-bridge.c          |   2 ++
 drivers/platform/x86/intel/int3472/tps68470.c | 201 ++++++++++++++++++
 .../x86/intel/int3472/tps68470_board_data.c   | 163 ++++++++++++++
 5 files changed, 407 insertions(+), 1 deletion(-)

base-commit: 6de23f81a4be5ee86a4df4fde0ca0c7bf67aecd1
--
2.51.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
@ 2026-03-24 21:41   ` Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Dell Latitude 5285 2-in-1 has a BIOS bug where the ACPI GEXP device
and the I2C4 controller (INT3446) both claim the same MMIO region via the
shared SB04 variable. This causes intel_lpss_acpi to fail binding to I2C4
with -EBUSY, preventing the front camera (OV5670) sensor from being
registered.

Add a DMI quirk that selects IGNORE_RESOURCE_CONFLICTS for INT3446 on this
machine, matching the existing pattern used by other LPSS quirks.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/mfd/intel-lpss-acpi.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c
index 63406026d..7d0964848 100644
--- a/drivers/mfd/intel-lpss-acpi.c
+++ b/drivers/mfd/intel-lpss-acpi.c
@@ -13,6 +13,8 @@
 #include <linux/ioport.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
+#include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
@@ -52,6 +54,15 @@ static const struct intel_lpss_platform_info spt_i2c_info = {
 	.swnode = &spt_i2c_node,
 };
 
+/* Same as spt_i2c_info but with QUIRK_IGNORE_RESOURCE_CONFLICTS for Dell 5285
+ * where ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources.
+ */
+static const struct intel_lpss_platform_info spt_i2c_info_ignore_conflicts = {
+	.clk_rate = 120000000,
+	.swnode = &spt_i2c_node,
+	.quirks = QUIRK_IGNORE_RESOURCE_CONFLICTS,
+};
+
 static const struct property_entry uart_properties[] = {
 	PROPERTY_ENTRY_U32("reg-io-width", 4),
 	PROPERTY_ENTRY_U32("reg-shift", 2),
@@ -172,6 +183,16 @@ static const struct acpi_device_id intel_lpss_acpi_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, intel_lpss_acpi_ids);
 
+static const struct dmi_system_id dell5285_lpss_dmi[] = {
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+		},
+	},
+	{ }
+};
+
 static int intel_lpss_acpi_probe(struct platform_device *pdev)
 {
 	const struct intel_lpss_platform_info *data;
@@ -182,6 +203,17 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENODEV;
 
+	/* Apply IGNORE_RESOURCE_CONFLICTS for I2C4 on Dell Latitude 5285.
+	 * The ACPI GEXP device conflicts with I2C4 (INT3446) MMIO resources
+	 * due to a BIOS bug where both use the same SB04 variable.
+	 */
+	if (data == &spt_i2c_info &&
+	    acpi_dev_hid_uid_match(ACPI_COMPANION(&pdev->dev), "INT3446", NULL) &&
+	    dmi_check_system(dell5285_lpss_dmi)) {
+		dev_info(&pdev->dev, "Dell 5285: applying IGNORE_RESOURCE_CONFLICTS for I2C4\n");
+		data = &spt_i2c_info_ignore_conflicts;
+	}
+
 	info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);
 	if (!info)
 		return -ENOMEM;
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields for Dell Latitude 5285
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
@ 2026-03-24 21:41   ` Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data " Thierry Chatard
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard, kernel test robot

The Dell Latitude 5285 BIOS leaves the GNVS fields C0TP, L0CL, and L1CL
at zero at boot. The TPS68470 clock driver reads L0CL and L1CL to select
the output frequency; with both fields zero the clock outputs are disabled,
and neither camera sensor can communicate over I2C.

Additionally, when C0TP=0 the ACPI _DEP method on INT3479 returns PCI0 as
its dependency instead of CLP0 (the INT3472 device), causing ipu_bridge to
never create the i2c-INT3479:00 client for the front camera.

Add a DMI-gated fixup that runs at TPS68470 probe time and writes 0x02
(19.2 MHz) into C0TP, L0CL, and L1CL.

The GNVS physical address is discovered at run time by scanning the raw
AML of the DSDT (and any SSDTs) for the GNVS SystemMemory OperationRegion
definition (opcode sequence 0x5B 0x80 "GNVS" 0x00). The parsed address is
then mapped with acpi_os_map_memory(), which is safe because ACPI NVS
memory is reserved by the firmware and already mapped by the OS. No
hard-coded physical addresses are used.

Field byte offsets within the GNVS region (verified against DSDT
disassembly on this platform, region size 0x0725 bytes):
  C0TP: 0x43A   L0CL: 0x4F7   L1CL: 0x549

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603211747.Z6xudmNd-lkp@intel.com/
---
 drivers/platform/x86/intel/int3472/tps68470.c | 201 ++++++++++++++++++
 1 file changed, 201 insertions(+)

diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
index a496075c0..c9686426f 100644
--- a/drivers/platform/x86/intel/int3472/tps68470.c
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
@@ -2,8 +2,10 @@
 /* Author: Dan Scally <djrscally@gmail.com> */
 
 #include <linux/acpi.h>
+#include <linux/dmi.h>
 #include <linux/i2c.h>
 #include <linux/kernel.h>
+#include <linux/unaligned.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/tps68470.h>
 #include <linux/platform_device.h>
@@ -140,6 +142,203 @@ skl_int3472_fill_clk_pdata(struct device *dev, struct tps68470_clk_platform_data
 	return n_consumers;
 }
 
+/* Dell Latitude 5285 GNVS fix
+ *
+ * The BIOS leaves GNVS fields C0TP, L0CL and L1CL at zero after POST.
+ * With C0TP=0 the ACPI _DEP on INT3479 resolves to PCI0 instead of CLP0
+ * (INT3472), so ipu_bridge never creates i2c-INT3479:00 (OV5670 front cam).
+ * With L0CL=L1CL=0 the TPS68470 clock driver disables all clock outputs,
+ * making both sensors unreachable over I2C.
+ *
+ * Fix: at TPS68470 probe time, locate the GNVS SystemMemory OperationRegion
+ * by scanning the DSDT/SSDTs for its AML definition, map the region, and
+ * write 0x02 (19.2 MHz) into C0TP, L0CL and L1CL.
+ *
+ * Field byte offsets (verified from DSDT disassembly, GNVS size 0x0725):
+ *   C0TP: 0x43A   L0CL: 0x4F7   L1CL: 0x549
+ */
+#define DELL5285_C0TP_OFF	0x43A
+#define DELL5285_L0CL_OFF	0x4F7
+#define DELL5285_L1CL_OFF	0x549
+/* Minimum GNVS region size: last field (L1CL) is 1 byte at 0x549 */
+#define DELL5285_GNVS_MIN_SIZE	(DELL5285_L1CL_OFF + 1)
+
+/* AML integer opcodes (ACPI 6.4, section 20.2.3) */
+#define AML_ZERO_OP		0x00
+#define AML_ONE_OP		0x01
+#define AML_BYTE_PREFIX		0x0A
+#define AML_WORD_PREFIX		0x0B
+#define AML_DWORD_PREFIX	0x0C
+#define AML_QWORD_PREFIX	0x0E
+
+/**
+ * aml_parse_int - Parse one AML integer opcode at @p.
+ * @p:   Pointer to the current position in the AML byte stream.
+ * @end: One past the last valid byte of the AML buffer.
+ * @val: Output: the parsed integer value.
+ *
+ * Returns the number of bytes consumed, or 0 on failure.
+ */
+static int aml_parse_int(const u8 *p, const u8 *end, u64 *val)
+{
+	if (p >= end)
+		return 0;
+	switch (*p) {
+	case AML_ZERO_OP:
+		*val = 0;
+		return 1;
+	case AML_ONE_OP:
+		*val = 1;
+		return 1;
+	case AML_BYTE_PREFIX:
+		if (p + 2 > end)
+			return 0;
+		*val = p[1];
+		return 2;
+	case AML_WORD_PREFIX:
+		if (p + 3 > end)
+			return 0;
+		*val = get_unaligned_le16(p + 1);
+		return 3;
+	case AML_DWORD_PREFIX:
+		if (p + 5 > end)
+			return 0;
+		*val = get_unaligned_le32(p + 1);
+		return 5;
+	case AML_QWORD_PREFIX:
+		if (p + 9 > end)
+			return 0;
+		*val = get_unaligned_le64(p + 1);
+		return 9;
+	}
+	return 0;
+}
+
+/**
+ * dell5285_gnvs_from_table - Scan one ACPI table for the GNVS OperationRegion.
+ * @tbl:  ACPI table header; the AML body is scanned for the GNVS signature.
+ * @addr: Output: physical base address of the GNVS region.
+ * @size: Output: byte length of the GNVS region.
+ *
+ * Searches the AML body of @tbl for the byte sequence:
+ *   ExtOp(0x5B) OpRegionOp(0x80) NameSeg("GNVS") RegionSpace(SystemMemory=0x00)
+ * followed by two AML integers (region address and length).
+ *
+ * Returns true and fills @addr / @size if found and plausible.
+ */
+static bool dell5285_gnvs_from_table(const struct acpi_table_header *tbl,
+				     phys_addr_t *addr, u32 *size)
+{
+	/* AML: ExtOp OpRegionOp NameSeg("GNVS") SystemMemory */
+	static const u8 sig[] = { 0x5B, 0x80, 'G', 'N', 'V', 'S', 0x00 };
+	const u8 *aml = (const u8 *)tbl + sizeof(*tbl);
+	const u8 *end = (const u8 *)tbl + tbl->length;
+	const u8 *p;
+
+	for (p = aml; p + sizeof(sig) < end; p++) {
+		u64 region_addr, region_size;
+		int consumed;
+
+		if (memcmp(p, sig, sizeof(sig)) != 0)
+			continue;
+
+		p += sizeof(sig);
+		consumed = aml_parse_int(p, end, &region_addr);
+		if (!consumed || !region_addr)
+			continue;
+
+		p += consumed;
+		consumed = aml_parse_int(p, end, &region_size);
+		if (!consumed || region_size < DELL5285_GNVS_MIN_SIZE)
+			continue;
+
+		*addr = (phys_addr_t)region_addr;
+		*size = (u32)region_size;
+		return true;
+	}
+	return false;
+}
+
+/**
+ * dell5285_gnvs_find - Locate the GNVS OperationRegion by scanning DSDT and SSDTs.
+ * @addr: Output: physical base address of the GNVS region.
+ * @size: Output: byte length of the GNVS region.
+ *
+ * Returns true if the GNVS region was found in any ACPI table.
+ */
+static bool dell5285_gnvs_find(phys_addr_t *addr, u32 *size)
+{
+	struct acpi_table_header *tbl;
+	u32 i;
+
+	/* DSDT */
+	if (ACPI_SUCCESS(acpi_get_table(ACPI_SIG_DSDT, 1, &tbl))) {
+		bool found = dell5285_gnvs_from_table(tbl, addr, size);
+
+		acpi_put_table(tbl);
+		if (found)
+			return true;
+	}
+
+	/* SSDTs (instance numbers start at 1, stop at first failure) */
+	for (i = 1; i <= 32; i++) {
+		bool found;
+
+		if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_SSDT, i, &tbl)))
+			break;
+		found = dell5285_gnvs_from_table(tbl, addr, size);
+		acpi_put_table(tbl);
+		if (found)
+			return true;
+	}
+
+	return false;
+}
+
+static const struct dmi_system_id dell5285_gnvs_dmi[] = {
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+		},
+	},
+	{ }
+};
+
+static void dell5285_gnvs_fix(void)
+{
+	phys_addr_t gnvs_addr;
+	u32 gnvs_size;
+	void *gnvs;
+
+	if (!dmi_check_system(dell5285_gnvs_dmi))
+		return;
+
+	if (!dell5285_gnvs_find(&gnvs_addr, &gnvs_size)) {
+		pr_err("int3472-tps68470: Dell 5285: GNVS OperationRegion not found in DSDT/SSDTs\n");
+		return;
+	}
+
+	gnvs = acpi_os_map_memory(gnvs_addr, gnvs_size);
+	if (!gnvs) {
+		pr_err("int3472-tps68470: Dell 5285: failed to map GNVS at %pa\n",
+		       &gnvs_addr);
+		return;
+	}
+
+	pr_info("int3472-tps68470: Dell 5285 GNVS fix at %pa: C0TP=0x%02x L0CL=0x%02x L1CL=0x%02x -> 0x02\n",
+		&gnvs_addr,
+		*(u8 *)(gnvs + DELL5285_C0TP_OFF),
+		*(u8 *)(gnvs + DELL5285_L0CL_OFF),
+		*(u8 *)(gnvs + DELL5285_L1CL_OFF));
+
+	*(u8 *)(gnvs + DELL5285_C0TP_OFF) = 0x02;
+	*(u8 *)(gnvs + DELL5285_L0CL_OFF) = 0x02;
+	*(u8 *)(gnvs + DELL5285_L1CL_OFF) = 0x02;
+
+	acpi_os_unmap_memory(gnvs, gnvs_size);
+}
+
 static int skl_int3472_tps68470_probe(struct i2c_client *client)
 {
 	struct acpi_device *adev = ACPI_COMPANION(&client->dev);
@@ -155,6 +354,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
 	if (!adev)
 		return -ENODEV;
 
+	dell5285_gnvs_fix();
+
 	n_consumers = skl_int3472_fill_clk_pdata(&client->dev, &clk_pdata);
 	if (n_consumers < 0)
 		return n_consumers;
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data for Dell Latitude 5285
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
@ 2026-03-24 21:41   ` Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
  4 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Dell Latitude 5285 2-in-1 has two cameras connected through a TPS68470
PMIC/clock/GPIO hub:

  Front: OV5670 (ACPI INT3479) on I2C4
  Back:  OV8858 (ACPI INT3477) on I2C2, daisy-chained behind TPS68470
         S_I2C port (controlled by reg 0x43 S_I2C_CTL)

GPIO mapping (TPS68470):
  INT3479 (OV5670): GPIO3 = reset, GPIO4 = powerdown (both active-low)
  INT3477 (OV8858): GPIO9 = s_resetn, GPIO7 = s_enable (both active-low)
    GPIO9 and GPIO7 are the TPS68470 secondary-port GPIOs (SGPO reg 0x22
    bits 2 and 0), not regular GPDO outputs.

Regulator mapping:
  CORE  -> dvdd  / INT3477
  ANA   -> avdd  / INT3477
  VIO   -> dovdd / INT3477
  VSIO  -> avdd  / INT3479 and vsio / INT3477 (always_on: keeps S_I2C_CTL
           non-zero from boot so OV8858 is reachable on I2C2 at any time)
  AUX1  -> dvdd  / INT3479
  AUX2  -> dovdd / INT3479

Marking VSIO always_on ensures the TPS68470 S_I2C passthrough is active
from the moment the PMIC driver probes, eliminating a timing dependency
between TPS68470 and ov8858 probe ordering.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 .../x86/intel/int3472/tps68470_board_data.c   | 163 ++++++++++++++++++
 1 file changed, 163 insertions(+)

diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
index 71357a036..a5b469dcb 100644
--- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
+++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
@@ -287,6 +287,162 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
 	},
 };
 
+/* Settings for Dell Latitude 5285 2-in-1 */
+
+static struct regulator_consumer_supply dell_5285_int3477_ana_consumer_supplies[] = {
+	REGULATOR_SUPPLY("avdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3477_core_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dvdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3477_vio_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dovdd", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_vsio_consumer_supplies[] = {
+	REGULATOR_SUPPLY("avdd", "i2c-INT3479:00"),
+	/* S_I2C_CTL: must be enabled for OV8858 I2C daisy-chain access */
+	REGULATOR_SUPPLY("vsio", "i2c-INT3477:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_aux1_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dvdd", "i2c-INT3479:00"),
+};
+
+static struct regulator_consumer_supply dell_5285_int3479_aux2_consumer_supplies[] = {
+	REGULATOR_SUPPLY("dovdd", "i2c-INT3479:00"),
+};
+
+static const struct regulator_init_data dell_5285_tps68470_core_reg_init_data = {
+	.constraints = {
+		.min_uV = 1200000,
+		.max_uV = 1200000,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_core_consumer_supplies),
+	.consumer_supplies = dell_5285_int3477_core_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_ana_reg_init_data = {
+	.constraints = {
+		.min_uV = 2815200,
+		.max_uV = 2815200,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_ana_consumer_supplies),
+	.consumer_supplies = dell_5285_int3477_ana_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vcm_reg_init_data = {
+	.constraints = {
+		.min_uV = 2815200,
+		.max_uV = 2815200,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = 0,
+	.consumer_supplies = NULL,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vio_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3477_vio_consumer_supplies),
+	.consumer_supplies = dell_5285_int3477_vio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_vsio_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		/*
+		 * Keep S_I2C_CTL enabled from boot so OV8858 I2C daisy-chain
+		 * is accessible before ov8858 driver probes.
+		 */
+		.always_on = 1,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_vsio_consumer_supplies),
+	.consumer_supplies = dell_5285_int3479_vsio_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_aux1_reg_init_data = {
+	.constraints = {
+		.min_uV = 1213200,
+		.max_uV = 1213200,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_aux1_consumer_supplies),
+	.consumer_supplies = dell_5285_int3479_aux1_consumer_supplies,
+};
+
+static const struct regulator_init_data dell_5285_tps68470_aux2_reg_init_data = {
+	.constraints = {
+		.min_uV = 1800600,
+		.max_uV = 1800600,
+		.apply_uV = 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(dell_5285_int3479_aux2_consumer_supplies),
+	.consumer_supplies = dell_5285_int3479_aux2_consumer_supplies,
+};
+
+static const struct tps68470_regulator_platform_data dell_5285_tps68470_pdata = {
+	.reg_init_data = {
+		[TPS68470_CORE] = &dell_5285_tps68470_core_reg_init_data,
+		[TPS68470_ANA]  = &dell_5285_tps68470_ana_reg_init_data,
+		[TPS68470_VCM]  = &dell_5285_tps68470_vcm_reg_init_data,
+		[TPS68470_VIO]  = &dell_5285_tps68470_vio_reg_init_data,
+		[TPS68470_VSIO] = &dell_5285_tps68470_vsio_reg_init_data,
+		[TPS68470_AUX1] = &dell_5285_tps68470_aux1_reg_init_data,
+		[TPS68470_AUX2] = &dell_5285_tps68470_aux2_reg_init_data,
+	},
+};
+
+static struct gpiod_lookup_table dell_5285_int3477_gpios = {
+	.dev_id = "i2c-INT3477:00",
+	.table = {
+		/*
+		 * TPS68470 GPIO9 = s_resetn (secondary camera reset, active-low)
+		 * TPS68470 GPIO7 = s_enable (secondary camera enable/powerdown)
+		 * These logic outputs are specifically designed for secondary
+		 * camera control on the TPS68470. Matches Surface Go pattern.
+		 */
+		GPIO_LOOKUP("tps68470-gpio", 9, "reset", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("tps68470-gpio", 7, "powerdown", GPIO_ACTIVE_LOW),
+		{ }
+	}
+};
+
+static struct gpiod_lookup_table dell_5285_int3479_gpios = {
+	.dev_id = "i2c-INT3479:00",
+	.table = {
+		GPIO_LOOKUP("tps68470-gpio", 3, "reset", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("tps68470-gpio", 4, "powerdown", GPIO_ACTIVE_LOW),
+		{ }
+	}
+};
+
+static const struct int3472_tps68470_board_data dell_5285_tps68470_board_data = {
+	.dev_name = "i2c-INT3472:05",
+	.tps68470_regulator_pdata = &dell_5285_tps68470_pdata,
+	.n_gpiod_lookups = 2,
+	.tps68470_gpio_lookup_tables = {
+		&dell_5285_int3477_gpios,
+		&dell_5285_int3479_gpios,
+	},
+};
+
 static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
 	{
 		.matches = {
@@ -316,6 +472,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
 		},
 		.driver_data = (void *)&dell_7212_tps68470_board_data,
 	},
+	{
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR,   "Dell Inc."),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Latitude 5285"),
+		},
+		.driver_data = (void *)&dell_5285_tps68470_board_data,
+	},
 	{ }
 };
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477)
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
                     ` (2 preceding siblings ...)
  2026-03-24 21:41   ` [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data " Thierry Chatard
@ 2026-03-24 21:41   ` Thierry Chatard
  2026-03-24 21:41   ` [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
  4 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Omnivision OV8858 is used as the rear camera in several Intel
IPU3-based devices (e.g. Dell Latitude 5285 2-in-1). Its ACPI HID is
INT3477. Add a sensor configuration entry with a link frequency of
360 MHz to allow ipu_bridge to create the firmware node for this sensor.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/media/pci/intel/ipu-bridge.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index fc6608e33..f51749d0f 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -63,6 +63,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
 	IPU_SENSOR_CONFIG("INT33F0", 1, 384000000),
 	/* Omnivision OV2740 */
 	IPU_SENSOR_CONFIG("INT3474", 1, 180000000),
+	/* Omnivision OV8858 */
+	IPU_SENSOR_CONFIG("INT3477", 1, 360000000),
 	/* Omnivision OV5670 */
 	IPU_SENSOR_CONFIG("INT3479", 1, 422400000),
 	/* Omnivision OV8865 */
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply
  2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
                     ` (3 preceding siblings ...)
  2026-03-24 21:41   ` [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
@ 2026-03-24 21:41   ` Thierry Chatard
  4 siblings, 0 replies; 13+ messages in thread
From: Thierry Chatard @ 2026-03-24 21:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-media, platform-driver-x86, lee, djrscally, hansg,
	ilpo.jarvinen, mchehab, sakari.ailus, jacopo.mondi, nicholas,
	Thierry Chatard

The Omnivision OV8858 appears in ACPI firmware under the HID INT3477 on
Intel IPU3-based platforms such as the Dell Latitude 5285 2-in-1. Add
INT3477 to the ACPI match table so the driver binds when instantiated by
ipu_bridge.

On the Dell Latitude 5285 the OV8858 is powered through a TPS68470 PMIC.
The TPS68470 VSIO regulator controls the S_I2C_CTL register (0x43) which
enables I2C passthrough to the sensor. The board data for this machine
maps VSIO to the supply name "vsio" for INT3477. Add "vsio" to
ov8858_supply_names[] so the driver requests this regulator at probe time.

The existing supply array had a duplicate "dvdd" entry; replace it with
the new "vsio" entry and reorder to: avdd, dvdd, dovdd, vsio.

Signed-off-by: Thierry Chatard <tchatard@gmail.com>
---
 drivers/media/i2c/ov8858.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
index 3f45f7fab..5bfea237b 100644
--- a/drivers/media/i2c/ov8858.c
+++ b/drivers/media/i2c/ov8858.c
@@ -79,8 +79,9 @@
 
 static const char * const ov8858_supply_names[] = {
 	"avdd",		/* Analog power */
-	"dovdd",	/* Digital I/O power */
 	"dvdd",		/* Digital core power */
+	"dovdd",	/* Digital I/O power */
+	"vsio",		/* Secondary I2C / S_I2C_CTL enable */
 };
 
 struct regval {
@@ -1981,11 +1982,18 @@ static const struct of_device_id ov8858_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ov8858_of_match);
 
+static const struct acpi_device_id ov8858_acpi_ids[] = {
+	{ "INT3477" },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(acpi, ov8858_acpi_ids);
+
 static struct i2c_driver ov8858_i2c_driver = {
 	.driver = {
 		.name = "ov8858",
 		.pm = &ov8858_pm_ops,
 		.of_match_table = ov8858_of_match,
+		.acpi_match_table = ACPI_PTR(ov8858_acpi_ids),
 	},
 	.probe		= ov8858_probe,
 	.remove		= ov8858_remove,
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-03-24 21:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20  0:09 [PATCH 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
2026-03-20  0:09 ` [PATCH 1/5] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
2026-03-20  0:09 ` [PATCH 2/5] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
2026-03-21  9:44   ` kernel test robot
2026-03-20  0:09 ` [PATCH 3/5] platform/x86: int3472: tps68470: add board data " Thierry Chatard
2026-03-20  0:09 ` [PATCH 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
2026-03-20  0:09 ` [PATCH 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard
2026-03-24 21:41 ` [PATCH v2 0/5] Enable dual cameras on Dell Latitude 5285 2-in-1 Thierry Chatard
2026-03-24 21:41   ` [PATCH v2 1/3] platform/x86: intel_lpss: add resource conflict quirk for Dell Latitude 5285 Thierry Chatard
2026-03-24 21:41   ` [PATCH v2 2/3] platform/x86: int3472: tps68470: fix GNVS clock fields " Thierry Chatard
2026-03-24 21:41   ` [PATCH v2 3/3] platform/x86: int3472: tps68470: add board data " Thierry Chatard
2026-03-24 21:41   ` [PATCH v2 4/5] media: ipu-bridge: add sensor configuration for OV8858 (INT3477) Thierry Chatard
2026-03-24 21:41   ` [PATCH v2 5/5] media: ov8858: add ACPI device ID INT3477 and vsio power supply Thierry Chatard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox