From patchwork Fri Nov 8 12:03:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Wang X-Patchwork-Id: 841837 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (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 2A1A51E5721; Fri, 8 Nov 2024 12:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731067411; cv=none; b=SutuPj7cbkJQByxjPPLumbIu5lHfBLXdB/jm5q1grWTrlJN5/pEqN2YP8ONQLsFNHrwQ0A/1q5D6AE+pbsjWB3Slis3XrmSFaVGcM//uor25HXJ8WyvSJ2zC/X650uGHF2CVCxM8FutT3p+w5vB2SvX8eGHz79ZSGptjUBkJmzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731067411; c=relaxed/simple; bh=kak8+PuARXuSGio98YkM2i1soiYRpSfGtPCyC+yBT+k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=coa3eqXhxuwQDrlcVt8Vin8uq97fF7KjUzG0lCdGhhepGGJrRLW2cdiVP8IXcsDGiiJCk0ygFC/IFTvEFA4u7eqloY3tgq/IHwMdievOn5cUq6KwtEGRDmZN2x8vEmxqnBgpt+1PXafc9Tdo4mK/L1NnNxDf5iG5/F4IRMzG9vE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DjD0E+XF; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DjD0E+XF" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71e953f4e7cso1584987b3a.3; Fri, 08 Nov 2024 04:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731067409; x=1731672209; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yZV37t9uqIdEuftQYvw+4E0W0H36QIb6rckaStuSrGk=; b=DjD0E+XFFO0A614xX8hkWEQVbJu4G2l/ykFwvyu5BlYZ+z6JW8asVbyNEuUus7OF5V aXocO4On+Tl6DMr+kWK9C09txLjyxkVKm6zHPn7uWyv7SmvM0YMbSwYoHfxn1n301OGY 63i6qI97jUHZCxjHuSRwj5SoaqAohI5DU5ytbjL/AmlMpF3WOQSme7Lcw9I5j0wOnoEV Zgz9m3HMx+viMDu3TjJRHT+KkJZM8fa5yzJp5YoinOTLHAUymvgv6mAX8EcEHJn0mny9 ig+eT5el77MxeKpHNytOCr/y62M7JEawjLid5Pyde7cnvNiZVlFGLY4b1mWNB7+wxqYJ 71Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731067409; x=1731672209; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yZV37t9uqIdEuftQYvw+4E0W0H36QIb6rckaStuSrGk=; b=vJZyRrPne2KAxWmBOdNRHTds3sIzUyjtp6ml9UW7EIoNhTmxdMYAj/VSsC1H7EdRum WVQqcO1EITldBGzbtUzlmvV9DCDCjmWe1DKK4rG8BuWPznu1uWtWCvq68J0W2lHVSGT2 zV6pNVca1PwKvf77m6zOfcxjCWPE7YShS5/rzZLTbKhy4rK/DXBAx5iB3s1IfCLkHVs3 glEnQG6rfRT4arsKwyjBULdHDzpoT54PX2ZuSf0VDepUWUlGbT3TkXjeELAlANFApIr4 KpHckrW/WsdCdo0Y7bFkyFpOyLhU9Jn7N4685SLETHZI9vB2Ql3YUB8wvVvS/vbrB8ez tOeA== X-Forwarded-Encrypted: i=1; AJvYcCVM4BAp6chq6GN55bxEtrktMD3hZbEF8bbrPau1+os213rd76qNm/p6wAq9T+vw93OoP5raHlnWSPR9@vger.kernel.org, AJvYcCWvCMFJpAmdrAfFwaDuQmRW8hBXMvFzro/Ze+00t8rRvtZJvKQ9MXxlJWevWJ4pa4hcSNK6jWzAjvYN3hPq@vger.kernel.org, AJvYcCXpkfgS9AOS4hHuy9BF2POgmQlYAtqr2e1z2VUDbm5M+kj58qTI1ay679LiGNRkIfPKcpAp7Mmn958PIhs=@vger.kernel.org X-Gm-Message-State: AOJu0YxyY5yKrWGf4TdczABoHhhfjChsANf4guBX3vNwUYESZeqZ54dL FueMAbn5jnxEE2GfS3MJ7MApaHgdsMVdIWbS70nIGG4ahd2UTqSY X-Google-Smtp-Source: AGHT+IFlUSXTo3Pv11YDofY+SBId+3cHzgjsjrqsJm+1XkFwlp3IC7d9Z0BaPeUWROiMZiF2njptLw== X-Received: by 2002:a05:6a00:234b:b0:720:9a03:b6dc with SMTP id d2e1a72fcca58-724133597c8mr3464195b3a.18.1731067409452; Fri, 08 Nov 2024 04:03:29 -0800 (PST) Received: from ux-UP-WHL01.. (mailgw01.goodix.com. [45.117.96.243]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724079a403fsm3579656b3a.105.2024.11.08.04.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 04:03:29 -0800 (PST) From: Charles Wang To: krzk@kernel.org, hbarnor@chromium.org, dianders@chromium.org, conor.dooley@microchip.com Cc: dmitry.torokhov@gmail.com, jikos@kernel.org, bentiss@kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Charles Wang Subject: [PATCH v3 1/2] dt-bindings: input: Goodix GT7986U SPI HID Touchscreen Date: Fri, 8 Nov 2024 20:03:10 +0800 Message-ID: <20241108120311.87795-2-charles.goodix@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241108120311.87795-1-charles.goodix@gmail.com> References: <20241108120311.87795-1-charles.goodix@gmail.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The Goodix GT7986U touch controller report touch data according to the HID protocol through the SPI bus. However, it is incompatible with Microsoft's HID-over-SPI protocol. NOTE: these bindings are distinct from the bindings used with the GT7986U when the chip is running I2C firmware. For some background, see discussion on the mailing lists in the thread: https://lore.kernel.org/r/20241018020815.3098263-2-charles.goodix@gmail.com Signed-off-by: Charles Wang --- .../bindings/input/goodix,gt7986u-spifw.yaml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml diff --git a/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml b/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml new file mode 100644 index 000000000..8105b9ce2 --- /dev/null +++ b/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/goodix,gt7986u-spifw.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Goodix GT7986U SPI HID Touchscreen + +maintainers: + - Charles Wang + +description: Supports the Goodix GT7986U touchscreen. + This touch controller reports data packaged according to the HID protocol + over the SPI bus, but it is incompatible with Microsoft's HID-over-SPI protocol. + + NOTE: these bindings are distinct from the bindings used with the + GT7986U when the chip is running I2C firmware. This is because there's + not a single device that talks over both I2C and SPI but rather + distinct touchscreens that happen to be built with the same ASIC but + that are distinct products running distinct firmware. + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + enum: + - goodix,gt7986u-spifw + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + goodix,hid-report-addr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The register address for retrieving HID report data. + + spi-max-frequency: true + +required: + - compatible + - reg + - interrupts + - reset-gpios + - goodix,hid-report-addr + +unevaluatedProperties: false + +examples: + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@0 { + compatible = "goodix,gt7986u-spifw"; + reg = <0>; + interrupt-parent = <&gpio>; + interrupts = <25 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + spi-max-frequency = <10000000>; + goodix,hid-report-addr = <0x22c8c>; + }; + }; + +... From patchwork Fri Nov 8 12:03:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Wang X-Patchwork-Id: 842553 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 3B7AA1E570A; Fri, 8 Nov 2024 12:03:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731067416; cv=none; b=nDZfLoxgXVBvfvErt4XPJ/a5p0Th1jOIHLM+Qfw9soolfrrvieqjrQIsvELPlj3iFQbDqvG2MES2VLX0Ghr6QKa1WYCfBhANkNK5Gr+JnKFHmu7PMPpZ6WgWYibzgPZy/Uwl99ygXyf5QoSqw0x5tkekyWloGHyydAe8TXaQjqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731067416; c=relaxed/simple; bh=ChBYcsymTV1V2mzS78DD/EMvOHeZnX/SWf2LKR2jUG0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tc6lhsrKXkcV8lUxyf4CeJ8GdOlY/GKO4qA8/Ooh2/cTRONilrfRoHig2N1ePE/5ikFLWZTmqVVh0NRlD2qGozxQeHHlYPk+AI/1nh4BQTQGHAz26gow9ooPssyVfGmktt6kktIHTbA7m86wVxweqMQPUetIlUJQrE/WYdwAFC8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gHLYVjV4; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gHLYVjV4" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-71e8235f0b6so1715434b3a.3; Fri, 08 Nov 2024 04:03:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731067414; x=1731672214; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ikksqLJ4EA+Xck83QqUeUsYVlDqNhdNWvuB3gGEYssM=; b=gHLYVjV4cxFVubE7HNRQZg3JiW11dLTGUvONZfQU3xDliAC+lqnoIeZNGOkoOHsJ4B YwOv+jwHc/x+xdT61g9+7kJg4mkQ/ClejSFseHMGbSeyrRAdQC376Ix9fwwaIOApU7fk FZJuTmzxHH8nhpUsnwsAIQEmfhnEg/GhPXZ6gjsA4wtAuqVG3f6GrV3Wdye90JfvIo1J WDGih1q/QDSZw1NG/liI8c5kSvgRjdEZd2I8SXy3xKVMgubyCAlXdfw9Gzlz2unoCioT eadAoveQWVwMYJOe3/lbqT0Tu7YozHVAuETQieEsIhx6rYhY/yLTXJ4zFPMUBwfScekE xMOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731067414; x=1731672214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ikksqLJ4EA+Xck83QqUeUsYVlDqNhdNWvuB3gGEYssM=; b=LXIfEtG0L8v+SVTy8uLA4DZVAV6vGKUIx4hJUmkvNDNH2nfNwZFzcQW8bV0QExeRoK dFH/1de47kqXgliR2XUeOirW0mVcRETH9Dg2P45m+uB7VoXWky9BajY58mwomHp2NqMg Y+JWCd4/X7SzpMl58fTtxUd9YaNj8o2fI4WnzpAvMXGMqc+gOT35OqJ27Idq7wzJFb8+ alzKAYgSzfE4OqAzDgprtJqvG2CZ4O+ljFCYRdyFLddIGamXJ9dysTid+oqHCn1HyBCV +4TMHvSFGLyCC9qXWOzOqjXtnvgzb5cuHzSN1UcTV4DOdgLVzB6CIHqRp6bwQwleUVgi SmxA== X-Forwarded-Encrypted: i=1; AJvYcCU9Ruo33bz41v4zdp2T/rHKwKnGCULea3BmCMOaVRHQNyKQK2F6HNvwGmAKyyIGv1JHrh6vQD8OoXg7@vger.kernel.org, AJvYcCUrsYAzDG6YP/xw99jU32+U8drR7aEBEzbvzS47Zl+dWuexcSQyHLOv/SUqYe7lp4lL5SmPPUpIOaYARQ4=@vger.kernel.org, AJvYcCW9jWvP1zi5gqJzZq9W9dgwfeUk3IpTyRseruw1vVaYVAK1RqRnHnAHQ+SJuKkJ6/Dy5YQHpbYLPL7qcj6F@vger.kernel.org X-Gm-Message-State: AOJu0YykPj3oIxRuWbPRdCgHw2ye+RaEt9Ci8jkGnDXdDezPt8mWes7m 3octuCiJ3ZksFkVhLHzg4vMblTH3y1Y/HaRsjkXfP4+JGkujL6lO X-Google-Smtp-Source: AGHT+IEg8uT2/01qFIz2nHpe00coD7q2mrHMZHOIwgHUHZoLVfNAQyBU+biUvKI+sNcFRxnq3EEfIw== X-Received: by 2002:a05:6a21:7891:b0:1db:dc58:8058 with SMTP id adf61e73a8af0-1dc22b5363cmr3197155637.31.1731067414362; Fri, 08 Nov 2024 04:03:34 -0800 (PST) Received: from ux-UP-WHL01.. (mailgw01.goodix.com. [45.117.96.243]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724079a403fsm3579656b3a.105.2024.11.08.04.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 04:03:33 -0800 (PST) From: Charles Wang To: krzk@kernel.org, hbarnor@chromium.org, dianders@chromium.org, conor.dooley@microchip.com Cc: dmitry.torokhov@gmail.com, jikos@kernel.org, bentiss@kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Charles Wang Subject: [PATCH v3 2/2] dt-bindings: input: gt7986u-spifw: Remove hid-report-addr property Date: Fri, 8 Nov 2024 20:03:11 +0800 Message-ID: <20241108120311.87795-3-charles.goodix@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241108120311.87795-1-charles.goodix@gmail.com> References: <20241108120311.87795-1-charles.goodix@gmail.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since all boards use the same address, drop the goodix,hid-report-addr property and hardcode it in the driver as a default value. Signed-off-by: Charles Wang --- .../devicetree/bindings/input/goodix,gt7986u-spifw.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml b/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml index 8105b9ce2..c9e346a60 100644 --- a/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml +++ b/Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml @@ -36,11 +36,6 @@ properties: reset-gpios: maxItems: 1 - goodix,hid-report-addr: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - The register address for retrieving HID report data. - spi-max-frequency: true required: @@ -48,7 +43,6 @@ required: - reg - interrupts - reset-gpios - - goodix,hid-report-addr unevaluatedProperties: false @@ -68,7 +62,6 @@ examples: interrupts = <25 IRQ_TYPE_LEVEL_LOW>; reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; spi-max-frequency = <10000000>; - goodix,hid-report-addr = <0x22c8c>; }; };