From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Abel Vesa <abel.vesa@linaro.org>, Alex Elder <elder@linaro.org>,
Srini Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [RFC] arm64: dts: qcom: qrb5165-rb5: model the PMU of the QCA6391
Date: Mon, 22 Jan 2024 19:21:58 +0100 [thread overview]
Message-ID: <20240122182158.69183-1-brgl@bgdev.pl> (raw)
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
I'm limiting the audience of this compared to the PCI power sequencing
series as I wanted to run the DT part by the maintainers before I commit
to a doomed effort.
Here is the DT representation of the QCA6390's PMU with its inputs and
outputs. If I were to implement the pwrseq framework that would be able
to assign the relevant pwrseq data to the consumer based on the actual
regulators and not abstract bt-pwrseq or wlan-pwrseq properties - would
that fly with you?
We'd need to deprecate the existing BT bindings but unfortunately they
are already described as consuming the host PMIC regulators in bindings.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 129 +++++++++++++++++++++--
arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 ++
2 files changed, 128 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index cd0db4f31d4a..c9b1600c57ef 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -108,6 +108,88 @@ lt9611_3v3: lt9611-3v3 {
regulator-always-on;
};
+ qca6390_pmu: pmu@0 {
+ compatible = "qcom,qca6390-pmu";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_en_state>, <&wlan_en_state>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s2f_0p95>;
+ vddrfa1-supply = <&vreg_s2f_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p3>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p3>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+
+ bt-enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+ wifi-enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+ swctrl-gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>;
+
+ regulators {
+ vreg_pmu_rfa_cmn: ldo0 {
+ regulator-name = "vreg_pmu_rfa_cmn";
+ regulator-min-microvolt = <760000>;
+ regulator-max-microvolt = <840000>;
+ };
+
+ vreg_pmu_aon_0p59: ldo1 {
+ regulator-name = "vreg_pmu_aon_0p59";
+ regulator-min-microvolt = <540000>;
+ regulator-max-microvolt = <840000>;
+ };
+
+ vreg_pmu_wlcx_0p8: ldo2 {
+ regulator_name = "vreg_pmu_wlcx_0p8";
+ regulator-min-microvolt = <760000>;
+ regulator-max-microvolt = <840000>;
+ };
+
+ vreg_pmu_wlmx_0p85: ldo3 {
+ regulator-name = "vreg_pmu_wlmx_0p85";
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <890000>;
+ };
+
+ vreg_pmu_btcmx_0p85: ldo4 {
+ regulator-name = "vreg_pmu_btcmx_0p85";
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <890000>;
+ };
+
+ vreg_pmu_rfa_0p8: ldo5 {
+ regulator-name = "vreg_pmu_rfa_0p8";
+ regulator-min-microvolt = <760000>;
+ regulator-max-microvolt = <840000>;
+ };
+
+ vreg_pmu_rfa_1p2: ldo6 {
+ regulator-name = "vreg_pmu_rfa_1p2";
+ regulator-min-microvolt = <1187000>;
+ regulator-max-microvolt = <1313000>;
+ };
+
+ vreg_pmu_rfa_1p7: ldo7 {
+ regulator_name = "vreg_pmu_rfa_1p7";
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1890000>;
+ };
+
+ vreg_pmu_pcie_0p9: ldo8 {
+ regulator_name = "vreg_pmu_pcie_0p9";
+ regulator-min-microvolt = <870000>;
+ regulator-max-microvolt = <970000>;
+ };
+
+ vreg_pmu_pcie_1p8: ldo9 {
+ regulator_name = "vreg_pmu_pcie_1p8";
+ regulator-min-microvolt = <1710000>;
+ regulator-max-microvolt = <1890000>;
+ };
+ };
+ };
+
thermal-zones {
conn-thermal {
polling-delay-passive = <0>;
@@ -734,6 +816,24 @@ &pcie0_phy {
vdda-pll-supply = <&vreg_l9a_1p2>;
};
+&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>;
+ vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>;
+ vddrfa0-supply = <&vreg_pmu_rfa_0p8>;
+ vddrfa1-supply = <&vreg_pmu_rfa_1p2>;
+ vddrfa2-supply = <&vreg_pmu_rfa_1p7>;
+ vddpcie0-supply = <&vreg_pmu_pcie_0p9>;
+ vddpcie1-supply = <&vreg_pmu_pcie_1p8>;
+ };
+};
+
&pcie1 {
status = "okay";
};
@@ -1303,6 +1403,14 @@ sdc2_card_det_n: sd-card-det-n-state {
function = "gpio";
bias-pull-up;
};
+
+ wlan_en_state: wlan-default-state {
+ pins = "gpio20";
+ function = "gpio";
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
};
&uart6 {
@@ -1311,17 +1419,16 @@ &uart6 {
bluetooth {
compatible = "qcom,qca6390-bt";
- pinctrl-names = "default";
- pinctrl-0 = <&bt_en_state>;
-
- enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
-
- vddio-supply = <&vreg_s4a_1p8>;
- vddpmu-supply = <&vreg_s2f_0p95>;
- vddaon-supply = <&vreg_s6a_0p95>;
- vddrfa0p9-supply = <&vreg_s2f_0p95>;
- vddrfa1p3-supply = <&vreg_s8c_1p3>;
- vddrfa1p9-supply = <&vreg_s5a_1p9>;
+ vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+ vddaon-supply = <&vreg_pmu_aon_0p59>;
+ vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+ vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
+ vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>;
+ vddrfa0-supply = <&vreg_pmu_rfa_0p8>;
+ vddrfa1-supply = <&vreg_pmu_rfa_1p2>;
+ vddrfa2-supply = <&vreg_pmu_rfa_1p7>;
+ vddpcie0-supply = <&vreg_pmu_pcie_0p9>;
+ vddpcie1-supply = <&vreg_pmu_pcie_1p8>;
};
};
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 760501c1301a..fef9c314ce55 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -2197,6 +2197,16 @@ pcie0: pcie@1c00000 {
dma-coherent;
status = "disabled";
+
+ pcieport0: pcie@0 {
+ device_type = "pci";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ bus-range = <0x01 0xff>;
+ };
};
pcie0_phy: phy@1c06000 {
--
2.40.1
next reply other threads:[~2024-01-22 18:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 18:21 Bartosz Golaszewski [this message]
2024-01-23 4:46 ` [RFC] arm64: dts: qcom: qrb5165-rb5: model the PMU of the QCA6391 Bjorn Andersson
2024-01-23 9:22 ` Bartosz Golaszewski
2024-01-23 15:34 ` Bjorn Andersson
2024-01-23 15:44 ` Krzysztof Kozlowski
2024-01-23 15:49 ` neil.armstrong
2024-01-24 9:06 ` Bartosz Golaszewski
2024-01-24 9:17 ` Bartosz Golaszewski
2024-01-23 5:54 ` Dmitry Baryshkov
2024-01-23 9:28 ` Bartosz Golaszewski
2024-01-23 8:30 ` Krzysztof Kozlowski
2024-01-23 10:04 ` Bartosz Golaszewski
2024-01-23 15:09 ` Krzysztof Kozlowski
2024-01-23 15:14 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240122182158.69183-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=elder@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.