Skip to content

patches: Add kernel 7.0 support with Surface Pro 10 camera patches#2156

Open
djmulder wants to merge 9 commits into
linux-surface:masterfrom
djmulder:feature/surface-pro-10-cameras
Open

patches: Add kernel 7.0 support with Surface Pro 10 camera patches#2156
djmulder wants to merge 9 commits into
linux-surface:masterfrom
djmulder:feature/surface-pro-10-cameras

Conversation

@djmulder

Copy link
Copy Markdown

This PR adds patches/7.0/ based on the 6.19 patch set, with the following
additions to 0013-cameras.patch for Microsoft Surface Pro 10 (Meteor Lake):

New driver:

  • Sony IMX681 sensor driver supporting both Surface Pro 10 (MTL, 380.8 MHz
    C-PHY) and Surface Pro 11 (LNL, 969.6 MHz D-PHY) with platform-specific
    PLL selection at stream-on time

ipu-bridge:

  • SONY0681 entry with C-PHY bus type and dual link frequencies
  • OVTID858 (OV13858) rear camera entry
  • device_reprobe() to fix probe ordering race condition

INT3472:

  • GPIO type 0x08 (DVDD) and 0x10 (DOVDD) support with proper named
    constants, replacing the SP9 magic number workaround
  • CLK_IS_CRITICAL and always-on regulator constraints

OV13858:

  • Reset GPIO handling for SP10

Tested on Surface Pro 10 for Business (MSHW0520/MSHW0521), Ubuntu 26.04,
kernel 7.0.0-15-generic. Both sensors probe successfully. Rear camera
produces frames (ISP tuning pending). Front camera probes but produces
black frames pending C-PHY support in ipu6-isys-dwc-phy.c.

djmulder added 3 commits May 29, 2026 15:32
Add patches/7.0/ based on 6.19 patch set with the following additions
to 0013-cameras.patch:

- Add Sony IMX681 sensor driver supporting both Surface Pro 10 (MTL,
  380.8 MHz C-PHY) and Surface Pro 11 (LNL, 969.6 MHz D-PHY)
- Add ipu-bridge entries for SONY0681 (C-PHY, dual freq) and OVTID858
- Add INT3472 GPIO type 0x08 (DVDD) and 0x10 (DOVDD) support,
  replacing the SP9 magic number workaround with proper constants
- Add INT3472 CLK_IS_CRITICAL and always-on regulator constraints
- Add OV13858 reset GPIO handling for Surface Pro 10

Tested on Surface Pro 10 (MSHW0520/MSHW0521) with Ubuntu 26.04 /
kernel 7.0.0-15-generic.
Remove development debug messages from SP10 camera patches:
- Remove verbose dev_info calls from imx681, ov13858, int3472
- Downgrade ipu-bridge sensor connection messages to dev_dbg
- Keep meaningful messages (reset GPIO toggle, probe success)
The OV13858 rear camera on Surface Pro 10 (Microsoft Surface Pro 10
for Business) is mounted 180° rotated. Add a DMI match entry so
ipu-bridge reports the correct rotation to libcamera/v4l2.

Patchset: cameras
@djmulder djmulder marked this pull request as draft May 30, 2026 18:20
@djmulder djmulder marked this pull request as ready for review May 30, 2026 18:21
djmulder added 3 commits June 1, 2026 09:54
Adds work-in-progress patch for IPU6EP-MTL C-PHY support needed
for the IMX681 front camera on Surface Pro 10 for Business.

The patch implements the C-PHY detection and routing infrastructure
but still needs correct DWC PHY IFC register values for C-PHY mode.
All kernel driver infrastructure correct. Blocked on Linux firmware
not supporting C-PHY. See contrib/surface-pro-10-cphy/README.md.
djmulder added 3 commits June 4, 2026 18:20
HUB_FW register investigation confirmed: HUB_FW[4] stays 0 even for
working D-PHY port 0, so it is not the blocker. The firmware simply
does not process C-PHY data for PORT_4/src=4, and rejects PORT_6/src=6
with FW_INTERNAL_CONSISTENCY error. All kernel infrastructure correct.
…se=0

ETL trace analysis confirmed Windows driver uses:
src=6 (CSI2_3PH_CPHY_PORT0), vc=0, isl_use=0, sensor_type=14, nlanes=2

This is identical to what we tried. Linux firmware rejects src=6 with
FW_INTERNAL_CONSISTENCY error. isl_use=1/2/3 cause INVALID_STREAM_CONFIG.
The Linux firmware binary is confirmed as the sole blocker.
Key findings from extended debugging session:

1. SIP registers use isp->base (full BAR0), not isys->pdata->base (ISYS sub-region)
2. SIP1_RXA/RXB_CTRL bit 0 can be written but doesn't affect data flow
3. FB_PORT_CFG (0x238054) is firmware-controlled read-only
4. SETTLE timing registers at SIP1+0x18 don't accept writes for 2-trio config
5. Writing SIP registers corrupts hardware state across reboots - DO NOT write
6. CTRL0_IRQ_STATUS and UNISPART_IRQ both read 0 for working D-PHY (firmware clears)
7. D-PHY timing (SETTLE_D1=0x37) is set by firmware, not driver

Root cause confirmed: firmware does not process C-PHY data for src=4.
All kernel-side hardware is correctly configured. Awaiting firmware update.
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