Message ID | 20230209020916.6475-5-steev@kali.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72048wrn; Wed, 8 Feb 2023 18:10:46 -0800 (PST) X-Google-Smtp-Source: AK7set9SekZHp0lPScl58WLQebuVtKOaYybvOynLy+lE8hsZ9oMVq5DPey3Dz3CPiR30OVtjHB05 X-Received: by 2002:a17:906:2083:b0:87b:d3d3:3de6 with SMTP id 3-20020a170906208300b0087bd3d33de6mr8814583ejq.3.1675908646547; Wed, 08 Feb 2023 18:10:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675908646; cv=none; d=google.com; s=arc-20160816; b=roMomW4tYZ2APgNKUvunTdulB9WuN+qRNau5/hzsg1vWZw0MgX9TKyQszhZPmBmV7W XoBk61g1sO/egBE/2CJ77F5H6drsJC1qhgajKQbhyI6ZU22zUvGgt9B2O5rRcEx9wzxs Zc7feAQHpCwa35uFirPI6tb5jaum2ns007Y1GOo/w4ldN4niEOWtpk3LLdMi4SZhm9NF +Dc/AFwM24QHWiDSL/C/Bd+qv5VbIjYrFlmmCgGlm0TqpDXqa7jScV7QvFLuWYFVBDIv R9NVuDg2M9msJig5M7v02TpjMtYRBNRuNws4r3zM9JcjHGyvExubFT9ekN3gLxH/E3C+ k+sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ErEfS9bjsXHZf8zW3eSPIlB6x60rqZJ+hhTJR6OvqGc=; b=SuEWWXBaiFQLALAxYwFs1QCIbJh6KYu9tEhhOh8o/dZM4NI+ATcVV3mHQd8MMSlqTM vyMr5jrFsnn4bHtnwuVFW3FtQLMasKApgDR96o/dm1pLyVt955szraWpAQZw0ddq6AA4 KQ4sTF1W8pd76JugkokZn9FdroIsNk/ul4FISYqHCKqIHhhUahG7BWVT6paioO8510mk geJS7kf0TdtMfRrqFttzZVWdSi9wkDGGyOYT1WPOC8PEZmGQZzu92Eb5PUPsRvxeGv6Y jtoK/Ngjtacrc7ZaYI2E5t+GkqjS/guQJxXBv+dj9kfcJmOMZw/ZS1dOCFxAqAzpUHjl Bbeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kali.org header.s=google header.b=fjZV9pId; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kali.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wi16-20020a170906fd5000b008a9fa2fdbe4si704856ejb.152.2023.02.08.18.10.23; Wed, 08 Feb 2023 18:10:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kali.org header.s=google header.b=fjZV9pId; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kali.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231765AbjBICJz (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Wed, 8 Feb 2023 21:09:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231560AbjBICJb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Feb 2023 21:09:31 -0500 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F2662749B for <linux-kernel@vger.kernel.org>; Wed, 8 Feb 2023 18:09:25 -0800 (PST) Received: by mail-qv1-xf2c.google.com with SMTP id j9so523300qvt.0 for <linux-kernel@vger.kernel.org>; Wed, 08 Feb 2023 18:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ErEfS9bjsXHZf8zW3eSPIlB6x60rqZJ+hhTJR6OvqGc=; b=fjZV9pIdx9EwPU6LiQEp4Di0RywW13a19YPevr0FjfutfFo/SyYbOvgwAmrwEpSiRj 9kP3ZmTRPSd4sx8NhzFFoLZd7p/bKBzxYwOhPpJfsu9YXpXecb/ohtQwE80BsHvutrBC bYl22uNLgi58lw/P/IPyoMcsw4RmbHrJ/bbnMuSyt8axKjfcFcH5KkWBJpBFTIBeIUak JfQql1C4u8VBaHzgAUxaFDPNLjafXir4BKMWi9uQ/jZxqTDu/d73ra7suflOvSnKo2X+ DdnwMiP+LDzFrHeXV4hyeAPbdg3JZYrgm6UuB6CL9HK71MuPOzV320Cw9chxlQ3SHiO2 MW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ErEfS9bjsXHZf8zW3eSPIlB6x60rqZJ+hhTJR6OvqGc=; b=Gh3+CYr0V/YkMHqingVwwl+dyOYM5PzfOkfO7sc41j0rGgJJx5P4B8AmMtlLGU3wiU MAPGqMag+QCcztruF0J6J2FIw1+2RMkSotVG6ZcHEp80uENaadU8WCTG1Zpn3zGCHprK 4BDwvIESmNbRP7qmJ3derVdXxNYDXPsmFrk/H7cn8arLss41nTaGeWJ4JNNweNXo0zVc 34sAWxLrc/cqN28t3+btg61BliHPnQkPLS/QR1B87vVBjPsnir6qFr4ZovLKaKuj8gHE /wV/y7L5EwgHnbv3alfAzM0LlH/LrJAUwpCAj8z/lA1z/+5jUXhiVncIYsy64t7Hm1cu 5pmw== X-Gm-Message-State: AO0yUKVrWz00u+EDz1Mt8s3dUMSu92s/Y1pO89gLr0NEdtda+zoDjDPu jVFIPhcUVMISsNPxUwQEJLI67g== X-Received: by 2002:ad4:5b87:0:b0:545:fe7f:437a with SMTP id 7-20020ad45b87000000b00545fe7f437amr13502008qvp.0.1675908564289; Wed, 08 Feb 2023 18:09:24 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id o186-20020a37bec3000000b007208a81e11esm398544qkf.41.2023.02.08.18.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 18:09:23 -0800 (PST) From: Steev Klimaszewski <steev@kali.org> To: Steev Klimaszewski <steev@kali.org> Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, Sven Peter <sven@svenpeter.dev>, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, Mark Pearson <markpearson@lenovo.com> Subject: [PATCH v5 4/4] arm64: dts: qcom: thinkpad-x13s: Add bluetooth Date: Wed, 8 Feb 2023 20:09:16 -0600 Message-Id: <20230209020916.6475-5-steev@kali.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209020916.6475-1-steev@kali.org> References: <20230209020916.6475-1-steev@kali.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757317585322354750?= X-GMAIL-MSGID: =?utf-8?q?1757317585322354750?= |
Series |
Add WCN6855 Bluetooth support
|
|
Commit Message
Steev Klimaszewski
Feb. 9, 2023, 2:09 a.m. UTC
The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2,
add this.
Signed-off-by: Steev Klimaszewski <steev@kali.org>
Link: https://lore.kernel.org/r/20230207052829.3996-5-steev@kali.org
---
Changes since v4:
* Address Konrad's review comments.
Changes since v3:
* Add vreg_s1c
* Add regulators and not dead code
* Fix commit message changelog
Changes since v2:
* Remove dead code and add TODO comment
* Make dtbs_check happy with the pin definitions
.../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
Comments
On Wed, Feb 08, 2023 at 08:09:16PM -0600, Steev Klimaszewski wrote: > The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, > add this. > > Signed-off-by: Steev Klimaszewski <steev@kali.org> > Link: https://lore.kernel.org/r/20230207052829.3996-5-steev@kali.org This link should not be needed. Also, please update the patch Subject to use the following prefix: arm64: dts: qcom: sc8280xp-x13s: ... > --- > Changes since v4: > * Address Konrad's review comments. > > Changes since v3: > * Add vreg_s1c > * Add regulators and not dead code > * Fix commit message changelog > > Changes since v2: > * Remove dead code and add TODO comment > * Make dtbs_check happy with the pin definitions > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 76 +++++++++++++++++++ > 1 file changed, 76 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > index f936b020a71d..ad20cfb3a830 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -24,6 +24,8 @@ / { > aliases { > i2c4 = &i2c4; > i2c21 = &i2c21; > + serial0 = &uart17; This is an unrelated change that does not belong in this patch. > + serial1 = &uart2; > }; > > wcd938x: audio-codec { > @@ -297,6 +299,15 @@ pmc8280c-rpmh-regulators { > qcom,pmic-id = "c"; > vdd-bob-supply = <&vreg_vph_pwr>; > > + vreg_s1c: smps1 { > + regulator-name = "vreg_s1c"; > + regulator-min-microvolt = <1880000>; > + regulator-max-microvolt = <1900000>; > + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, > + <RPMH_REGULATOR_MODE_RET>; > + regulator-allow-set-load; Don't you need to specify initial-mode as well? > + }; > + > vreg_l1c: ldo1 { > regulator-name = "vreg_l1c"; > regulator-min-microvolt = <1800000>; > @@ -712,6 +723,32 @@ &qup0 { > status = "okay"; > }; > > +&uart2 { > + pinctrl-0 = <&uart2_state>; > + pinctrl-names = "default"; > + > + status = "okay"; > + > + bluetooth { > + compatible = "qcom,wcn6855-bt"; > + > + vddio-supply = <&vreg_s10b>; > + vddbtcxmx-supply = <&vreg_s12b>; > + vddrfacmn-supply = <&vreg_s12b>; > + vddrfa0p8-supply = <&vreg_s12b>; > + vddrfa1p2-supply = <&vreg_s11b>; > + vddrfa1p7-supply = <&vreg_s1c>; > + > + max-speed = <3200000>; > + > + enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; > + swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>; > + > + pinctrl-0 = <&bt_en>; > + pinctrl-names = "default"; > + }; > +}; > + > &qup1 { > status = "okay"; > }; > @@ -720,6 +757,11 @@ &qup2 { > status = "okay"; > }; > > +&uart17 { > + compatible = "qcom,geni-debug-uart"; > + status = "okay"; > +}; This bit does not belong here either. We don't have any means of accessing the debug uart on the X13s so we should probably just leave it disabled. > + > &remoteproc_adsp { > firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; > > @@ -980,6 +1022,19 @@ hastings_reg_en: hastings-reg-en-state { > &tlmm { > gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; > > + bt_en: bt-en-state { As you are configuring more than one pin, please rename this as: bt_default: bt-default-state > + hstp-sw-ctrl-pins { > + pins = "gpio132"; > + function = "gpio"; You should define the bias configuration as well. I guess we need to keep the default pull-down enabled. > + }; > + > + hstp-bt-en-pins { > + pins = "gpio133"; > + function = "gpio"; > + drive-strength = <16>; bias-disable? > + }; > + }; > + > edp_reg_en: edp-reg-en-state { > pins = "gpio25"; > function = "gpio"; > @@ -1001,6 +1056,27 @@ i2c4_default: i2c4-default-state { > bias-disable; > }; > > + uart2_state: uart2-state { Rename this one too: uart2_default: uart2-default-state > + cts-pins { > + pins = "gpio122"; This should be gpio121 (gpio122 is rts). > + function = "qup2"; > + bias-disable; Don't we need a pull-down on this one to avoid a floating input when the module is powered down? > + }; > + > + rts-tx-pins { Please split this in two nodes. > + pins = "gpio122", "gpio123"; > + function = "qup2"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + rx-pins { > + pins = "gpio124"; > + function = "qup2"; > + bias-pull-up; > + }; > + }; > + > i2c21_default: i2c21-default-state { > pins = "gpio81", "gpio82"; > function = "qup21"; Johan
On Thu, Mar 9, 2023 at 11:24 AM Johan Hovold <johan@kernel.org> wrote: > > On Wed, Feb 08, 2023 at 08:09:16PM -0600, Steev Klimaszewski wrote: > > The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, > > add this. > > > > Signed-off-by: Steev Klimaszewski <steev@kali.org> > > Link: https://lore.kernel.org/r/20230207052829.3996-5-steev@kali.org > > This link should not be needed. > > Also, please update the patch Subject to use the following prefix: > > arm64: dts: qcom: sc8280xp-x13s: ... > Yeah, that was me screwing up my patch, will make those changes for v6 > > --- > > Changes since v4: > > * Address Konrad's review comments. > > > > Changes since v3: > > * Add vreg_s1c > > * Add regulators and not dead code > > * Fix commit message changelog > > > > Changes since v2: > > * Remove dead code and add TODO comment > > * Make dtbs_check happy with the pin definitions > > .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 76 +++++++++++++++++++ > > 1 file changed, 76 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > index f936b020a71d..ad20cfb3a830 100644 > > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > > @@ -24,6 +24,8 @@ / { > > aliases { > > i2c4 = &i2c4; > > i2c21 = &i2c21; > > + serial0 = &uart17; > > This is an unrelated change that does not belong in this patch. > > > + serial1 = &uart2; > > }; > > > > wcd938x: audio-codec { > > @@ -297,6 +299,15 @@ pmc8280c-rpmh-regulators { > > qcom,pmic-id = "c"; > > vdd-bob-supply = <&vreg_vph_pwr>; > > > > + vreg_s1c: smps1 { > > + regulator-name = "vreg_s1c"; > > + regulator-min-microvolt = <1880000>; > > + regulator-max-microvolt = <1900000>; > > + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, > > + <RPMH_REGULATOR_MODE_RET>; > > + regulator-allow-set-load; > > Don't you need to specify initial-mode as well? > > > + }; > > + > > vreg_l1c: ldo1 { > > regulator-name = "vreg_l1c"; > > regulator-min-microvolt = <1800000>; > > @@ -712,6 +723,32 @@ &qup0 { > > status = "okay"; > > }; > > > > +&uart2 { > > + pinctrl-0 = <&uart2_state>; > > + pinctrl-names = "default"; > > + > > + status = "okay"; > > + > > + bluetooth { > > + compatible = "qcom,wcn6855-bt"; > > + > > + vddio-supply = <&vreg_s10b>; > > + vddbtcxmx-supply = <&vreg_s12b>; > > + vddrfacmn-supply = <&vreg_s12b>; > > + vddrfa0p8-supply = <&vreg_s12b>; > > + vddrfa1p2-supply = <&vreg_s11b>; > > + vddrfa1p7-supply = <&vreg_s1c>; > > + > > + max-speed = <3200000>; > > + > > + enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; > > + swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>; > > + > > + pinctrl-0 = <&bt_en>; > > + pinctrl-names = "default"; > > + }; > > +}; > > + > > &qup1 { > > status = "okay"; > > }; > > @@ -720,6 +757,11 @@ &qup2 { > > status = "okay"; > > }; > > > > +&uart17 { > > + compatible = "qcom,geni-debug-uart"; > > + status = "okay"; > > +}; > > This bit does not belong here either. We don't have any means of > accessing the debug uart on the X13s so we should probably just leave it > disabled. > Will drop it (and the above one as well) > > + > > &remoteproc_adsp { > > firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; > > > > @@ -980,6 +1022,19 @@ hastings_reg_en: hastings-reg-en-state { > > &tlmm { > > gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; > > > > + bt_en: bt-en-state { > > As you are configuring more than one pin, please rename this as: > > bt_default: bt-default-state > > > + hstp-sw-ctrl-pins { > > + pins = "gpio132"; > > + function = "gpio"; > > You should define the bias configuration as well. I guess we need to > keep the default pull-down enabled. > > > + }; > > + > > + hstp-bt-en-pins { > > + pins = "gpio133"; > > + function = "gpio"; > > + drive-strength = <16>; > > bias-disable? > > > + }; > > + }; > > + > > edp_reg_en: edp-reg-en-state { > > pins = "gpio25"; > > function = "gpio"; > > @@ -1001,6 +1056,27 @@ i2c4_default: i2c4-default-state { > > bias-disable; > > }; > > > > + uart2_state: uart2-state { > > Rename this one too: > > uart2_default: uart2-default-state > > > + cts-pins { > > + pins = "gpio122"; > > This should be gpio121 (gpio122 is rts). > You are right that it should be... however... if I actually set it to be 121.... bluetooth doesn't actually come up/work? > > + function = "qup2"; > > + bias-disable; > > Don't we need a pull-down on this one to avoid a floating input when the > module is powered down? > Maybe? I don't have access to the schematics or anything so I was going with the best guess based on what worked by poking and prodding. Will try this. > > + }; > > + > > + rts-tx-pins { > > Please split this in two nodes. > > > + pins = "gpio122", "gpio123"; > > + function = "qup2"; > > + drive-strength = <2>; > > + bias-disable; > > + }; > > + > > + rx-pins { > > + pins = "gpio124"; > > + function = "qup2"; > > + bias-pull-up; > > + }; > > + }; > > + > > i2c21_default: i2c21-default-state { > > pins = "gpio81", "gpio82"; > > function = "qup21"; > > Johan
On Thu, Mar 09, 2023 at 02:07:58PM -0600, Steev Klimaszewski wrote: > On Thu, Mar 9, 2023 at 11:24 AM Johan Hovold <johan@kernel.org> wrote: > > On Wed, Feb 08, 2023 at 08:09:16PM -0600, Steev Klimaszewski wrote: > > > + uart2_state: uart2-state { > > > > Rename this one too: > > > > uart2_default: uart2-default-state > > > > > + cts-pins { > > > + pins = "gpio122"; > > > > This should be gpio121 (gpio122 is rts). > > > > You are right that it should be... however... if I actually set it to > be 121.... bluetooth doesn't actually come up/work? I'm running with this fixed locally and it's working here. Not muxing the cts-pin should break flow control (e.g. the host will send data regardless of if the device signals that it's ready to receive it). > > > + function = "qup2"; > > > + bias-disable; > > > > Don't we need a pull-down on this one to avoid a floating input when the > > module is powered down? > > Maybe? I don't have access to the schematics or anything so I was > going with the best guess based on what worked by poking and prodding. > Will try this. There are no external resistors and most of the Qualcomm boards with these Bluetooth modules appear to enable the internal pull-down on cts. But there are also two boards that recently switched to bias-bus-hold: 3d0e375bae55 ("arm64: dts: qcom: sc7280-qcard: Configure CTS pin to bias-bus-hold for bluetooth") to avoid leakage. Perhaps that's what we want here too. Johan
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index f936b020a71d..ad20cfb3a830 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -24,6 +24,8 @@ / { aliases { i2c4 = &i2c4; i2c21 = &i2c21; + serial0 = &uart17; + serial1 = &uart2; }; wcd938x: audio-codec { @@ -297,6 +299,15 @@ pmc8280c-rpmh-regulators { qcom,pmic-id = "c"; vdd-bob-supply = <&vreg_vph_pwr>; + vreg_s1c: smps1 { + regulator-name = "vreg_s1c"; + regulator-min-microvolt = <1880000>; + regulator-max-microvolt = <1900000>; + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, + <RPMH_REGULATOR_MODE_RET>; + regulator-allow-set-load; + }; + vreg_l1c: ldo1 { regulator-name = "vreg_l1c"; regulator-min-microvolt = <1800000>; @@ -712,6 +723,32 @@ &qup0 { status = "okay"; }; +&uart2 { + pinctrl-0 = <&uart2_state>; + pinctrl-names = "default"; + + status = "okay"; + + bluetooth { + compatible = "qcom,wcn6855-bt"; + + vddio-supply = <&vreg_s10b>; + vddbtcxmx-supply = <&vreg_s12b>; + vddrfacmn-supply = <&vreg_s12b>; + vddrfa0p8-supply = <&vreg_s12b>; + vddrfa1p2-supply = <&vreg_s11b>; + vddrfa1p7-supply = <&vreg_s1c>; + + max-speed = <3200000>; + + enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; + swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&bt_en>; + pinctrl-names = "default"; + }; +}; + &qup1 { status = "okay"; }; @@ -720,6 +757,11 @@ &qup2 { status = "okay"; }; +&uart17 { + compatible = "qcom,geni-debug-uart"; + status = "okay"; +}; + &remoteproc_adsp { firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; @@ -980,6 +1022,19 @@ hastings_reg_en: hastings-reg-en-state { &tlmm { gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; + bt_en: bt-en-state { + hstp-sw-ctrl-pins { + pins = "gpio132"; + function = "gpio"; + }; + + hstp-bt-en-pins { + pins = "gpio133"; + function = "gpio"; + drive-strength = <16>; + }; + }; + edp_reg_en: edp-reg-en-state { pins = "gpio25"; function = "gpio"; @@ -1001,6 +1056,27 @@ i2c4_default: i2c4-default-state { bias-disable; }; + uart2_state: uart2-state { + cts-pins { + pins = "gpio122"; + function = "qup2"; + bias-disable; + }; + + rts-tx-pins { + pins = "gpio122", "gpio123"; + function = "qup2"; + drive-strength = <2>; + bias-disable; + }; + + rx-pins { + pins = "gpio124"; + function = "qup2"; + bias-pull-up; + }; + }; + i2c21_default: i2c21-default-state { pins = "gpio81", "gpio82"; function = "qup21";