Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1256831pxa; Thu, 20 Aug 2020 06:55:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcC12z0QnZYztTcRNO0nE0HZd625mfnhsvFabDY6MyaKDwytMu8naiENW5/wISm09avTrE X-Received: by 2002:a17:906:7fc9:: with SMTP id r9mr3260215ejs.407.1597931749941; Thu, 20 Aug 2020 06:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597931749; cv=none; d=google.com; s=arc-20160816; b=EbyQkvch4ZEsjhyjZ7tydGUO8Wo5ESstbyldIe1UrvWiKGROQpyt3rE2eS7pGzHpBh TM2238rDoEoCcYh0xpEg7lSth9bNhHAT3LiNMKcYbru/MUJhsEx7d2IYIr5+elJ7e1wS 2FoyQLgtoheWm5km7DcMHo0+efgRk6ylCRznB7vvMtdxHerSeVEeK+zZ2m1SewI0U6zO oeqf+nv/yQpiwCckd6Ylz+ID64rAXJZNXgU5MBmJoKYMIoxI7OZB35bDdtKj/pRHsKb5 W8jG0JdtbMlsO9GmBHVQjqfP5qsFGAQZptnyao5g908qJ8k5Yvq0MAnkLc8T1LSO+QmS EDZg== 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=Rwl9SQET5W5/xr0GgDFjvYCPA4i+Kj/vBIOmHI4508c=; b=iGIrVia2EfUnLlvhUDEv2ih19yTQS5qrmXMqBcypA80DjaARbN87R9TpDzrxkB0Dnj JqD1eIYVltnTHjvvRUdHBk1AJR2yzo/deqJFFu3/cY5WD/2pDrilqFzygR/1KxOI7vtn Z8gIaSQqDaRrC4jycQfCMNibXXVhMLIe+q00FmGuiV8hGxuOIhVUcdwmL6N2TyylTgaR HFqABHY3toU/lbBzTYPCqAKXWS+ltVoIVp7wwW96x85mO0iwW50ZuPtyzd484lSxUTh8 RXQhO3AObp7XGqD4FoVKfQ2iwJxnKPlokCFNknAjXGfcgO2OvPixjkeyoE7083TBrNwV t1vg== 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 cq22si1327115edb.609.2020.08.20.06.55.25; Thu, 20 Aug 2020 06:55:49 -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 S1729143AbgHTNwb (ORCPT + 99 others); Thu, 20 Aug 2020 09:52:31 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:11599 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728020AbgHTNwC (ORCPT ); Thu, 20 Aug 2020 09:52:02 -0400 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 20 Aug 2020 06:52:01 -0700 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 20 Aug 2020 06:52:00 -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; 20 Aug 2020 19:21:34 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id 97B08440F; Thu, 20 Aug 2020 19:21:33 +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, satya priya Subject: [PATCH V3 2/3] arm64: dts: qcom: sc7180: Add sleep pin ctrl for BT uart Date: Thu, 20 Aug 2020 19:21:06 +0530 Message-Id: <1597931467-24268-3-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597931467-24268-1-git-send-email-skakit@codeaurora.org> References: <1597931467-24268-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 sleep pin ctrl for BT uart, and also change the bias configuration to match Bluetooth module. 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. arch/arm64/boot/dts/qcom/sc7180-idp.dts | 54 +++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts index d8b5507..806f626 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts @@ -473,20 +473,20 @@ &qup_uart3_default { pinconf-cts { - /* - * Configure a pull-down on 38 (CTS) to match the pull of - * the Bluetooth module. - */ + /* Configure no pull on 38 (CTS) to match Bluetooth module */ pins = "gpio38"; - bias-pull-down; - output-high; + bias-disable; }; pinconf-rts { - /* We'll drive 39 (RTS), so no pull */ + /* + * Configure pull-down on 39 (RTS). This is needed to avoid a + * floating pin which could mislead Bluetooth controller + * with UART RFR state (READY/NOT_READY). + */ pins = "gpio39"; drive-strength = <2>; - bias-disable; + bias-pull-down; }; pinconf-tx { @@ -494,7 +494,43 @@ pins = "gpio40"; drive-strength = <2>; bias-disable; - output-high; + }; + + pinconf-rx { + /* + * Configure a pull-up on 41 (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_uart3_sleep { + pinconf-cts { + /* Configure no-pull on 38 (CTS) to match Bluetooth module */ + pins = "gpio38"; + bias-disable; + }; + + pinconf-rts { + /* + * Configure pull-down on 39 (RTS). This is needed to avoid a + * floating pin which could mislead Bluetooth controller + * with UART RFR state (READY/NOT_READY). + */ + pins = "gpio39"; + drive-strength = <2>; + bias-pull-down; + }; + + pinconf-tx { + /* Configure pull-up on 40 (TX) when it isn't actively driven */ + pins = "gpio40"; + drive-strength = <2>; + bias-pull-up; }; pinconf-rx { -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation