2020-09-03 15:11:06

by Satya Priya

[permalink] [raw]
Subject: [PATCH V4 3/4] arm64: dts: qcom: sc7180: Add sleep state for BT UART

Add sleep state for BT uart to support the wakeup feature.

Signed-off-by: satya priya <[email protected]>
Reviewed-by: Akash Asthana <[email protected]>
---
Changes in V2:
- This patch adds sleep state for BT UART. Newly added in V2.

Changes in V3:
- Remove "output-high" for TX from both sleep and default states
as it is not required. Configure pull-up for TX in sleep state.

Changes in V4:
- As per Matthias's comment, removed drive-strength for sleep state
and fixed nit-pick.

arch/arm64/boot/dts/qcom/sc7180-idp.dts | 37 +++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
index cecac3e..77e3523 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
@@ -507,6 +507,43 @@
};
};

+&qup_uart3_sleep {
+ pinconf-cts {
+ /*
+ * Configure no-pull on CTS. As this is driven by BT, do not
+ * specify any pull in order to not conflict with BT pulls.
+ */
+ pins = "gpio38";
+ bias-disable;
+ };
+
+ pinconf-rts {
+ /*
+ * Configure pull-down on RTS to make sure that the BT SoC can
+ * wake up the system by sending wakeup bytes during suspend.
+ */
+ pins = "gpio39";
+ bias-pull-down;
+ };
+
+ pinconf-tx {
+ /* Configure pull-up on TX when it isn't actively driven */
+ pins = "gpio40";
+ bias-pull-up;
+ };
+
+ pinconf-rx {
+ /*
+ * Configure a pull-up on 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 = "gpio41";
+ bias-pull-up;
+ };
+};
+
&qup_uart8_default {
pinconf-tx {
pins = "gpio44";
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


2020-09-03 16:24:36

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [PATCH V4 3/4] arm64: dts: qcom: sc7180: Add sleep state for BT UART

On Thu, Sep 03, 2020 at 08:34:57PM +0530, satya priya wrote:
> Add sleep state for BT uart to support the wakeup feature.
>
> Signed-off-by: satya priya <[email protected]>
> Reviewed-by: Akash Asthana <[email protected]>
> ---
> Changes in V2:
> - This patch adds sleep state for BT UART. Newly added in V2.
>
> Changes in V3:
> - Remove "output-high" for TX from both sleep and default states
> as it is not required. Configure pull-up for TX in sleep state.
>
> Changes in V4:
> - As per Matthias's comment, removed drive-strength for sleep state
> and fixed nit-pick.
>
> arch/arm64/boot/dts/qcom/sc7180-idp.dts | 37 +++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
> index cecac3e..77e3523 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
> @@ -507,6 +507,43 @@
> };
> };
>
> +&qup_uart3_sleep {
> + pinconf-cts {
> + /*
> + * Configure no-pull on CTS. As this is driven by BT, do not
> + * specify any pull in order to not conflict with BT pulls.
> + */
> + pins = "gpio38";
> + bias-disable;
> + };
> +
> + pinconf-rts {
> + /*
> + * Configure pull-down on RTS to make sure that the BT SoC can
> + * wake up the system by sending wakeup bytes during suspend.
> + */
> + pins = "gpio39";
> + bias-pull-down;
> + };
> +
> + pinconf-tx {
> + /* Configure pull-up on TX when it isn't actively driven */
> + pins = "gpio40";
> + bias-pull-up;
> + };
> +
> + pinconf-rx {
> + /*
> + * Configure a pull-up on 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 = "gpio41";
> + bias-pull-up;
> + };
> +};
> +
> &qup_uart8_default {
> pinconf-tx {
> pins = "gpio44";

Reviewed-by: Matthias Kaehlcke <[email protected]>

2020-09-09 21:33:40

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH V4 3/4] arm64: dts: qcom: sc7180: Add sleep state for BT UART

Hi,

On Thu, Sep 3, 2020 at 8:08 AM satya priya <[email protected]> wrote:
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
> index cecac3e..77e3523 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
> @@ -507,6 +507,43 @@
> };
> };
>
> +&qup_uart3_sleep {
> + pinconf-cts {
> + /*
> + * Configure no-pull on CTS. As this is driven by BT, do not
> + * specify any pull in order to not conflict with BT pulls.
> + */
> + pins = "gpio38";
> + bias-disable;

Same comment as in the previous patch that I'm not convinced removing
the bias here is correct.


> + };
> +
> + pinconf-rts {
> + /*
> + * Configure pull-down on RTS to make sure that the BT SoC can
> + * wake up the system by sending wakeup bytes during suspend.
> + */
> + pins = "gpio39";
> + bias-pull-down;
> + };
> +
> + pinconf-tx {
> + /* Configure pull-up on TX when it isn't actively driven */
> + pins = "gpio40";
> + bias-pull-up;
> + };
> +
> + pinconf-rx {
> + /*
> + * Configure a pull-up on 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 = "gpio41";
> + bias-pull-up;
> + };
> +};
> +
> &qup_uart8_default {

Slight nit that "default" starts with a "d" which sorts before "sleep"
which starts with an "s". Thus "qup_uart8_default" should be above
"qup_uart3_sleep", not below.

2020-09-10 13:19:12

by Satya Priya

[permalink] [raw]
Subject: Re: [PATCH V4 3/4] arm64: dts: qcom: sc7180: Add sleep state for BT UART

On 2020-09-10 02:59, Doug Anderson wrote:
> Hi,
>
> On Thu, Sep 3, 2020 at 8:08 AM satya priya <[email protected]>
> wrote:
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
>> b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
>> index cecac3e..77e3523 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
>> +++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
>> @@ -507,6 +507,43 @@
>> };
>> };
>>
>> +&qup_uart3_sleep {
>> + pinconf-cts {
>> + /*
>> + * Configure no-pull on CTS. As this is driven by BT,
>> do not
>> + * specify any pull in order to not conflict with BT
>> pulls.
>> + */
>> + pins = "gpio38";
>> + bias-disable;
>
> Same comment as in the previous patch that I'm not convinced removing
> the bias here is correct.
>

Okay.

>
>> + };
>> +
>> + pinconf-rts {
>> + /*
>> + * Configure pull-down on RTS to make sure that the BT
>> SoC can
>> + * wake up the system by sending wakeup bytes during
>> suspend.
>> + */
>> + pins = "gpio39";
>> + bias-pull-down;
>> + };
>> +
>> + pinconf-tx {
>> + /* Configure pull-up on TX when it isn't actively
>> driven */
>> + pins = "gpio40";
>> + bias-pull-up;
>> + };
>> +
>> + pinconf-rx {
>> + /*
>> + * Configure a pull-up on 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 = "gpio41";
>> + bias-pull-up;
>> + };
>> +};
>> +
>> &qup_uart8_default {
>
> Slight nit that "default" starts with a "d" which sorts before "sleep"
> which starts with an "s". Thus "qup_uart8_default" should be above
> "qup_uart3_sleep", not below.

Okay.