devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add Bluetooth support
@ 2025-06-10 16:59 Jens Glathe via B4 Relay
  2025-06-14 19:54 ` Konrad Dybcio
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Glathe via B4 Relay @ 2025-06-10 16:59 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Anthony Ruhier,
	Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

To enable Bluetooth pwrseq appears to be required for the WCN7850.
Add the nodes from QCP.
Add uart14 for the BT interface.

Tested-by: Anthony Ruhier <aruhier@mailbox.org>
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
This patch adds the Bluetooth support for the WCN7850 card on this laptop.
Since WCN7850 is supposed to need pwrseq, also added this from the QCP.

This is also part of my tree [1] for the Yoga Slim 7X.
definition for the pwrseq and regulators.

[1] https://github.com/jglathe/linux_ms_dev_kit/blob/jg/ubuntu-qcom-x1e-6.15.0-jg-6/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts 
---
Changes in v2:
- rebased to next-20250610
- added tested-by from Anthony Ruhier
- Link to v1: https://lore.kernel.org/r/20250426-slim7x-bt-v1-1-d68f961af886@oldschoolsolutions.biz
---
 .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts  | 137 +++++++++++++++++++++
 1 file changed, 137 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index dad0f11e8e8583df6fd8aeec5be2af86739d85fb..720a514611248bb3d6d9518c2920a11631888e5d 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -18,6 +18,7 @@ / {
 
 	aliases {
 		serial0 = &uart21;
+		serial1 = &uart14;
 	};
 
 	chosen {
@@ -404,6 +405,101 @@ vph_pwr: regulator-vph-pwr {
 		regulator-always-on;
 		regulator-boot-on;
 	};
+
+	vreg_wcn_0p95: regulator-wcn-0p95 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VREG_WCN_0P95";
+		regulator-min-microvolt = <950000>;
+		regulator-max-microvolt = <950000>;
+
+		vin-supply = <&vreg_wcn_3p3>;
+	};
+
+	vreg_wcn_1p9: regulator-wcn-1p9 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VREG_WCN_1P9";
+		regulator-min-microvolt = <1900000>;
+		regulator-max-microvolt = <1900000>;
+
+		vin-supply = <&vreg_wcn_3p3>;
+	};
+
+	vreg_wcn_3p3: regulator-wcn-3p3 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VREG_WCN_3P3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&tlmm 214 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&wcn_sw_en>;
+		pinctrl-names = "default";
+
+		regulator-boot-on;
+	};
+
+	wcn7850-pmu {
+		compatible = "qcom,wcn7850-pmu";
+
+		vdd-supply = <&vreg_wcn_0p95>;
+		vddio-supply = <&vreg_l15b_1p8>;
+		vddaon-supply = <&vreg_wcn_0p95>;
+		vdddig-supply = <&vreg_wcn_0p95>;
+		vddrfa1p2-supply = <&vreg_wcn_1p9>;
+		vddrfa1p8-supply = <&vreg_wcn_1p9>;
+
+		wlan-enable-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
+		bt-enable-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-0 = <&wcn_wlan_bt_en>;
+		pinctrl-names = "default";
+
+		regulators {
+			vreg_pmu_rfa_cmn: ldo0 {
+				regulator-name = "vreg_pmu_rfa_cmn";
+			};
+
+			vreg_pmu_aon_0p59: ldo1 {
+				regulator-name = "vreg_pmu_aon_0p59";
+			};
+
+			vreg_pmu_wlcx_0p8: ldo2 {
+				regulator-name = "vreg_pmu_wlcx_0p8";
+			};
+
+			vreg_pmu_wlmx_0p85: ldo3 {
+				regulator-name = "vreg_pmu_wlmx_0p85";
+			};
+
+			vreg_pmu_btcmx_0p85: ldo4 {
+				regulator-name = "vreg_pmu_btcmx_0p85";
+			};
+
+			vreg_pmu_rfa_0p8: ldo5 {
+				regulator-name = "vreg_pmu_rfa_0p8";
+			};
+
+			vreg_pmu_rfa_1p2: ldo6 {
+				regulator-name = "vreg_pmu_rfa_1p2";
+			};
+
+			vreg_pmu_rfa_1p8: ldo7 {
+				regulator-name = "vreg_pmu_rfa_1p8";
+			};
+
+			vreg_pmu_pcie_0p9: ldo8 {
+				regulator-name = "vreg_pmu_pcie_0p9";
+			};
+
+			vreg_pmu_pcie_1p8: ldo9 {
+				regulator-name = "vreg_pmu_pcie_1p8";
+			};
+		};
+	};
 };
 
 &apps_rsc {
@@ -1045,6 +1141,16 @@ &pcie4_port0 {
 	wifi@0 {
 		compatible = "pci17cb,1107";
 		reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
+		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
+		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
 	};
 };
 
@@ -1403,6 +1509,37 @@ usb2_pwr_3p3_reg_en: usb2-pwr-3p3-reg-en-state {
 		drive-strength = <2>;
 		bias-disable;
 	};
+
+	wcn_sw_en: wcn-sw-en-state {
+		pins = "gpio214";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	wcn_wlan_bt_en: wcn-wlan-bt-en-state {
+		pins = "gpio116", "gpio117";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+};
+
+&uart14 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,wcn7850-bt";
+		max-speed = <3200000>;
+
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
+	};
 };
 
 &uart21 {

---
base-commit: b27cc623e01be9de1580eaa913508b237a7a9673
change-id: 20250426-slim7x-bt-6d01127291d1

Best regards,
-- 
Jens Glathe <jens.glathe@oldschoolsolutions.biz>



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add Bluetooth support
  2025-06-10 16:59 [PATCH v2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add Bluetooth support Jens Glathe via B4 Relay
@ 2025-06-14 19:54 ` Konrad Dybcio
  2025-06-23 12:16   ` Stephan Gerhold
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2025-06-14 19:54 UTC (permalink / raw)
  To: jens.glathe, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold
  Cc: linux-arm-msm, devicetree, linux-kernel, Anthony Ruhier

On 6/10/25 6:59 PM, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> To enable Bluetooth pwrseq appears to be required for the WCN7850.
> Add the nodes from QCP.
> Add uart14 for the BT interface.
> 
> Tested-by: Anthony Ruhier <aruhier@mailbox.org>
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---
> This patch adds the Bluetooth support for the WCN7850 card on this laptop.
> Since WCN7850 is supposed to need pwrseq, also added this from the QCP.
> 
> This is also part of my tree [1] for the Yoga Slim 7X.
> definition for the pwrseq and regulators.
> 
> [1] https://github.com/jglathe/linux_ms_dev_kit/blob/jg/ubuntu-qcom-x1e-6.15.0-jg-6/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts 
> ---
> Changes in v2:
> - rebased to next-20250610
> - added tested-by from Anthony Ruhier
> - Link to v1: https://lore.kernel.org/r/20250426-slim7x-bt-v1-1-d68f961af886@oldschoolsolutions.biz
> ---

I'm mildly confused given the multitude of options - but does this
check +Stephan's M.2 description appropriateness check?

Konrad

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add Bluetooth support
  2025-06-14 19:54 ` Konrad Dybcio
