From: Antoniu Miclaus <antoniu.miclaus@analog.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Michael Hennerich <michael.hennerich@analog.com>,
Mark Brown <broonie@kernel.org>,
Antoniu Miclaus <antoniu.miclaus@analog.com>,
<linux-input@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>
Subject: [PATCH v3 3/3] dt-bindings: touchscreen: ad7877: add bindings
Date: Mon, 9 Sep 2024 12:30:13 +0300 [thread overview]
Message-ID: <20240909093101.14113-3-antoniu.miclaus@analog.com> (raw)
In-Reply-To: <20240909093101.14113-1-antoniu.miclaus@analog.com>
Add device tree bindings for the ad7877 driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
changes in v3:
- use strings for polarity.
- use unit siffix where applies.
- add defaults where applies.
- add complete example.
.../input/touchscreen/adi,ad7877.yaml | 109 ++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml
diff --git a/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml
new file mode 100644
index 000000000000..7603ce63af7e
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/adi,ad7877.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7877 Touch Screen Controller
+
+maintainers:
+ - Antoniu Miclaus <antoniu.miclaus@analog.com>
+
+description: |
+ Analog Devices Touch Screen Controller
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD7877.pdf
+
+allOf:
+ - $ref: touchscreen.yaml#
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7877
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ spi-max-frequency:
+ description: AD7877 SPI bus clock frequency.
+ minimum: 10000
+ maximum: 20000000
+
+ adi,stopacq-polarity:
+ description: The polarity of the signal applied to the STOPACQ pin.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [low, high]
+
+ adi,first-conv-delay-ns:
+ description: Delay in ns before the first conversion.
+ enum: [500, 128000, 1000000, 8000000]
+
+ adi,pen-down-acc-interval:
+ description: Enable the ADC to repeatedly perform conversions.
+ 0 = convert once
+ 1 = every 0.5 ms
+ 2 = every 1 ms
+ 3 = every 8 ms
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1, 2, 3]
+ default: 0
+
+ adi,acquisition-time-us:
+ description: Select acquisition times in us for the ADC.
+ enum: [2, 4, 8, 16]
+
+ adi,vref-delay-us:
+ description: Delay required for the SPI transfers depending on the VREF used.
+
+ touchscreen-average-samples:
+ enum: [1, 4, 8, 16]
+
+ touchscreen-x-plate-ohms:
+ default: 400
+
+ touchscreen-min-x: true
+ touchscreen-min-y: true
+ touchscreen-size-x: true
+ touchscreen-size-y: true
+ touchscreen-max-pressure: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - touchscreen-average-samples
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@0 {
+ compatible = "adi,ad7877";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio>;
+ adi,vref-delay-us = <100>;
+ adi,stopacq-polarity = "low";
+ adi,first-conv-delay-ns = <500>;
+ adi,pen-down-acc-interval = <0>;
+ adi,acquisition-time-us = <2>;
+ touchscreen-average-samples = <16>;
+ touchscreen-x-plate-ohms = <400>;
+ touchscreen-min-x = <0>;
+ touchscreen-min-y = <0>;
+ touchscreen-size-x = <800>;
+ touchscreen-size-y = <480>;
+ touchscreen-max-pressure = <4095>;
+ };
+ };
+...
--
2.46.0
next prev parent reply other threads:[~2024-09-09 9:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 9:30 [PATCH v3 1/3] input: touchscreem: ad7877: add match table Antoniu Miclaus
2024-09-09 9:30 ` [PATCH v3 2/3] input: touchscreen: ad7877: add dt support Antoniu Miclaus
2024-09-09 10:07 ` Krzysztof Kozlowski
2024-09-09 9:30 ` Antoniu Miclaus [this message]
2024-09-09 10:09 ` [PATCH v3 3/3] dt-bindings: touchscreen: ad7877: add bindings Krzysztof Kozlowski
2024-09-09 10:10 ` Krzysztof Kozlowski
2024-09-09 10:05 ` [PATCH v3 1/3] input: touchscreem: ad7877: add match table Krzysztof Kozlowski
2024-09-09 10:30 ` Nuno Sá
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240909093101.14113-3-antoniu.miclaus@analog.com \
--to=antoniu.miclaus@analog.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®