From nobody Thu Apr 9 16:34:22 2026 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD8C7382395 for ; Tue, 3 Mar 2026 06:13:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772518438; cv=none; b=by7uHyTqOYYYBZMLHtUjkKe/XFhsxQ27nU8Begn4wtT6+06Eiz5Mj1yxClnj+uWZu4qJrWLs59/bn8w9avxc5/yZ4ztCF+ttCoXYcNS3Je24CfsZFGIG9IUHBcCC6scrgxQQiGWdpJrf8iZbG9sf38TUSZWl/u7jiOgc87HShXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772518438; c=relaxed/simple; bh=HKsF8s2CN39ptYXnUpAjllMxDvOrGH7BmQr/pDNdroM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YAVbX4oC0SueXVNSJMTS60h/Sb7Qcnuev5UhFXVFGP3RrLdJz4UTiWC0Rt+TCeKuQTr7vZJwwR8AfIMFHhHsha6P2M5VqzXJizrsIevbsVhfTgySELuXUXklvcWgM9JZS0cHjH4HccKvHfGuPEv1S0ictgfUyKX/eka0co3bi6M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=YnaJKba/; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="YnaJKba/" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2addb31945aso39081085ad.1 for ; Mon, 02 Mar 2026 22:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1772518434; x=1773123234; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1zbYunSd9SIDIr6FUrKkB2zIIm+2n+JbdlctTH55ffY=; b=YnaJKba/CUPhw6WwK6kd5nrN5VX9i36RPXyzclk5PLwufyN7lcKbfUO4l8c/CSHPcT nMY06euorAc+J+0Jv6l2JaF3u+TrHniCG11W5hN3kKgRQ6iSsSyz1v/zUy3VH2mu4toi pKNA9nsVj+zL8Nw3CEqskl0bMs8cC8mQGB1Tc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772518434; x=1773123234; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1zbYunSd9SIDIr6FUrKkB2zIIm+2n+JbdlctTH55ffY=; b=w0GdxvXm+/2t5MRvEqvMAePTpSX4eM1pkj0tyBkB+fkYqR3Iac1dozlNctSaG8b/NK XSRiTf4rE6H+Z12PST4O1E2/2GI7soSRcLO7eJnQ7JMUT0KlCrQdUfbVR4rfw0iSDlg+ LVPtxMRDhIS6z1r4idiJo9gLUorJc+yy2l8hiy0plebcJhtXhMXP+DEfv4QDSdtcDBLS wRXDVrvNlG3K9AB8K3X6OVPSIgWXc6B1Hh/RqwgVyOPjYlHmve7dKIFhn1KQ5JM2v45x LJ9dl20EQ/P8xXCfKYRusMHv6vQF3H+NKnwbxxd+WmvhbXuJoIbYDrXP1nyszjUCZ3GE UKow== X-Forwarded-Encrypted: i=1; AJvYcCUAgxiTk1Jbf4EdvgdA2MbP6c7ewM/vhFEx7YTpwzmUeK/Y/TIfHwW3SX9tbtXEPwiYvNhHvohvJbdnJ0w=@vger.kernel.org X-Gm-Message-State: AOJu0YwtJV6QBkitFxjuYnYJw1BkihgLq7Y7mxe0JC1y7wVsh66d7Yns l3oK9fRBitKTh4lTPwqSbn4JAMyEL4+S0jGuiIj1KTCkKo9Fypi1PcI66f6mW5j7xg== X-Gm-Gg: ATEYQzw6LBbqtqPP7syD/ANo7/HZ6CBRxYjRs3oC8sbAmWTdiHBv268Bc0XyB9dW82k mnQlSZYg2FtdVg7vNx1FuOMNxEI4iO7/7Z3V1icfdvYbhzPyfiyJjfxqJwDmeRTvc4HIpROiGwr rU3911u6L+2V4Uc9QxUss056V2tC2qOIJRFkSWOvaQ8PJ4l7EnF9v0yX9kstJaf7J4+yK4bNmOi 0hmRGZJqtJQIoyGIpGczVTZkKKf31rngKLSrhCvSzue572FUPNeam0bWSdeQwAN13sFozkS5iX5 OLg0/ZT6A5ry9gtDMi1P8l5oTkuv4oXqU/xs/YaaY+DpvmygbCe619rzvTYJ3i1Zz90ZFk5JF05 2NDZjjg56OJJso5Z1kY3NaJ/M59DEvSoJagebnCX0Q/FSPBJN1fQe4VZ2Xth1jkUO4xhXFkIIt6 RjsG/Vg4dgdJeq+Z7sGGwE/B5qNn2pvKZvINX3yuf08/V/XbAaGgVvIlr9vLhoZMgu+3BrN9FI9 mBBr2Kwz1UiXI06Epg4YD7T3wU5y8Ndrw== X-Received: by 2002:a17:903:1786:b0:2aa:e817:1bcf with SMTP id d9443c01a7336-2ae2e4d7a3bmr137864645ad.51.1772518433772; Mon, 02 Mar 2026 22:13:53 -0800 (PST) Received: from jingyliang-input-linux.c.googlers.com (111.169.168.34.bc.googleusercontent.com. [34.168.169.111]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb6fe4f3sm152639735ad.91.2026.03.02.22.13.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 22:13:53 -0800 (PST) From: Jingyuan Liang Date: Tue, 03 Mar 2026 06:13:01 +0000 Subject: [PATCH 09/12] dt-bindings: input: Document hid-over-spi DT schema Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260303-send-upstream-v1-9-1515ba218f3d@chromium.org> References: <20260303-send-upstream-v1-0-1515ba218f3d@chromium.org> In-Reply-To: <20260303-send-upstream-v1-0-1515ba218f3d@chromium.org> To: Jiri Kosina , Benjamin Tissoires , Jonathan Corbet , Mark Brown , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-input@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-trace-kernel@vger.kernel.org, devicetree@vger.kernel.org, hbarnor@chromium.org, Jingyuan Liang , Dmitry Antipov , Jarrett Schultz X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772518424; l=5693; i=jingyliang@chromium.org; s=20260213; h=from:subject:message-id; bh=HKsF8s2CN39ptYXnUpAjllMxDvOrGH7BmQr/pDNdroM=; b=3yauzbUstrOGl5qDbA/zaXfBs8F8XvC7hZJ8BVjAu9S340VlZ8h1r6uNBWzD+nBmeke1laoEl KMLb+MDQtJyB1u7HQFp7CyBh7fKvz7M3Cislqv92CB/53/zJ5KRua02 X-Developer-Key: i=jingyliang@chromium.org; a=ed25519; pk=VTYSdqslTtYOjWWoIGgYoWupGWqNSidrggReKMgfPo4= Documentation describes the required and optional properties for implementing Device Tree for a Microsoft G6 Touch Digitizer that supports HID over SPI Protocol 1.0 specification. The properties are common to HID over SPI. Signed-off-by: Dmitry Antipov Signed-off-by: Jarrett Schultz Signed-off-by: Jingyuan Liang --- .../devicetree/bindings/input/hid-over-spi.yaml | 153 +++++++++++++++++= ++++ 1 file changed, 153 insertions(+) diff --git a/Documentation/devicetree/bindings/input/hid-over-spi.yaml b/Do= cumentation/devicetree/bindings/input/hid-over-spi.yaml new file mode 100644 index 000000000000..b623629ed9d3 --- /dev/null +++ b/Documentation/devicetree/bindings/input/hid-over-spi.yaml @@ -0,0 +1,153 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/hid-over-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HID over SPI Devices + +maintainers: + - Benjamin Tissoires + - Jiri Kosina + +description: |+ + HID over SPI provides support for various Human Interface Devices over t= he + SPI bus. These devices can be for example touchpads, keyboards, touch sc= reens + or sensors. + + The specification has been written by Microsoft and is currently availab= le here: + https://www.microsoft.com/en-us/download/details.aspx?id=3D103325 + + If this binding is used, the kernel module spi-hid will handle the commu= nication + with the device and the generic hid core layer will handle the protocol. + +allOf: + - $ref: /schemas/input/touchscreen/touchscreen.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - microsoft,g6-touch-digitizer + - const: hid-over-spi + - description: Just "hid-over-spi" alone is allowed, but not recomme= nded. + const: hid-over-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: + GPIO specifier for the digitizer's reset pin (active low). The line = must + be flagged with GPIO_ACTIVE_LOW. + + vdd-supply: + description: + Regulator for the VDD supply voltage. + + input-report-header-address: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 0xffffff + description: + A value to be included in the Read Approval packet, listing an addre= ss of + the input report header to be put on the SPI bus. This address has 24 + bits. + + input-report-body-address: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 0xffffff + description: + A value to be included in the Read Approval packet, listing an addres= s of + the input report body to be put on the SPI bus. This address has 24 = bits. + + output-report-address: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 0xffffff + description: + A value to be included in the Output Report sent by the host, listin= g an + address where the output report on the SPI bus is to be written to. = This + address has 24 bits. + + post-power-on-delay-ms: + description: + Optional time in ms required by the device after enabling its regula= tors + or powering it on, before it is ready for communication. + + minimal-reset-delay-ms: + description: + Optional minimum amount of time in ms that device needs to be in res= et + state for the reset to take effect. + + read-opcode: + $ref: /schemas/types.yaml#/definitions/uint8 + description: + Value to be used in Read Approval packets. 1 byte. + + write-opcode: + $ref: /schemas/types.yaml#/definitions/uint8 + description: + Value to be used in Write Approval packets. 1 byte. + + hid-over-spi-flags: + $ref: /schemas/types.yaml#/definitions/uint16 + description: + 16 bits. + Bits 0-12 - Reserved (must be 0) + Bit 13 - SPI Write Mode. Possible values - + * 0b0- Writes are carried out in Single-SPI mode + * 0b1- Writes are carried out in the Multi-SPI mode specified by b= its + 14-15 + Bits 14-15 - Multi-SPI Mode. Possible values - + * 0b00- Single SPI + * 0b01- Dual SPI + * 0b10- Quad SPI + +required: + - compatible + - interrupts + - reset-gpios + - vdd-supply + - input-report-header-address + - input-report-body-address + - output-report-address + - read-opcode + - write-opcode + - hid-over-spi-flags + +additionalProperties: false + +examples: + - | + #include + #include + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + hid@0 { + compatible =3D "hid-over-spi"; + reg =3D <0x0>; + interrupts-extended =3D <&gpio 42 IRQ_TYPE_EDGE_FALLING>; + reset-gpios =3D <&gpio 27 GPIO_ACTIVE_LOW>; + vdd-supply =3D <&pm8350c_l3>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&ts_d6_reset_assert &ts_d6_int_bias>; + input-report-header-address =3D <0x1000>; + input-report-body-address =3D <0x1004>; + output-report-address =3D <0x2000>; + read-opcode =3D <0x0b>; + write-opcode =3D <0x02>; + hid-over-spi-flags =3D <0x0000>; + post-power-on-delay-ms =3D <5>; + minimal-reset-delay-ms =3D <5>; + }; + }; \ No newline at end of file --=20 2.53.0.473.g4a7958ca14-goog