From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 209AC509F06 for ; Fri, 9 Oct 2026 22:26:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791584812; cv=none; b=c2mwYWubasKSodBaZ7Hzyll1w5APSzVUzj47JIrUVyjGJK6mKuocRgUQ8FQkS6qKNBmkeAQEWZxfFbzOA+tM85edy7E+zXC319qOHOpqZ5BFhuouxsk3qpxf01VfK3Xz+AUAWN/Fu0t5uqa0JZfGcrHhFCJptz8de1vn7OTYRMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791584812; c=relaxed/simple; bh=72Nm2xPACBMza4dpmAjiF+9Mji7R6ngQlpvq8pPnER4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=U410BclcII6pB5URAhSYh+2teXRDq83TCSFUgC/fl9pbz4CVzXA3q4DLSRatFVWg4dx5zuLUtrIwD4zctGLQqtfD5tmx2OwOw6LzdiQqr+77iWsXSHr1SGDbQaxjjEITWtB44+N+xuOH548NvIyMQbDuC065gP/3Jcv6O684y1Y= 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=BtGj9MVI; arc=none smtp.client-ip=209.85.214.180 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="BtGj9MVI" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2e8246b13cbso1671735ad.2 for ; Fri, 09 Oct 2026 15:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1791584805; x=1792189605; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=PBu3xWQl0zj63Pw/WrczlkLjQSRA1otgNmqx45WtYLU=; b=BtGj9MVI65pUQpo0bBT4GquTh6PQF5U5JBMtgv79jVkAf+iQvZC2D6OJlhd19vRbRO FBz60UDUX0GwJqbuR+oMqwG1LEt2cZ7bNy+OlePCapySx2UpZMou2fJ4A3j3r0eWB2lb /T6a6y2/PZSf53ZuHjMfGIzrT+HbmTgczlhTQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791584805; x=1792189605; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=PBu3xWQl0zj63Pw/WrczlkLjQSRA1otgNmqx45WtYLU=; b=J5A/NXatitwu9+WpqEyQDhHtmAa9aNJuWoU7Cck3+LX2PAgQnLwDi61iIY4u+ynECX Kur99KnXJl86yZlcZCnonamXZG68Laek9oiRgblbZbNzR/xKtdz0z5oydBLsPQG5++l7 HlrC5Skzg1lM1O7kfiFez5F7DFj1+d/3Punl31AbpyumbmTez0e+/aD/rt/MYvpD23MH rlY82svQiLBtzWEKJ4WeO/LMQNZHYP0Q5G4sXQiVrDGUShNQIdfdh0Dr00nqeFzkAH8z xdTXpUDWKl70zhXlL4ptgnBvggjtrOBomymS1fGWYgoK1Uom69NJ9DtkltP4dPxXHsgc zh5Q== X-Forwarded-Encrypted: i=1; AKwUvBxA889GUq8dOHgv55Yiamfdm62QfDGIrDwhT1qsIx/pHio8v5jTOY/wzKkD/SlwA0KVF+SwrEX+rBGQ@vger.kernel.org X-Gm-Message-State: AFq9FYIEAvmJlkiNzR8Dpc/w3ujpHXmZ+e+o5eQwK4x3as/y4WgdPXAz fPdewVq0aOLpNp10y+ixPTJy1OErY/OLbo8oArzI0xugiqglsI1O6fLjimx5shwAJA== X-Gm-Gg: AYBFou0klFIhueRpG9ud1vlDtPf+FE4FEw11Kk35z0kXa1EPYRvzP/auHJVPjGS2yxW fBLHhBt8iLTsAFG6nMP0E6qd8IK+ZaWt4yvt+353ogPLr4irVU014uSEI1YwawXsOdclvH6tPjQ S/35avvHTVipa+JsK/tBYadlY4lbNMWpgCcbtiZvdqz6f/4ezJp43f6ZEouyMhncjJJAJgllHWr HU9LIy7XZcyOckZO0ZdDl7a/08Yn6CYBm13X4gLuowJbxbczPyXaczB9LytBtSOXB5eh2nuuj9v rX43RGGelfNg4TAn0dLOdodBUbXXAOXX+pS3daoNqmCVMeM9E/cfqGNajV3XJfWtWDIgvzvwR0d 3plq6GQ+1aQ9ySCgMMObUtD9KSIBUSL4CABDnH2negOV5qn4u96RAAbfabevBncLOHQLAV+BL6D uCAOSzJDzZqVq22ow0tENhSwHwuCwNdBb2uk/nOF/w93Sk/LH5m1FFCNdtKvnwoV6lWWqfOtKZm m0smXVwONdZ9l9xD0HVtJ7G3gMUGFq24Kp9msEM7QSaWcAgHFJThoVR7945Tk4IkVb3mLHiaxrZ X-Received: by 2002:a17:903:1585:b0:2dd:c100:9433 with SMTP id d9443c01a7336-2e842cd0d8dmr30724495ad.49.1791584805029; Fri, 09 Oct 2026 15:26:45 -0700 (PDT) Received: from jingyliang-input-linux.c.googlers.com (35.152.82.34.bc.googleusercontent.com. [34.82.152.35]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e84219e503sm16660725ad.17.2026.10.09.15.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2026 15:26:44 -0700 (PDT) From: Jingyuan Liang Date: Fri, 09 Oct 2026 22:25:34 +0000 Subject: [PATCH v5 09/11] dt-bindings: input: Document hid-over-spi DT schema Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261009-send-upstream-v5-9-384af01da3ee@chromium.org> References: <20261009-send-upstream-v5-0-384af01da3ee@chromium.org> In-Reply-To: <20261009-send-upstream-v5-0-384af01da3ee@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, tfiga@chromium.org, fqwqf@fqwqf.xyz, daleyo@gmail.com, Jingyuan Liang , Dmitry Antipov , Jarrett Schultz X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1791584797; l=5021; i=jingyliang@chromium.org; s=20260213; h=from:subject:message-id; bh=72Nm2xPACBMza4dpmAjiF+9Mji7R6ngQlpvq8pPnER4=; b=XESZK185fOwWrPZ4glwRC6/Im76uCbwmPk+s0WAzP8HshRks8rpkdjeNqdiN4VhlVHpQ/yP9Z cSXImZpNeakDSGJtVH0n9pQLrL2+dFpcOYiDwHaQZJIqm4gvbyyQoaP 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 Tested-by: Dale Whinham Signed-off-by: Jingyuan Liang --- .../devicetree/bindings/input/hid-over-spi.yaml | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/Documentation/devicetree/bindings/input/hid-over-spi.yaml b/Documentation/devicetree/bindings/input/hid-over-spi.yaml new file mode 100644 index 000000000000..2a5fa0868a09 --- /dev/null +++ b/Documentation/devicetree/bindings/input/hid-over-spi.yaml @@ -0,0 +1,130 @@ +# 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 + - Jingyuan Liang + +description: |+ + HID over SPI provides support for various Human Interface Devices over the + SPI bus. These devices can be for example touchpads, keyboards, touch screens + or sensors. + + The specification has been written by Microsoft and is currently available + here: https://www.microsoft.com/en-us/download/details.aspx?id=103325 + + The HID over SPI specification does not define fixed values for the + read/write opcodes and the input/output report addresses. The host + retrieves them from platform firmware (ACPI _DSM), and they differ + between devices. These properties provide the same values on Device + Tree systems, so devices that fully comply with the specification work + with the "hid-over-spi" fallback compatible. + +allOf: + - $ref: /schemas/input/touchscreen/touchscreen.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + items: + - enum: + - microsoft,g6-touch-digitizer + - const: hid-over-spi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: + GPIO specifier for the device's reset line. The HID over SPI + specification requires a dedicated, host-driven, active-low reset + line. 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 address 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 address 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, listing an + address where the output report on the SPI bus is to be written to. This + address has 24 bits. + + 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 Output Report packets. 1 byte. + +required: + - compatible + - reg + - interrupts + - reset-gpios + - vdd-supply + - input-report-header-address + - input-report-body-address + - output-report-address + - read-opcode + - write-opcode + +unevaluatedProperties: false + +examples: + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + hid@0 { + compatible = "microsoft,g6-touch-digitizer", "hid-over-spi"; + reg = <0x0>; + interrupts-extended = <&gpio 42 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + vdd-supply = <&pm8350c_l3>; + pinctrl-names = "default"; + pinctrl-0 = <&ts_d6_int_bias>; + input-report-header-address = <0x1000>; + input-report-body-address = <0x1004>; + output-report-address = <0x2000>; + read-opcode = /bits/ 8 <0x0b>; + write-opcode = /bits/ 8 <0x02>; + }; + }; -- 2.56.0.385.gd3acb90ef8-goog