Skip to content

Commit fe9c624

Browse files
author
Benjamin Tissoires
committed
Merge branch 'for-6.12/goodix-spi' into for-linus
- Add support for a new Goodix HID over SPI driver (Charles Wang) Note: this driver doesn't rely on the spefication of HID over SPI provided by Microsoft, thus needs a separate driver, not a generic bus transport low level driver.
2 parents 1a811ed + 252ed1f commit fe9c624

File tree

4 files changed

+896
-0
lines changed

4 files changed

+896
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/goodix,gt7986u.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: GOODIX GT7986U SPI HID Touchscreen
8+
9+
maintainers:
10+
- Charles Wang <[email protected]>
11+
12+
description: Supports the Goodix GT7986U touchscreen.
13+
This touch controller reports data packaged according to the HID protocol,
14+
but is incompatible with Microsoft's HID-over-SPI protocol.
15+
16+
allOf:
17+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- goodix,gt7986u
23+
24+
reg:
25+
maxItems: 1
26+
27+
interrupts:
28+
maxItems: 1
29+
30+
reset-gpios:
31+
maxItems: 1
32+
33+
goodix,hid-report-addr:
34+
$ref: /schemas/types.yaml#/definitions/uint32
35+
description:
36+
The register address for retrieving HID report data.
37+
This address is related to the device firmware and may
38+
change after a firmware update.
39+
40+
spi-max-frequency: true
41+
42+
additionalProperties: false
43+
44+
required:
45+
- compatible
46+
- reg
47+
- interrupts
48+
- reset-gpios
49+
- goodix,hid-report-addr
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/interrupt-controller/irq.h>
54+
#include <dt-bindings/gpio/gpio.h>
55+
56+
spi {
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
60+
touchscreen@0 {
61+
compatible = "goodix,gt7986u";
62+
reg = <0>;
63+
interrupt-parent = <&gpio>;
64+
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
65+
reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
66+
spi-max-frequency = <10000000>;
67+
goodix,hid-report-addr = <0x22c8c>;
68+
};
69+
};
70+
71+
...

drivers/hid/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,12 @@ config HID_VIVALDI_COMMON
404404
option so that drivers can use common code to parse the HID
405405
descriptors for vivaldi function row keymap.
406406

407+
config HID_GOODIX_SPI
408+
tristate "Goodix GT7986U SPI HID touchscreen"
409+
depends on SPI_MASTER
410+
help
411+
Support for Goodix GT7986U SPI HID touchscreen device.
412+
407413
config HID_GOOGLE_HAMMER
408414
tristate "Google Hammer Keyboard"
409415
select HID_VIVALDI_COMMON

drivers/hid/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ obj-$(CONFIG_HID_GEMBIRD) += hid-gembird.o
5454
obj-$(CONFIG_HID_GFRM) += hid-gfrm.o
5555
obj-$(CONFIG_HID_GLORIOUS) += hid-glorious.o
5656
obj-$(CONFIG_HID_VIVALDI_COMMON) += hid-vivaldi-common.o
57+
obj-$(CONFIG_HID_GOODIX_SPI) += hid-goodix-spi.o
5758
obj-$(CONFIG_HID_GOOGLE_HAMMER) += hid-google-hammer.o
5859
obj-$(CONFIG_HID_GOOGLE_STADIA_FF) += hid-google-stadiaff.o
5960
obj-$(CONFIG_HID_VIVALDI) += hid-vivaldi.o

0 commit comments

Comments
 (0)