From ff66dce0104c85e898161bf625cac3b17d37f229 Mon Sep 17 00:00:00 2001 From: Xiaoning Ma Date: Fri, 26 Feb 2021 16:48:25 +0800 Subject: [PATCH] ARM: dts: msm: enable bluetooth for direwolf vm Add bluetooth node and related resources. Change-Id: Ib199668f780b92f03e2db59f8471b2a48d88dfeb --- qcom/direwolf-cnss.dtsi | 50 ++++++++++++++++++++++++++++++++++++++ qcom/direwolf-pinctrl.dtsi | 39 +++++++++++++++++++++++++++++ qcom/direwolf-vm.dtsi | 19 ++++++++++++--- 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 qcom/direwolf-cnss.dtsi diff --git a/qcom/direwolf-cnss.dtsi b/qcom/direwolf-cnss.dtsi new file mode 100644 index 000000000000..a18956ca1b21 --- /dev/null +++ b/qcom/direwolf-cnss.dtsi @@ -0,0 +1,50 @@ + +&soc { + /* PWR_CTR2_VDD_1P8 supply */ + vreg_conn_1p8: vreg_conn_1p8 { + compatible = "regulator-fixed"; + regulator-name = "vreg_conn_1p8"; + pinctrl-names = "default"; + pinctrl-0 = <&conn_power_1p8_active>; + startup-delay-us = <4000>; + enable-active-high; + gpio = <&tlmm 128 0>; + }; + + /* PWR_CTR1_VDD_PA supply */ + vreg_conn_pa: vreg_conn_pa { + compatible = "regulator-fixed"; + regulator-name = "vreg_conn_pa"; + pinctrl-names = "default"; + pinctrl-0 = <&conn_power_pa_active>; + startup-delay-us = <4000>; + enable-active-high; + gpio = <&tlmm 129 0>; + }; + + bluetooth: bt-qca-auto-converged { + compatible = "qcom,qca-auto-converged"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_en_active>; + /* BT_EN */ + qcom,bt-reset-gpio = <&tlmm 126 0>; + /* PWR_CTR1_VDD_PA */ + qcom,bt-vdd-ctrl1-supply = <&vreg_conn_pa>; + /* PWR_CTR2_VDD_1P8 */ + qcom,bt-vdd-ctrl2-supply = <&vreg_conn_1p8>; + qcom,bt-vdd-aon-supply = <&pm8540_e0_s4>; + qcom,bt-vdd-rfa1-supply = <&pm8540_g0_l6>; + qcom,bt-vdd-rfa2-supply = <&pm8540_a0_l15>; + + /* */ + qcom,bt-vdd-aon-config = <1055000 1055000 0 0>; + /* No vol setting for bypass LDOs */ + qcom,bt-vdd-rfa1-config = <0 0 0 0>; + qcom,bt-vdd-rfa2-config = <0 0 0 0>; + }; +}; + +&qupv3_se2_4uart { + status = "ok"; +}; + diff --git a/qcom/direwolf-pinctrl.dtsi b/qcom/direwolf-pinctrl.dtsi index 742c12f51810..f4edf88c5890 100644 --- a/qcom/direwolf-pinctrl.dtsi +++ b/qcom/direwolf-pinctrl.dtsi @@ -1847,4 +1847,43 @@ }; }; }; + + bt_en_active: bt_en_active { + mux { + pins = "gpio126"; + function = "gpio"; + }; + + config { + pins = "gpio126"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + conn_power_1p8_active: conn_power_1p8_active { + mux { + pins = "gpio128"; + function = "gpio"; + }; + + config { + pins = "gpio128"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + conn_power_pa_active: conn_power_pa_active { + mux { + pins = "gpio129"; + function = "gpio"; + }; + + config { + pins = "gpio129"; + drive-strength = <2>; + bias-pull-up; + }; + }; }; diff --git a/qcom/direwolf-vm.dtsi b/qcom/direwolf-vm.dtsi index ee8eb40d0532..25f982d519fc 100644 --- a/qcom/direwolf-vm.dtsi +++ b/qcom/direwolf-vm.dtsi @@ -305,12 +305,22 @@ regulator-max-microvolt = <1260000>; }; + S4E0: pm8540_e0_s4: regulator-pm8540_e0-s4 { + regulator-name = "smpe4"; + regulator-min-microvolt = <320000>; + regulator-max-microvolt = <2040000>; + }; + L5A0: pm8540_a0_l5: regulator-pm8540_a0-l5 { regulator-name = "ldoa5"; regulator-min-microvolt = <720000>; regulator-max-microvolt = <950000>; }; + L6G0: pm8540_g0_l6: regulator-pm8540_g0-l6 { + regulator-name = "ldog6"; + }; + L7A0: pm8540_a0_l7: regulator-pm8540_a0-l7 { regulator-name = "ldoa7"; regulator-min-microvolt = <1620000>; @@ -346,6 +356,10 @@ regulator-min-microvolt = <2970000>; regulator-max-microvolt = <3544000>; }; + + L15A0: pm8540_a0_l15: regulator-pm8540_a0-l15 { + regulator-name = "ldoa15"; + }; }; &firmware { @@ -359,6 +373,7 @@ #include "pm8540-vm.dtsi" #include "direwolf-vm-audio.dtsi" #include "direwolf-vm-usb.dtsi" +#include "direwolf-cnss.dtsi" &qupv3_0 { /delete-property/ qcom,msm-bus,num-paths; @@ -374,7 +389,3 @@ /delete-property/ qcom,msm-bus,num-paths; /delete-property/ qcom,msm-bus,vectors-bus-ids; }; - -&qupv3_se2_4uart { - status = "ok"; -};