]> www.infradead.org Git - users/hch/misc.git/commitdiff
arm64: dts: qcom: x1e80100-qcp: Add FSUSB42 USB switches
authorStephan Gerhold <stephan.gerhold@linaro.org>
Thu, 12 Dec 2024 13:08:24 +0000 (14:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2024 07:56:04 +0000 (08:56 +0100)
Unlike most X1E boards, the QCP does not have Parade PS8830 retimers on the
three USB-C ports. Instead, there are FSUSB42 USB switches for each port
that handle orientation switching for the SBU lines. The overall setup is
similar to the gpio-sbu-mux defined for sc8280xp-crd and the ThinkPad X13s.

Co-developed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20241212-x1e80100-qcp-dp-v1-2-37cb362a0dfe@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts

index 5ef030c60abe2998d093ee60a6754a90cd5aaf72..cc0561debdb0b5c89f5d7f298d34f1feaf183b61 100644 (file)
                                                remote-endpoint = <&usb_1_ss0_qmpphy_out>;
                                        };
                                };
+
+                               port@2 {
+                                       reg = <2>;
+
+                                       pmic_glink_ss0_sbu: endpoint {
+                                               remote-endpoint = <&usb_1_ss0_sbu_mux>;
+                                       };
+                               };
                        };
                };
 
                                                remote-endpoint = <&usb_1_ss1_qmpphy_out>;
                                        };
                                };
+
+                               port@2 {
+                                       reg = <2>;
+
+                                       pmic_glink_ss1_sbu: endpoint {
+                                               remote-endpoint = <&usb_1_ss1_sbu_mux>;
+                                       };
+                               };
                        };
                };
 
                                                remote-endpoint = <&usb_1_ss2_qmpphy_out>;
                                        };
                                };
+
+                               port@2 {
+                                       reg = <2>;
+
+                                       pmic_glink_ss2_sbu: endpoint {
+                                               remote-endpoint = <&usb_1_ss2_sbu_mux>;
+                                       };
+                               };
                        };
                };
        };
 
                regulator-boot-on;
        };
+
+       usb-1-ss0-sbu-mux {
+               compatible = "onnn,fsusb42", "gpio-sbu-mux";
+
+               enable-gpios = <&tlmm 168 GPIO_ACTIVE_LOW>;
+               select-gpios = <&tlmm 167 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-0 = <&usb_1_ss0_sbu_default>;
+               pinctrl-names = "default";
+
+               mode-switch;
+               orientation-switch;
+
+               port {
+                       usb_1_ss0_sbu_mux: endpoint {
+                               remote-endpoint = <&pmic_glink_ss0_sbu>;
+                       };
+               };
+       };
+
+       usb-1-ss1-sbu-mux {
+               compatible = "onnn,fsusb42", "gpio-sbu-mux";
+
+               enable-gpios = <&tlmm 179 GPIO_ACTIVE_LOW>;
+               select-gpios = <&tlmm 178 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-0 = <&usb_1_ss1_sbu_default>;
+               pinctrl-names = "default";
+
+               mode-switch;
+               orientation-switch;
+
+               port {
+                       usb_1_ss1_sbu_mux: endpoint {
+                               remote-endpoint = <&pmic_glink_ss1_sbu>;
+                       };
+               };
+       };
+
+       usb-1-ss2-sbu-mux {
+               compatible = "onnn,fsusb42", "gpio-sbu-mux";
+
+               enable-gpios = <&tlmm 171 GPIO_ACTIVE_LOW>;
+               select-gpios = <&tlmm 170 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-0 = <&usb_1_ss2_sbu_default>;
+               pinctrl-names = "default";
+
+               mode-switch;
+               orientation-switch;
+
+               port {
+                       usb_1_ss2_sbu_mux: endpoint {
+                               remote-endpoint = <&pmic_glink_ss2_sbu>;
+                       };
+               };
+       };
 };
 
 &apps_rsc {
                };
        };
 
+       usb_1_ss0_sbu_default: usb-1-ss0-sbu-state {
+               mode-pins {
+                       pins = "gpio166";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+                       output-high;
+               };
+
+               oe-n-pins {
+                       pins = "gpio168";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+
+               sel-pins {
+                       pins = "gpio167";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+
+       };
+
+       usb_1_ss1_sbu_default: usb-1-ss1-sbu-state {
+               mode-pins {
+                       pins = "gpio177";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+                       output-high;
+               };
+
+               oe-n-pins {
+                       pins = "gpio179";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+
+               sel-pins {
+                       pins = "gpio178";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+       };
+
+       usb_1_ss2_sbu_default: usb-1-ss2-sbu-state {
+               mode-pins {
+                       pins = "gpio169";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+                       output-high;
+               };
+
+               oe-n-pins {
+                       pins = "gpio171";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+
+               sel-pins {
+                       pins = "gpio170";
+                       function = "gpio";
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+       };
+
        wcd_default: wcd-reset-n-active-state {
                pins = "gpio191";
                function = "gpio";