Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/microsoft,mshw0485.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microsoft Surface G6 MSHW0485 touchscreen

maintainers:
- Leon Silcott <leon@boasi.io>

description:
The MSHW0485 is a HID-over-SPI touchscreen used by the Microsoft Surface
Pro 11. It uses a protocol-9 Qualcomm GENI controller in quad-SPI mode.

allOf:
- $ref: touchscreen.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
const: microsoft,mshw0485

reg:
maxItems: 1

interrupts:
maxItems: 1

interrupt-gpios:
maxItems: 1

power-gpios:
maxItems: 1

reset-gpios:
maxItems: 1

spi-max-frequency:
maximum: 40000000

required:
- compatible
- reg
- interrupts
- interrupt-gpios
- power-gpios
- reset-gpios
- spi-max-frequency

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

spi {
#address-cells = <1>;
#size-cells = <0>;

touchscreen@0 {
compatible = "microsoft,mshw0485";
reg = <0>;
spi-max-frequency = <40000000>;

interrupt-parent = <&tlmm>;
interrupts = <51 IRQ_TYPE_LEVEL_LOW>;
interrupt-gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
power-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
reset-gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;
};
};
...
14 changes: 14 additions & 0 deletions Documentation/devicetree/bindings/spi/qcom,spi-geni-qcom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ description:
allOf:
- $ref: /schemas/spi/spi-controller.yaml#
- $ref: /schemas/soc/qcom/qcom,se-common-props.yaml#
- if:
required:
- qcom,geni-qspi
then:
required:
- dmas
- dma-names

properties:
compatible:
Expand Down Expand Up @@ -64,6 +71,13 @@ properties:
power-domains:
maxItems: 1

qcom,geni-qspi:
type: boolean
description:
Select protocol-9 quad-SPI operation for the Microsoft Denali touch
controller. The serial engine firmware must already be loaded by the
platform firmware and the DMA channels must use QCOM_GPI_QSPI.

reg:
maxItems: 1

Expand Down
54 changes: 54 additions & 0 deletions arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,10 @@
};
};

&gpi_dma1 {
status = "okay";
};

&gpu {
status = "okay";
};
Expand Down Expand Up @@ -1064,6 +1068,36 @@
vdd3-supply = <&vreg_l8b_3p0>;
};

&spi10 {
qcom,geni-qspi;

dmas = <&gpi_dma1 0 2 QCOM_GPI_QSPI>,
<&gpi_dma1 1 2 QCOM_GPI_QSPI>;
dma-names = "tx", "rx";

pinctrl-0 = <&qup_spi10_data_clk>,
<&qup_spi10_cs>,
<&g6ts_qspi_data23>;
pinctrl-names = "default";

status = "okay";

touchscreen@0 {
compatible = "microsoft,mshw0485";
reg = <0>;
spi-max-frequency = <40000000>;

interrupt-parent = <&tlmm>;
interrupts = <51 IRQ_TYPE_LEVEL_LOW>;
interrupt-gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
power-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
reset-gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;

pinctrl-0 = <&g6ts_interrupt>, <&g6ts_reset_power>;
pinctrl-names = "default";
};
};

&swr0 {
status = "okay";

Expand Down Expand Up @@ -1099,6 +1133,26 @@
gpio-reserved-ranges = <44 4>, /* SPI (TPM) */
<238 1>; /* UFS Reset */

g6ts_interrupt: g6ts-interrupt-state {
pins = "gpio51";
function = "gpio";
bias-pull-up;
};

g6ts_qspi_data23: g6ts-qspi-data23-state {
pins = "gpio49", "gpio50";
function = "qup1_se2";
drive-strength = <6>;
bias-disable;
};

g6ts_reset_power: g6ts-reset-power-state {
pins = "gpio48", "gpio64";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

hall_int_n_default: hall-int-n-state {
pins = "gpio2";
function = "gpio";
Expand Down
1 change: 1 addition & 0 deletions debian.qcom-x1e/config/annotations
Original file line number Diff line number Diff line change
Expand Up @@ -12144,6 +12144,7 @@ CONFIG_TOUCHSCREEN_MC13783 policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_MELFAS_MIP4 policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_MMS114 policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_MSG2638 policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_MSHW0485 policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_MTOUCH policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS policy<{'arm64': 'm'}>
CONFIG_TOUCHSCREEN_PENMOUNT policy<{'arm64': 'm'}>
Expand Down
Loading