From: David Bauer <mail@david-bauer.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dt-bindings: input: add Semtech SX951x binding
Date: Mon, 5 May 2025 22:38:44 +0200 [thread overview]
Message-ID: <20250505203847.86714-1-mail@david-bauer.net> (raw)
Add device-tree binding for the Semtech SX9512/SX9513 family of touch
controllers with integrated LED driver.
Signed-off-by: David Bauer <mail@david-bauer.net>
---
.../bindings/input/semtech,sx951x.yaml | 180 ++++++++++++++++++
1 file changed, 180 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/semtech,sx951x.yaml
diff --git a/Documentation/devicetree/bindings/input/semtech,sx951x.yaml b/Documentation/devicetree/bindings/input/semtech,sx951x.yaml
new file mode 100644
index 000000000000..e4f938decd86
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/semtech,sx951x.yaml
@@ -0,0 +1,180 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/semtech,sx951x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Semtech SX9512/SX9513 based capacitive touch sensors
+
+description: |
+ The Semtech SX9512/SX9513 Family of capacitive touch controllers
+ with integrated LED drivers. The device communication is using I2C only.
+
+maintainers:
+ - David Bauer <mail@david-bauer.net>
+
+properties:
+ compatible:
+ enum:
+ - semtech,sx9512
+ - semtech,sx9513
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ poll-interval:
+ default: 100
+ description: |
+ The polling interval for touch events in milliseconds.
+
+patternProperties:
+ "^channel@[0-7]$":
+ $ref: input.yaml#
+ type: object
+ description: |
+ Each node represents a channel of the touch controller.
+ Each channel provides a capacitive touch sensor input and
+ an LED driver output.
+
+ properties:
+ reg:
+ enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+ linux,keycodes:
+ maxItems: 1
+ description: |
+ Specifies an array of numeric keycode values to
+ be used for the channels. If this property is
+ omitted, the channel is not used as a key.
+
+ semtech,cin-delta:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 3
+ default: 3
+ description: |
+ The capacitance delta which is used to detect a touch
+ or release event. The property value is mapped to a
+ farad range between 7pF and 2.3pF internally. The delta
+ becomes smaller the higher the value is.
+
+ semtech,sense-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 255
+ default: 4
+ description: |
+ The threshold value after which the channel detects a touch.
+ Refer to the datasheet for the internal calculation of the
+ resulting touch sensitivity.
+
+ led:
+ $ref: /schemas/leds/common.yaml#
+ type: object
+ unevaluatedProperties: false
+ description: |
+ Presence of this property indicates the channel
+ is used as an LED driver.
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/leds/common.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touch@2b {
+ compatible = "semtech,sx9512";
+
+ reg = <0x2b>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ poll-interval = <100>;
+
+ channel@1 {
+ reg = <1>;
+
+ semtech,cin-delta = <0x3>;
+ semtech,sense-threshold = <0xff>;
+
+ linux,keycodes = <KEY_A>;
+ };
+
+ channel@2 {
+ reg = <2>;
+
+ semtech,cin-delta = <0x3>;
+ semtech,sense-threshold = <0xff>;
+
+ linux,keycodes = <KEY_B>;
+ };
+
+ channel@3 {
+ reg = <3>;
+
+ semtech,cin-delta = <0x3>;
+ semtech,sense-threshold = <0xff>;
+
+ linux,keycodes = <KEY_WPS_BUTTON>;
+ };
+
+ channel@4 {
+ reg = <4>;
+
+ led {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_WAN;
+ };
+ };
+
+ channel@5 {
+ reg = <5>;
+
+ led {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WAN;
+ };
+ };
+
+ channel@6 {
+ reg = <6>;
+
+ led {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ linux,default-trigger = "phy1tx";
+ };
+ };
+
+ channel@7 {
+ reg = <7>;
+
+ led {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
+ linux,default-trigger = "phy0tx";
+ };
+ };
+ };
+ };
--
2.47.2
next reply other threads:[~2025-05-05 20:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 20:38 David Bauer [this message]
2025-05-05 20:38 ` [PATCH 2/2] Input sx951x: add Semtech SX9512/SX9513 driver David Bauer
2025-05-06 5:26 ` Dmitry Torokhov
2025-05-06 6:21 ` [PATCH 1/2] dt-bindings: input: add Semtech SX951x binding Krzysztof Kozlowski
2025-05-06 10:05 ` David Bauer
2025-05-12 19:50 ` Rob Herring
2025-05-20 13:58 ` Krzysztof Kozlowski
2025-05-20 14:03 ` Krzysztof Kozlowski
2025-05-20 19:40 ` David Bauer
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=20250505203847.86714-1-mail@david-bauer.net \
--to=mail@david-bauer.net \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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®