Skip to contentSkip to conversation

arm64: dts: qcom: shikra: Add RF_CLK2 clock to wcn3988-pmu nodes

PATCH In review Cheng Jiang 3 participants 5 messages Oct 20 – Oct 21

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: qcom: shikra: Add RF_CLK2 clock to wcn3988-pmu nodes

The WCN3988 on the Shikra SoMs takes its reference clock from the RPM RF_CLK2 clock. It is not described in the device tree, so pwrseq-qcom-wcn finds no clock to enable and RF_CLK2 stays off, leaving Bluetooth unable to come up.

Describe the clock on the wcn3988-pmu nodes in both SoM dtsi files so pwrseq-qcom-wcn enables it as part of the WCN3988 power-on sequence.

---
 arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi | 2 ++
 arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi | 2 ++
 2 files changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi +2 -0
index b2747c765755..d442a19d7557 100644
@@ -3,6 +3,7 @@
  * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
+#include <dt-bindings/clock/qcom,rpmcc.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -157,6 +158,7 @@ wcn3988-pmu {
 		pinctrl-names = "default";
 
 		swctrl-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>;
+		clocks = <&rpmcc RPM_SMD_RF_CLK2>;
 
 		vddio-supply = <&pm4125_l7>;
 		vddxo-supply = <&pm4125_l13>;
arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi +2 -0
index 093032527eb2..48729fd44186 100644
@@ -3,6 +3,7 @@
  * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
+#include <dt-bindings/clock/qcom,rpmcc.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
@@ -85,6 +86,7 @@ wcn3988-pmu {
 		pinctrl-names = "default";
 
 		swctrl-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>;
+		clocks = <&rpmcc RPM_SMD_RF_CLK2>;
 
 		vddio-supply = <&pm8150_s4>;
 		vddxo-supply = <&pm8150_l12>;
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Cheng Jiang

The WCN3988 on the Shikra SoMs takes its reference clock from the RPM RF_CLK2 clock. It is not described in the device tree, so pwrseq-qcom-wcn finds no clock to enable and RF_CLK2 stays off, leaving Bluetooth unable to come up.

Describe the clock on the wcn3988-pmu nodes in both SoM dtsi files so pwrseq-qcom-wcn enables it as part of the WCN3988 power-on sequence.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Cheng Jiang
Quoted 10 lines · Cheng Jiang

The WCN3988 on the Shikra SoMs takes its reference clock from the RPM RF_CLK2 clock. It is not described in the device tree, so pwrseq-qcom-wcn finds no clock to enable and RF_CLK2 stays off, leaving Bluetooth unable to come up.

Describe the clock on the wcn3988-pmu nodes in both SoM dtsi files so pwrseq-qcom-wcn enables it as part of the WCN3988 power-on sequence.

---

Konrad

#3 lore raw

Hi Bjorn, Abel, Konrad,

Please drop this patch.

I re-tested on Shikra EVK with and without the RF_CLK2 clock described on the wcn3988-pmu nodes, and Bluetooth comes up in both cases. The commit message claim that Bluetooth fails to come up without the clock does not hold, so the patch is not needed for Bluetooth. Thanks to Abel and Konrad for the reviews.

Sorry for the noise.

Quoted 15 lines · Konrad Dybcio
Quoted 10 lines · Cheng Jiang

The WCN3988 on the Shikra SoMs takes its reference clock from the RPM RF_CLK2 clock. It is not described in the device tree, so pwrseq-qcom-wcn finds no clock to enable and RF_CLK2 stays off, leaving Bluetooth unable to come up.

Describe the clock on the wcn3988-pmu nodes in both SoM dtsi files so pwrseq-qcom-wcn enables it as part of the WCN3988 power-on sequence.

---

Konrad

#4 lore raw
Quoted 9 lines · Cheng Jiang

Hi Bjorn, Abel, Konrad,

Please drop this patch.

I re-tested on Shikra EVK with and without the RF_CLK2 clock described on the wcn3988-pmu nodes, and Bluetooth comes up in both cases. The commit message claim that Bluetooth fails to come up without the clock does not hold, so the patch is not needed for Bluetooth. Thanks to Abel and Konrad for the reviews.

It may be that you're lucky on the timing (or that clk-smd-rpm keeps all clocks online). Please verify the schematic / clock map. If that clock signal is connected to WCN, please go ahead with this patch.

Konrad