arm64: dts: qcom: sc8280xp-x13s: Add bluetooth
authorSteev Klimaszewski <steev@kali.org>
Sun, 26 Mar 2023 23:38:12 +0000 (18:38 -0500)
committerBjorn Andersson <andersson@kernel.org>
Wed, 5 Apr 2023 03:51:38 +0000 (20:51 -0700)
The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2,
add this.

Signed-off-by: Steev Klimaszewski <steev@kali.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230326233812.28058-5-steev@kali.org
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts

index 4884e22..a1db3cf 100644 (file)
@@ -24,6 +24,7 @@
        aliases {
                i2c4 = &i2c4;
                i2c21 = &i2c21;
+               serial1 = &uart2;
        };
 
        wcd938x: audio-codec {
        status = "okay";
 };
 
+&uart2 {
+       pinctrl-0 = <&uart2_default>;
+       pinctrl-names = "default";
+
+       status = "okay";
+
+       bluetooth {
+               compatible = "qcom,wcn6855-bt";
+
+               vddio-supply = <&vreg_s10b>;
+               vddbtcxmx-supply = <&vreg_s12b>;
+               vddrfacmn-supply = <&vreg_s12b>;
+               vddrfa0p8-supply = <&vreg_s12b>;
+               vddrfa1p2-supply = <&vreg_s11b>;
+               vddrfa1p7-supply = <&vreg_s1c>;
+
+               max-speed = <3200000>;
+
+               enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>;
+               swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-0 = <&bt_default>;
+               pinctrl-names = "default";
+       };
+};
+
 &usb_0 {
        status = "okay";
 };
 &tlmm {
        gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>;
 
+       bt_default: bt-default-state {
+               hstp-bt-en-pins {
+                       pins = "gpio133";
+                       function = "gpio";
+                       drive-strength = <16>;
+                       bias-disable;
+               };
+
+               hstp-sw-ctrl-pins {
+                       pins = "gpio132";
+                       function = "gpio";
+                       bias-pull-down;
+               };
+       };
+
        edp_reg_en: edp-reg-en-state {
                pins = "gpio25";
                function = "gpio";
                };
        };
 
+       uart2_default: uart2-default-state {
+               cts-pins {
+                       pins = "gpio121";
+                       function = "qup2";
+                       bias-bus-hold;
+               };
+
+               rts-pins {
+                       pins = "gpio122";
+                       function = "qup2";
+                       drive-strength = <2>;
+                       bias-disable;
+               };
+
+               rx-pins {
+                       pins = "gpio124";
+                       function = "qup2";
+                       bias-pull-up;
+               };
+
+               tx-pins {
+                       pins = "gpio123";
+                       function = "qup2";
+                       drive-strength = <2>;
+                       bias-disable;
+               };
+       };
+
        usb0_sbu_default: usb0-sbu-state {
                oe-n-pins {
                        pins = "gpio101";