Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2191994pxk; Mon, 14 Sep 2020 07:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7KtsecWAnnheVfDK582aMOA1sQSpW84aRgJQcie48WUaacMhkx1zkvM0XMXu9Tg3BFcS+ X-Received: by 2002:a17:906:341b:: with SMTP id c27mr14660105ejb.286.1600092442175; Mon, 14 Sep 2020 07:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600092442; cv=none; d=google.com; s=arc-20160816; b=wYgyVL0YxhcSBcxzPeZHNhhdB7Nf01zLtM7Ff+7xsDbTmaFQpmG4eAJzjEjMff2Ui5 xHNliRuyr/9c4NZjA51qAHwyaIKXHF//0UVjvdD5hF9Wa1DFh3ALTAQXHrrpOn21m4EE iIwaXegnGeWndZ0YYZ2S2uLCHHH4ccFN1hanH3/xIda3QKCkWmEhFzqjI54Mw3+IZUB7 VYtNtMraJAZIi3f5JXmu1k1tMZB7NHyk1C0R8sSHDIqGm6AdUQJUDm6LmYohlOEoy+VX uzME8t2WmNAh5vWj01YDlVXYR+M5Sbq/4bAuvRdRQUI+8l4+cmMMlem7eiHFe9liw+1O FNKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=6q7nIxq86c0KoHyNTEGcoNx/3X0xJgu0IguAN3npIek=; b=L0q7kVMQwD0m7QVDPFJm6HnVQD03bDtwBpJk45eRVW1b9fnlld67fpe5ghfmGmuMuw sLQitKy/ep44E3QTAJI8IzSrlmYC7UqhP0+s+PP0NMFgfIdD5nVYNGBSWt0PqnXuF+aZ exyyvmP2HGfbLe61t8/9H1t9Nk0X8gJAzbXv2nk48Zg283sQSfNVwI40rtCa+RsubgYX 8+O9Nbw0j7rRpE5X4Gq19bvLm07ADTOiq+KYeS3jOgeK6N6fAXlw9j+HnX/XH2paBz4p ZEZK5J+Z2hns58CinAeh7zwECE5hAeBaGjphP62XTdN809p13PpgmLpAwoe5NSZu68Ru tS0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si7674568ede.468.2020.09.14.07.06.59; Mon, 14 Sep 2020 07:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbgINOGJ (ORCPT + 99 others); Mon, 14 Sep 2020 10:06:09 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:31994 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgINOAq (ORCPT ); Mon, 14 Sep 2020 10:00:46 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 14 Sep 2020 06:59:27 -0700 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 14 Sep 2020 06:59:26 -0700 Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg02-blr.qualcomm.com with ESMTP; 14 Sep 2020 19:28:55 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 2EAD144D9; Mon, 14 Sep 2020 19:28:54 +0530 (IST) From: satya priya To: Bjorn Andersson Cc: Matthias Kaehlcke , gregkh@linuxfoundation.org, Andy Gross , Rob Herring , 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 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 Message-Id: <1600091917-7464-4-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600091917-7464-1-git-send-email-skakit@codeaurora.org> References: <1600091917-7464-1-git-send-email-skakit@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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