Skip to contentSkip to conversation

dt-bindings: input: touchscreen: hynitron,cst816x: Common properties and supply

PATCH In review Gerard Marull-Paretas 2 participants 5 messages Nov 22

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover dt-bindings: input: touchscreen: hynitron,cst816x: Common properties and supply

The CST816x binding allows no properties besides the controller's resources and gesture keycodes. Boards also need to describe the coordinate range and orientation of the panel the controller is fitted to, and its supply, which is often switched along with the display.

Patch 1 references the common touchscreen schema, patch 2 documents the supply.

Gerard Marull-Paretas (2):
dt-bindings: input: touchscreen: hynitron,cst816x: Reference
touchscreen.yaml
dt-bindings: input: touchscreen: hynitron,cst816x: Add supply

 .../bindings/input/touchscreen/hynitron,cst816x.yaml  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

base-commit: c44104f3642da720164042623e4832836aefdd8e

Signature · 1 line
2.45.2
#1 lore raw

PATCH 1/2 dt-bindings: input: touchscreen: hynitron,cst816x: Reference touchscreen.yaml

The controller reports positions in the coordinate range of the panel it is fitted to, and how the panel is mounted varies from one board to another. Reference the common touchscreen schema, so that boards can describe them with the common properties (touchscreen-size-x/y, touchscreen-inverted-x/y, touchscreen-swapped-x-y, ...), as other touchscreen controller bindings do.

---

Notes:
Checked with dtschema 2026.9: the steps of dt_binding_check run by hand (host make too old), yamllint and dt-check-style --mode=strict.

 .../bindings/input/touchscreen/hynitron,cst816x.yaml       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml +6 -1
index 72d4da636881..df52431b1d49 100644
@@ -13,6 +13,9 @@ description: |
   Bindings for CST816x high performance self-capacitance touch chip series
   with single point gesture and real two-point operation.
 
+allOf:
+  - $ref: touchscreen.yaml#
+
 properties:
   compatible:
     enum:
@@ -41,7 +44,7 @@ required:
   - reg
   - interrupts
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -57,6 +60,8 @@ examples:
             interrupt-parent = <&gpio0>;
             interrupts = <4 IRQ_TYPE_EDGE_RISING>;
             reset-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+            touchscreen-size-x = <240>;
+            touchscreen-size-y = <240>;
             linux,keycodes = <KEY_UP>, <KEY_DOWN>, <KEY_LEFT>, <KEY_RIGHT>,
                              <BTN_TOOL_TRIPLETAP>;
         };
Signature · 1 line
2.45.2
#3 lore raw

PATCH 2/2 dt-bindings: input: touchscreen: hynitron,cst816x: Add supply

In reply to Gerard Marull-Paretas

The controllers run from a single 2.8 V to 3.6 V supply. Boards may switch it, for example along with the display panel the touchscreen is laminated to, so document it.

---

Notes:
Checked with dtschema 2026.9: the steps of dt_binding_check run by hand (host make too old), yamllint and dt-check-style --mode=strict.

 .../bindings/input/touchscreen/hynitron,cst816x.yaml          | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml +4 -0
index df52431b1d49..ae8424693534 100644
@@ -30,6 +30,9 @@ properties:
   reset-gpios:
     maxItems: 1
 
+  vdd-supply:
+    description: Power supply of the controller.
+
   linux,keycodes:
     minItems: 1
     items:
@@ -60,6 +63,7 @@ examples:
             interrupt-parent = <&gpio0>;
             interrupts = <4 IRQ_TYPE_EDGE_RISING>;
             reset-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+            vdd-supply = <&vdd_ts>;
             touchscreen-size-x = <240>;
             touchscreen-size-y = <240>;
             linux,keycodes = <KEY_UP>, <KEY_DOWN>, <KEY_LEFT>, <KEY_RIGHT>,
Signature · 1 line
2.45.2