Skip to content

SP11: integrate 7.2.x platform, IPTS pen, audio, camera, and power support - #79

Draft
ooaklee wants to merge 2165 commits into
jglathe:jg/ubuntu-qcom-x1e-7.2.yfrom
ooaklee:sp11/integration-7.2.x
Draft

ooaklee wants to merge 2165 commits into
jglathe:jg/ubuntu-qcom-x1e-7.2.yfrom
ooaklee:sp11/integration-7.2.x

Conversation

@ooaklee

@ooaklee ooaklee commented Aug 21, 2026 •

Copy link
Copy Markdown

Summary

Integrates the downstream Surface Pro 11 kernel and Ubuntu 7.2.x line for both supported Denali variants:

  • X1E80100 / OLED — MSHW0485 product 045e:0c83
  • X1P42100 / LCD — MSHW0485 product 045e:0c80

The branch now brings together SP11 device-tree, driver, packaging, configuration, and CI work for direct touch, iptsd-backed pen input, volume buttons, native audio and microphone capture, platform power profiles, battery-provider selection, and the IMX681 front camera.

This is intentionally a broad downstream integration line rather than an upstream-ready subsystem patch series.

Highlights

Touch, pen, and buttons

  • Adds the in-tree MSHW0485 HID-over-SPI touchscreen path for X1E/OLED and X1P/LCD.
  • Keeps the kernel driver as the sole direct-touch and panel-mode owner while exposing a bounded HIDRAW-only DFT sibling for unmodified iptsd v3.1.0 stylus processing.
  • Relays only the required DFT reports, keeps transport state separate from HID client data, and ties bridge recreation to controller recovery generations.
  • Promotes the live-validated Phase 84 IPTS initialization and level-low, one-response-per-IRQ cadence as the shared default profile.
  • Retains the bounded /dev/g6ts-heat export for diagnostics; pressure, tilt, and button events use the DFT/iptsd path.
  • Wires and enables both volume-up and volume-down on the device tree.

Audio and microphones

  • Ports the Golden v33 native SP11 playback path: protected SP/SPVI AudioReach graph, VI+CPS feedback, Windows-ordered calibration/volume/mute handling, WSA8845 lifecycle fixes, TOP_CFG1 physical-lane parity, and SoundWire feedback-port Offset2 parity.
  • Adds stereo TX-macro DMIC capture while retaining the VA capture path.
  • Shares the VA-owned physical DMIC clocks with the TX macro, validates the Denali 19.2 MHz divider and EP16 routing, and limits the new behavior to microsoft,denali.
  • Includes the SP11 WSA884x 2-speaker/4-ohm profile and PA-fault recovery.

Power and battery

  • Makes platform_profile available on the DT-only SP11 through a non-ACPI kobject fallback while preserving the legacy sysfs path expected by power-profiles-daemon.
  • Adds per-policy FREQ_QOS_MAX CPU caps, late cpufreq-policy handling, and an SP11 low-power boot default.
  • Skips the duplicate SAM battery provider on Denali so Qualcomm battmgr remains authoritative for both variants.

Front camera

  • Adds the standalone Sony IMX681 front-camera path for X1E/OLED: 3840x2640 packed RAW10, 24-bit exposure plus gain controls, and the validated 2.406-Gsymbol/s X1E80100 C-PHY profile.
  • Routes CCI1.1 -> CSIPHY2 -> CSID0 -> VFE0 RDI0 and describes MCLK4, power rails, reset, and the privacy LED.
  • Enables the driver in the Ubuntu ARM64 configuration; the existing D-PHY path remains unchanged.
  • Limits this scope to the front RGB camera; rear and IR/Windows Hello support remain follow-up work.

Platform integration

  • Carries the SP11/Denali device trees, SPI-HID support, display/DP and DWC3 fixes, kernel configuration, Ubuntu packaging/changelog updates, and integration-branch CI policy.
  • Tracks the wider jg/ubuntu-qcom-x1e-7.2.y kernel line, so the comparison also contains inherited QCOM arm64, DRM, media, networking, platform-driver, and core-kernel work.

