Skip to content

Commit fdbb802

Browse files
Linus Walleijdtor
authored andcommitted
dt-bindings: input/ts/zinitix: Convert to YAML, fix and extend
This converts the Zinitix BT4xx and BT5xx touchscreen bindings to YAML, fix them up a bit and extends them. We list all the existing BT4xx and BT5xx components with compatible strings. These are all similar, use the same bindings and work in similar ways. We rename the supplies from the erroneous vdd/vddo to the actual supply names vcca/vdd as specified on the actual component. It is long established that supplies shall be named after the supply pin names of a component. The confusion probably stems from that in a certain product the rails to the component were named vdd/vddo. Drop some notes on how OS implementations should avoid confusion by first looking for vddo, and if that exists assume the legacy binding pair and otherwise use vcca/vdd. Add reset-gpios as sometimes manufacturers pulls a GPIO line to the reset line on the chip. Add optional touchscreen-fuzz-x and touchscreen-fuzz-y properties. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [Fixed dt_schema_check] Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20220106072840.36851-3-nikita@trvn.ru Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 8a78050 commit fdbb802

2 files changed

Lines changed: 115 additions & 40 deletions

File tree

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/touchscreen/zinitix,bt400.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Zinitix BT4xx and BT5xx series touchscreen controller bindings
8+
9+
description: The Zinitix BT4xx and BT5xx series of touchscreen controllers
10+
are Korea-produced touchscreens with embedded microcontrollers. The
11+
BT4xx series was produced 2010-2013 and the BT5xx series 2013-2014.
12+
13+
maintainers:
14+
- Michael Srba <Michael.Srba@seznam.cz>
15+
- Linus Walleij <linus.walleij@linaro.org>
16+
17+
allOf:
18+
- $ref: touchscreen.yaml#
19+
20+
properties:
21+
$nodename:
22+
pattern: "^touchscreen(@.*)?$"
23+
24+
compatible:
25+
enum:
26+
- zinitix,bt402
27+
- zinitix,bt403
28+
- zinitix,bt404
29+
- zinitix,bt412
30+
- zinitix,bt413
31+
- zinitix,bt431
32+
- zinitix,bt432
33+
- zinitix,bt531
34+
- zinitix,bt532
35+
- zinitix,bt538
36+
- zinitix,bt541
37+
- zinitix,bt548
38+
- zinitix,bt554
39+
- zinitix,at100
40+
41+
reg:
42+
description: I2C address on the I2C bus
43+
44+
clock-frequency:
45+
description: I2C client clock frequency, defined for host when using
46+
the device on the I2C bus
47+
minimum: 0
48+
maximum: 400000
49+
50+
interrupts:
51+
description: Interrupt to host
52+
maxItems: 1
53+
54+
vcca-supply:
55+
description: Analog power supply regulator on the VCCA pin
56+
57+
vdd-supply:
58+
description: Digital power supply regulator on the VDD pin.
59+
In older device trees this can be the accidental name for the analog
60+
supply on the VCCA pin, and in that case the deprecated vddo-supply is
61+
used for the digital power supply.
62+
63+
vddo-supply:
64+
description: Deprecated name for the digital power supply, use vdd-supply
65+
as this reflects the real name of the pin. If this supply is present,
66+
the vdd-supply represents VCCA instead of VDD. Implementers should first
67+
check for this property, and if it is present assume that the vdd-supply
68+
represents the analog supply.
69+
deprecated: true
70+
71+
reset-gpios:
72+
description: Reset line for the touchscreen, should be tagged
73+
as GPIO_ACTIVE_LOW
74+
75+
zinitix,mode:
76+
description: Mode of reporting touch points. Some modes may not work
77+
with a particular ts firmware for unknown reasons. Available modes are
78+
1 and 2. Mode 2 is the default and preferred.
79+
$ref: /schemas/types.yaml#/definitions/uint32
80+
enum: [1, 2]
81+
82+
touchscreen-size-x: true
83+
touchscreen-size-y: true
84+
touchscreen-fuzz-x: true
85+
touchscreen-fuzz-y: true
86+
87+
additionalProperties: false
88+
89+
required:
90+
- compatible
91+
- reg
92+
- interrupts
93+
- touchscreen-size-x
94+
- touchscreen-size-y
95+
96+
examples:
97+
- |
98+
#include <dt-bindings/interrupt-controller/irq.h>
99+
#include <dt-bindings/gpio/gpio.h>
100+
i2c {
101+
#address-cells = <1>;
102+
#size-cells = <0>;
103+
104+
touchscreen@20 {
105+
compatible = "zinitix,bt541";
106+
reg = <0x20>;
107+
interrupt-parent = <&gpio>;
108+
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
109+
vcca-supply = <&reg_vcca_tsp>;
110+
vdd-supply = <&reg_vdd_tsp>;
111+
touchscreen-size-x = <540>;
112+
touchscreen-size-y = <960>;
113+
zinitix,mode = <2>;
114+
};
115+
};

Documentation/devicetree/bindings/input/touchscreen/zinitix.txt

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)