diff mbox series

[1/4] arm64: dts: qcom: msm8998-lenovo-miix-630: enable touchscreen

Message ID 20240722-miix630-support-v1-1-a6483cfe8674@linaro.org (mailing list archive)
State Superseded
Headers show
Series arm64: dts: qcom: improve Lenovo Miix 630 support | expand

Commit Message

Dmitry Baryshkov July 22, 2024, 11:57 a.m. UTC
There is no point in keeping touchscreen disabled, enable corresponding
i2c-hid device.

04F3:2608 Touchscreen as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input1
04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input2
04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input3
04F3:2608 Stylus as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input4

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../boot/dts/qcom/msm8998-lenovo-miix-630.dts      | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Konrad Dybcio July 22, 2024, 11:22 p.m. UTC | #1
On 22.07.2024 1:57 PM, Dmitry Baryshkov wrote:
> There is no point in keeping touchscreen disabled, enable corresponding
> i2c-hid device.
> 
> 04F3:2608 Touchscreen as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input1
> 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input2
> 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input3
> 04F3:2608 Stylus as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input4
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  .../boot/dts/qcom/msm8998-lenovo-miix-630.dts      | 28 ++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> index a105143bee4a..118c55f5bcfd 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> @@ -11,6 +11,24 @@ / {
>  	chassis-type = "convertible";
>  };
>  
> +&blsp1_i2c5 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	tsc1: hid@10 {
weird (and unused label)

very non-specific node name too

> +		compatible = "hid-over-i2c";
> +		reg = <0x10>;
> +		hid-descr-addr = <0x1>;
> +
> +		interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
> +
> +		pinctrl-0 = <&i2c5_hid_active>;
> +		pinctrl-names = "default";
> +
> +		wakeup-source;

double tap to wake? tap to wake?

> +	};
> +};
> +
>  &blsp1_i2c6 {
>  	status = "okay";
>  
> @@ -35,3 +53,13 @@ &remoteproc_mss {
>  &sdhc2 {
>  	cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
>  };
> +
> +&tlmm {
> +	i2c5_hid_active: i2c5-hid-active-state {
> +		pins = "gpio125";
> +		function = "gpio";
> +
> +		bias-pull-up;
> +		drive-strength = <2>;

Since there are no other pin definitions, you can do better and not
copy the old rotten style ;)

Konrad
Dmitry Baryshkov July 23, 2024, 1:09 a.m. UTC | #2
On Tue, 23 Jul 2024 at 02:22, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 22.07.2024 1:57 PM, Dmitry Baryshkov wrote:
> > There is no point in keeping touchscreen disabled, enable corresponding
> > i2c-hid device.
> >
> > 04F3:2608 Touchscreen as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input1
> > 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input2
> > 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input3
> > 04F3:2608 Stylus as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input4
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  .../boot/dts/qcom/msm8998-lenovo-miix-630.dts      | 28 ++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> > index a105143bee4a..118c55f5bcfd 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> > +++ b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> > @@ -11,6 +11,24 @@ / {
> >       chassis-type = "convertible";
> >  };
> >
> > +&blsp1_i2c5 {
> > +     clock-frequency = <400000>;
> > +     status = "okay";
> > +
> > +     tsc1: hid@10 {
> weird (and unused label)
>
> very non-specific node name too
>
> > +             compatible = "hid-over-i2c";
> > +             reg = <0x10>;
> > +             hid-descr-addr = <0x1>;
> > +
> > +             interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
> > +
> > +             pinctrl-0 = <&i2c5_hid_active>;
> > +             pinctrl-names = "default";
> > +
> > +             wakeup-source;
>
> double tap to wake? tap to wake?
>
> > +     };
> > +};
> > +
> >  &blsp1_i2c6 {
> >       status = "okay";
> >
> > @@ -35,3 +53,13 @@ &remoteproc_mss {
> >  &sdhc2 {
> >       cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
> >  };
> > +
> > +&tlmm {
> > +     i2c5_hid_active: i2c5-hid-active-state {
> > +             pins = "gpio125";
> > +             function = "gpio";
> > +
> > +             bias-pull-up;
> > +             drive-strength = <2>;
>
> Since there are no other pin definitions, you can do better and not
> copy the old rotten style ;)

Both node and pinctrl were c&p from c630. But was is rotten here?
Konrad Dybcio July 23, 2024, 10:01 a.m. UTC | #3
On 23.07.2024 3:09 AM, Dmitry Baryshkov wrote:
> On Tue, 23 Jul 2024 at 02:22, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 22.07.2024 1:57 PM, Dmitry Baryshkov wrote:
>>> There is no point in keeping touchscreen disabled, enable corresponding
>>> i2c-hid device.
>>>
>>> 04F3:2608 Touchscreen as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input1
>>> 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input2
>>> 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input3
>>> 04F3:2608 Stylus as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input4
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>  .../boot/dts/qcom/msm8998-lenovo-miix-630.dts      | 28 ++++++++++++++++++++++
>>>  1 file changed, 28 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
>>> index a105143bee4a..118c55f5bcfd 100644
>>> --- a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
>>> +++ b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
>>> @@ -11,6 +11,24 @@ / {
>>>       chassis-type = "convertible";
>>>  };
>>>
>>> +&blsp1_i2c5 {
>>> +     clock-frequency = <400000>;
>>> +     status = "okay";
>>> +
>>> +     tsc1: hid@10 {
>> weird (and unused label)
>>
>> very non-specific node name too
>>
>>> +             compatible = "hid-over-i2c";
>>> +             reg = <0x10>;
>>> +             hid-descr-addr = <0x1>;
>>> +
>>> +             interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
>>> +
>>> +             pinctrl-0 = <&i2c5_hid_active>;
>>> +             pinctrl-names = "default";
>>> +
>>> +             wakeup-source;
>>
>> double tap to wake? tap to wake?
>>
>>> +     };
>>> +};
>>> +
>>>  &blsp1_i2c6 {
>>>       status = "okay";
>>>
>>> @@ -35,3 +53,13 @@ &remoteproc_mss {
>>>  &sdhc2 {
>>>       cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
>>>  };
>>> +
>>> +&tlmm {
>>> +     i2c5_hid_active: i2c5-hid-active-state {
>>> +             pins = "gpio125";
>>> +             function = "gpio";
>>> +
>>> +             bias-pull-up;
>>> +             drive-strength = <2>;
>>
>> Since there are no other pin definitions, you can do better and not
>> copy the old rotten style ;)
> 
> Both node and pinctrl were c&p from c630. But was is rotten here?

yes, we stopped putting a random newline in there quite some years ago

Konrad
Dmitry Baryshkov July 23, 2024, 10:33 a.m. UTC | #4
On Tue, 23 Jul 2024 at 13:01, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 23.07.2024 3:09 AM, Dmitry Baryshkov wrote:
> > On Tue, 23 Jul 2024 at 02:22, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >>
> >> On 22.07.2024 1:57 PM, Dmitry Baryshkov wrote:
> >>> There is no point in keeping touchscreen disabled, enable corresponding
> >>> i2c-hid device.
> >>>
> >>> 04F3:2608 Touchscreen as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input1
> >>> 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input2
> >>> 04F3:2608 as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input3
> >>> 04F3:2608 Stylus as /devices/platform/soc@0/c179000.i2c/i2c-0/0-0010/0018:04F3:2608.0001/input/input4
> >>>
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>> ---
> >>>  .../boot/dts/qcom/msm8998-lenovo-miix-630.dts      | 28 ++++++++++++++++++++++
> >>>  1 file changed, 28 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> >>> index a105143bee4a..118c55f5bcfd 100644
> >>> --- a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> >>> +++ b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
> >>> @@ -11,6 +11,24 @@ / {
> >>>       chassis-type = "convertible";
> >>>  };
> >>>
> >>> +&blsp1_i2c5 {
> >>> +     clock-frequency = <400000>;
> >>> +     status = "okay";
> >>> +
> >>> +     tsc1: hid@10 {
> >> weird (and unused label)
> >>
> >> very non-specific node name too
> >>
> >>> +             compatible = "hid-over-i2c";
> >>> +             reg = <0x10>;
> >>> +             hid-descr-addr = <0x1>;
> >>> +
> >>> +             interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
> >>> +
> >>> +             pinctrl-0 = <&i2c5_hid_active>;
> >>> +             pinctrl-names = "default";
> >>> +
> >>> +             wakeup-source;
> >>
> >> double tap to wake? tap to wake?
> >>
> >>> +     };
> >>> +};
> >>> +
> >>>  &blsp1_i2c6 {
> >>>       status = "okay";
> >>>
> >>> @@ -35,3 +53,13 @@ &remoteproc_mss {
> >>>  &sdhc2 {
> >>>       cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
> >>>  };
> >>> +
> >>> +&tlmm {
> >>> +     i2c5_hid_active: i2c5-hid-active-state {
> >>> +             pins = "gpio125";
> >>> +             function = "gpio";
> >>> +
> >>> +             bias-pull-up;
> >>> +             drive-strength = <2>;
> >>
> >> Since there are no other pin definitions, you can do better and not
> >> copy the old rotten style ;)
> >
> > Both node and pinctrl were c&p from c630. But was is rotten here?
>
> yes, we stopped putting a random newline in there quite some years ago

Ack
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
index a105143bee4a..118c55f5bcfd 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
+++ b/arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
@@ -11,6 +11,24 @@  / {
 	chassis-type = "convertible";
 };
 
+&blsp1_i2c5 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	tsc1: hid@10 {
+		compatible = "hid-over-i2c";
+		reg = <0x10>;
+		hid-descr-addr = <0x1>;
+
+		interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>;
+
+		pinctrl-0 = <&i2c5_hid_active>;
+		pinctrl-names = "default";
+
+		wakeup-source;
+	};
+};
+
 &blsp1_i2c6 {
 	status = "okay";
 
@@ -35,3 +53,13 @@  &remoteproc_mss {
 &sdhc2 {
 	cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
 };
+
+&tlmm {
+	i2c5_hid_active: i2c5-hid-active-state {
+		pins = "gpio125";
+		function = "gpio";
+
+		bias-pull-up;
+		drive-strength = <2>;
+	};
+};