Additions after the original recorded tip

The previous description's validation section stopped at 5cf0b8835858. The current head adds the following SP11 integration work:

Head or merge Added scope
b6ca0e494a9b DT-only platform-profile support, CPU frequency caps, and low-power default
537d1ac61225 Golden v33 native speaker/audio parity
3fc7c5249f4a X1P touchscreen product support and Denali battery-provider selection
58e36b1acb04 Stereo TX DMIC capture
d915d679423e IMX681 C-PHY front-camera support
2cbd1ec3e2da HIDRAW/iptsd pen bridge, transport-lifetime fixes, IPTS init, IRQ cadence, and shared X1E/X1P defaults

That range contains 18 commits touching 61 files, with 8,520 insertions and 878 deletions.

Validation status

  • Current head: 2cbd1ec3e2da385e7bd91fd65c63ba5a8fb5b865.
  • Pen on X1E/OLED: Phase 84 was hardware-validated on 7.2.0-jg-0sp11v19-qcom-x1e; hover, contact, pressure, tilt, barrel button, and concurrent one-/two-/three-finger touch worked with no transport errors, recovery failures, daemon restarts, or kernel taint in the acceptance run. X1P uses the same promoted profile, but separate X1P pen qualification remains outstanding.
  • X1P direct touch: hardware-validated with product 045e:0c80; descriptor validation and physical touch completed successfully.
  • Native playback: hardware-validated on X1E/OLED with the v9/v10 packages, including stereo output and the Golden v33 feedback/lane-order fixes.
  • TX DMIC capture: the integration and git diff --check passed in the constituent PR; Linux hardware capture and regression testing were still outstanding there.
  • Power profiles: profile enumeration, switching, and frequency QoS were hardware-validated on the v8 package.
  • Front camera: repeated and continuous RAW10 capture, gain/exposure response, zero reported CSID/VFE transport errors, libcamera processing, PipeWire publication, and Firefox Google Meet preview were hardware-validated on X1E/OLED.
  • Integration checks: the fork's SP11 integration validator passed at the exact current head; it checks patch hygiene and the SP11-authored checkpatch gate, not a full kernel build. The target PR currently reports no checks.
  • Validation varies across the inherited integration history; see the linked constituent PRs for exact commands, kernels, evidence, and remaining qualification items.

Integration state

The target and integration branches have advanced independently since this PR opened, and GitHub currently reports merge conflicts. The large comparison includes inherited kernel and Ubuntu history and is not a count of SP11-authored patches. The branch must be synchronized with the current target before merge.

Links

jglathe and others added 30 commits August 17, 2026 20:14
QMP Combo PHYs default to USB3DP lane routing, which can break static setups like
DP-to-HDMI bridges by misallocating lanes to USB3.
Revive the optional "qcom,combo-initial-mode" DT property [1] to explicitly
set the initial mode ("usb3dp", "dp", "usb3"). In static configs (no mode-switch
or orientation-switch props), honor it and skip lane inference to avoid overrides.
This simplifies HDMI enablement on undocumented Snapdragon X laptops while
preserving dynamic Type-C behavior.

[1]: https://lore.kernel.org/r/20250821-topic-x1e80100-hdmi-v1-2-f14ad9430e88@linaro.org

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Microsoft Surface Pro 12 is using this (well, my definition of it), changed to
Stephan Gerhold's one.

Remove the edp0_hpd_default reference from Thinkbook 16 as TLMM 119 is used by the HDMI bridge
as enable pin.

Link: https://lore.kernel.org/r/20250822-x1e80100-add-edp-hpd-v2-1-6310176239a6@linaro.org

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
…to dp controller, fix backlight"

now duplicate template, therefore remove it

Link: https://lore.kernel.org/r/20250822-x1e80100-add-edp-hpd-v2-1-6310176239a6@linaro.org

