arm64: dts: qcom: msm8998: Fixup uart3 gpio config for bluetooth
authorJeffrey Hugo <jeffrey.l.hugo@gmail.com>
Mon, 21 Oct 2019 16:19:21 +0000 (09:19 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 18 Dec 2019 05:26:58 +0000 (21:26 -0800)
It turns out that the wcn3990 can float the gpio lines during bootup, etc
which will result in the uart core thinking there is incoming data.  This
results in the bluetooth stack getting garbage.  By applying a bias to
match what wcn3990 would drive, the issue is corrected.

Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Link: https://lore.kernel.org/r/20191021161921.31825-1-jeffrey.l.hugo@gmail.com
[bjorn: Moved board specific pinctrl states to the end]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
arch/arm64/boot/dts/qcom/msm8998-pins.dtsi

index 0f84fa0..b3cf263 100644 (file)
        vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
        vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
 };
+
+/* PINCTRL - board-specific pinctrl */
+&blsp1_uart3_on {
+       rx {
+               /delete-property/ bias-disable;
+               /*
+                * Configure a pull-up on 45 (RX). This is needed to
+                * avoid garbage data when the TX pin of the Bluetooth
+                * module is in tri-state (module powered off or not
+                * driving the signal yet).
+                */
+               bias-pull-up;
+       };
+
+       cts {
+               /delete-property/ bias-disable;
+               /*
+                * Configure a pull-down on 47 (CTS) to match the pull
+                * of the Bluetooth module.
+                */
+               bias-pull-down;
+       };
+};
index 1220756..6835fbd 100644 (file)
        vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
        vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
 };
+
+/* PINCTRL - board-specific pinctrl */
+&blsp1_uart3_on {
+       rx {
+               /delete-property/ bias-disable;
+               /*
+                * Configure a pull-up on 45 (RX). This is needed to
+                * avoid garbage data when the TX pin of the Bluetooth
+                * module is in tri-state (module powered off or not
+                * driving the signal yet).
+                */
+               bias-pull-up;
+       };
+
+       cts {
+               /delete-property/ bias-disable;
+               /*
+                * Configure a pull-down on 47 (CTS) to match the pull
+                * of the Bluetooth module.
+                */
+               bias-pull-down;
+       };
+};
index e32d3ab..7c222cb 100644 (file)
        };
 
        blsp1_uart3_on: blsp1_uart3_on {
-               mux {
-                       pins = "gpio45", "gpio46", "gpio47", "gpio48";
+               tx {
+                       pins = "gpio45";
                        function = "blsp_uart3_a";
+                       drive-strength = <2>;
+                       bias-disable;
                };
 
-               config {
-                       pins = "gpio45", "gpio46", "gpio47", "gpio48";
+               rx {
+                       pins = "gpio46";
+                       function = "blsp_uart3_a";
+                       drive-strength = <2>;
+                       bias-disable;
+               };
+
+               cts {
+                       pins = "gpio47";
+                       function = "blsp_uart3_a";
+                       drive-strength = <2>;
+                       bias-disable;
+               };
+
+               rfr {
+                       pins = "gpio48";
+                       function = "blsp_uart3_a";
                        drive-strength = <2>;
                        bias-disable;
                };