devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node
@ 2024-09-29 11:29 Jianhua Lu
  2024-09-29 11:29 ` [PATCH 2/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node Jianhua Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jianhua Lu @ 2024-09-29 11:29 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Jianhua Lu

Add qca6390-pmu node, which is used to manage power supply sequence for wifi and
bluetooth on sm8250 soc based devices.

Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
 .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 3596dd328c31..ebea283f56ea 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -97,6 +97,67 @@ key-vol-up {
 		};
 	};
 
+	qca6390-pmu {
+		compatible = "qcom,qca6390-pmu";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_en_state>, <&wlan_en_state>;
+
+		vddaon-supply = <&vreg_s6a_0p95>;
+		vddpmu-supply = <&vreg_s6a_0p95>;
+		vddrfa0p95-supply = <&vreg_s6a_0p95>;
+		vddrfa1p3-supply = <&vreg_s8c_1p35>;
+		vddrfa1p9-supply = <&vreg_s5a_1p9>;
+		vddpcie1p3-supply = <&vreg_s8c_1p35>;
+		vddpcie1p9-supply = <&vreg_s5a_1p9>;
+		vddio-supply = <&vreg_s4a_1p8>;
+
+		wlan-enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+		bt-enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+
+		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_1p7: ldo7 {
+				regulator-name = "vreg_pmu_rfa_1p7";
+			};
+
+			vreg_pmu_pcie_0p9: ldo8 {
+				regulator-name = "vreg_pmu_pcie_0p9";
+			};
+
+			vreg_pmu_pcie_1p8: ldo9 {
+				regulator-name = "vreg_pmu_pcie_1p8";
+			};
+		};
+	};
+
 	vph_pwr: vph-pwr-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vph_pwr";
@@ -701,6 +762,22 @@ &slpi {
 
 &tlmm {
 	gpio-reserved-ranges = <40 4>;
+
+	bt_en_state: bt-default-state {
+		pins = "gpio21";
+		function = "gpio";
+		drive-strength = <16>;
+		output-low;
+		bias-pull-up;
+	};
+
+	wlan_en_state: wlan-default-state {
+		pins = "gpio20";
+		function = "gpio";
+		drive-strength = <16>;
+		output-low;
+		bias-pull-up;
+	};
 };
 
 &usb_1 {
-- 
2.46.0


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

* [PATCH 2/3]  arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node
  2024-09-29 11:29 [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Jianhua Lu
@ 2024-09-29 11:29 ` Jianhua Lu
  2024-10-06 21:02   ` Dmitry Baryshkov
  2024-09-29 11:29 ` [PATCH 3/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node Jianhua Lu
  2024-10-06 21:00 ` [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Dmitry Baryshkov
  2 siblings, 1 reply; 8+ messages in thread
From: Jianhua Lu @ 2024-09-29 11:29 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Jianhua Lu

Add wifi node and this wifi module is connected to pice port.

Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
 .../dts/qcom/sm8250-xiaomi-elish-common.dtsi    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index ebea283f56ea..05a71462325c 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -680,6 +680,23 @@ &pcie0_phy {
 	status = "okay";
 };
 
+&pcieport0 {
+	wifi@0 {
+		compatible = "pci17cb,1101";
+		reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p7-supply = <&vreg_pmu_rfa_1p7>;
+		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
+		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
+	};
+};
+
 &pm8150_gpios {
 	vol_up_n: vol-up-n-state {
 		pins = "gpio6";
-- 
2.46.0


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

* [PATCH 3/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node
  2024-09-29 11:29 [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Jianhua Lu
  2024-09-29 11:29 ` [PATCH 2/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node Jianhua Lu
@ 2024-09-29 11:29 ` Jianhua Lu
  2024-10-06 21:01   ` Dmitry Baryshkov
  2024-10-06 21:00 ` [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Dmitry Baryshkov
  2 siblings, 1 reply; 8+ messages in thread
From: Jianhua Lu @ 2024-09-29 11:29 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Jianhua Lu

Add bluetooth node and this bluetooth module is connected to uart.

Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
 .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 05a71462325c..58e0614cc803 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -30,6 +30,10 @@ / {
 	qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
 	qcom,board-id = <0x10008 0>;
 
+	aliases {
+		serial0 = &uart6;
+	};
+
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -797,6 +801,21 @@ wlan_en_state: wlan-default-state {
 	};
 };
 
+&uart6 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,qca6390-bt";
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p7-supply = <&vreg_pmu_rfa_1p7>;
+	};
+};
+
 &usb_1 {
 	/* USB 2.0 only */
 	qcom,select-utmi-as-pipe-clk;
-- 
2.46.0


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

* Re: [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node
  2024-09-29 11:29 [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Jianhua Lu
  2024-09-29 11:29 ` [PATCH 2/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node Jianhua Lu
  2024-09-29 11:29 ` [PATCH 3/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node Jianhua Lu
@ 2024-10-06 21:00 ` Dmitry Baryshkov
  2 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-10-06 21:00 UTC (permalink / raw)
  To: Jianhua Lu
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Sun, Sep 29, 2024 at 07:29:06PM GMT, Jianhua Lu wrote:
> Add qca6390-pmu node, which is used to manage power supply sequence for wifi and
> bluetooth on sm8250 soc based devices.
> 
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
>  .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 77 +++++++++++++++++++
>  1 file changed, 77 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry

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

* Re: [PATCH 3/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node
  2024-09-29 11:29 ` [PATCH 3/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node Jianhua Lu
@ 2024-10-06 21:01   ` Dmitry Baryshkov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-10-06 21:01 UTC (permalink / raw)
  To: Jianhua Lu
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Sun, Sep 29, 2024 at 07:29:08PM GMT, Jianhua Lu wrote:
> Add bluetooth node and this bluetooth module is connected to uart.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> 
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
>  .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
-- 
With best wishes
Dmitry

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

* Re: [PATCH 2/3]  arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node
  2024-09-29 11:29 ` [PATCH 2/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node Jianhua Lu
@ 2024-10-06 21:02   ` Dmitry Baryshkov
  2024-10-07  2:57     ` Jianhua Lu
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-10-06 21:02 UTC (permalink / raw)
  To: Jianhua Lu
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Sun, Sep 29, 2024 at 07:29:07PM GMT, Jianhua Lu wrote:
> Add wifi node and this wifi module is connected to pice port.

Could you please add ath11k probe messages to the log? We might need to
add an additional node with the calibration variant.

> 
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
>  .../dts/qcom/sm8250-xiaomi-elish-common.dtsi    | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> index ebea283f56ea..05a71462325c 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
> @@ -680,6 +680,23 @@ &pcie0_phy {
>  	status = "okay";
>  };
>  
> +&pcieport0 {
> +	wifi@0 {
> +		compatible = "pci17cb,1101";
> +		reg = <0x10000 0x0 0x0 0x0 0x0>;
> +
> +		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
> +		vddaon-supply = <&vreg_pmu_aon_0p59>;
> +		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
> +		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
> +		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
> +		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
> +		vddrfa1p7-supply = <&vreg_pmu_rfa_1p7>;
> +		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
> +		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
> +	};
> +};
> +
>  &pm8150_gpios {
>  	vol_up_n: vol-up-n-state {
>  		pins = "gpio6";
> -- 
> 2.46.0
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH 2/3]  arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node
  2024-10-06 21:02   ` Dmitry Baryshkov
@ 2024-10-07  2:57     ` Jianhua Lu
  2024-10-07  4:55       ` Dmitry Baryshkov
  0 siblings, 1 reply; 8+ messages in thread
From: Jianhua Lu @ 2024-10-07  2:57 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Mon, Oct 07, 2024 at 12:02:34AM +0300, Dmitry Baryshkov wrote:
> On Sun, Sep 29, 2024 at 07:29:07PM GMT, Jianhua Lu wrote:
> > Add wifi node and this wifi module is connected to pice port.
> 
> Could you please add ath11k probe messages to the log? We might need to
> add an additional node with the calibration variant.
> 
Hi, Dmitry. Do you mean that I should add ath11k probe message to the commit message?
The following is ath11k probe message:
[   10.285469] ath11k_pci 0000:01:00.0: Adding to iommu group 12
[   10.285637] ath11k_pci 0000:01:00.0: BAR 0 [mem 0x60400000-0x604fffff 64bit]: assigned
[   10.285699] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[   10.286003] ath11k_pci 0000:01:00.0: MSI vectors: 32
[   10.286023] ath11k_pci 0000:01:00.0: qca6390 hw2.0
[   10.652407] ath11k_pci 0000:01:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
[   10.652429] ath11k_pci 0000:01:00.0: fw_version 0x10121492 fw_build_timestamp 2021-11-04 11:23 fw_build_id

I'm not sure if it's necessary to add calibration variant because wifi
works normally on this board without adding calibration variant.

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

* Re: [PATCH 2/3]  arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node
  2024-10-07  2:57     ` Jianhua Lu
@ 2024-10-07  4:55       ` Dmitry Baryshkov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2024-10-07  4:55 UTC (permalink / raw)
  To: Jianhua Lu, Kalle Valo, Jeff Johnson
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel, ath11k

On Mon, Oct 07, 2024 at 10:57:17AM GMT, Jianhua Lu wrote:
> On Mon, Oct 07, 2024 at 12:02:34AM +0300, Dmitry Baryshkov wrote:
> > On Sun, Sep 29, 2024 at 07:29:07PM GMT, Jianhua Lu wrote:
> > > Add wifi node and this wifi module is connected to pice port.
> > 
> > Could you please add ath11k probe messages to the log? We might need to
> > add an additional node with the calibration variant.
> > 
> Hi, Dmitry. Do you mean that I should add ath11k probe message to the commit message?
> The following is ath11k probe message:
> [   10.285469] ath11k_pci 0000:01:00.0: Adding to iommu group 12
> [   10.285637] ath11k_pci 0000:01:00.0: BAR 0 [mem 0x60400000-0x604fffff 64bit]: assigned
> [   10.285699] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002)
> [   10.286003] ath11k_pci 0000:01:00.0: MSI vectors: 32
> [   10.286023] ath11k_pci 0000:01:00.0: qca6390 hw2.0
> [   10.652407] ath11k_pci 0000:01:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
> [   10.652429] ath11k_pci 0000:01:00.0: fw_version 0x10121492 fw_build_timestamp 2021-11-04 11:23 fw_build_id
> 
> I'm not sure if it's necessary to add calibration variant because wifi
> works normally on this board without adding calibration variant.

Added ath11k ML and corresponding maintainers to cc. Please cc them in
future revisions of this patchset. If you were to send the next
iteration of the series, please include the quoted log into the commit
message.

The board_id 0xff most likely requires calibration variant. Please
consider adding one and submitting board.elf following the process
specified at [1].

[1] https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles

-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2024-10-07  4:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 11:29 [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Jianhua Lu
2024-09-29 11:29 ` [PATCH 2/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add wifi node Jianhua Lu
2024-10-06 21:02   ` Dmitry Baryshkov
2024-10-07  2:57     ` Jianhua Lu
2024-10-07  4:55       ` Dmitry Baryshkov
2024-09-29 11:29 ` [PATCH 3/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add bluetooth node Jianhua Lu
2024-10-06 21:01   ` Dmitry Baryshkov
2024-10-06 21:00 ` [PATCH 1/3] arm64: dts: qcom: sm8250-xiaomi-elish: Add qca6390-pmu node Dmitry Baryshkov

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).