Skip to content

patches/6.19: int3472: map Surface Pro 7+ ov8865 DVDD supply pin - #2241

Closed
luqqas96 wants to merge 1 commit into
linux-surface:masterfrom
luqqas96:int3472-sp7plus-ov8865-dvdd
Closed

luqqas96 wants to merge 1 commit into
linux-surface:masterfrom
luqqas96:int3472-sp7plus-ov8865-dvdd

Conversation

@luqqas96

Copy link
Copy Markdown

What

This PR adds an entry to int3472_gpio_map[] in patches/6.19/0013-cameras.patch to map the Surface Pro 7+ rear camera's (ov8865 / INT347A:00) digital power supply pin (0xaf, declared in DSDT as type 0x08) to INT3472_GPIO_TYPE_HANDSHAKE with supply name dvdd.

With this mapping, the rear camera on the Surface Pro 7+ powers up and streams reliably (1280x720 @ ~30 fps and 3264x2448 RAW @ 15 fps).

Why

On the Surface Pro 7+, the ACPI INT3472:01 device declares the rear sensor's digital supply as GPIO type 0x08 on pin 0xaf.

  1. Mainline status: In mainline kernel discrete.c, type 0x08 has no case statement and falls through to unknown, so no regulator is ever registered.
  2. Current linux-surface status: In this tree's 0013-cameras.patch, type 0x08 was tentatively mapped to the supply name pwr1. Because no sensor driver requests pwr1, the resulting regulator stays disabled (users=0) and the sensor never receives digital power:
ov8865 i2c-INT347A:00: supply dvdd not found, using dummy regulator
int3472-discrete INT3472:01: GPIO type 0x08 detected on pin 0xaf
int3472-discrete INT3472:01:   con_id=pwr1, flags=0x0
ov8865 i2c-INT347A:00: failed to perform sw reset
ov8865 i2c-INT347A:00: Error -121 runtime-resuming sensor, cannot instantiate VCM
  1. Previous RFC approach ([RFC] cameras: ov8865: enable optional pwr1 supply on Surface Pro 7+ #2201): PR [RFC] cameras: ov8865: enable optional pwr1 supply on Surface Pro 7+ #2201 proposed adding an optional pwr1 supply request into ov8865.c. However, pwr1 is an out-of-tree name specific to 0013-cameras.patch and cannot be upstreamed to mainline.

Solution

The pin is the sensor's DVDD rail. Mapping the firmware's type 0x08 to INT3472_GPIO_TYPE_HANDSHAKE (which provides dvdd) keyed on the sensor HID INT347A in int3472_gpio_map[] solves the problem cleanly:

	{	/* Surface Pro 7+ declares the ov8865 dvdd pin as type 0x08 */
		.hid = "INT347A",
		.type_from = 0x08,
		.type_to = INT3472_GPIO_TYPE_HANDSHAKE,
		.con_id = "dvdd",
		.enable_time_us = GPIO_REGULATOR_ENABLE_TIME,
	},

Advantages:

  • No changes to ov8865.c: The driver continues requesting standard dvdd.
  • Precedent: Follows the existing mapping architecture used for OVTI08F4 in discrete.c.
  • Targeted: Keyed specifically on HID INT347A, so Pro 9 (OVTI5693 / OVTID858) remains untouched.
  • Mainline clean: Can be sent directly upstream to platform-driver-x86.

Verification

Tested on Microsoft Surface Pro 7+ (Intel Tiger Lake IPU6 8086:9a19, Fedora 44, kernel 6.19.8-3.surface.fc43, libcamera 0.7.1):

  • ov8865 i2c-INT347A:00: Instantiated dw9719 VCM
  • Stream capture: 1280x720 @ 30 fps (30/30 frames) and 3264x2448 RAW @ 15 fps (10/10 frames).
  • Software reset and runtime-PM errors completely resolved.

Refs

Add int3472_gpio_map entry for INT347A (ov8865 on Surface Pro 7+) mapping
sensor-resource type 0x08 to INT3472_GPIO_TYPE_HANDSHAKE ("dvdd").

This fixes rear camera initialization without needing out-of-tree sensor
driver changes or DSDT overrides.

Link: linux-surface#2201
Link: linux-surface#1702
Signed-off-by: luqqas96 <[email protected]>
@luqqas96

Copy link
Copy Markdown
Author

Closing in favour of the generic POWER1 -> dvdd upstream patchset submitted by @JakobBerg to linux-media and platform-driver-x86:
https://lore.kernel.org/linux-media/[email protected]/

...as well as the consolidated Surface Pro 7+ camera patchset in PR #2252 by @dmanresa-saes.

The independent hardware validation on stock OEM DSDT (bare firmware table, GPIO 175 / type 0x08, sustained 30 fps capture without ACPI overrides) remains documented in the discussion thread of issue #1702.

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.

1 participant