This reverts commit 22f5ffacc9cd4f5a5074b863223f80bc0f0d6b33.
…lt pinctrl

seems to be needed

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Relates-to commit 8c0b058.

Signed-off-by: James Addison <jay@jp-hosting.net>
adding the remaining commits of 20251101-asus_usbc_dp-v1-0-9fd4eb9935e8@hotmail.com
... but on the generalized x1-asus-vivobook-s15.dtsi

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
this works with Ubuntu kernel builds that don't know the SPRCHRGD in QSEECOM

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
found in Lenovo Ideapad Slim 3 15Q8X10

raw EDID:

00 ff ff ff ff ff ff 00 09 e5 ea 0c 00 00 00 00
0c 22 01 04 a5 21 15 78 03 af e5 97 5e 58 92 28
1f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 9c 3e 80 c8 70 b0 3c 40 30 20
36 00 49 ce 10 00 00 1a 00 00 00 fd 00 28 3c 4c
4c 10 01 0a 20 20 20 20 20 20 00 00 00 fe 00 42
4f 45 20 43 51 0a 20 20 20 20 20 20 00 00 00 fc
00 4e 56 31 35 33 57 55 4d 2d 4e 34 31 0a 01 63

70 20 79 02 00 81 00 15 74 1a 00 00 03 01 28 3c
00 00 53 4a 53 4a 3c 00 00 00 00 80 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 e3 90

Detailed Timing Descriptors:
DTD 1:
1920x1200   60.002995 Hz  16:10    75.604 kHz    160.280000 MHz (329 mm x 206 mm)
   Hfront   48 Hsync  32 Hback  120 Hpol P
   Vfront    3 Vsync   6 Vback   51 Vpol N

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
…iants

LCD: Panel is CMN N140JCE-EL1, selecting the odd backlight PWM like on
ThinkBook 16 G7 QOY

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
like on Thinkbook 16 and Ideapad 5

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
seem to be problematic

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
as tested out by Anthony Ruhier and Val Packett [1]

[1]: https://lore.kernel.org/all/a5efb372-1a2a-4262-abc8-49bbeffa6961@packett.cool/

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
name change from x1e80100 and x1p42100

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
There is a small window where the device can suspend after
pm_runtime_enable() and before pm_runtime_forbid(), causing an
unnecessary suspend/resume cycle while the PHY is not yet registered.

Move pm_runtime_forbid() before pm_runtime_enable() to eliminate
this race.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
add Purwa-specific dts

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Put the firmware paths into the separate dts

also correct the gpu firmware path to consistent naming.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
…ible for older kernels

Add this compatible to get efivars on kernels that are not aware
of the sp11 in scm.

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
rfkill should be disabled according to the Surface Pro 11's DSDT.

https://lore.kernel.org/all/20250113074810.29729-3-quic_lingbok@quicinc.com/
has added support to read the ACPI bitflag when ACPI is supported.

Document the disable-rfkill property to expose one specific feature
(DISABLE_RFKILL_BIT) for devices described with a DT, so that the
feature can be disabled.

Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Signed-off-by: Dale Whinham <daleyo@gmail.com>
Some devices (e.g. Microsoft Surface Pro 11) indicate that the rfkill
feature should be disabled by means of an ACPI bitflag.

If ACPI is not being used (i.e. booting using a devicetree) then this
property will not be read and therefore rfkill may be enabled and
the ath12k will be hard-blocked with no way to disable it.

Add a devicetree property that allows us to disable the rfkill feature.

Tested-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Signed-off-by: Dale Whinham <daleyo@gmail.com>
Disable rfkill as it is supposed to be according to the ath12k feature
flags in the Microsoft Surface Pro 11 ACPI DSDT.

Signed-off-by: Dale Whinham <daleyo@gmail.com>
Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Allows MAC address setting via dtbloader.
define PCI_VENDOR_ID_HP_BOGUS	0xffff

