Input: mshw0485: add opt-in pen userspace interfaces - #84
Draft
ooaklee wants to merge 738 commits into
Draft
Conversation
At the moment, we indirectly rely on the boot firmware to set up the pinctrl for the eDP HPD line coming from the internal display. If the boot firmware does not configure the display (e.g. because a different display is selected for output in the UEFI settings), then the display fails to come up and there are several errors in the kernel log: [drm:dpu_encoder_phys_vid_wait_for_commit_done:544] [dpu error]vblank timeout: 80020041 [drm:dpu_kms_wait_for_commit_done:524] [dpu error]wait for commit done returned -110 [drm:dpu_encoder_frame_done_timeout:2715] [dpu error]enc40 frame done timeout ... Fix this by adding the missing pinctrl for gpio119 (func1/edp0_hot and bias-disable according to the ACPI DSDT), which is defined as &edp0_hpd_default template in x1e80100.dtsi. Fixes: 6516961 ("arm64: dts: qcom: Add support for X1-based Asus Zenbook A14") Tested-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> # FHD OLED Reviewed-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
…for eDP HPD At the moment, we indirectly rely on the boot firmware to set up the pinctrl for the eDP HPD line coming from the internal display. If the boot firmware does not configure the display (e.g. because a different display is selected for output in the UEFI settings), then the display fails to come up and there are several errors in the kernel log: [drm:dpu_encoder_phys_vid_wait_for_commit_done:544] [dpu error]vblank timeout: 80020041 [drm:dpu_kms_wait_for_commit_done:524] [dpu error]wait for commit done returned -110 [drm:dpu_encoder_frame_done_timeout:2715] [dpu error]enc40 frame done timeout ... Fix this by adding the missing pinctrl for gpio119 (func1/edp0_hot and bias-disable according to the ACPI DSDT), which is defined as &edp0_hpd_default template in x1e80100.dtsi. Fixes: 7d1cbe2 ("arm64: dts: qcom: Add X1E78100 ThinkPad T14s Gen 6") Tested-by: Christopher Obbard <christopher.obbard@linaro.org> Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Lenovo Thinkpad T14s OLED Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
amend the following files for the new mdss_dp3_out definition: arch/arm64/boot/dts/qcom/x1-acer-swift-14.dtsi arch/arm64/boot/dts/qcom/x1-asus-vivobook-s15.dtsi arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi arch/arm64/boot/dts/qcom/x1p42100-lenovo-ideapad-5-2in1.dts arch/arm64/boot/dts/qcom/x1p42100-lenovo-ideapad-slim5x.dts refers-to: 24f44be also add the edp0_hpd_default pinctrl on dp3. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
slim5x: i2c0: correct pinctrl-0 5-2in1: add commented- out dedicated driver atna40ct01 Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
… 3 15Q8X10 add x126100 chip designation and compatible add initial device tree Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
…ncept ISO needs to boot and have efivars - use Thinkpad T14s as compatible also added Vivobook 15 x1p42100 also added HP Omnibook X 14-fe1 also added Thinkbook 16 also added Acer Swift Go 14 also added Surface Pro 12" Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
fix typos in tlmm definition Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
since calculating tlmmgpio was unsuccessfful, use the common known one: tlmm 3 remove all possible touchpads except for the actual detected one, @38 disable all sophisticated pinctrl, only on the i2c devices Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
shared with keyboard, f yeah Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
since its apparently shared with the keyboard, disable it for now there needs to be a mux driver which does the handling for it Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
required for 6.17 Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
add dependency for python3-libfdt add stubble-script hwids/finddtbs.py as debian/scripts/misc/find-dtbs.py Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
… T14s T14s is powerful, but the fan doesn't cool it enough for full load. Tone it down to the experimentally determined limits
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>
Add the dp0/dp1 DAI links for sound via displayport. Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Some devices use combo PHYs (i.e. USB3 + DisplayPort), which also handle the lane muxing. These PHYs are referenced twice from the USB-C connector (USB super-speed lines and SBU/AUX lines) resulting in the mux being configured twice. Avoid this by dropping duplicates. This is a re-application of b145c3f ("usb: typec: mux: avoid duplicated mux switches"), with fix derived from usb: typec: mux: Fix typec_switch_match() . Fixes: f576c75 ("Revert "usb: typec: mux: avoid duplicated mux switches"") Cc: stable@vger.kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Co-developed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Marek Vasut <marex@nabladev.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
The fwnode_typec_switch_get() sporadically returns NULL instead of an -EPROBE_DEFER for orientation-switch described in DT. This makes it impossible to discern whether the DT does describe an orientation-switch which did not probe yet, or whether the DT does not describe the switch. This happens with gpio-sbu-mux connected to an I2C GPIO expander. The class_find_device() on typec_switch_match() may return NULL in case the mux did not probe just yet early on boot. The sw_devs[] array can be empty on boot as well. If these two conditions occur, then the conditional if (to_typec_switch_dev(dev) == sw_devs[i]) evaluates to true and the match function returns NULL, which propagates to fwnode_typec_switch_get() which makes it look as if the orientation-switch was not described in DT. This is incorrect, because the mux driver will probe a bit later on, but at that point, the caller of fwnode_typec_switch_get() already got the NULL return value. The NULL return value also does not trigger IS_ERR(), therefore the caller driver interprets this as if the orientation-switch is not described in DT, and does not return -EPROBE_DEFER to try again, even if it should. Fix this by checking the class_find_device() return value, and return -EPROBE_DEFER if it is NULL right away. If the return value is not NULL, perform the deduplication test, and if that test passes, consider the return value to be already non-NULL. Fixes: a53b4f9 ("usb: typec: mux: avoid duplicated orientation switches") Cc: stable@vger.kernel.org Signed-off-by: Marek Vasut <marex@nabladev.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Tested-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
base purwa and hamoa variants on a common dtsi Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
…patible strings required to boot via stubble to identify the dtb Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Rewrite of the OmniBook 5 devicetree that is independent of the X14 dtsi. Additional changes: - Corrected the display-adjacent type-c port configuration by replacing the PS8830 redriver with a TB16-derived usb_1_ss0 setup - Adjusted eUSB2 repeaters following the TB16 configuration
for left side ports
Define the protocol selector used by the protocol-9 GENI QSPI engine. Link: 19bed4c Signed-off-by: x1e-nixos <noreply@scug.io> Signed-off-by: Leon Silcott <leon@boasi.io>
Add the transfer-ring handling needed by the protocol-9 GENI engine used for the Surface Pro 11 touchscreen. Keep the existing SPI, I2C, and UART paths unchanged and preserve DMA_PRIVATE. Re-lift the hardware-tested implementation onto the current 7.2.2 driver. Link: 19bed4c Signed-off-by: x1e-nixos <noreply@scug.io> Signed-off-by: Leon Silcott <leon@boasi.io>
Document the opt-in controller property used by Microsoft Denali to select the protocol-9 GENI firmware and QSPI GPI DMA channels. Signed-off-by: Leon Silcott <leon@boasi.io>
Re-lift the Surface Pro 11 QSPI path onto the current GENI SPI driver. Select it only when the Denali machine and qcom,geni-qspi property agree. Leave the common controller path unchanged and preserve the existing GENI tracepoints. Support the paired TX-command/RX-data transaction used by MSHW0485 without exposing the staging branch's laboratory controls or BIOS-reference API. Link: 65ce06c Link: b1075e6 Signed-off-by: Leon Silcott <leon@boasi.io>
Describe the OF-only HID-over-SPI touchscreen used by Microsoft Denali, including its interrupt, reset, power, and SPI requirements. Signed-off-by: Leon Silcott <leon@boasi.io>
Add the direct touch-input core for the HID-over-SPI controller found on Microsoft Surface Pro 11. Bind only to microsoft,mshw0485 on Denali and use the fixed GPIO power/reset sequence described by DT. Keep the experimental policy alternatives fixed in-kernel. Do not expose the staging diagnostic attributes or module parameters. Do not include the separate pen, heat-frame misc device, or HIDRAW interfaces. Link: b1075e6 Signed-off-by: Leon Silcott <leon@boasi.io>
Enable the protocol-9 QSPI engine and GPI DMA channels only on Microsoft Denali, then describe the MSHW0485 touchscreen and its control GPIOs. Link: b1075e6 Signed-off-by: Leon Silcott <leon@boasi.io>
Accept the Surface Pro 11 X1P touchscreen product ID alongside the existing X1E product ID when validating the MSHW0485 device descriptor. Link: 3fc7c52 Signed-off-by: Justin White <kyjus25@gmail.com> Signed-off-by: Leon Silcott <leon@boasi.io>
If connecting a hid_device with bus field indicating BUS_SPI print out "SPI" in the debug print. Macro sets the bus field to BUS_SPI and uses arguments to set vendor product fields. [Leon: mirror BUS_SPI in the HID-BPF helper enum used by this tree.] Link: https://patchew.org/linux/20260609-send-upstream-v4-0-b843d5e6ced3@chromium.org/20260609-send-upstream-v4-2-b843d5e6ced3@chromium.org/ Link: 61bb237 Signed-off-by: Dmitry Antipov <dmanti@microsoft.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jingyuan Liang <jingyliang@chromium.org> Signed-off-by: Leon Silcott <leon@boasi.io>
Rework the Surface Pro 11 pen support behind two independent, default-off feature gates. The heat-frame option builds the versioned misc-device ABI, while the iptsd option builds the HIDRAW sibling and native pen input path. Require a matching device-tree property at probe time for each option before its endpoint can be registered. With both options disabled, retain the existing touch initialization, falling-edge IRQ handling, and input path. Keep the validated IPTS initialization and level-low IRQ cadence confined to the iptsd opt-in. Use the controller driver's existing HID-over-SPI transactions and only add the HID core support needed for the private BUS_SPI child; do not carry the generic SPI-HID transport. Link: b805934 Link: c575142 Link: 71e31fa Link: dc4f260 Link: f1b743c Link: f831b6c Link: c05ed50 Link: 133679a Link: e417f2f Signed-off-by: Leon Silcott <leon@boasi.io>
Opt both Surface Pro 11 variants into the optional raw heat-frame ABI and HIDRAW iptsd bridge. The matching default-off kernel options must still be enabled before either interface is built, while machines outside the shared Denali DTSI remain unchanged. Link: 71e31fa Link: dc4f260 Signed-off-by: Leon Silcott <leon@boasi.io>
This was referenced Aug 31, 2026
Record the two opt-in MSHW0485 feature gates in the qcom-x1e annotations. Kconfig still defaults both options to n; this Ubuntu flavour explicitly enables them for Denali, whose device tree must also opt in before either endpoint registers. Link: 4c2356a Depends-on: jglathe#83 Signed-off-by: Leon Silcott <leon@boasi.io>
ooaklee
added a commit
to ooaklee/linux_ms_dev_kit-sp11
that referenced
this pull request
Sep 1, 2026
Integrate jglathe#84 for combined SP11 testing.
jglathe
force-pushed
the
jg/ubuntu-qcom-x1e-7.2.y
branch
2 times, most recently
from
September 9, 2026 20:39
4943ee7 to
6407d62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BUS_SPIdefinition needed by an MSHW0485 HID childnin KconfigDependency and status
Review this PR after #82 and #83. Its head is stacked on
x/sp11-qspi-touch-core, so the GitHub diff is cumulative until #83 is merged intojg/ubuntu-qcom-x1e-7.2.y. The pen-specific portion is the five commits after676d8e800267.This branch does not merge the broad
-sp11staging branch or replay the correction merged through #81. It deliberately builds on the OF-only direct-touch core isolated in #83.This PR is a draft. A custom build with both options disabled proves that it does not expose the experimental interfaces unintentionally. The Ubuntu qcom-x1e flavour deliberately enables both options, but their matching Denali device-tree properties remain mandatory and the enabled configurations still require the hardware checks below before the topic is ready.
Containment
CONFIG_TOUCHSCREEN_MSHW0485_HEAT_FRAMEandCONFIG_TOUCHSCREEN_MSHW0485_IPTSDare independent and default tony; this downstream flavour policy does not change their Kconfig defaultsmicrosoft,enable-heat-frame-abimicrosoft,enable-iptsd-bridgeHID_CONNECT_HIDRAWonly; it does not create a second touchscreen input device0x07and privacy-sensitive report0x6eremain off the production HIDRAW pathProvenance
The HID-core commit preserves Jarrett Schultz as the author of the current upstream v4 patch and retains its exact published chain:
Signed-off-by: Dmitry Antipov <dmanti@microsoft.com>Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>Signed-off-by: Jingyuan Liang <jingyliang@chromium.org>The one-line HID-BPF enum mirror is explicitly marked as Leon's current-tree adaptation.
Signed-off-by: Leon Silcott <leon@boasi.io>is appended to that submission; no Jarrett sign-off is invented because the authoritative v4 patch does not contain one.The remaining four focused commits are authored by Leon Silcott, carry the authorized Boasi sign-off, and retain immutable links to the corresponding integration commits for the heat-frame and iptsd work.
The final Ubuntu policy commit links the original target-integration commit and preserves Leon Silcott as author with the authorized Boasi sign-off.
The implementation commit also adds a focused
MICROSOFT SURFACE G6 TOUCHSCREEN DRIVERmaintainer entry covering the driver, binding, ABI documentation, and UAPI header.Validation
git diff --check 676d8e800267..HEADfor the incremental pen topicMISSING_SIGN_OFFfor nominal author Jarrett because the exact published trailer chain intentionally contains no Jarrett sign-offubuntu_x1e_defconfigW=1builds in all four configurations: both options disabled, heat only, iptsd only, and both enabledscripts/get_maintainer.plresolves the new driver, binding, ABI documentation, and UAPI to Leon Silcott and the Linux input listy;olddefconfigpreserves them and the annotations checker reports no MSHW0485 policy driftdefault n; compiled-DT audit confirms that only Denali carries the matching runtime opt-insHardware checks still required
/dev/g6ts-heat, record framing, polling, generation changes, controller recovery, suspend/resume, and removal while a reader is open0x07and privacy-sensitive report0x6eare not emitted on the HIDRAW path