Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: ov5693: add OVTI5693 ACPI HID for IPU6 Surface devices
@ 2026-07-08 21:36 Fernando Rimoli
  2026-07-09 13:17 ` Dan Scally
                   ` (2 more replies)
  0 siblings, 3 replies; 51+ messages in thread
From: Fernando Rimoli @ 2026-07-08 21:36 UTC (permalink / raw)
  To: Daniel Scally, Sakari Ailus, linux-media
  Cc: Mauro Carvalho Chehab, linux-kernel, Fernando Rimoli

The ov5693 driver only matches the "INT33BE" ACPI HID. Some Intel IPU6
Surface devices (e.g. Microsoft Surface Pro 9) enumerate the same OV5693
front camera with the ACPI HID "OVTI5693" instead. Without this HID the
i2c core never binds the driver, and the IPU bridge never builds the
firmware node graph for the sensor, so the front camera is unusable.

Add "OVTI5693" to the sensor driver's ACPI match table and to the IPU
bridge's supported-sensor list. The link frequency (419200000) matches
the existing INT33BE entry, as it is the same sensor. Devices that use
"INT33BE" (e.g. Surface Go 4) are unaffected.

Tested on Surface Pro 9 (IPU6): the sensor enumerates as OVTI5693:00
(ACPI path \_SB_.PC00.I2C3.CAMF) and binds with this change.

Link: https://github.com/linux-surface/linux-surface/pull/2171
Signed-off-by: Fernando Rimoli <fernandorimoli11@gmail.com>
---
Note: this HID addition makes the sensor bind and enumerate, but a fully
working front camera on IPU6 also requires programming MIPI_CTRL00
(0x4800 = 0x2d) before stream-on, otherwise the IPU6 CSI-2 receiver never
locks and capture times out. That register change is being handled
separately (see the Link: above). This patch is independent and useful on
its own for enumeration, so I'm sending it standalone; happy to reorder if
you'd prefer it after the register fix.

 drivers/media/i2c/ov5693.c           | 1 +
 drivers/media/pci/intel/ipu-bridge.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 4cc796bbe..02236f3db 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -1396,6 +1396,7 @@ static const struct dev_pm_ops ov5693_pm_ops = {
 
 static const struct acpi_device_id ov5693_acpi_match[] = {
 	{"INT33BE"},
+	{"OVTI5693"},
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match);
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index 88581a4c0..b70d61099 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -93,6 +93,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
 	IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000),
 	/* Omnivision OV5675 */
 	IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000),
+	/* Omnivision OV5693 */
+	IPU_SENSOR_CONFIG("OVTI5693", 1, 419200000),
 	/* Omnivision OV8856 */
 	IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000),
 	/* Sony IMX471 */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 51+ messages in thread
* Re: [PATCH v4 3/6] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock
@ 2026-09-01 19:23 Lucas Lis
  0 siblings, 0 replies; 51+ messages in thread
From: Lucas Lis @ 2026-09-01 19:23 UTC (permalink / raw)
  To: linux-media; +Cc: sakari.ailus, dan.scally, fernandorimoli11

Tested-by: Lucas Lis <lucaseze.lis@gmail.com> # Surface Pro 7+, IPU6
Tiger Lake (0x9a19)

Tested the v4 series on a Microsoft Surface Pro 7+: Intel Tiger Lake IPU6
(8086:9a19), front sensor enumerating as INT33BE, Fedora 44 running the
linux-surface kernel 6.19.8-3.surface.fc43.

Full build log, negative control and disassembly evidence also posted as
luqqas96 on GitHub:
https://github.com/linux-surface/linux-surface/pull/2171#issuecomment-5495563179

Base: vanilla 6.19.8 with the ov5693.c and ipu-bridge.c hunks of the
linux-surface 0013-cameras.patch applied, then this series on top. Patches 1
and 2 were already present in that tree, so they are not exercised here;
patch 6's OVTI5693 hunk needed manual application because that tree carries a
duplicate OVTI5693 entry, as reported by Fil Dunsky. Only the INT33BE path is
exercised on this machine.

With the series applied:
200/200 frames, 2592x1944, 28.64 fps
MIPI_CTRL00 (0x4800), read over i2c while streaming: 0x20

Negative control, same build with only this line removed:
- IPU_SENSOR_CONFIG_MATCH_FL("INT33BE", PCI_DEVICE_ID_INTEL_IPU6,
- CSI2_CLK_NONCONTINUOUS, 1, 419200000),

0/200 frames
MIPI_CTRL00 (0x4800), read over i2c: 0x00
intel_ipu6_isys: stream stop time out / stream close time out

Verified at the binary level that the sensor config array went from 31 to 30
entries, so exactly one entry was removed.

One difference from Fil Dunsky's negative control worth recording: he saw the
first capture after boot succeed with the entry removed, and only later
captures hang. On this machine the first capture after boot already returned
zero frames. I checked the journal for that boot: there was no earlier stream
attempt and no teardown before my test, so it really was the first stream of
that boot. I capture through libcamera rather than from the raw ISYS node, and
a desktop session had enumerated the sensor at login; either could explain the
difference, and I have not isolated which. It does not change the conclusion,
and for an end user on a normal desktop it means there is no working first
stream at all without the entry.

