The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Cc: agross@kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: msm8998: Fixup uart3 gpio config for bluetooth
Date: Sun, 20 Oct 2019 19:11:23 -0700	[thread overview]
Message-ID: <20191021021123.GF4500@tuxbook-pro> (raw)
In-Reply-To: <20191019221217.1432-1-jeffrey.l.hugo@gmail.com>

On Sat 19 Oct 15:12 PDT 2019, Jeffrey Hugo wrote:

> 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>
> ---
>  .../boot/dts/qcom/msm8998-clamshell.dtsi      | 31 +++++++++++++++++++
>  arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi     | 31 +++++++++++++++++++
>  2 files changed, 62 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi b/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
> index ab24d415acc0..7e02cb6c8e07 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
> @@ -74,6 +74,37 @@
>  	};
>  };
>  
> +&blsp1_uart3_on {
> +	/delete-node/ config;

So it would make much more sense then to split &blsp1_uart3_on in
sections defining its pins, than the "logical" config and mux split.


Please send a patch that changes msm8998-pins.dtsi to be:

blsp_uart3_on: blsp1-uart3-on {
	ctx {
	};

	rts {
	};

	rx [
	};

	tx {
	};
};


There's no need for the "pinconf" part and for pinctrl states with a
single pin/group we can simply omit the subnode (as this is now
possible).


Apart from that, I think this looks good!

Regards,
Bjorn

> +
> +	pinconf-cts {
> +		/*
> +		 * Configure a pull-down on 47 (CTS) to match the pull
> +		 * of the Bluetooth module.
> +		 */
> +		pins = "gpio47";
> +		bias-pull-down;
> +	};
> +
> +	pinconf-rts-tx {
> +		/* We'll drive 48 (RFR) and 45 (TX), so no pull */
> +		pins = "gpio45", "gpio48";
> +		drive-strength = <2>;
> +		bias-disable;
> +	};
> +
> +	pinconf-rx {
> +		/*
> +		 * 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).
> +		 */
> +		pins = "gpio45";
> +		bias-pull-up;
> +	};
> +};
> +
>  &dsi0 {
>  	status = "okay";
>  
> diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> index 1a1836ed1052..17f51af5e999 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
> @@ -37,6 +37,37 @@
>  	};
>  };
>  
> +&blsp1_uart3_on {
> +	/delete-node/ config;
> +
> +	pinconf-cts {
> +		/*
> +		 * Configure a pull-down on 47 (CTS) to match the pull
> +		 * of the Bluetooth module.
> +		 */
> +		pins = "gpio47";
> +		bias-pull-down;
> +	};
> +
> +	pinconf-rts-tx {
> +		/* We'll drive 48 (RFR) and 45 (TX), so no pull */
> +		pins = "gpio45", "gpio48";
> +		drive-strength = <2>;
> +		bias-disable;
> +	};
> +
> +	pinconf-rx {
> +		/*
> +		 * 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).
> +		 */
> +		pins = "gpio45";
> +		bias-pull-up;
> +	};
> +};
> +
>  &blsp2_uart1 {
>  	status = "okay";
>  };
> -- 
> 2.17.1
> 

      reply	other threads:[~2019-10-21  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 22:12 [PATCH] arm64: dts: qcom: msm8998: Fixup uart3 gpio config for bluetooth Jeffrey Hugo
2019-10-21  2:11 ` Bjorn Andersson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191021021123.GF4500@tuxbook-pro \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=jeffrey.l.hugo@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox