linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad
@ 2022-08-05  9:23 Johan Hovold
  2022-08-05  9:23 ` [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up Johan Hovold
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

This series clean up the sc8280xp CRD and X13s HID nodes somewhat and
marks the keyboard and touchpad as wakeup sources.

Included is also support for the alternate (second-source) touchpad
found on some X13s laptops. Note that the node is disabled for now as
ideally the boot firmware should be determining which touchpad is
actually populated.

With some additional fixes it is possible to have both nodes enabled and
letting Linux do the probing, but let's wait for a conclusion to the
discussion about whether that is desirable before enabling them both:

	https://lore.kernel.org/all/YuJXMHoT4ijUxnRb@hovoldconsulting.com

Johan


Johan Hovold (7):
  arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up
  arm64: dts: qcom: sc8280xp-crd: move HID pin config
  arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources
  arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen
    pull-up
  arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config
  arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup
    sources
  arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate
    touchpad

 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts     | 22 +++++++++--
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 38 +++++++++++++++++--
 2 files changed, 54 insertions(+), 6 deletions(-)

-- 
2.35.1


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

* [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:54   ` Manivannan Sadhasivam
  2022-08-05  9:23 ` [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config Johan Hovold
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The touchscreen interrupt line has an external pull-up so disable the
internal one as is done for the keyboard and touchpad.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index 6792e88b2c6c..47192e9cf7a4 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -405,7 +405,7 @@ ts0_default: ts0-default-state {
 		int-n {
 			pins = "gpio175";
 			function = "gpio";
-			bias-pull-up;
+			bias-disable;
 		};
 
 		reset-n {
-- 
2.35.1


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

* [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
  2022-08-05  9:23 ` [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:56   ` Manivannan Sadhasivam
  2022-08-05  9:23 ` [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources Johan Hovold
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The HID pin configurations belong in the HID nodes rather than i2c bus
node.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index 47192e9cf7a4..ae8be1b743ce 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -194,16 +194,20 @@ &qup0_i2c4 {
 	clock-frequency = <400000>;
 
 	pinctrl-names = "default";
-	pinctrl-0 = <&qup0_i2c4_default>, <&ts0_default>;
+	pinctrl-0 = <&qup0_i2c4_default>;
 
 	status = "okay";
 
 	touchscreen@10 {
 		compatible = "hid-over-i2c";
 		reg = <0x10>;
+
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts0_default>;
 	};
 };
 
@@ -219,24 +223,32 @@ &qup2_i2c5 {
 	clock-frequency = <400000>;
 
 	pinctrl-names = "default";
-	pinctrl-0 = <&qup2_i2c5_default>, <&kybd_default>, <&tpad_default>;
+	pinctrl-0 = <&qup2_i2c5_default>;
 
 	status = "okay";
 
 	touchpad@15 {
 		compatible = "hid-over-i2c";
 		reg = <0x15>;
+
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpad_default>;
 	};
 
 	keyboard@68 {
 		compatible = "hid-over-i2c";
 		reg = <0x68>;
+
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&kybd_default>;
 	};
 };
 
-- 
2.35.1


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

* [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
  2022-08-05  9:23 ` [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up Johan Hovold
  2022-08-05  9:23 ` [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:57   ` Manivannan Sadhasivam
  2022-08-05  9:23 ` [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up Johan Hovold
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The touchpad and keyboard can wake the system from suspend so declare
them as wakeup sources.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index ae8be1b743ce..fea7d8273ccd 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -237,6 +237,8 @@ touchpad@15 {
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&tpad_default>;
+
+		wakeup-source;
 	};
 
 	keyboard@68 {
@@ -249,6 +251,8 @@ keyboard@68 {
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&kybd_default>;
+
+		wakeup-source;
 	};
 };
 
-- 
2.35.1


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

* [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
                   ` (2 preceding siblings ...)
  2022-08-05  9:23 ` [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:57   ` Manivannan Sadhasivam
  2022-08-05  9:23 ` [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config Johan Hovold
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The (optional) touchscreen interrupt line has an external pull-up so
disable the internal one as is done for the keyboard and touchpad.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 562b4458e039..85efce641a4e 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -363,7 +363,7 @@ ts0_default: ts0-default-state {
 		int-n {
 			pins = "gpio175";
 			function = "gpio";
-			bias-pull-up;
+			bias-disable;
 		};
 
 		reset-n {
-- 
2.35.1


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

* [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
                   ` (3 preceding siblings ...)
  2022-08-05  9:23 ` [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:57   ` Manivannan Sadhasivam
  2022-08-05  9:23 ` [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources Johan Hovold
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The HID pin configurations belong in the HID nodes rather than i2c bus
node.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts   | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 85efce641a4e..76ba2d5fa17e 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -177,7 +177,7 @@ &qup0_i2c4 {
 	clock-frequency = <400000>;
 
 	pinctrl-names = "default";
-	pinctrl-0 = <&qup0_i2c4_default>, <&ts0_default>;
+	pinctrl-0 = <&qup0_i2c4_default>;
 
 	status = "okay";
 
@@ -185,9 +185,13 @@ &qup0_i2c4 {
 	touchscreen@10 {
 		compatible = "hid-over-i2c";
 		reg = <0x10>;
+
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts0_default>;
 	};
 };
 
@@ -203,24 +207,32 @@ &qup2_i2c5 {
 	clock-frequency = <400000>;
 
 	pinctrl-names = "default";
-	pinctrl-0 = <&qup2_i2c5_default>, <&kybd_default>, <&tpad_default>;
+	pinctrl-0 = <&qup2_i2c5_default>;
 
 	status = "okay";
 
 	touchpad@2c {
 		compatible = "hid-over-i2c";
 		reg = <0x2c>;
+
 		hid-descr-addr = <0x20>;
 		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpad_default>;
 	};
 
 	keyboard@68 {
 		compatible = "hid-over-i2c";
 		reg = <0x68>;
+
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&kybd_default>;
 	};
 };
 
-- 
2.35.1


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

* [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
                   ` (4 preceding siblings ...)
  2022-08-05  9:23 ` [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:58   ` Manivannan Sadhasivam
  2022-08-05  9:23 ` [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad Johan Hovold
  2022-08-05 11:02 ` [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Konrad Dybcio
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

The touchpad and keyboard can wake the system from suspend so declare
them as wakeup sources.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 76ba2d5fa17e..1ca72f6ba55a 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -221,6 +221,8 @@ touchpad@2c {
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&tpad_default>;
+
+		wakeup-source;
 	};
 
 	keyboard@68 {
@@ -233,6 +235,8 @@ keyboard@68 {
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&kybd_default>;
+
+		wakeup-source;
 	};
 };
 
-- 
2.35.1


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

* [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
                   ` (5 preceding siblings ...)
  2022-08-05  9:23 ` [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources Johan Hovold
@ 2022-08-05  9:23 ` Johan Hovold
  2022-08-06 16:59   ` Manivannan Sadhasivam
  2022-08-05 11:02 ` [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Konrad Dybcio
  7 siblings, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2022-08-05  9:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
	Johan Hovold

Add support for the alternate (second-source) touchpad found on some
X13s laptops.

Note that alternate touchpad is kept disabled for now. The boot firmware
should determine which device is actually populated and enable only the
corresponding node.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 1ca72f6ba55a..bdeb2d05aaa1 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -211,6 +211,22 @@ &qup2_i2c5 {
 
 	status = "okay";
 
+	touchpad@15 {
+		compatible = "hid-over-i2c";
+		reg = <0x15>;
+
+		hid-descr-addr = <0x1>;
+		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
+		vdd-supply = <&vreg_misc_3p3>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpad_default>;
+
+		wakeup-source;
+
+		status = "disabled";
+	};
+
 	touchpad@2c {
 		compatible = "hid-over-i2c";
 		reg = <0x2c>;
-- 
2.35.1


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

* Re: [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad
  2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
                   ` (6 preceding siblings ...)
  2022-08-05  9:23 ` [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad Johan Hovold
@ 2022-08-05 11:02 ` Konrad Dybcio
  2022-08-05 12:17   ` Johan Hovold
  7 siblings, 1 reply; 17+ messages in thread
From: Konrad Dybcio @ 2022-08-05 11:02 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Rob Herring, Krzysztof Kozlowski,
	Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel



On 5.08.2022 11:23, Johan Hovold wrote:
> This series clean up the sc8280xp CRD and X13s HID nodes somewhat and
> marks the keyboard and touchpad as wakeup sources.
> 
> Included is also support for the alternate (second-source) touchpad
> found on some X13s laptops. Note that the node is disabled for now as
> ideally the boot firmware should be determining which touchpad is
> actually populated.
Interesting, what bootloader is used on these? Are you chainloading
something on top of Qualcomm's XBL UEFI?

Konrad
> 
> With some additional fixes it is possible to have both nodes enabled and
> letting Linux do the probing, but let's wait for a conclusion to the
> discussion about whether that is desirable before enabling them both:
> 
> 	https://lore.kernel.org/all/YuJXMHoT4ijUxnRb@hovoldconsulting.com
> 
> Johan
> 
> 
> Johan Hovold (7):
>   arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up
>   arm64: dts: qcom: sc8280xp-crd: move HID pin config
>   arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources
>   arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen
>     pull-up
>   arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config
>   arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup
>     sources
>   arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate
>     touchpad
> 
>  arch/arm64/boot/dts/qcom/sc8280xp-crd.dts     | 22 +++++++++--
>  .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 38 +++++++++++++++++--
>  2 files changed, 54 insertions(+), 6 deletions(-)
> 

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

* Re: [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad
  2022-08-05 11:02 ` [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Konrad Dybcio
@ 2022-08-05 12:17   ` Johan Hovold
  0 siblings, 0 replies; 17+ messages in thread
From: Johan Hovold @ 2022-08-05 12:17 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Johan Hovold, Bjorn Andersson, Andy Gross, Rob Herring,
	Krzysztof Kozlowski, Manivannan Sadhasivam, linux-arm-msm,
	devicetree, linux-kernel

On Fri, Aug 05, 2022 at 01:02:14PM +0200, Konrad Dybcio wrote:
> On 5.08.2022 11:23, Johan Hovold wrote:

> > Included is also support for the alternate (second-source) touchpad
> > found on some X13s laptops. Note that the node is disabled for now as
> > ideally the boot firmware should be determining which touchpad is
> > actually populated.

> Interesting, what bootloader is used on these? Are you chainloading
> something on top of Qualcomm's XBL UEFI?

We're using GRUB currently. Not sure how we'd go about implementing
this, and perhaps we'll just end up enabling both in DT instead
eventually.

> > With some additional fixes it is possible to have both nodes enabled and
> > letting Linux do the probing, but let's wait for a conclusion to the
> > discussion about whether that is desirable before enabling them both:
> > 
> > 	https://lore.kernel.org/all/YuJXMHoT4ijUxnRb@hovoldconsulting.com

Johan

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

* Re: [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up
  2022-08-05  9:23 ` [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up Johan Hovold
@ 2022-08-06 16:54   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:54 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:11AM +0200, Johan Hovold wrote:
> The touchscreen interrupt line has an external pull-up so disable the
> internal one as is done for the keyboard and touchpad.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index 6792e88b2c6c..47192e9cf7a4 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -405,7 +405,7 @@ ts0_default: ts0-default-state {
>  		int-n {
>  			pins = "gpio175";
>  			function = "gpio";
> -			bias-pull-up;
> +			bias-disable;
>  		};
>  
>  		reset-n {
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config
  2022-08-05  9:23 ` [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config Johan Hovold
@ 2022-08-06 16:56   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:56 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:12AM +0200, Johan Hovold wrote:
> The HID pin configurations belong in the HID nodes rather than i2c bus
> node.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index 47192e9cf7a4..ae8be1b743ce 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -194,16 +194,20 @@ &qup0_i2c4 {
>  	clock-frequency = <400000>;
>  
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&qup0_i2c4_default>, <&ts0_default>;
> +	pinctrl-0 = <&qup0_i2c4_default>;
>  
>  	status = "okay";
>  
>  	touchscreen@10 {
>  		compatible = "hid-over-i2c";
>  		reg = <0x10>;
> +
>  		hid-descr-addr = <0x1>;
>  		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
>  		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ts0_default>;
>  	};
>  };
>  
> @@ -219,24 +223,32 @@ &qup2_i2c5 {
>  	clock-frequency = <400000>;
>  
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&qup2_i2c5_default>, <&kybd_default>, <&tpad_default>;
> +	pinctrl-0 = <&qup2_i2c5_default>;
>  
>  	status = "okay";
>  
>  	touchpad@15 {
>  		compatible = "hid-over-i2c";
>  		reg = <0x15>;
> +
>  		hid-descr-addr = <0x1>;
>  		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
>  		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&tpad_default>;
>  	};
>  
>  	keyboard@68 {
>  		compatible = "hid-over-i2c";
>  		reg = <0x68>;
> +
>  		hid-descr-addr = <0x1>;
>  		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
>  		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&kybd_default>;
>  	};
>  };
>  
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources
  2022-08-05  9:23 ` [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources Johan Hovold
@ 2022-08-06 16:57   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:57 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:13AM +0200, Johan Hovold wrote:
> The touchpad and keyboard can wake the system from suspend so declare
> them as wakeup sources.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index ae8be1b743ce..fea7d8273ccd 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -237,6 +237,8 @@ touchpad@15 {
>  
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&tpad_default>;
> +
> +		wakeup-source;
>  	};
>  
>  	keyboard@68 {
> @@ -249,6 +251,8 @@ keyboard@68 {
>  
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&kybd_default>;
> +
> +		wakeup-source;
>  	};
>  };
>  
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up
  2022-08-05  9:23 ` [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up Johan Hovold
@ 2022-08-06 16:57   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:57 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:14AM +0200, Johan Hovold wrote:
> The (optional) touchscreen interrupt line has an external pull-up so
> disable the internal one as is done for the keyboard and touchpad.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 562b4458e039..85efce641a4e 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -363,7 +363,7 @@ ts0_default: ts0-default-state {
>  		int-n {
>  			pins = "gpio175";
>  			function = "gpio";
> -			bias-pull-up;
> +			bias-disable;
>  		};
>  
>  		reset-n {
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config
  2022-08-05  9:23 ` [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config Johan Hovold
@ 2022-08-06 16:57   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:57 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:15AM +0200, Johan Hovold wrote:
> The HID pin configurations belong in the HID nodes rather than i2c bus
> node.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts   | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 85efce641a4e..76ba2d5fa17e 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -177,7 +177,7 @@ &qup0_i2c4 {
>  	clock-frequency = <400000>;
>  
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&qup0_i2c4_default>, <&ts0_default>;
> +	pinctrl-0 = <&qup0_i2c4_default>;
>  
>  	status = "okay";
>  
> @@ -185,9 +185,13 @@ &qup0_i2c4 {
>  	touchscreen@10 {
>  		compatible = "hid-over-i2c";
>  		reg = <0x10>;
> +
>  		hid-descr-addr = <0x1>;
>  		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
>  		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ts0_default>;
>  	};
>  };
>  
> @@ -203,24 +207,32 @@ &qup2_i2c5 {
>  	clock-frequency = <400000>;
>  
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&qup2_i2c5_default>, <&kybd_default>, <&tpad_default>;
> +	pinctrl-0 = <&qup2_i2c5_default>;
>  
>  	status = "okay";
>  
>  	touchpad@2c {
>  		compatible = "hid-over-i2c";
>  		reg = <0x2c>;
> +
>  		hid-descr-addr = <0x20>;
>  		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
>  		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&tpad_default>;
>  	};
>  
>  	keyboard@68 {
>  		compatible = "hid-over-i2c";
>  		reg = <0x68>;
> +
>  		hid-descr-addr = <0x1>;
>  		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
>  		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&kybd_default>;
>  	};
>  };
>  
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources
  2022-08-05  9:23 ` [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources Johan Hovold
@ 2022-08-06 16:58   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:58 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:16AM +0200, Johan Hovold wrote:
> The touchpad and keyboard can wake the system from suspend so declare
> them as wakeup sources.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 76ba2d5fa17e..1ca72f6ba55a 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -221,6 +221,8 @@ touchpad@2c {
>  
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&tpad_default>;
> +
> +		wakeup-source;
>  	};
>  
>  	keyboard@68 {
> @@ -233,6 +235,8 @@ keyboard@68 {
>  
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&kybd_default>;
> +
> +		wakeup-source;
>  	};
>  };
>  
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad
  2022-08-05  9:23 ` [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad Johan Hovold
@ 2022-08-06 16:59   ` Manivannan Sadhasivam
  0 siblings, 0 replies; 17+ messages in thread
From: Manivannan Sadhasivam @ 2022-08-06 16:59 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, Aug 05, 2022 at 11:23:17AM +0200, Johan Hovold wrote:
> Add support for the alternate (second-source) touchpad found on some
> X13s laptops.
> 
> Note that alternate touchpad is kept disabled for now. The boot firmware
> should determine which device is actually populated and enable only the
> corresponding node.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
>  .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts   | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 1ca72f6ba55a..bdeb2d05aaa1 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -211,6 +211,22 @@ &qup2_i2c5 {
>  
>  	status = "okay";
>  
> +	touchpad@15 {
> +		compatible = "hid-over-i2c";
> +		reg = <0x15>;
> +
> +		hid-descr-addr = <0x1>;
> +		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
> +		vdd-supply = <&vreg_misc_3p3>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&tpad_default>;
> +
> +		wakeup-source;
> +
> +		status = "disabled";
> +	};
> +
>  	touchpad@2c {
>  		compatible = "hid-over-i2c";
>  		reg = <0x2c>;
> -- 
> 2.35.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

end of thread, other threads:[~2022-08-06 16:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05  9:23 [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Johan Hovold
2022-08-05  9:23 ` [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up Johan Hovold
2022-08-06 16:54   ` Manivannan Sadhasivam
2022-08-05  9:23 ` [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config Johan Hovold
2022-08-06 16:56   ` Manivannan Sadhasivam
2022-08-05  9:23 ` [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources Johan Hovold
2022-08-06 16:57   ` Manivannan Sadhasivam
2022-08-05  9:23 ` [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up Johan Hovold
2022-08-06 16:57   ` Manivannan Sadhasivam
2022-08-05  9:23 ` [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config Johan Hovold
2022-08-06 16:57   ` Manivannan Sadhasivam
2022-08-05  9:23 ` [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources Johan Hovold
2022-08-06 16:58   ` Manivannan Sadhasivam
2022-08-05  9:23 ` [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad Johan Hovold
2022-08-06 16:59   ` Manivannan Sadhasivam
2022-08-05 11:02 ` [PATCH 0/7] arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad Konrad Dybcio
2022-08-05 12:17   ` Johan Hovold

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).