Message ID | 20230316034759.73489-5-steev@kali.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp274984wrt; Wed, 15 Mar 2023 21:07:35 -0700 (PDT) X-Google-Smtp-Source: AK7set8GpFqIvzM6YmQNyELyR46lPO4Z1kd5BF/WXqUNIcAQOcpymAa1E/WOE/EmHcseYPOYNEUg X-Received: by 2002:a05:6a20:12c3:b0:bf:58f4:beaf with SMTP id v3-20020a056a2012c300b000bf58f4beafmr2443161pzg.7.1678939655144; Wed, 15 Mar 2023 21:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678939655; cv=none; d=google.com; s=arc-20160816; b=TTjiNqYIwpxD4KeyHa+mZjNy/d75lrnSZ242q3czzqtHkIcI4GGkJk8xuRo09KvG59 ylCf6+P3C/lNeMQ7QL8bb2DW1RfxLqEC9yQhtT5yP+qe9qZk7D/SDvYAXLwJWCgr3MvN 7K6h2Uuw1RSlS3cOF9D05pIGqymOcnwO8XoP7e8PO925SkIL3RpZyezSidJDDnBImGd6 9jdOZ1cLzfzOCc25xO2Mz4bV1gRHcGBo19lgl8IFWIIsp6KVno+7wNFsPzWHCnfgjhBa tesCX1tuFkBYunDdj3AL4HrdtSThGXYemuxV3yd14sDdM76YmHlQn/080GjMhV++R+eB pBbQ== 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=MviEEWSTJxxSnXQ8MTU0qt5CxziP8W4MnnoSp2fynjs=; b=PL6FdABxhl3/7NLuk8WQEUYjyQMWhV9ukE6ghGVAjRTuT5z7EbLw3YvoP5jq+EhwUp HfN/MFei6zXZgoAeijMyh0a/I86+MSgnE90id41022d8hWRrA2iNOhB9IRnMy+7n1LFe 9DgUXxhGGOCIK7RNFBi9WusD1ji/23nonVTlvmrlRcgGoyT8yvf/fX8Vmdy7LrXDbWam IJs39kajNSSc5X2ui7Z9jum5l1LVbw/4sq6GSCw4PRFOAkex53/Hq/anUtP7wu3fIzir aRd4f/B1+bjb0AJ/6yu9WjBK1CbfGHUSKm1uXzQ5+ToJc3caQ08I7WXCDX15EgJxuEk2 8QmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kali.org header.s=google header.b=XWl8vLRg; 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 s21-20020a056a00195500b00625f79ca1b4si290574pfk.240.2023.03.15.21.07.22; Wed, 15 Mar 2023 21:07:35 -0700 (PDT) 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=XWl8vLRg; 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 S229743AbjCPDsg (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Wed, 15 Mar 2023 23:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjCPDsN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 23:48:13 -0400 Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 649309E309 for <linux-kernel@vger.kernel.org>; Wed, 15 Mar 2023 20:48:10 -0700 (PDT) Received: by mail-oo1-xc2a.google.com with SMTP id n27-20020a4ad63b000000b005252709efdbso54746oon.4 for <linux-kernel@vger.kernel.org>; Wed, 15 Mar 2023 20:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; t=1678938489; 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=MviEEWSTJxxSnXQ8MTU0qt5CxziP8W4MnnoSp2fynjs=; b=XWl8vLRg8SWI+k7I74n/oowWqeKyPcjyMWA1lH1QzC2rDjJLZXfwRheUyKbLXuiN2e /iOUiLF7OQcqv2an0KOFsoh5jUVWiJMRSlcNzV/sWLhjc00F8twiykhe4mncckWWyMBU bikDI/5mXlnBz+Cmbrh3a5W56A6f5R1OEr/xF8nDQ8U4rSd68bwvWiGhloB/4PILWup9 ylD8uXJk2lvidmyjGn9YfGsAiKF/flB8o1QWdaHka8hyOhL9zjBgi7FO48x6Z5KRn1ec y2ybe9MSGq91TQKPuqIw3+4H6spkIvl/fEtetMp2I0GRsE5HlTy+PXmtd/aGptkV+aiW o0Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678938489; 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=MviEEWSTJxxSnXQ8MTU0qt5CxziP8W4MnnoSp2fynjs=; b=nZ3mjqOXGaqPXVqO2miXSzsbYMTelV7/50GSbmgm9k6erg5q/kEtRcPODKfCgbQUBY puK4PlcagjXQp0gtyDuzj3rNI+Xfa682yII/L3pJFCG8FPMAH1gR6sUEAyw6mctR08Tx 6N5dbeFywuurHuF/Gm3m4D0etd13oV+2fcvn5FUakS4YvQHTwLkW3IqV/cGPmXv2mCOj Ek8Bv1lK3UYaTEwqaf6J39OzsOZvMp15hM3Sv0tNyaA6hi/ZJX2uVqSrA5uvucXbzOfY SvoWJLXb+Ss65bGAPTSStbzK4hFUvGUq9bMiRGS60soWCBCHTkYYD4jXz/xKi2/ELTEI P0xw== X-Gm-Message-State: AO0yUKUjhgx6MH8p2SDvP9gDXVo8zhxzIjd4/XZLPaACJSEKPgaY005V imf7FSpClFICggQ13Nbqeyq1/Q== X-Received: by 2002:a4a:d286:0:b0:525:3dc9:c39b with SMTP id h6-20020a4ad286000000b005253dc9c39bmr11389658oos.0.1678938489411; Wed, 15 Mar 2023 20:48:09 -0700 (PDT) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id b3-20020a9d4783000000b0068bc48c61a5sm3054659otf.19.2023.03.15.20.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 20:48:09 -0700 (PDT) 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>, Johan Hovold <johan@kernel.org> Subject: [PATCH v6 4/4] arm64: dts: qcom: sc8280xp-x13s: Add bluetooth Date: Wed, 15 Mar 2023 22:47:58 -0500 Message-Id: <20230316034759.73489-5-steev@kali.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316034759.73489-1-steev@kali.org> References: <20230316034759.73489-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?1760495827818576437?= X-GMAIL-MSGID: =?utf-8?q?1760495827818576437?= |
Series |
Add WCN6855 Bluetooth support
|
|
Commit Message
Steev Klimaszewski
March 16, 2023, 3:47 a.m. UTC
The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2,
add this.
Signed-off-by: Steev Klimaszewski <steev@kali.org>
---
Changes since v5:
* Update patch subject
* Specify initial mode (via guess) for vreg_s1c
* Drop uart17 definition
* Rename bt_en to bt_default because configuring more than one pin
* Correct (maybe) bias configurations
* Correct cts gpio
* Split rts-tx into two nodes
* Drop incorrect link in the commit message
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 | 80 +++++++++++++++++++
1 file changed, 80 insertions(+)
Comments
On Wed, Mar 15, 2023 at 10:47:58PM -0500, Steev Klimaszewski wrote: > The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, > add this. > > Signed-off-by: Steev Klimaszewski <steev@kali.org> > --- > Changes since v5: > * Update patch subject > * Specify initial mode (via guess) for vreg_s1c > * Drop uart17 definition > * Rename bt_en to bt_default because configuring more than one pin > * Correct (maybe) bias configurations > * Correct cts gpio > * Split rts-tx into two nodes > * Drop incorrect link in the commit message > > 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 | 80 +++++++++++++++++++ > 1 file changed, 80 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 53ae75fb52ed..b3221c27903a 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,7 @@ / { > aliases { > i2c4 = &i2c4; > i2c21 = &i2c21; > + serial1 = &uart2; > }; > > wcd938x: audio-codec { > @@ -431,6 +432,16 @@ regulators-1 { > 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-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, > + <RPMH_REGULATOR_MODE_RET>; > + regulator-allow-set-load; So this does not look quite right still as you're specifying an initial mode which is not listed as allowed. Also there are no other in-tree users of RPMH_REGULATOR_MODE_RET and AUTO is used to switch mode automatically which seems odd to use with allow-set-load. This regulator is in fact also used by the wifi part of the chip and as that driver does not set any loads so we may end up with a regulator in retention mode while wifi is in use. Perhaps Bjorn can enlighten us, but my guess is that this should just be "intial-mode = AUTO" (or even HPM, but I have no idea where this came from originally). > + }; > + > vreg_l1c: ldo1 { > regulator-name = "vreg_l1c"; > regulator-min-microvolt = <1800000>; > @@ -901,6 +912,32 @@ &qup0 { > status = "okay"; > }; > > +&uart2 { > + pinctrl-0 = <&uart2_default>; > + 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_default>; > + pinctrl-names = "default"; > + }; > +}; > + > &qup1 { > status = "okay"; > }; > @@ -1175,6 +1212,21 @@ hastings_reg_en: hastings-reg-en-state { > &tlmm { > gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; > > + bt_default: bt-default-state { > + hstp-sw-ctrl-pins { > + pins = "gpio132"; > + function = "gpio"; > + bias-pull-down; > + }; > + > + hstp-bt-en-pins { > + pins = "gpio133"; > + function = "gpio"; > + drive-strength = <16>; > + bias-disable; > + }; > + }; > + > edp_reg_en: edp-reg-en-state { > pins = "gpio25"; > function = "gpio"; > @@ -1196,6 +1248,34 @@ i2c4_default: i2c4-default-state { > bias-disable; > }; > > + uart2_default: uart2-default-state { > + cts-pins { > + pins = "gpio121"; > + function = "qup2"; > + bias-pull-down; So I believe this should be 'bias-bus-hold' even if the pinctrl binding may need to be updated to suppress the corresponding dtb check warning. I'll send a patch for that. > + }; > + > + rts-pins { > + pins = "gpio122"; > + function = "qup2"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + tx-pins { nit: tx should go after rx for alphabetical sorting. > + pins = "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 16, 2023 at 11:26:12AM +0100, Johan Hovold wrote: > On Wed, Mar 15, 2023 at 10:47:58PM -0500, Steev Klimaszewski wrote: > > The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, > > add this. > > > > Signed-off-by: Steev Klimaszewski <steev@kali.org> > > --- > > + vreg_s1c: smps1 { > > + regulator-name = "vreg_s1c"; > > + regulator-min-microvolt = <1880000>; > > + regulator-max-microvolt = <1900000>; > > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > > + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, > > + <RPMH_REGULATOR_MODE_RET>; > > + regulator-allow-set-load; > > So this does not look quite right still as you're specifying an initial > mode which is not listed as allowed. > > Also there are no other in-tree users of RPMH_REGULATOR_MODE_RET and > AUTO is used to switch mode automatically which seems odd to use with > allow-set-load. > > This regulator is in fact also used by the wifi part of the chip and as > that driver does not set any loads so we may end up with a regulator in > retention mode while wifi is in use. > > Perhaps Bjorn can enlighten us, but my guess is that this should just be > "intial-mode = AUTO" (or even HPM, but I have no idea where this came > from originally). This one probably also needs to be marked as always-on as we don't currently describe the fact that the wifi part also uses s1c. Johan
Hi Johan, On Thu, Mar 16, 2023 at 6:05 AM Johan Hovold <johan@kernel.org> wrote: > > On Thu, Mar 16, 2023 at 11:26:12AM +0100, Johan Hovold wrote: > > On Wed, Mar 15, 2023 at 10:47:58PM -0500, Steev Klimaszewski wrote: > > > The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, > > > add this. > > > > > > Signed-off-by: Steev Klimaszewski <steev@kali.org> > > > --- > > > > + vreg_s1c: smps1 { > > > + regulator-name = "vreg_s1c"; > > > + regulator-min-microvolt = <1880000>; > > > + regulator-max-microvolt = <1900000>; > > > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > > > + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, > > > + <RPMH_REGULATOR_MODE_RET>; > > > + regulator-allow-set-load; > > > > So this does not look quite right still as you're specifying an initial > > mode which is not listed as allowed. > > > > Also there are no other in-tree users of RPMH_REGULATOR_MODE_RET and > > AUTO is used to switch mode automatically which seems odd to use with > > allow-set-load. > > > > This regulator is in fact also used by the wifi part of the chip and as > > that driver does not set any loads so we may end up with a regulator in > > retention mode while wifi is in use. > > > > Perhaps Bjorn can enlighten us, but my guess is that this should just be > > "intial-mode = AUTO" (or even HPM, but I have no idea where this came > > from originally). > > This one probably also needs to be marked as always-on as we don't > currently describe the fact that the wifi part also uses s1c. > > Johan I couldn't remember exactly why I chose HPM, and so I recreated what I'd done. I looked to see what modes were available by git grepping the kernel sources and since they are in include/dt-bindings/regulator/qcom,rpmh-regulator.h with a comment explaining what each mode is, I picked HPM since it starts it at the full rated current. As to why I chose the others... it was based on SMPS being mentioned in that comment block. Since I wasn't sure what PFM is (and admittedly, did not look it up) I skipped it. And you are right, we probably don't want to yank that regulator out from under the wifi... will add that in v7, so I guess for v7 we want HPM, LPM, AUTO with AUTO being initial. I guess I was trying to think that RET would allow as little power usage as possible when bluetooth isn't in use. --steev
On Thu, Mar 16, 2023 at 02:17:38PM -0500, Steev Klimaszewski wrote: > On Thu, Mar 16, 2023 at 6:05 AM Johan Hovold <johan@kernel.org> wrote: > > On Thu, Mar 16, 2023 at 11:26:12AM +0100, Johan Hovold wrote: > > > On Wed, Mar 15, 2023 at 10:47:58PM -0500, Steev Klimaszewski wrote: > > > > + vreg_s1c: smps1 { > > > > + regulator-name = "vreg_s1c"; > > > > + regulator-min-microvolt = <1880000>; > > > > + regulator-max-microvolt = <1900000>; > > > > + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > > > > + regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO>, > > > > + <RPMH_REGULATOR_MODE_RET>; > > > > + regulator-allow-set-load; > > > > > > So this does not look quite right still as you're specifying an initial > > > mode which is not listed as allowed. > > > > > > Also there are no other in-tree users of RPMH_REGULATOR_MODE_RET and > > > AUTO is used to switch mode automatically which seems odd to use with > > > allow-set-load. > > > > > > This regulator is in fact also used by the wifi part of the chip and as > > > that driver does not set any loads so we may end up with a regulator in > > > retention mode while wifi is in use. > > > > > > Perhaps Bjorn can enlighten us, but my guess is that this should just be > > > "intial-mode = AUTO" (or even HPM, but I have no idea where this came > > > from originally). > > > > This one probably also needs to be marked as always-on as we don't > > currently describe the fact that the wifi part also uses s1c. > I couldn't remember exactly why I chose HPM, and so I recreated what > I'd done. I looked to see what modes were available by git grepping > the kernel sources and since they are in > include/dt-bindings/regulator/qcom,rpmh-regulator.h with a comment > explaining what each mode is, I picked HPM since it starts it at the > full rated current. As to why I chose the others... it was based on > SMPS being mentioned in that comment block. Since I wasn't sure what > PFM is (and admittedly, did not look it up) I skipped it. > > And you are right, we probably don't want to yank that regulator out > from under the wifi... will add that in v7, so I guess for v7 we want > HPM, LPM, AUTO with AUTO being initial. I guess I was trying to think > that RET would allow as little power usage as possible when bluetooth > isn't in use. No, I think you need to stick with HPM and disallow setting the load since doing so could impact other consumers that are not yet described. 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 53ae75fb52ed..b3221c27903a 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,7 @@ / { aliases { i2c4 = &i2c4; i2c21 = &i2c21; + serial1 = &uart2; }; wcd938x: audio-codec { @@ -431,6 +432,16 @@ regulators-1 { 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-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + 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>; @@ -901,6 +912,32 @@ &qup0 { status = "okay"; }; +&uart2 { + pinctrl-0 = <&uart2_default>; + 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_default>; + pinctrl-names = "default"; + }; +}; + &qup1 { status = "okay"; }; @@ -1175,6 +1212,21 @@ hastings_reg_en: hastings-reg-en-state { &tlmm { gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; + bt_default: bt-default-state { + hstp-sw-ctrl-pins { + pins = "gpio132"; + function = "gpio"; + bias-pull-down; + }; + + hstp-bt-en-pins { + pins = "gpio133"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + }; + }; + edp_reg_en: edp-reg-en-state { pins = "gpio25"; function = "gpio"; @@ -1196,6 +1248,34 @@ i2c4_default: i2c4-default-state { bias-disable; }; + uart2_default: uart2-default-state { + cts-pins { + pins = "gpio121"; + function = "qup2"; + bias-pull-down; + }; + + rts-pins { + pins = "gpio122"; + function = "qup2"; + drive-strength = <2>; + bias-disable; + }; + + tx-pins { + pins = "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";