Skip to content

int3472: power up the Surface Pro 7+ rear and IR cameras (Pro 9 code unchanged) - #194

Open
T-Caster wants to merge 4 commits into
linux-surface:v7.3-surface-develfrom
T-Caster:int3472-sp7plus-7.3
Open

T-Caster wants to merge 4 commits into
linux-surface:v7.3-surface-develfrom
T-Caster:int3472-sp7plus-7.3

Conversation

@T-Caster

@T-Caster T-Caster commented Nov 15, 2026 •

Copy link
Copy Markdown

Three backports from mainline plus one small linux-surface commit that make the rear (OV8865) and infrared (OV7251) cameras of the Surface Pro 7+ power up on the 7.3 kernels. The front camera is covered by #193. The Surface Pro 9 code is not changed.

On the Pro 7+ the int3472 nodes describe two rails the driver does not hand to the sensors under the names they ask for:

  • Rear, INT347A: the second rail has GPIO type 0x08 (POWER1). The Pro 9 support registers it as pwr1, but ov8865 asks for dvdd, gets a dummy regulator and the sensor is never fully powered.
  • Infrared, INT347E: the power-enable GPIO is registered as avdd, but ov7251 asks for vdda. The first I2C write fails and the sensor never probes.
# Mainline Subject Author
1 torvalds/linux@70e6384fe0f4 platform/x86: int3472: Fix uninitialised variable warning Sakari Ailus
2 torvalds/linux@844982d3b993 platform/x86: int3472: Increase handshake GPIO delay to 200 ms Hans de Goede
3 torvalds/linux@59cab094b8b5 platform/x86: int3472: map the ov7251 power enable GPIO to "vdda" D. Manresa
4 – platform/x86: int3472: map the Surface Pro 7+ ov8865 POWER1 rail to "dvdd" Firas Sharary

1 and 2 are already in 7.3.y stable (they are in v7.3-surface, which is on 7.3.4), so they should drop out when this branch is rebased; they are here because 3 does not apply to the 7.3.0 base without them.

4 is linux-surface only. It adds one entry to the int3472 GPIO map: for INT347A only, type 0x08 gets the con_id dvdd. The rail is then registered by the existing Pro 9 0x08 code, so nothing changes for the Pro 9 (ov13858 still gets pwr1). Mainline solves this generically with torvalds/linux@34e31390a3b9 ("support the POWER1 GPIO type", maps 0x08 to dvdd for every device). When that arrives with 7.4, this entry can go together with the Pro 9 0x08 code.

Testing, Surface Pro 7+ (IPU6 Tiger Lake 8086:9a19, SKU Surface_Pro_7+_1960), Debian 13, linux-surface 7.3.4-1, with the int3472 module built from this branch:

  • Before: i2c-INT347E:00 has no driver bound; the rear camera lists in libcamera but a capture gets no frames.
  • After: GPIO type 0x08 detected on pin 0xaf, con_id=dvdd, all three sensors probe (OV7251 revision 7 (1F) detected, Instantiated dw9719 VCM). Raw capture from the ISYS nodes over repeated start/stop cycles delivered every frame for the rear (3264x2448, 15 fps) and infrared (640x480) cameras, and Howdy face authentication works with the infrared camera.

Note for anyone trying the infrared camera: its illuminator additionally needs the ov7251 strobe support, which is not part of this PR.

Sakari Ailus and others added 4 commits November 15, 2026 18:52
Fix a compiler warning about an uninitialised err_msg variable by printing
the error where it is handled:

drivers/platform/x86/intel/int3472/discrete.c:440:24: warning: ‘err_msg’ may be used uninitialized [-Wmaybe-uninitialized]
  440 |                 return dev_err_probe(int3472->dev, ret, err_msg);

Fixes: 5de691b ("platform/x86: Add intel_skl_int3472 driver")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

(cherry picked from commit 70e6384)
Signed-off-by: Firas Sharary <firassharary3@gmail.com>
There have been several reports of the sensor not properly powering on,
on laptops where an INT3472 handshake GPIO is used. Both with ov08x40 and
hi556 sensors.

Testing has shown that a delay of 200 ms is necessary in some cases.
The handshake GPIO is typically used to signal an extra bridge or other IC
with that IC running the full sensor power sequence based on the handshake
signal and also possible controlling I2C pass-through.

It seems that in some cases that extra IC takes up to 200 ms to before
the sensor is fully powered up and ready for I2C communication.

