diff mbox series

[v6,2/3] dt-bindings: input: Add TouchNetix axiom touchscreen

Message ID 20240125165823.996910-3-kamel.bouhara@bootlin.com
State Superseded
Headers show
Series Input: Add TouchNetix axiom touchscreen driver | expand

Commit Message

Kamel BOUHARA Jan. 25, 2024, 4:58 p.m. UTC
Add the TouchNetix axiom I2C touchscreen device tree bindings
documentation.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
 .../input/touchscreen/touchnetix,ax54a.yaml   | 67 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 73 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/touchnetix,ax54a.yaml

Comments

Krzysztof Kozlowski Jan. 26, 2024, 11:46 a.m. UTC | #1
On 25/01/2024 17:58, Kamel Bouhara wrote:
> +  reset-gpios:
> +    maxItems: 1
> +
> +  vdda-supply:
> +    description: Analog power supply regulator on VDDA pin
> +
> +  vddi-supply:
> +    description: I/O power supply regulator on VDDI pin
> +
> +  startup-time-ms:
> +    description: delay after power supply regulator is applied in ms

That's a regulator property - ramp up time.

Best regards,
Krzysztof
Rob Herring Jan. 30, 2024, 10:28 p.m. UTC | #2
On Fri, Jan 26, 2024 at 12:46:16PM +0100, Krzysztof Kozlowski wrote:
> On 25/01/2024 17:58, Kamel Bouhara wrote:
> > +  reset-gpios:
> > +    maxItems: 1
> > +
> > +  vdda-supply:
> > +    description: Analog power supply regulator on VDDA pin
> > +
> > +  vddi-supply:
> > +    description: I/O power supply regulator on VDDI pin
> > +
> > +  startup-time-ms:
> > +    description: delay after power supply regulator is applied in ms
> 
> That's a regulator property - ramp up time.

I'm sure there's an existing property name that could be used.

But why is it needed? Is it variable per board with the same device? If 
not, it should be implied by the compatible.

Rob
Krzysztof Kozlowski Jan. 31, 2024, 7:28 a.m. UTC | #3
On 30/01/2024 23:28, Rob Herring wrote:
> On Fri, Jan 26, 2024 at 12:46:16PM +0100, Krzysztof Kozlowski wrote:
>> On 25/01/2024 17:58, Kamel Bouhara wrote:
>>> +  reset-gpios:
>>> +    maxItems: 1
>>> +
>>> +  vdda-supply:
>>> +    description: Analog power supply regulator on VDDA pin
>>> +
>>> +  vddi-supply:
>>> +    description: I/O power supply regulator on VDDI pin
>>> +
>>> +  startup-time-ms:
>>> +    description: delay after power supply regulator is applied in ms
>>
>> That's a regulator property - ramp up time.
> 
> I'm sure there's an existing property name that could be used.
> 
> But why is it needed? Is it variable per board with the same device? If 
> not, it should be implied by the compatible.

I meant, that regulators have such property. Unless this is coming from
the device needs, not from the regulator?

Best regards,
Krzysztof
Kamel BOUHARA Jan. 31, 2024, 9:06 a.m. UTC | #4
Hello,

On Wed, Jan 31, 2024 at 08:28:43AM +0100, Krzysztof Kozlowski wrote:
> On 30/01/2024 23:28, Rob Herring wrote:
> > On Fri, Jan 26, 2024 at 12:46:16PM +0100, Krzysztof Kozlowski wrote:
> >> On 25/01/2024 17:58, Kamel Bouhara wrote:
> >>> +  reset-gpios:
> >>> +    maxItems: 1
> >>> +
> >>> +  vdda-supply:
> >>> +    description: Analog power supply regulator on VDDA pin
> >>> +
> >>> +  vddi-supply:
> >>> +    description: I/O power supply regulator on VDDI pin
> >>> +
> >>> +  startup-time-ms:
> >>> +    description: delay after power supply regulator is applied in ms
> >>
> >> That's a regulator property - ramp up time.
> >
> > I'm sure there's an existing property name that could be used.
> >
> > But why is it needed? Is it variable per board with the same device? If
> > not, it should be implied by the compatible.
>
> I meant, that regulators have such property. Unless this is coming from
> the device needs, not from the regulator?
>

After looking again into the device's datasheet [1], the delay (startup
time) is not really optional and it shouldn't be set through devicetree.

IIUC, it have to be set unconditionally after a device reset or
a vdda assertion.

[1]: https://www.touchnetix.com/media/dgnjohor/tnxd00394-a3-axiom_ax54a_2d_touch_controller_datasheet.pdf
--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Krzysztof Kozlowski Jan. 31, 2024, 10:59 a.m. UTC | #5
On 31/01/2024 10:06, Kamel Bouhara wrote:
> Hello,
> 
> On Wed, Jan 31, 2024 at 08:28:43AM +0100, Krzysztof Kozlowski wrote:
>> On 30/01/2024 23:28, Rob Herring wrote:
>>> On Fri, Jan 26, 2024 at 12:46:16PM +0100, Krzysztof Kozlowski wrote:
>>>> On 25/01/2024 17:58, Kamel Bouhara wrote:
>>>>> +  reset-gpios:
>>>>> +    maxItems: 1
>>>>> +
>>>>> +  vdda-supply:
>>>>> +    description: Analog power supply regulator on VDDA pin
>>>>> +
>>>>> +  vddi-supply:
>>>>> +    description: I/O power supply regulator on VDDI pin
>>>>> +
>>>>> +  startup-time-ms:
>>>>> +    description: delay after power supply regulator is applied in ms
>>>>
>>>> That's a regulator property - ramp up time.
>>>
>>> I'm sure there's an existing property name that could be used.
>>>
>>> But why is it needed? Is it variable per board with the same device? If
>>> not, it should be implied by the compatible.
>>
>> I meant, that regulators have such property. Unless this is coming from
>> the device needs, not from the regulator?
>>
> 
> After looking again into the device's datasheet [1], the delay (startup
> time) is not really optional and it shouldn't be set through devicetree.
> 
> IIUC, it have to be set unconditionally after a device reset or
> a vdda assertion.
> 
> [1]: https://www.touchnetix.com/media/dgnjohor/tnxd00394-a3-axiom_ax54a_2d_touch_controller_datasheet.pdf
> --

OK, then it's not a regulator ramp up, but rather part of device driver
(deduced from compatible).

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchnetix,ax54a.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchnetix,ax54a.yaml
new file mode 100644
index 000000000000..7b3997457fa5
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/touchnetix,ax54a.yaml
@@ -0,0 +1,67 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/touchnetix,ax54a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TouchNetix Axiom series touchscreen controller
+
+maintainers:
+  - Kamel Bouhara <kamel.bouhara@bootlin.com>
+
+allOf:
+  - $ref: /schemas/input/touchscreen/touchscreen.yaml#
+  - $ref: /schemas/input/input.yaml#
+
+properties:
+  compatible:
+    const: touchnetix,ax54a
+
+  reg:
+    const: 0x66
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  vdda-supply:
+    description: Analog power supply regulator on VDDA pin
+
+  vddi-supply:
+    description: I/O power supply regulator on VDDI pin
+
+  startup-time-ms:
+    description: delay after power supply regulator is applied in ms
+
+required:
+  - compatible
+  - reg
+  - vdda-supply
+  - vddi-supply
+  - startup-time-ms
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      touchscreen@66 {
+        compatible = "touchnetix,ax54a";
+        reg = <0x66>;
+        interrupt-parent = <&gpio2>;
+        interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+        reset-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+        vdda-supply = <&vdda_reg>;
+        vddi-supply = <&vddi_reg>;
+        poll-interval = <20>;
+        startup-time-ms = <100>;
+      };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 7608b714653f..4752d8436dbb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21431,6 +21431,12 @@  S:	Maintained
 F:	Documentation/ABI/testing/sysfs-class-firmware-attributes
 F:	drivers/platform/x86/think-lmi.?
 
+TOUCHNETIX AXIOM I2C TOUCHSCREEN DRIVER
+M:	Kamel Bouhara <kamel.bouhara@bootlin.com>
+L:	linux-input@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/input/touchscreen/touchnetix,ax54a.yaml
+
 THUNDERBOLT DMA TRAFFIC TEST DRIVER
 M:	Isaac Hazan <isaac.hazan@intel.com>
 L:	linux-usb@vger.kernel.org