Qualcomm FastConnect 6900 Wi-Fi 6E Dual Band Simultaneous (DBS) WiFiCx Network Adapter

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
For some devices, Wi-Fi is entirely hard blocked by default making
the Wi-Fi radio unusable, except if rfkill is disabled as expected
on those models.

Commit c6a7c0b ("wifi: ath12k: Add Support for enabling or
disabling specific features based on ACPI bitflag") added a way to
support features set via ACPI, including the DISABLE_RFKILL bit.

Add a disable-rfkill property to expose the DISABLE_RFKILL bit
equivalent for devices described by a Devicetree instead of ACPI.

Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Reference the ieee80211.yaml schema to allow disable-rfkill to
be used for models that need to disable the rfkill feature,
otherwise the Wi-Fi radio is unusable.

This is required by the Surface Pro 11 with WCN7850.

Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
in the spirit of sp12

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
add rfkill, mac addresses, pcie4 pinctrl

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
previously was /usr/lib/, /usr/share/

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
@jglathe

jglathe commented Aug 31, 2026

Copy link
Copy Markdown
Owner

When you do changes in drivers that are not exclusively written for the SP11 (and usually have a hardware /firmware detection in probe()), you need to gate your changes against the "common" use case, as you did in the qspi code for gpi DMA. The gating is easiest with check agaunst the dt, of_ compatible=microsoft,denali. The of_ structure is also in the device descriptor or can be easily reached.
Work from 7.2.y, yes. It is easier to integrate these parts. And good preparation for the upstreaming part 😁
I've seen another thing: You disable the cl4 idle state, my tree disables the cl5 idle state for stability. From the comment this read differently, like a resume issue. Could it be a bit too much? Disabled idle states draw more power.

@jglathe

jglathe commented Sep 1, 2026

Copy link
Copy Markdown
Owner

All current open PRs are drafts. That qspi patch is a big one, I don't have hardware that uses the spi at all (to my knowledge). Maybe a public call for testing on Ubuntu Discourse helps to verify the changes. There are quite a few people with Dell Laptops, they could help, probably. The sp11v21 pre-compiled package would be a good start. A bit of a testing dilemma.

@jglathe

jglathe commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Also, I have set up a Matrix room for sp11/12 bringup: https://matrix.to/#/#sp11_12_linux:matrix.org
Might be a more immediate way of communication. I use element-desktop as client.

@jglathe
jglathe marked this pull request as draft September 1, 2026 06:25
@ooaklee

ooaklee commented Sep 1, 2026

Copy link
Copy Markdown
Author

@jglathe, it doesn't seem like I can join; I've tried the web and desktop. What account did you invite? Do you have Discord? If so, add me there, please: typicalleee

Via the desktop app, I am seeing
MatrixError: [403] You are not invited to this room. (https://matrix-client.matrix.org/_matrix/client/v3/join/%23sp11_12_linux%3Amatrix.org?server_name=matrix.org&via=matrix.org)

@ooaklee

ooaklee commented Sep 1, 2026

Copy link
Copy Markdown
Author

All current open PRs are drafts.

The majority are ready to go; I only put them in draft to make sure we follow the order we agreed on

That qspi patch is a big one, I don't have hardware that uses the spi at all (to my knowledge). Maybe a public call for testing on Ubuntu Discourse helps to verify the changes.

That's a shout; I'll make lexr.sh public shortly, then get it to build that Image and get feedback

@jglathe

jglathe commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Do you have a user name on Matrix? I need this to invite you. Mine is @jglathe:matrix.org

@ooaklee

ooaklee commented Sep 1, 2026 •

Copy link
Copy Markdown
Author

@jglathe, posted a message requesting testers

I've also made lexr public, so if you want to give it a spin, please see:

@ooaklee

ooaklee commented Oct 4, 2026

Copy link
Copy Markdown
Author

October 4: retire old submission versions; keep this coordination thread

The repaired combined source is now 8ba2b75713feb5c72bbc11dd8cce4048e23cdeea, ABI 7.2.5-jg-0sp11v8-qcom-x1e, based on the current release-line tip e57ec2987d4540fa89280d349f79c4d9bcd7cf27. Its ordinary-use results and outstanding acceptance items are tracked in ooaklee/linux_ms_dev_kit-sp11#68; the same source is published as an experimental v8 release, not a fully qualified release.

We are withdrawing older submission versions #83–#91 rather than leaving obsolete 7.2.2 heads as active merge requests. Their branches, commits, contributor credit, source links and discussions remain intact. This PR stays open, as requested, as the original coordination/provenance thread—not a proposal to merge the whole integration branch.

Current fork review: ooaklee/linux_ms_dev_kit-sp11#51 carries the refreshed inherited Denali/touch/pen/sensor/C-PHY/graph prerequisites; ooaklee/linux_ms_dev_kit-sp11#56 covers additional CAMSS parity, ooaklee/linux_ms_dev_kit-sp11#57 TX, ooaklee/linux_ms_dev_kit-sp11#58 playback, ooaklee/linux_ms_dev_kit-sp11#59 battery, ooaklee/linux_ms_dev_kit-sp11#60 native profiles, and ooaklee/linux_ms_dev_kit-sp11#61 additional GPI ordering. These are not upstream-ready successor submissions. The two additional deferred GPI corrections remain explicitly deferred without changing tested v8 source.

After exact combined acceptance, supporting provenance and appropriate shared-driver checks, we will reconstruct focused author-preserving upstream topics against the then-current release tip. TX precedes playback; battery precedes profiles. The requested non-SP11 X1E boot check remains necessary before shared audio reaches the release line. Fork-only integration scripts/workflows and repository policy will never be included in those submissions. No merge or default-branch promotion is implied by this cleanup.

@ooaklee

ooaklee commented Oct 4, 2026

Copy link
Copy Markdown
Author

October 4: bounded combined v8 camera/audio follow-up

Combined fork review #68 now records the successful
three-cycle camera/reopen/indicator check in Power Saver with concurrent quiet
built-in-speaker playback on unchanged source 8ba2b75713feb5c72bbc11dd8cce4048e23cdeea, ABI
7.2.5-jg-0sp11v8-qcom-x1e. Stop snapshots have zero ECC/CRC and VFE
violation/overflow values; frame-drop information flags and undecoded RX status
remain limitations. Durable qualification report.

This closes that bounded check, not every camera mode, physical speaker
protection, shared-device acceptance or the remaining CI/provenance/deviation
gates. The test applies to the separate v8 source, not this PR's historical
integration head
. This PR remains a coordination thread, not a broad merge
request. The requested non-SP11 X1E boot check still precedes shared audio
release-line acceptance, and focused successors will exclude all fork-only CI.

@lain3d

lain3d commented Oct 8, 2026

Copy link
Copy Markdown

Adding a small historical source-preservation handoff to this coordination thread, not proposing a branch merge. I've released my abandoned X1E80100 OLED/Wi-Fi research at https://github.com/lain3d/surface-pro-11-research and the experimental kernel at https://github.com/lain3d/surface-pro-11-kernel. The default main includes the front-camera driver and associated receiver/PHY work.

The platform material that may be useful is the ADSP/USB-C external-root investigation. In our August experiment, retaining UCSI registration across charger_pd restart removed the orientation-NONE teardown, but storage still disconnected: that change was not a complete external-root fix. Attaching to the smaller boot ADSP image preserved PD but did not provide adsp_apps/audio. Later boot experiments and their limits are retained in the archive; I am not suggesting a live ADSP restart on USB-root.

This work builds on your kernel and denisix's platform contributions; the 2.4 MHz DMIC and baseline SPI work were prior art, not my discoveries. Your newer integration has moved substantially beyond the old baseline. The release is unmaintained and experimental, with no request to merge the old WIP branches or claim they satisfy current shared-device acceptance.

@jglathe
jglathe force-pushed the jg/ubuntu-qcom-x1e-7.2.y branch from e57ec29 to 48021d4 Compare October 9, 2026 17:31
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.