arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad
cover arm64: dts: qcom: sc8280xp: HID wakeup sources and alt. touchpad
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/[email protected]
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(-)
Signature · 1 line
2.35.1
PATCH 1/7 arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up
The touchscreen interrupt line has an external pull-up so disable the internal one as is done for the keyboard and touchpad.
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -1
@@ -405,7 +405,7 @@ ts0_default: ts0-default-state { int-n { pins = "gpio175"; function = "gpio"; - bias-pull-up; + bias-disable; }; reset-n {
Signature · 1 line
2.35.1
Re: [PATCH 1/7] arm64: dts: qcom: sc8280xp-crd: disable touchscreen pull-up
Quoted 4 lines · 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 <[email protected]>
Thanks,
Mani
Quoted 20 lines
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1
-1@@ -405,7 +405,7 @@ ts0_default: ts0-default-state { int-n { pins = "gpio175"; function = "gpio"; - bias-pull-up; + bias-disable; }; reset-n {Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 2/7 arm64: dts: qcom: sc8280xp-crd: move HID pin config
In reply to Johan HovoldThe HID pin configurations belong in the HID nodes rather than i2c bus node.
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +14 -2
@@ -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>; }; };
Signature · 1 line
2.35.1
Re: [PATCH 2/7] arm64: dts: qcom: sc8280xp-crd: move HID pin config
Quoted 4 lines · Johan Hovold
The HID pin configurations belong in the HID nodes rather than i2c bus node.
Signed-off-by Johan Hovold <[email protected]>
Thanks,
Mani
Quoted 67 lines
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +14
-2@@ -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>; }; };Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 3/7 arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources
In reply to Johan HovoldThe touchpad and keyboard can wake the system from suspend so declare them as wakeup sources.
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +4 -0
@@ -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; }; };
Signature · 1 line
2.35.1
Re: [PATCH 3/7] arm64: dts: qcom: sc8280xp-crd: mark HID wakeup sources
Quoted 4 lines · Johan Hovold
The touchpad and keyboard can wake the system from suspend so declare them as wakeup sources.
Signed-off-by Johan Hovold <[email protected]>
Thanks,
Mani
Quoted 29 lines
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +4
-0@@ -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; }; };Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 4/7 arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up
In reply to Johan HovoldThe (optional) touchscreen interrupt line has an external pull-up so disable the internal one as is done for the keyboard and touchpad.
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1 -1
@@ -363,7 +363,7 @@ ts0_default: ts0-default-state { int-n { pins = "gpio175"; function = "gpio"; - bias-pull-up; + bias-disable; }; reset-n {
Signature · 1 line
2.35.1
Re: [PATCH 4/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: disable touchscreen pull-up
Quoted 4 lines · 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 <[email protected]>
Thanks,
Mani
Quoted 20 lines
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1
-1@@ -363,7 +363,7 @@ ts0_default: ts0-default-state { int-n { pins = "gpio175"; function = "gpio"; - bias-pull-up; + bias-disable; }; reset-n {Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 5/7 arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config
In reply to Johan HovoldThe HID pin configurations belong in the HID nodes rather than i2c bus node.
--- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +14 -2
@@ -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>; }; };
Signature · 1 line
2.35.1
Re: [PATCH 5/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: move HID pin config
Quoted 4 lines · Johan Hovold
The HID pin configurations belong in the HID nodes rather than i2c bus node.
Signed-off-by Johan Hovold <[email protected]>
Thanks,
Mani
Quoted 68 lines
--- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +14
-2@@ -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>; }; };Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 6/7 arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources
In reply to Johan HovoldThe touchpad and keyboard can wake the system from suspend so declare them as wakeup sources.
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +4 -0
@@ -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; }; };
Signature · 1 line
2.35.1
Re: [PATCH 6/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: mark HID wakeup sources
Quoted 4 lines · Johan Hovold
The touchpad and keyboard can wake the system from suspend so declare them as wakeup sources.
Signed-off-by Johan Hovold <[email protected]>
Thanks,
Mani
Quoted 29 lines
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +4
-0@@ -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; }; };Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 7/7 arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad
In reply to Johan HovoldAdd 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.
--- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +16 -0
@@ -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>;
Signature · 1 line
2.35.1
Re: [PATCH 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: add alternate touchpad
Quoted 8 lines · 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 <[email protected]>
Thanks,
Mani
Quoted 34 lines
--- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +16
-0@@ -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>;Signature · 1 line
2.35.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 7 lines · 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.
Interesting, what bootloader is used on these? Are you chainloading something on top of Qualcomm's XBL UEFI?
Konrad
Quoted 26 lines
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/[email protected]
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
touchpadarch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 22 +++++++++-- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 38 +++++++++++++++++-- 2 files changed, 54 insertions(+), 6 deletions(-)
Quoted 9 lines · Konrad Dybcio
Quoted 4 lines · Johan Hovold
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.
Quoted 5 lines
Quoted 5 lines
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:
Johan