@ 2025-06-23 12:16   ` Stephan Gerhold
  2025-06-24 10:46     ` Jens Glathe
  0 siblings, 1 reply; 4+ messages in thread
From: Stephan Gerhold @ 2025-06-23 12:16 UTC (permalink / raw)
  To: Konrad Dybcio, jens.glathe
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	Anthony Ruhier, Johan Hovold

On Sat, Jun 14, 2025 at 09:54:05PM +0200, Konrad Dybcio wrote:
> On 6/10/25 6:59 PM, Jens Glathe via B4 Relay wrote:
> > From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> > 
> > To enable Bluetooth pwrseq appears to be required for the WCN7850.
> > Add the nodes from QCP.
> > Add uart14 for the BT interface.
> > 
> > Tested-by: Anthony Ruhier <aruhier@mailbox.org>
> > Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> > ---
> > This patch adds the Bluetooth support for the WCN7850 card on this laptop.
> > Since WCN7850 is supposed to need pwrseq, also added this from the QCP.
> > 
> > This is also part of my tree [1] for the Yoga Slim 7X.
> > definition for the pwrseq and regulators.
> > 
> > [1] https://github.com/jglathe/linux_ms_dev_kit/blob/jg/ubuntu-qcom-x1e-6.15.0-jg-6/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts 
> > ---
> > Changes in v2:
> > - rebased to next-20250610
> > - added tested-by from Anthony Ruhier
> > - Link to v1: https://lore.kernel.org/r/20250426-slim7x-bt-v1-1-d68f961af886@oldschoolsolutions.biz
> > ---
> 
> I'm mildly confused given the multitude of options - but does this
> check +Stephan's M.2 description appropriateness check?
> 

Well, Bjorn has already merged two instances of this description in
x1e80100-asus-vivobook-s15.dts and x1e80100-hp-omnibook-x14.dts, so it
doesn't sound fair anymore to block these kind of patches without
proposing an actually viable alternative solution.

From a quick glance at the Yoga Slim 7x mainboard, I think that WiFi/BT
is indeed a M.2 card there (like CRD/T14s, but unlike QCP). We haven't
decided on a good way to model that yet. It would be nice to have at
least my TODO comment that I added in the CRD/T14s commits so that it is
obvious that there is ideally still some rework to be done in the
future.

Jens, can you add the same TODO comment that exists in the other two
device trees mentioned above?

Thanks,
Stephan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add Bluetooth support
  2025-06-23 12:16   ` Stephan Gerhold
@ 2025-06-24 10:46     ` Jens Glathe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Glathe @ 2025-06-24 10:46 UTC (permalink / raw)
  To: Stephan Gerhold, Konrad Dybcio
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	Anthony Ruhier, Johan Hovold

Am 23.06.25 um 14:16 schrieb Stephan Gerhold:

> Well, Bjorn has already merged two instances of this description in
> x1e80100-asus-vivobook-s15.dts and x1e80100-hp-omnibook-x14.dts, so it
> doesn't sound fair anymore to block these kind of patches without
> proposing an actually viable alternative solution.
Hell yes.
> From a quick glance at the Yoga Slim 7x mainboard, I think that WiFi/BT
> is indeed a M.2 card there (like CRD/T14s, but unlike QCP). We haven't
> decided on a good way to model that yet. It would be nice to have at
> least my TODO comment that I added in the CRD/T14s commits so that it is
> obvious that there is ideally still some rework to be done in the
> future.

 From my glance onto a photo of the pcb it looked soldered on without an 
m2 slot.

I actually collected some experience with removing this card in the 
Snapdragon Dev Kit (its normal m2 slot there). Replaced it with an Intel 
I226V NIC, which works with the pmu-wcn7850 definition, but not without 
it. So... still a bit confused why that is, but probably its also the 
kind of working around pcie quirks that the pwrseq-qcom_wcn driver is doing.

> Jens, can you add the same TODO comment that exists in the other two
> device trees mentioned above?

I did that in v3. So it should be valid either way :)

with best regards

Jens



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-24 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10 16:59 [PATCH v2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: add Bluetooth support Jens Glathe via B4 Relay
2025-06-14 19:54 ` Konrad Dybcio
2025-06-23 12:16   ` Stephan Gerhold
2025-06-24 10:46     ` Jens Glathe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).