On the out-of-tree rebuild set: rebuilding ipu-bridge alone was sufficient
here, with an unmodified in-tree intel-ipu6 and intel-ipu6-isys. The
linux-surface Fedora kernel sets "# CONFIG_MODVERSIONS is not set", so there
is no symbol CRC check to fail. Of the five files including media/ipu-bridge.h,
only ipu-bridge.c dereferences members of struct ipu_sensor; ipu6.c only calls
ipu_bridge_init() and passes a function pointer. The "rebuild the pair"
guidance therefore applies to CONFIG_MODVERSIONS=y kernels.

Caveats on the frame counts: libcamera on this machine is not stock. It is
0.7.1 rebuilt locally with a patch that filters out the sensor's binned modes,
held back with versionlock. Capturing from the raw ISYS node as a cross-check
is not possible here: it returns csi2-4 Transfer FIFO overflow even with the
camera healthy and libcamera pulling 28.64 fps at the same time. The register
reads above do not go through libcamera; they are direct i2c reads taken while
the sensor is streaming.

This machine also carries two downstream workarounds that write
MIPI_CTRL00 = 0x2d, a polling systemd service and a locally patched ov5693.ko.
Both were stopped and removed for every measurement above, since 0x2d has bit 5
set and would have masked the result.

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

end of thread, other threads:[~2026-09-02 19:12 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 21:36 [PATCH] media: ov5693: add OVTI5693 ACPI HID for IPU6 Surface devices Fernando Rimoli
2026-07-09 13:17 ` Dan Scally
2026-07-14  9:32 ` Sakari Ailus
2026-07-17 13:20 ` [PATCH v2 0/3] media: Enable the OV5693 front camera on " Fernando Rimoli
2026-07-17 13:20   ` [PATCH v2 1/3] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-07-17 13:20   ` [PATCH v2 2/3] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-07-17 13:20   ` [PATCH v2 3/3] media: i2c: ov5693: Gate the MIPI clock lane for IPU6 Fernando Rimoli
2026-07-19 16:25     ` Jakob Berg Jespersen
2026-07-19 22:42     ` Sakari Ailus
2026-07-20 16:38   ` [PATCH v3 0/4] media: Enable the OV5693 front camera on IPU6 Surface devices Fernando Rimoli
2026-07-20 16:38     ` [PATCH v3 1/4] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-07-20 16:38     ` [PATCH v3 2/4] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-07-20 21:09       ` Dan Scally
2026-07-20 16:38     ` [PATCH v3 3/4] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Fernando Rimoli
2026-07-20 21:49       ` Dan Scally
2026-07-30  7:46       ` Sakari Ailus
2026-08-31 18:16         ` Fernando Rimoli
2026-07-20 16:38     ` [PATCH v3 4/4] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Fernando Rimoli
2026-07-20 21:56       ` Dan Scally
2026-07-20 23:50         ` Fernando Rimoli
2026-07-30  7:32           ` Sakari Ailus
2026-08-31 18:17             ` Fernando Rimoli
2026-08-31 18:18         ` Fernando Rimoli
2026-08-31 18:18     ` [PATCH v4 0/6] media: Enable the OV5693 front camera on IPU6 Surface devices Fernando Rimoli
2026-08-31 18:18       ` [PATCH v4 1/6] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-08-31 18:18       ` [PATCH v4 2/6] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-08-31 18:18       ` [PATCH v4 3/6] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Fernando Rimoli
2026-09-01  9:32         ` Jakob Berg Jespersen
2026-09-01  9:56           ` Fernando Rimoli
2026-09-01 16:34           ` Fernando Rimoli
2026-09-01 18:32             ` Jakob Berg Jespersen
2026-09-01 18:46         ` Fil Dunsky
2026-09-02  7:27         ` Sakari Ailus
2026-08-31 18:18       ` [PATCH v4 4/6] media: ipu-bridge: Assign endpoint property indices dynamically Fernando Rimoli
2026-09-02  6:33         ` Sakari Ailus
2026-08-31 18:18       ` [PATCH v4 5/6] media: ipu-bridge: Match sensor configs per IPU and add config flags Fernando Rimoli
2026-09-01  9:57         ` Fernando Rimoli
2026-09-02  6:42         ` Sakari Ailus
2026-08-31 18:18       ` [PATCH v4 6/6] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Fernando Rimoli
2026-09-02  4:42         ` Kengo Oki
2026-09-02 14:23       ` [PATCH v5 0/7] media: Enable the OV5693 front camera on IPU6 Surface devices Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 1/7] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 2/7] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 3/7] dt-bindings: media: ov5693: Add clock-noncontinuous Fernando Rimoli
2026-09-02 17:27           ` Conor Dooley
2026-09-02 14:23         ` [PATCH v5 4/7] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Fernando Rimoli
2026-09-02 19:11           ` Fil Dunsky
2026-09-02 14:23         ` [PATCH v5 5/7] media: ipu-bridge: Assign endpoint property indices dynamically Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 6/7] media: ipu-bridge: Match sensor configs per IPU and add config flags Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 7/7] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Fernando Rimoli
  -- strict thread matches above, loose matches on Subject: below --
2026-09-01 19:23 [PATCH v4 3/6] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Lucas Lis

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