Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,23 @@
vin-supply = <&vreg_wcn_3p3>;
};

vreg_wcn_bt_en: regulator-wcn-bt-en {
compatible = "regulator-fixed";

regulator-name = "VREG_WCN_BT_EN";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;

gpio = <&tlmm 116 GPIO_ACTIVE_HIGH>;
enable-active-high;

pinctrl-0 = <&wcn_bt_en>;
pinctrl-names = "default";

regulator-always-on;
regulator-boot-on;
};

vreg_wcn_3p3: regulator-wcn-3p3 {
compatible = "regulator-fixed";

Expand Down Expand Up @@ -620,10 +637,9 @@
vddrfa1p2-supply = <&vreg_wcn_1p9>;
vddrfa1p8-supply = <&vreg_wcn_1p9>;

bt-enable-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>;
wlan-enable-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;

pinctrl-0 = <&wcn_bt_en>, <&wcn_wlan_en>;
pinctrl-0 = <&wcn_wlan_en>;
pinctrl-names = "default";

regulators {
Expand Down Expand Up @@ -1360,13 +1376,13 @@
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>;
vddrfacmn-supply = <&vreg_wcn_3p3>;
vddaon-supply = <&vreg_wcn_3p3>;
vddwlcx-supply = <&vreg_wcn_3p3>;
vddwlmx-supply = <&vreg_wcn_3p3>;
vddrfa0p8-supply = <&vreg_wcn_3p3>;
vddrfa1p2-supply = <&vreg_wcn_3p3>;
vddrfa1p8-supply = <&vreg_wcn_3p3>;
};
};

Expand Down
3 changes: 2 additions & 1 deletion drivers/bluetooth/hci_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)

if (!qcadev->bt_en &&
(data->soc_type == QCA_WCN6750 ||
data->soc_type == QCA_WCN6855))
data->soc_type == QCA_WCN6855 ||
data->soc_type == QCA_WCN7850))
power_ctrl_enabled = false;

qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
Expand Down
14 changes: 14 additions & 0 deletions drivers/power/sequencing/pwrseq-qcom-wcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,20 @@ static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq,
reg_node->parent->parent != ctx->of_node)
return PWRSEQ_NO_MATCH;

/*
* If this is a Bluetooth consumer device but the bt-enable GPIO is not
* configured in the power sequencer (e.g. BT_EN is tied high via a
* hardware pull-up and therefore absent from the DT), don't match.
* The consumer driver will fall back to its legacy power control path
* and correctly set power_ctrl_enabled to false.
*
* BT device nodes are conventionally named "bluetooth" in the DT,
* so use of_node_name_eq() as a generic check rather than enumerating
* specific compatible strings.
*/
if (!ctx->bt_gpio && of_node_name_eq(dev_node, "bluetooth"))
return PWRSEQ_NO_MATCH;

return PWRSEQ_MATCH_OK;
}

Expand Down