More Surface Laptop 7 features
Konrad Dybcio
maintainercover More Surface Laptop 7 features
This adds MP-controller-connected USB ports and lid switch support. The dependencies are marked with b4 tags.
More yet to come, hopefully soon
---
Konrad Dybcio (2):
arm64: dts: qcom: x1e80100-romulus: Add lid switch
arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
.../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 82 +++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-)
---
base-commit: ecc768a84f0b8e631986f9ade3118fa37852fef0
change-id: 20240902-topic-sl7_updates-8909bf66c5b7
prerequisite-message-id: <[email protected]>
prerequisite-patch-id: 69039c4c0e330e53885c6b3564d99f0a4aedc178
prerequisite-patch-id: c910914c40326e1d4b8c65ab785c56f10bba2e91
Best regards,
Signature · 1 line
Konrad Dybcio <[email protected]>
Konrad Dybcio
maintainerPATCH 1/2 arm64: dts: qcom: x1e80100-romulus: Add lid switch
From: Konrad Dybcio <[email protected]>
One of the best parts of having a laptop is being able to close the lid and go on with your day. Enable this feature by defining the lid switch.
--- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +23 -0
@@ -4,6 +4,8 @@ */ #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/gpio-keys.h> +#include <dt-bindings/input/input.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
@@ -30,6 +32,21 @@ backlight: backlight { pinctrl-names = "default"; }; + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&hall_int_n_default>; + pinctrl-names = "default"; + + switch-lid { + gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + linux,input-type = <EV_SW>; + linux,code = <SW_LID>; + wakeup-source; + wakeup-event-action = <EV_ACT_DEASSERTED>; + }; + }; + leds { compatible = "gpio-leds";
@@ -704,6 +721,12 @@ &tlmm { gpio-reserved-ranges = <44 4>, /* SPI (TPM) */ <238 1>; /* UFS Reset */ + hall_int_n_default: hall-int-n-state { + pins = "gpio2"; + function = "gpio"; + bias-disable; + }; + nvme_reg_en: nvme-reg-en-state { pins = "gpio18"; function = "gpio";
Signature · 1 line
2.46.0
Re: [PATCH 1/2] arm64: dts: qcom: x1e80100-romulus: Add lid switch
Quoted 10 lines · Konrad Dybcio
From: Konrad Dybcio <[email protected]>
One of the best parts of having a laptop is being able to close the lid and go on with your day. Enable this feature by defining the lid switch.
Signed-off-by Konrad Dybcio <[email protected]>--- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Signature · 2 lines
With best wishes Dmitry
Konrad Dybcio
maintainerPATCH 2/2 arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
In reply to Konrad DybcioFrom: Konrad Dybcio <[email protected]>
The USB MP controller is wired up to the USB-A port on the left side and to the Surface Connector on the right side. Configure it.
While at it, remove a stray double \n.
--- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +57 -2
@@ -572,7 +572,17 @@ &i2c5 { status = "okay"; - /* Something @4f */ + ptn3222: redriver@4f { + compatible = "nxp,ptn3222"; + reg = <0x4f>; + + reset-gpios = <&tlmm 7 GPIO_ACTIVE_LOW>; + + vdd3v3-supply = <&vreg_l13b>; + vdd1v8-supply = <&vreg_l4b>; + + #phy-cells = <0>; + }; }; &i2c7 {
@@ -583,7 +593,6 @@ &i2c7 { /* PS8830 USB retimer @8 */ }; - &mdss { status = "okay"; };
@@ -717,6 +726,15 @@ &smb2360_1_eusb2_repeater { vdd3-supply = <&vreg_l14b>; }; +&smb2360_2 { + status = "okay"; +}; + +&smb2360_2_eusb2_repeater { + vdd18-supply = <&vreg_l3d>; + vdd3-supply = <&vreg_l8b>; +}; + &tlmm { gpio-reserved-ranges = <44 4>, /* SPI (TPM) */ <238 1>; /* UFS Reset */
@@ -856,3 +874,40 @@ &usb_1_ss1_dwc3_hs { &usb_1_ss1_qmpphy_out { remote-endpoint = <&pmic_glink_ss1_ss_in>; }; + +/* MP0 goes to the Surface Connector, MP1 goes to the USB-A port */ +&usb_mp { + status = "okay"; +}; + +&usb_mp_hsphy0 { + vdd-supply = <&vreg_l2e>; + vdda12-supply = <&vreg_l2j>; + + phys = <&smb2360_2_eusb2_repeater>; + + status = "okay"; +}; + +&usb_mp_hsphy1 { + vdd-supply = <&vreg_l2e>; + vdda12-supply = <&vreg_l2j>; + + phys = <&ptn3222>; + + status = "okay"; +}; + +&usb_mp_qmpphy0 { + vdda-phy-supply = <&vreg_l3e>; + vdda-pll-supply = <&vreg_l3c>; + + status = "okay"; +}; + +&usb_mp_qmpphy1 { + vdda-phy-supply = <&vreg_l3e>; + vdda-pll-supply = <&vreg_l3c>; + + status = "okay"; +};
Signature · 1 line
2.46.0
Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
Quoted 21 lines · Konrad Dybcio
From: Konrad Dybcio <[email protected]>
The USB MP controller is wired up to the USB-A port on the left side and to the Surface Connector on the right side. Configure it.
While at it, remove a stray double \n.
Signed-off-by Konrad Dybcio <[email protected]>--- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +0
-1@@ -572,7 +572,17 @@ &i2c5 { status = "okay"; - /* Something @4f */
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi &i2c5 { · line 584
Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +10
-0+ ptn3222: redriver@4f { + compatible = "nxp,ptn3222"; + reg = <0x4f>; + + reset-gpios = <&tlmm 7 GPIO_ACTIVE_LOW>; + + vdd3v3-supply = <&vreg_l13b>; + vdd1v8-supply = <&vreg_l4b>; + + #phy-cells = <0>;
It's unrelated to mutiport USB-A, should go in a separate change, and also probably in a bigger change enabling usb-c features using the retimer.
Neil
Quoted 70 lines
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +47
-1+ }; }; &i2c7 {@@ -583,7 +593,6 @@ &i2c7 { /* PS8830 USB retimer @8 */ }; - &mdss { status = "okay"; };@@ -717,6 +726,15 @@ &smb2360_1_eusb2_repeater { vdd3-supply = <&vreg_l14b>; }; +&smb2360_2 { + status = "okay"; +}; + +&smb2360_2_eusb2_repeater { + vdd18-supply = <&vreg_l3d>; + vdd3-supply = <&vreg_l8b>; +}; + &tlmm { gpio-reserved-ranges = <44 4>, /* SPI (TPM) */ <238 1>; /* UFS Reset */@@ -856,3 +874,40 @@ &usb_1_ss1_dwc3_hs { &usb_1_ss1_qmpphy_out { remote-endpoint = <&pmic_glink_ss1_ss_in>; }; + +/* MP0 goes to the Surface Connector, MP1 goes to the USB-A port */ +&usb_mp { + status = "okay"; +}; + +&usb_mp_hsphy0 { + vdd-supply = <&vreg_l2e>; + vdda12-supply = <&vreg_l2j>; + + phys = <&smb2360_2_eusb2_repeater>; + + status = "okay"; +}; + +&usb_mp_hsphy1 { + vdd-supply = <&vreg_l2e>; + vdda12-supply = <&vreg_l2j>; + + phys = <&ptn3222>; + + status = "okay"; +}; + +&usb_mp_qmpphy0 { + vdda-phy-supply = <&vreg_l3e>; + vdda-pll-supply = <&vreg_l3c>; + + status = "okay"; +}; + +&usb_mp_qmpphy1 { + vdda-phy-supply = <&vreg_l3e>; + vdda-pll-supply = <&vreg_l3c>; + + status = "okay"; +};
Konrad Dybcio
maintainerRe: [PATCH 2/2] arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
Quoted 26 lines · On 2.09.2024 6:01 PM, [email protected] wrote:
Quoted 25 lines · Konrad Dybcio
From: Konrad Dybcio <[email protected]>
The USB MP controller is wired up to the USB-A port on the left side and to the Surface Connector on the right side. Configure it.
While at it, remove a stray double \n.
Signed-off-by Konrad Dybcio <[email protected]>---
.../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 59 +++++++++++++++++++++-1 file changed, 57 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +0
-0@@ -572,7 +572,17 @@ &i2c5 { status = "okay";- /* Something @4f */
+ ptn3222: redriver@4f {
+ compatible = "nxp,ptn3222";
+ reg = <0x4f>;arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +3
-0+ + reset-gpios = <&tlmm 7 GPIO_ACTIVE_LOW>; +
Quoted 8 lines
Quoted 4 lines
+ vdd3v3-supply = <
&vreg_l13b>;
+ vdd1v8-supply = <&vreg_l4b>;
+
+ #phy-cells = <0>;It's unrelated to mutiport USB-A, should go in a separate change, and also probably in a bigger change enabling usb-c features using the retimer.
No, this chip converts between eUSB on the PHY and USB on the port
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
Quoted 36 lines · Konrad Dybcio
Quoted 26 lines · On 2.09.2024 6:01 PM, [email protected] wrote:
Quoted 25 lines · Konrad Dybcio
From: Konrad Dybcio <[email protected]>
The USB MP controller is wired up to the USB-A port on the left side and to the Surface Connector on the right side. Configure it.
While at it, remove a stray double \n.
Signed-off-by Konrad Dybcio <[email protected]>--- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +6
-0@@ -572,7 +572,17 @@ &i2c5 { status = "okay"; - /* Something @4f */ + ptn3222: redriver@4f { + compatible = "nxp,ptn3222"; + reg = <0x4f>; + + reset-gpios = <&tlmm 7 GPIO_ACTIVE_LOW>; +Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi &i2c5 { · line 584
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-microsoft-romulus.dtsi +4
-0+ vdd3v3-supply = <&vreg_l13b>; + vdd1v8-supply = <&vreg_l4b>; + + #phy-cells = <0>;It's unrelated to mutiport USB-A, should go in a separate change, and also probably in a bigger change enabling usb-c features using the retimer.
Quoted 1 line
No, this chip converts between eUSB on the PHY and USB on the port
Oh my bad, indeed, sorry for the confusion
Neil
Quoted 2 lines
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
In reply to Konrad DybcioQuoted 5 lines · Konrad Dybcio
From: Konrad Dybcio <[email protected]>
The USB MP controller is wired up to the USB-A port on the left side and to the Surface Connector on the right side. Configure it.
Quoted 7 lines
While at it, remove a stray double \n.
Signed-off-by Konrad Dybcio <[email protected]>--- .../boot/dts/qcom/x1e80100-microsoft-romulus.dtsi | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes Dmitry
Quoted 6 lines · Konrad Dybcio
This adds MP-controller-connected USB ports and lid switch support. The dependencies are marked with b4 tags.
More yet to come, hopefully soon
Applied, thanks!
[1/2] arm64: dts: qcom: x1e80100-romulus: Add lid switch
commit: 86d402355e8cefe3bfcc36fa6c5feb53ecfd92f0
[2/2] arm64: dts: qcom: x1e80100-romulus: Set up USB Multiport controller
commit: facead4ce0c45c6d2de535df8376f728cb9e7064Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>