From: satya priya <skakit@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Matthias Kaehlcke <mka@chromium.org>,
gregkh@linuxfoundation.org, Andy Gross <agross@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, akashast@codeaurora.org,
rojay@codeaurora.org, msavaliy@qti.qualcomm.com,
dianders@chromium.org, satya priya <skakit@codeaurora.org>
Subject: [PATCH V6 3/4] arm64: dts: qcom: sc7180-trogdor: Add wakeup support for BT UART
Date: Mon, 14 Sep 2020 19:28:36 +0530 [thread overview]
Message-ID: <1600091917-7464-4-git-send-email-skakit@codeaurora.org> (raw)
In-Reply-To: <1600091917-7464-1-git-send-email-skakit@codeaurora.org>
Add the necessary pinctrl, interrupt property and a suitable sleep config
to support Bluetooth wakeup feature.
GPIO mode is configured in sleep state to drive the RTS/RFR line low.
If QUP function is selected in sleep state, UART RTS/RFR is pulled high
during suspend and BT SoC not able to send wakeup bytes.
Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V5:
- Newly added in V5. This patch adds wakeup support for trogdor board files.
Changes in V6:
- As per Doug's comment deleted interrupts property and sorted the qup sleep
state before trackpad.
- As per Bjorn's comment canged the commit text, rationale for RTS, TX, RX.
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 54 ++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index a6b9beb..6629df9 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -794,6 +794,13 @@ ap_spi_fp: &spi10 {
&uart3 {
status = "okay";
+ /delete-property/interrupts;
+ interrupts-extended = <&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
+ <&tlmm 41 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-1 = <&qup_uart3_sleep>;
+
bluetooth: bluetooth {
compatible = "qcom,wcn3991-bt";
vddio-supply = <&pp1800_l10a>;
@@ -1307,6 +1314,53 @@ ap_spi_fp: &spi10 {
};
};
+ qup_uart3_sleep: qup-uart3-sleep {
+ pinmux {
+ pins = "gpio38", "gpio39",
+ "gpio40", "gpio41";
+ function = "gpio";
+ };
+
+ pinconf-cts {
+ /*
+ * Configure a pull-down on CTS to match the pull of
+ * the Bluetooth module.
+ */
+ pins = "gpio38";
+ bias-pull-down;
+ };
+
+ pinconf-rts {
+ /*
+ * Configure pull-down on RTS. As RTS is active low
+ * signal, pull it low to indicate the BT SoC that it
+ * can wakeup the system anytime from suspend state by
+ * pulling RX low (by sending wakeup bytes).
+ */
+ pins = "gpio39";
+ bias-pull-down;
+ };
+
+ pinconf-tx {
+ /*
+ * Configure pull-up on TX when it isn't actively driven
+ * to prevent BT SoC from receiving garbage during sleep.
+ */
+ 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 floating which may cause spurious wakeups.
+ */
+ pins = "gpio41";
+ bias-pull-up;
+ };
+ };
+
trackpad_int_1v8_odl: trackpad-int-1v8-odl {
pinmux {
pins = "gpio58";
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2020-09-14 14:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 13:58 [PATCH V6 0/4] Add wakeup support over UART RX satya priya
2020-09-14 13:58 ` [PATCH V6 1/4] arm64: dts: qcom: sc7180: Improve the uart3 pin config for sc7180-idp satya priya
2020-09-14 13:58 ` [PATCH V6 2/4] arm64: dts: qcom: sc7180: Add wakeup support for BT UART on sc7180-idp satya priya
2020-09-14 15:57 ` Matthias Kaehlcke
2020-09-14 21:20 ` Doug Anderson
2020-09-14 13:58 ` satya priya [this message]
2020-09-14 16:00 ` [PATCH V6 3/4] arm64: dts: qcom: sc7180-trogdor: Add wakeup support for BT UART Matthias Kaehlcke
2020-09-14 21:23 ` Doug Anderson
2020-09-14 13:58 ` [PATCH V6 4/4] tty: serial: qcom_geni_serial: Fix the UART wakeup issue satya priya
2020-09-15 0:16 ` [PATCH V6 0/4] Add wakeup support over UART RX Bjorn Andersson
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=1600091917-7464-4-git-send-email-skakit@codeaurora.org \
--to=skakit@codeaurora.org \
--cc=agross@kernel.org \
--cc=akashast@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=msavaliy@qti.qualcomm.com \
--cc=robh+dt@kernel.org \
--cc=rojay@codeaurora.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