arm64: dts: qcom: sc8280xp-x13s: model the PMU of the on-board wcn6855
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 18 Oct 2024 12:49:15 +0000 (14:49 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 29 Oct 2024 20:12:27 +0000 (15:12 -0500)
Add a node for the PMU of the WCN6855 and rework the inputs of the wifi
and bluetooth nodes to consume the PMU's outputs.

With this we can drop the regulator-always-on properties from vreg_s11b
and vreg_s12b as they will now be enabled by the power sequencing
driver.

Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241018-sc8280xp-pwrseq-v6-5-8da8310d9564@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts

index 83208b10f994b282ed50c3ba8a82298b6fc50deb..2cd34a1b57d013b636936113d6e6601f004bd68a 100644 (file)
                        };
                };
        };
+
+       wcn6855-pmu {
+               compatible = "qcom,wcn6855-pmu";
+
+               pinctrl-0 = <&bt_default>, <&wlan_en>;
+               pinctrl-names = "default";
+
+               wlan-enable-gpios = <&tlmm 134 GPIO_ACTIVE_HIGH>;
+               bt-enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>;
+               swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>;
+
+               vddio-supply = <&vreg_s10b>;
+               vddaon-supply = <&vreg_s12b>;
+               vddpmu-supply = <&vreg_s12b>;
+               vddpmumx-supply = <&vreg_s12b>;
+               vddpmucx-supply = <&vreg_s12b>;
+               vddrfa0p95-supply = <&vreg_s12b>;
+               vddrfa1p3-supply = <&vreg_s11b>;
+               vddrfa1p9-supply = <&vreg_s1c>;
+               vddpcie1p3-supply = <&vreg_s11b>;
+               vddpcie1p9-supply = <&vreg_s1c>;
+
+               regulators {
+                       vreg_pmu_rfa_cmn_0p8: ldo0 {
+                               regulator-name = "vreg_pmu_rfa_cmn_0p8";
+                       };
+
+                       vreg_pmu_aon_0p8: ldo1 {
+                               regulator-name = "vreg_pmu_aon_0p8";
+                       };
+
+                       vreg_pmu_wlcx_0p8: ldo2 {
+                               regulator-name = "vreg_pmu_wlcx_0p8";
+                       };
+
+                       vreg_pmu_wlmx_0p8: ldo3 {
+                               regulator-name = "vreg_pmu_wlmx_0p8";
+                       };
+
+                       vreg_pmu_btcmx_0p8: ldo4 {
+                               regulator-name = "vreg_pmu_btcmx_0p8";
+                       };
+
+                       vreg_pmu_pcie_1p8: ldo5 {
+                               regulator-name = "vreg_pmu_pcie_1p8";
+                       };
+
+                       vreg_pmu_pcie_0p9: ldo6 {
+                               regulator-name = "vreg_pmu_pcie_0p9";
+                       };
+
+                       vreg_pmu_rfa_0p8: ldo7 {
+                               regulator-name = "vreg_pmu_rfa_0p8";
+                       };
+
+                       vreg_pmu_rfa_1p2: ldo8 {
+                               regulator-name = "vreg_pmu_rfa_1p2";
+                       };
+
+                       vreg_pmu_rfa_1p7: ldo9 {
+                               regulator-name = "vreg_pmu_rfa_1p7";
+                       };
+               };
+       };
 };
 
 &apps_rsc {
                        regulator-min-microvolt = <1272000>;
                        regulator-max-microvolt = <1272000>;
                        regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-                       regulator-always-on;
                };
 
                vreg_s12b: smps12 {
                        regulator-min-microvolt = <984000>;
                        regulator-max-microvolt = <984000>;
                        regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-                       regulator-always-on;
                };
 
                vreg_l1b: ldo1 {
                compatible = "pci17cb,1103";
                reg = <0x10000 0x0 0x0 0x0 0x0>;
 
+               vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
+               vddaon-supply = <&vreg_pmu_aon_0p8>;
+               vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+               vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
+               vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
+               vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
+               vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+               vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+               vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
+
                qcom,ath11k-calibration-variant = "LE_X13S";
        };
 };
        bluetooth {
                compatible = "qcom,wcn6855-bt";
 
-               vddio-supply = <&vreg_s10b>;
-               vddbtcxmx-supply = <&vreg_s12b>;
-               vddrfacmn-supply = <&vreg_s12b>;
-               vddrfa0p8-supply = <&vreg_s12b>;
-               vddrfa1p2-supply = <&vreg_s11b>;
-               vddrfa1p7-supply = <&vreg_s1c>;
+               vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
+               vddaon-supply = <&vreg_pmu_aon_0p8>;
+               vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+               vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
+               vddbtcmx-supply = <&vreg_pmu_btcmx_0p8>;
+               vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+               vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+               vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
 
                max-speed = <3200000>;
-
-               enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>;
-               swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>;
-
-               pinctrl-0 = <&bt_default>;
-               pinctrl-names = "default";
        };
 };
 
                        bias-disable;
                };
        };
+
+       wlan_en: wlan-en-state {
+               pins = "gpio134";
+               function = "gpio";
+               drive-strength = <8>;
+               bias-pull-down;
+       };
 };