With the default handshake signal delay increased to 200 ms the quirk to
increase it to 45 ms for the ov08x40 is no longer necessary and is actually
undesirable since some ov08x40 setups also need the longer delay, drop it.

Fixes: 30359c2 ("platform/x86: int3472: Increase ov08x40 handshake GPIO delay to 45 ms")
Closes: https://lore.kernel.org/platform-driver-x86/20260816204247.2844986-1-opensource@inspiredexperts.com/
Reported-by: James Alexander <opensource@inspiredexperts.com>
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2333331
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2333647
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

(cherry picked from commit 844982d)
Signed-off-by: Firas Sharary <firassharary3@gmail.com>
On IPU6 designs carrying an OV7251 IR sensor (ACPI HID INT347E) the INT3472
describes the sensor's single gated rail as a power-enable GPIO, which the
driver registers as a regulator with con_id "avdd". The ov7251 driver and its
DT bindings name the sensor supplies vdda, vddd and vdddo, so the lookup finds
nothing, the rail is never enabled, and probe fails on the first I2C access:

  int3472-discrete INT3472:02: avdd  \_SB.GPI0 pin 131 active-high
  ov7251 i2c-INT347E:00: supply vdda not found, using dummy regulator
  ov7251 i2c-INT347E:00: probe with driver ov7251 failed with error -121

Map the power-enable GPIO to con_id "vdda" for INT347E, the same way the
existing entries map it to "vdd" for the mt9m114 and to "vana" for the imx471.
The sensor's other two supplies keep falling back to the dummy regulator,
which is correct here: the firmware gates a single rail.

The table already has an INT347E entry mapping the reset GPIO to "enable",
added when the ov7251 was brought up on these machines; this is the same class
of firmware-vs-binding name mismatch for the remaining pin.

Tested on a Microsoft Surface Pro 7+ (Tiger Lake, IPU6): with this change the
IR sensor probes, the illuminator strobes, and the camera streams 640x480 at
30 fps through libcamera. The same failure was reproduced independently on a
second Pro 7+ running stock firmware and a distro kernel, with no out-of-tree
code, in [1].

Developed with the assistance of an AI tool (Claude) and verified on hardware.

Link: linux-surface/linux-surface#1702 [1]
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: D. Manresa <dmanresa@gmail.com>
Tested-by: Jakob Berg Jespersen <dev@berg.pm>   # Surface Pro 7+, probe/power-on
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

(cherry picked from commit 59cab09)
Signed-off-by: Firas Sharary <firassharary3@gmail.com>
…dvdd"

On the Surface Pro 7+ the INT3472 for the rear camera (INT347A, ov8865)
describes a second power rail as GPIO type 0x08 (POWER1). The 0x08
handling added for the Surface Pro 9 registers that rail as "pwr1", the
name its ov13858 asks for, but ov8865 requests "dvdd". It gets a dummy
regulator instead and the sensor is never fully powered.

Add a GPIO map entry that names the 0x08 rail "dvdd" for INT347A only. The
Surface Pro 9 keeps its "pwr1" rail unchanged.

Upstream solves this generically with commit 34e3139 ("platform/x86:
int3472: support the POWER1 GPIO type"), which maps 0x08 to "dvdd" for all
devices; this entry can be dropped together with the Pro 9 0x08 handling
once that commit is picked up.

Assisted-by: LLM
Signed-off-by: Firas Sharary <firassharary3@gmail.com>
@T-Caster
T-Caster force-pushed the int3472-sp7plus-7.3 branch from 3874a43 to b78beef Compare November 15, 2026 17:06
@T-Caster T-Caster changed the title int3472: backport mainline fixes for the Surface Pro 7+ rear and IR cameras int3472: power up the Surface Pro 7+ rear and IR cameras (Pro 9 code unchanged) Nov 15, 2026
@T-Caster

Copy link
Copy Markdown
Author

I reworked this so it no longer touches the Surface Pro 9 code. Instead of backporting the mainline POWER1 commit, which replaced the Pro 9 0x08 handling, the Pro 7+ rear camera now gets a single GPIO map entry that names its 0x08 rail dvdd for INT347A only. The Pro 9 keeps pwr1. I also dropped "Clean up GPIO parsing", which was only needed by the POWER1 backport. Retested on the Pro 7+: all three cameras stream and IR face authentication works. The description is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants