devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing
  2025-08-20 12:25 Langyan Ye
@ 2025-08-20 12:25 ` Langyan Ye
  2025-08-20 14:47   ` Doug Anderson
  0 siblings, 1 reply; 7+ messages in thread
From: Langyan Ye @ 2025-08-20 12:25 UTC (permalink / raw)
  To: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss
  Cc: dianders, linux-input, devicetree, linux-kernel, Langyan Ye

Parade-tc3408 requires reset to pull down time greater than 10ms,
so the configuration post_power_delay_ms is 10, and the chipset
initial time is required to be greater than 300ms,
so the post_gpio_reset_on_delay_ms is set to 300.

Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
---
 drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
index 3fcff6daa0d3..23826cb808b7 100644
--- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
+++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
@@ -179,11 +179,19 @@ static const struct elan_i2c_hid_chip_data ilitek_ili2901_chip_data = {
 	.main_supply_name = "vcc33",
 };
 
+static const struct elan_i2c_hid_chip_data parade_tc3408_chip_data = {
+	.post_power_delay_ms = 10,
+	.post_gpio_reset_on_delay_ms = 100,
+	.hid_descriptor_address = 0x0001,
+	.main_supply_name = "vcc33",
+};
+
 static const struct of_device_id elan_i2c_hid_of_match[] = {
 	{ .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
 	{ .compatible = "elan,ekth6a12nay", .data = &elan_ekth6a12nay_chip_data },
 	{ .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
 	{ .compatible = "ilitek,ili2901", .data = &ilitek_ili2901_chip_data },
+	{ .compatible = "parade,tc3408", .data = &parade_tc3408_chip_data },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, elan_i2c_hid_of_match);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing
  2025-08-20 12:25 ` [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing Langyan Ye
@ 2025-08-20 14:47   ` Doug Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2025-08-20 14:47 UTC (permalink / raw)
  To: Langyan Ye
  Cc: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss,
	linux-input, devicetree, linux-kernel

Hi,

On Wed, Aug 20, 2025 at 5:25 AM Langyan Ye
<yelangyan@huaqin.corp-partner.google.com> wrote:
>
> Parade-tc3408 requires reset to pull down time greater than 10ms,
> so the configuration post_power_delay_ms is 10, and the chipset
> initial time is required to be greater than 300ms,
> so the post_gpio_reset_on_delay_ms is set to 300.
>
> Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
> ---
>  drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 0/2] Add tc3408 bindings and timing
@ 2025-08-21  3:15 Langyan Ye
  2025-08-21  3:15 ` [PATCH v2 1/2] dt-bindings: input: Add Parade TC3408 touchscreen controller Langyan Ye
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Langyan Ye @ 2025-08-21  3:15 UTC (permalink / raw)
  To: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss
  Cc: dianders, linux-input, devicetree, linux-kernel, Langyan Ye

The tc3408 touch screen chip same as Elan eKTH6915 controller
has a reset gpio. The difference is that they have different
post_power_delay_ms.

According to the Parade TC3408 datasheet, the reset pin requires a
pull-down duration longer than 10 ms, therefore post_power_delay_ms
is set to 10. In addition, the chipset requires an initialization
time greater than 300 ms after reset, so post_gpio_reset_on_delay_ms
is configured as 300.

Changes in v3:
- PATCH 2/2: Corrected post_gpio_reset_on_delay_ms: 100 -> 300
- PATCH 2/2: Dropped Reviewed-by tag from Douglas Anderson since code changed
- Link to v2: https://lore.kernel.org/all/20250820122520.3356738-1-yelangyan@huaqin.corp-partner.google.com/

Changes in v2:
- PATCH 1/2: Drop redundant "bindings for" from subject
- PATCH 1/2: Improve description (describe hardware instead of bindings)
- PATCH 1/2: Drop "panel: true" property
- PATCH 1/2: Drop redundant description for reset-gpios
- PATCH 1/2: Use unevaluatedProperties: false instead of additionalProperties
- Link to v1: https://lore.kernel.org/all/20250819034852.1230264-1-yelangyan@huaqin.corp-partner.google.com/

Langyan Ye (2):
  dt-bindings: input: Add Parade TC3408 touchscreen controller
  HID: i2c-hid: elan: Add parade-tc3408 timing

 .../bindings/input/parade,tc3408.yaml         | 68 +++++++++++++++++++
 drivers/hid/i2c-hid/i2c-hid-of-elan.c         |  8 +++
 2 files changed, 76 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/parade,tc3408.yaml

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] dt-bindings: input: Add Parade TC3408 touchscreen controller
  2025-08-21  3:15 [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
@ 2025-08-21  3:15 ` Langyan Ye
  2025-08-21  3:15 ` [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing Langyan Ye
  2025-08-21  3:44 ` [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
  2 siblings, 0 replies; 7+ messages in thread
From: Langyan Ye @ 2025-08-21  3:15 UTC (permalink / raw)
  To: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss
  Cc: dianders, linux-input, devicetree, linux-kernel, Langyan Ye,
	Conor Dooley

The tc3408 touch screen chip same as Elan eKTH6915 controller
has a reset gpio. The difference is that they have different
post_power_delay_ms.

Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/input/parade,tc3408.yaml         | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/parade,tc3408.yaml

diff --git a/Documentation/devicetree/bindings/input/parade,tc3408.yaml b/Documentation/devicetree/bindings/input/parade,tc3408.yaml
new file mode 100644
index 000000000000..30ffefb96c68
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/parade,tc3408.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/parade,tc3408.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Parade TC3408 touchscreen controller
+
+maintainers:
+  - Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
+
+description: |
+  Parade TC3408 is a touchscreen controller supporting the I2C-HID protocol.
+  It requires a reset GPIO and two power supplies (3.3V and 1.8V).
+
+allOf:
+  - $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
+properties:
+  compatible:
+    const: parade,tc3408
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  vcc33-supply:
+    description: The 3.3V supply to the touchscreen.
+
+  vccio-supply:
+    description: The 1.8V supply to the touchscreen.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - reset-gpios
+  - vcc33-supply
+  - vccio-supply
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      touchscreen: touchscreen@24 {
+        compatible = "parade,tc3408";
+        reg = <0x24>;
+
+        interrupt-parent = <&pio>;
+        interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
+
+        reset-gpios = <&pio 126 GPIO_ACTIVE_LOW>;
+        vcc33-supply = <&pp3300_tchscr_x>;
+        vccio-supply = <&pp1800_tchscr_report_disable>;
+      };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing
  2025-08-21  3:15 [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
  2025-08-21  3:15 ` [PATCH v2 1/2] dt-bindings: input: Add Parade TC3408 touchscreen controller Langyan Ye
@ 2025-08-21  3:15 ` Langyan Ye
  2025-08-21 14:29   ` Doug Anderson
  2025-08-21  3:44 ` [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
  2 siblings, 1 reply; 7+ messages in thread
From: Langyan Ye @ 2025-08-21  3:15 UTC (permalink / raw)
  To: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss
  Cc: dianders, linux-input, devicetree, linux-kernel, Langyan Ye

Parade-tc3408 requires reset to pull down time greater than 10ms,
so the configuration post_power_delay_ms is 10, and the chipset
initial time is required to be greater than 300ms,
so the post_gpio_reset_on_delay_ms is set to 300.

Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
---
 drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
index 3fcff6daa0d3..875f5e214c7b 100644
--- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c
+++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c
@@ -179,11 +179,19 @@ static const struct elan_i2c_hid_chip_data ilitek_ili2901_chip_data = {
 	.main_supply_name = "vcc33",
 };
 
+static const struct elan_i2c_hid_chip_data parade_tc3408_chip_data = {
+	.post_power_delay_ms = 10,
+	.post_gpio_reset_on_delay_ms = 300,
+	.hid_descriptor_address = 0x0001,
+	.main_supply_name = "vcc33",
+};
+
 static const struct of_device_id elan_i2c_hid_of_match[] = {
 	{ .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data },
 	{ .compatible = "elan,ekth6a12nay", .data = &elan_ekth6a12nay_chip_data },
 	{ .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data },
 	{ .compatible = "ilitek,ili2901", .data = &ilitek_ili2901_chip_data },
+	{ .compatible = "parade,tc3408", .data = &parade_tc3408_chip_data },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, elan_i2c_hid_of_match);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/2] Add tc3408 bindings and timing
  2025-08-21  3:15 [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
  2025-08-21  3:15 ` [PATCH v2 1/2] dt-bindings: input: Add Parade TC3408 touchscreen controller Langyan Ye
  2025-08-21  3:15 ` [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing Langyan Ye
@ 2025-08-21  3:44 ` Langyan Ye
  2 siblings, 0 replies; 7+ messages in thread
From: Langyan Ye @ 2025-08-21  3:44 UTC (permalink / raw)
  To: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss
  Cc: dianders, linux-input, devicetree, linux-kernel

Langyan Ye <yelangyan@huaqin.corp-partner.google.com> 于2025年8月21日周四 11:15写道:
>
> The tc3408 touch screen chip same as Elan eKTH6915 controller
> has a reset gpio. The difference is that they have different
> post_power_delay_ms.
>
> According to the Parade TC3408 datasheet, the reset pin requires a
> pull-down duration longer than 10 ms, therefore post_power_delay_ms
> is set to 10. In addition, the chipset requires an initialization
> time greater than 300 ms after reset, so post_gpio_reset_on_delay_ms
> is configured as 300.
>
> Changes in v3:
> - PATCH 2/2: Corrected post_gpio_reset_on_delay_ms: 100 -> 300
> - PATCH 2/2: Dropped Reviewed-by tag from Douglas Anderson since code changed
> - Link to v2: https://lore.kernel.org/all/20250820122520.3356738-1-yelangyan@huaqin.corp-partner.google.com/
>
> Changes in v2:
> - PATCH 1/2: Drop redundant "bindings for" from subject
> - PATCH 1/2: Improve description (describe hardware instead of bindings)
> - PATCH 1/2: Drop "panel: true" property
> - PATCH 1/2: Drop redundant description for reset-gpios
> - PATCH 1/2: Use unevaluatedProperties: false instead of additionalProperties
> - Link to v1: https://lore.kernel.org/all/20250819034852.1230264-1-yelangyan@huaqin.corp-partner.google.com/
>
> Langyan Ye (2):
>   dt-bindings: input: Add Parade TC3408 touchscreen controller
>   HID: i2c-hid: elan: Add parade-tc3408 timing
>
>  .../bindings/input/parade,tc3408.yaml         | 68 +++++++++++++++++++
>  drivers/hid/i2c-hid/i2c-hid-of-elan.c         |  8 +++
>  2 files changed, 76 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/parade,tc3408.yaml
>
> --
> 2.34.1
>

Hi all,

Apologies for the confusion. The last series I sent was labeled as
"[PATCH v2 0/2]" in the subject, but it should have been "[PATCH v3 0/2]".
Please consider that series as v3.

Thanks,
Langyan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing
  2025-08-21  3:15 ` [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing Langyan Ye
@ 2025-08-21 14:29   ` Doug Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2025-08-21 14:29 UTC (permalink / raw)
  To: Langyan Ye
  Cc: dmitry.torokhov, robh, krzk+dt, conor+dt, jikos, bentiss,
	linux-input, devicetree, linux-kernel

Hi,

On Wed, Aug 20, 2025 at 8:15 PM Langyan Ye
<yelangyan@huaqin.corp-partner.google.com> wrote:
>
> Parade-tc3408 requires reset to pull down time greater than 10ms,
> so the configuration post_power_delay_ms is 10, and the chipset
> initial time is required to be greater than 300ms,
> so the post_gpio_reset_on_delay_ms is set to 300.
>
> Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
> ---
>  drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Whoops, I guess I should have realized that the commit description
(300ms) didn't match the contents of the patch (100ms) in your
previous version. Sorry about that. This version looks fine.

Reviewed-by: Douglas Anderson <dianders@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-21 14:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21  3:15 [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
2025-08-21  3:15 ` [PATCH v2 1/2] dt-bindings: input: Add Parade TC3408 touchscreen controller Langyan Ye
2025-08-21  3:15 ` [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing Langyan Ye
2025-08-21 14:29   ` Doug Anderson
2025-08-21  3:44 ` [PATCH v2 0/2] Add tc3408 bindings and timing Langyan Ye
  -- strict thread matches above, loose matches on Subject: below --
2025-08-20 12:25 Langyan Ye
2025-08-20 12:25 ` [PATCH v2 2/2] HID: i2c-hid: elan: Add parade-tc3408 timing Langyan Ye
2025-08-20 14:47   ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).