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

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