Repository navigation
Conversation
|
Surface Pro 7+ here (Fedora 44, kernel Same fault, confirmedI also pinned down which pin it is. Sweeping GPIO state across an
So the rail exists, is registered, and is never enabled — because it is registered under a What
|
| Kernel | types with a case | con_ids |
|---|---|---|
6.19.8-3.surface |
00 01 08 0b 0c 0d 10 12 13 |
reset powerdown clk-enable privacy-led avdd dvdd pwr1 pwr2 hpd |
6.19.10-300.fc44 (stock Fedora) |
00 01 0b 0c 0d 12 13 |
reset powerdown clk-enable privacy-led avdd dvdd |
Mainline does not handle type 0x08 at all. The pwr1 name exists only here, and it
was introduced as an explicit guess for a type nobody had identified — the original comment
speculates it could be a focus motor or a flash.
That is why I think the patch as written cannot go upstream: it teaches a mainline sensor
driver to request a supply name that only exists in an out-of-tree patch. From mainline's
point of view ov8865 would be asking for a rail that never appears.
What the pin is
It is DVDD. I verified this by patching the DSDT so that INT3472:01's _DSM declares the
pin as type 0x12 instead of 0x08 — one byte, verified at ASL level — and booting with
the patched table:
int3472-discrete INT3472:01: GPIO type 0x12 detected on pin 0xaf
regulator name=INT3472:01-dvdd
ov8865 i2c-INT347A:00: Instantiated dw9719 VCM
3264x2448-SBGGR10/RAW 15 fps 10/10 frames
1280x720-ABGR8888/sRGB 30 fps 30/30 frames
Both original I2C errors are gone. The control is that the front ov5693 on the same
machine still complains about its own two supplies in that same boot, so this is not a
"something else changed" result. The front camera also needs the MIPI_CTRL00 write from
#2171 — same as you reported.
Suggested alternative: map it, don't rename it
Since the pin is DVDD, the smallest correct fix is to map the firmware's type to a type
the driver already understands, keyed on the sensor HID — which is exactly how the ov08x40
handshake pin is already handled in int3472_gpio_map[]:
{ /* 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 over renaming in the sensor driver:
- No change to
ov8865.c, so nothing depends on an out-of-tree supply name. - The map runs before the
switch, sotypebecomesHANDSHAKEand the existing
regulator path handles it — thecase 0x08:additions in0013-cameras.patchare not
needed for this sensor. - HID-keyed, so the Pro 9 (
OVTI5693/OVTID858) is untouched. - There is precedent for both halves:
OVTI08F4maps a pin todvdd, andINT347E
remaps a reset GPIO's meaning per device.
What I have and have not tested, stated plainly: I have measured that giving this pin
to the sensor as dvdd makes the camera work — via the DSDT override, on this machine.
I have not yet booted without the override with only the map entry applied, so the map
entry itself is untested in that form. I'm working on that and will report back either way.
Related: on this machine INT3472:02 (the ov7251 IR sensor, INT347E:00) registers no
GPIOs at all — not a mis-typed one, none. That is a different and earlier failure than
the rear camera's, in case anyone is looking at IR.
INT3472 can describe a second sensor power rail as a GPIO of type POWER1 (0x08), which the driver does not recognise, so the rail is left unmapped and never enabled: int3472-discrete INT3472:01: GPIO type 0x08 unknown; the sensor may not work On the Microsoft Surface Pro 7+ the rear camera's INT3472 (INT347A, ov8865) has such a pin; without it the ov8865 "dvdd" supply resolves to a dummy regulator and the sensor never probes. Define the POWER0 (0x07) and POWER1 (0x08) GPIO types and map POWER1 to a regulator with con_id "dvdd" for all devices, the supply the in-tree ov8865 driver already requests. POWER0 is defined but left unmapped, as no device that uses it is known. With this change the Surface Pro 7+ rear camera probes and streams reliably. Link: linux-surface/linux-surface#1867 Link: linux-surface/linux-surface#2201 Suggested-by: Sakari Ailus <[email protected]> Signed-off-by: Jakob Berg Jespersen <[email protected]> Reviewed-by: Hans de Goede <[email protected]> [Sakari Ailus: Sanitised the commit message a little.] Signed-off-by: Sakari Ailus <[email protected]>
Surface Pro 7+ OV8865
pwr1test evidenceThis file accompanies the RFC patch in
0014-ov8865-pwr1.patch.Tested hardware and software
8086:9a19)INT347A:00)6.19.8-surface-30.7.0Failure before the patch
The INT3472 layer exposed a regulator named
INT3472:01-pwr1, but it hadzero users and remained disabled. The OV8865 runtime-resume path failed on
the first I2C software-reset write:
Increasing the power-up delay and retrying the reset five times still
returned
-121on every attempt.Result after the patch
Raw capture:
Processed capture:
Front camera
The OV5693 front camera also works on this device after programming
MIPI register
0x4800to0x2dbefore stream-on, as proposed inlinux-surface PR #2171. On this Surface Pro 7+ it captures 1296x972
SBGGR10 at approximately 28.7 fps.