Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1055795pxk; Thu, 10 Sep 2020 06:06:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJK2Y17FxWFIdBCkIJdXktNUve+8pXxOSESwXFhjhGCO3ifodJOt7+3m1hrYBNqd3LySKr X-Received: by 2002:a50:8709:: with SMTP id i9mr9367418edb.141.1599743159947; Thu, 10 Sep 2020 06:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599743159; cv=none; d=google.com; s=arc-20160816; b=UH9ydpNqk29hGPPPujFWNoeHLWzeROdcl0PQJIafO7fvFCiMIHI5osvVu5FeD73DAR WRtnsq0jTm7YJOIzmdu9a9oock87eX0rpFi9BCOfH2mte+Ux7xLQdEFwAqXGI7i9v/uV FeVma6+I1iaNNduxhZSgFVJB1w+TFw2n+XEvW+6MWGU8zEb3qrd741e63voRGRQ9QUsb 1kUCJYGfdesynkY9+dn8qPMZN3od2B0c+pUaG1t25s4AmPDb1+GhNuIv41o7tZx/EcXD AG3LnI05EQSlZrhYEbtP8pRslKpiTME7MdctugeSEhm2L80b4Ba7gL7HvGb4wGie1DV+ nlPw== 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=TVATNro9Z9QARgBGpZALx4fBx3vORWLPuiOylzjySPI=; b=lxPDaBVRDHYqhoG3geu5NKzC9d5DZ8ncESjXeq0ixN7xc1RLF0UTNefu4ifqS16MQq GvxSl15MorU7lhq7hVmZFARadr5y11aeDFScPsp0k4qZj9By0y+1sxDm3uKY4V/p3wXo 5TpWzQXF07INpXupUVD1nhIbYNu+yRvZWwYTpjI18irXiC445oU07hQjtPn2HMKkVkTG yzq+dHWYuJ61xNjvZd0rzz4taHNqzwkUoj/7+CN95NlzFLOxOg9cHw+5GrsLetRdVf3U J3+G0vLcP6lmWs942IxaTweCeLexMbbIInxMA1OkBrkKQ6f5TI38QRT+vyWCKcpgZPNB oS8Q== 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 x11si3396415edr.460.2020.09.10.06.05.36; Thu, 10 Sep 2020 06:05:59 -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 S1730684AbgIJNDa (ORCPT + 99 others); Thu, 10 Sep 2020 09:03:30 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:38551 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730682AbgIJMzA (ORCPT ); Thu, 10 Sep 2020 08:55:00 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 10 Sep 2020 05:55:00 -0700 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 10 Sep 2020 05:54:58 -0700 Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg01-blr.qualcomm.com with ESMTP; 10 Sep 2020 18:24:31 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 6152743F6; Thu, 10 Sep 2020 18:24:30 +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 V5 2/4] arm64: dts: qcom: sc7180: Add necessary pinctrl and interrupt config for BT UART Date: Thu, 10 Sep 2020 18:23:56 +0530 Message-Id: <1599742438-16811-3-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599742438-16811-1-git-send-email-skakit@codeaurora.org> References: <1599742438-16811-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 a suitable sleep configuration for uart3 to support Bluetooth wakeup. 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. So, configure GPIO mode in sleep state to keep it low during suspend. Signed-off-by: satya priya Reviewed-by: Akash Asthana --- 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. Changes in V5: - As per Matthias's comments, moved pinmux change for sleep state, pinctrl and interrupt config to the board specific file. arch/arm64/boot/dts/qcom/sc7180-idp.dts | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts index 04888df..e529a41 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts @@ -344,6 +344,10 @@ }; &uart3 { + pinctrl-names = "default", "sleep"; + pinctrl-1 = <&qup_uart3_sleep>; + interrupts-extended = <&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>, + <&tlmm 41 IRQ_TYPE_EDGE_FALLING>; status = "okay"; bluetooth: wcn3990-bt { @@ -545,3 +549,47 @@ }; }; +&tlmm { + 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 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; + }; + }; +}; -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation