Thread (12 messages) 12 messages, 6 authors, 2022-02-25

[PATCH v3 3/5] Documentation: DT bindings for HID over SPI.

From: Dmitry Antipov <hidden>
Date: 2022-01-15 02:31:49
Also in: linux-input, linux-spi
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, open firmware and flattened device tree bindings, the rest · Maintainers: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds

From: Dmitry Antipov <redacted>

Added documentation describes the required properties for implementing
Device Tree for a device supporting HID over SPI and also provides an
example.

Signed-off-by: Dmitry Antipov <redacted>
---
 .../bindings/input/hid-over-spi.txt           | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100755 Documentation/devicetree/bindings/input/hid-over-spi.txt
diff --git a/Documentation/devicetree/bindings/input/hid-over-spi.txt b/Documentation/devicetree/bindings/input/hid-over-spi.txt
new file mode 100755
index 000000000000..5eba95b5724e
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/hid-over-spi.txt
@@ -0,0 +1,43 @@
+* HID over SPI Device-Tree bindings
+
+HID over SPI provides support for Human Interface Devices over the SPI bus. HID
+Over SPI Protocol Specification 1.0 was written by Microsoft and is available at
+https://www.microsoft.com/en-us/download/details.aspx?id=103325.
+
+If this binding is used, the kernel module spi-hid will handle the communication
+with the device and the generic hid core layer will handle the protocol.
+
+Required properties:
+- compatible: must be "hid-over-spi"
+- interrupts: interrupt line
+- vdd-supply: phandle of the regulator that provides the supply voltage
+- reset_gpio-gpios: gpio wired to the device reset line
+- post-power-on-delay-ms: time required by the device after enabling its
+regulators or powering it on, before it is ready for communication 
+- minimal-reset-delay-ms: minimum amount of time that device needs to be in
+reset state for the reset to take effect
+- input-report-header-address: this property and the rest are described in HID
+Over SPI Protocol Spec 1.0
+- input-report-body-address
+- output-report-address
+- read-opcode
+- write-opcode
+- flags
+
+Example:
+	spi-hid-dev0 {
+		compatible = "hid-over-spi";
+		reg = <0>;
+		interrupts-extended = <&tlmm 42 IRQ_TYPE_EDGE_FALLING>;
+		vdd-supply = <&pm8350c_l3>;
+		input-report-header-address = <0x1000>;
+		input-report-body-address = <0x1004>;
+		output-report-address = <0x2000>;
+		read-opcode = <0x0b>;
+		write-opcode = <0x02>;
+		flags = <0x00>;
+		reset_gpio-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
+		post-power-on-delay-ms = <5>;
+		minimal-reset-delay-ms = <5>;
+		
+	};
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help