diff mbox series

[v5,3/3] arm64: dts: qcom: Add touchscreen and touchpad support for evoker

Message ID 20220930153538.v5.3.I50d04dcbe735dda69995cf1078824d671501869e@changeid
State New
Headers show
Series [v5,1/3] dt-bindings: arm: qcom: Separate LTE/WIFI SKU for sc7280-evoker | expand

Commit Message

Sheng-Liang Pan Sept. 30, 2022, 7:37 a.m. UTC
Change touchpad and touchscreen node for evoker
Touchpad: SA461D-1011
Touchscreen: GT7986U

Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
---

(no changes since v1)

 .../boot/dts/qcom/sc7280-herobrine-evoker.dtsi  | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

Comments

Douglas Anderson Sept. 30, 2022, 3:53 p.m. UTC | #1
Hi,

On Fri, Sep 30, 2022 at 12:38 AM Sheng-Liang Pan
<sheng-liang.pan@quanta.corp-partner.google.com> wrote:
>
> Change touchpad and touchscreen node for evoker
> Touchpad: SA461D-1011
> Touchscreen: GT7986U
>
> Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
> ---
>
> (no changes since v1)

nit: for patman, add:

Series-changes: 5
- Touchscreen / trackpad patch new for v5.

...and then you won't get the confusing "no changes since v1" message.

>  .../boot/dts/qcom/sc7280-herobrine-evoker.dtsi  | 17 +++++++----------
>  1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi
> index e78072159d54b..c26f19371c8bc 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi
> @@ -23,16 +23,15 @@ ap_tp_i2c: &i2c0 {
>         status = "okay";
>         clock-frequency = <400000>;
>
> -       trackpad: trackpad@2c {
> -               compatible = "hid-over-i2c";
> -               reg = <0x2c>;
> +       trackpad: trackpad@15 {
> +               compatible = "elan,ekth3000";
> +               reg = <0x15>;
>                 pinctrl-names = "default";
>                 pinctrl-0 = <&tp_int_odl>;
>
>                 interrupt-parent = <&tlmm>;
>                 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
>
> -               hid-descr-addr = <0x20>;
>                 vcc-supply = <&pp3300_z1>;
>
>                 wakeup-source;
> @@ -43,18 +42,16 @@ ts_i2c: &i2c13 {
>         status = "okay";
>         clock-frequency = <400000>;
>
> -       ap_ts: touchscreen@10 {
> -               compatible = "elan,ekth6915";
> -               reg = <0x10>;
> -               pinctrl-names = "default";
> -               pinctrl-0 = <&ts_int_conn>, <&ts_rst_conn>;

Why did you remove the pinctrl? Those should have stayed.


> +       touchscreen: touchscreen@5d {

nit: it's nice to keep the touchscreen label the same as the other
herobrine boards, so I'd keep this as:

ap_ts: touchscreen@5d {


> +               compatible = "goodix,gt7375p";
> +               reg = <0x5d>;
>
>                 interrupt-parent = <&tlmm>;
>                 interrupts = <55 IRQ_TYPE_LEVEL_LOW>;
>
>                 reset-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
>
> -               vcc33-supply = <&ts_avdd>;
> +               vdd-supply = <&ts_avdd>;

What you have here is fine, but I've heard rumors that we might end up
needing to specify a different IO voltage rail. Right now the goodix
bindings / goodix driver don't handle that. ...anyway, no action items
for you right now but just a heads up.

-Doug
Douglas Anderson Sept. 30, 2022, 4:25 p.m. UTC | #2
Hi,

On Fri, Sep 30, 2022 at 12:38 AM Sheng-Liang Pan
<sheng-liang.pan@quanta.corp-partner.google.com> wrote:
>
> Change touchpad and touchscreen node for evoker
> Touchpad: SA461D-1011
> Touchscreen: GT7986U

[...cut...]

> +       touchscreen: touchscreen@5d {
> +               compatible = "goodix,gt7375p";
> +               reg = <0x5d>;

One further note is that in the commit message you've said GT7986U in
the commit message but you're specifying "goodix,gt7375p" here.
Ideally, what you'd do is:

1. Create a bindings patch modifying "goodix,gt7375p.yaml" much like
we did for elan [1]. You'd end up with something like this (untested):

  compatible:
    oneOf:
      - const: goodix,gt7375p
      - items:
          - const: goodix,gt7986u
          - const: goodix,gt7375p

2. You wouldn't need any driver patch unless the timings for gt7986u
are different than gt7375p

3. In your device tree, you'd list:

compatible = "goodix,gt7986u", "goodix,gt7375p";

...which says "I really have a gt7986u, but if you don't have any
special knowledge about gt7986u then you can just pretend I have a
gt7375p".


[1] https://lore.kernel.org/r/20220923083657.v5.2.Ic4e8f03868f88b8027a81bc3d414bae68978e6b7@changeid
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi
index e78072159d54b..c26f19371c8bc 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi
@@ -23,16 +23,15 @@  ap_tp_i2c: &i2c0 {
 	status = "okay";
 	clock-frequency = <400000>;
 
-	trackpad: trackpad@2c {
-		compatible = "hid-over-i2c";
-		reg = <0x2c>;
+	trackpad: trackpad@15 {
+		compatible = "elan,ekth3000";
+		reg = <0x15>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&tp_int_odl>;
 
 		interrupt-parent = <&tlmm>;
 		interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
 
-		hid-descr-addr = <0x20>;
 		vcc-supply = <&pp3300_z1>;
 
 		wakeup-source;
@@ -43,18 +42,16 @@  ts_i2c: &i2c13 {
 	status = "okay";
 	clock-frequency = <400000>;
 
-	ap_ts: touchscreen@10 {
-		compatible = "elan,ekth6915";
-		reg = <0x10>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&ts_int_conn>, <&ts_rst_conn>;
+	touchscreen: touchscreen@5d {
+		compatible = "goodix,gt7375p";
+		reg = <0x5d>;
 
 		interrupt-parent = <&tlmm>;
 		interrupts = <55 IRQ_TYPE_LEVEL_LOW>;
 
 		reset-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
 
-		vcc33-supply = <&ts_avdd>;
+		vdd-supply = <&ts_avdd>;
 	};
 };