[PATCH v4 31/39] dts: msm8916: import PMIC dtsi files

2024-02-15 Thread Caleb Connolly
Import the supporting pm8916.dtsi and msm8916-pm8916.dtsi files from
upstream in preparation for switching boards over.

Taken from kernel tag v6.7

Reviewed-by: Neil Armstrong 
Signed-off-by: Caleb Connolly 
---
 arch/arm/dts/msm8916-pm8916.dtsi | 157 ++
 arch/arm/dts/pm8916.dtsi | 178 +++
 2 files changed, 335 insertions(+)

diff --git a/arch/arm/dts/msm8916-pm8916.dtsi b/arch/arm/dts/msm8916-pm8916.dtsi
new file mode 100644
index ..b1a7eafbee31
--- /dev/null
+++ b/arch/arm/dts/msm8916-pm8916.dtsi
@@ -0,0 +1,157 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * msm8916-pm8916.dtsi describes common properties (e.g. regulator connections)
+ * that apply to most devices that make use of the MSM8916 SoC and PM8916 PMIC.
+ * Many regulators have a fixed purpose in the original reference design and
+ * were rarely re-used for different purposes. Devices that deviate from the
+ * typical reference design should not make use of this include and instead add
+ * the necessary properties in the board-specific device tree.
+ */
+
+#include "msm8916.dtsi"
+#include "pm8916.dtsi"
+
+&camss {
+   vdda-supply = <&pm8916_l2>;
+};
+
+&mdss_dsi0 {
+   vdda-supply = <&pm8916_l2>;
+   vddio-supply = <&pm8916_l6>;
+};
+
+&mdss_dsi0_phy {
+   vddio-supply = <&pm8916_l6>;
+};
+
+&mpss {
+   pll-supply = <&pm8916_l7>;
+};
+
+&pm8916_codec {
+   vdd-cdc-io-supply = <&pm8916_l5>;
+   vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
+   vdd-micbias-supply = <&pm8916_l13>;
+};
+
+&sdhc_1 {
+   vmmc-supply = <&pm8916_l8>;
+   vqmmc-supply = <&pm8916_l5>;
+};
+
+&sdhc_2 {
+   vmmc-supply = <&pm8916_l11>;
+   vqmmc-supply = <&pm8916_l12>;
+};
+
+&usb_hs_phy {
+   v1p8-supply = <&pm8916_l7>;
+   v3p3-supply = <&pm8916_l13>;
+};
+
+&wcnss {
+   vddpx-supply = <&pm8916_l7>;
+};
+
+&wcnss_iris {
+   vddxo-supply = <&pm8916_l7>;
+   vddrfa-supply = <&pm8916_s3>;
+   vddpa-supply = <&pm8916_l9>;
+   vdddig-supply = <&pm8916_l5>;
+};
+
+&rpm_requests {
+   pm8916_rpm_regulators: regulators {
+   compatible = "qcom,rpm-pm8916-regulators";
+   vdd_l1_l2_l3-supply = <&pm8916_s3>;
+   vdd_l4_l5_l6-supply = <&pm8916_s4>;
+   vdd_l7-supply = <&pm8916_s4>;
+
+   /* pm8916_s1 is managed by rpmpd (MSM8916_VDDCX) */
+
+   pm8916_s3: s3 {
+   regulator-min-microvolt = <125>;
+   regulator-max-microvolt = <135>;
+   regulator-always-on; /* Needed for L2 */
+   };
+
+   pm8916_s4: s4 {
+   regulator-min-microvolt = <185>;
+   regulator-max-microvolt = <215>;
+   regulator-always-on; /* Needed for L5/L7 */
+   };
+
+   /*
+* Some of the regulators are unused or managed by another
+* processor (e.g. the modem). We should still define nodes for
+* them to ensure the vote from the application processor can be
+* dropped in case the regulators are already on during boot.
+*
+* The labels for these nodes are omitted on purpose because
+* boards should configure a proper voltage before using them.
+*/
+   l1 {};
+
+   pm8916_l2: l2 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   regulator-always-on; /* Needed for LPDDR RAM */
+   };
+
+   /* pm8916_l3 is managed by rpmpd (MSM8916_VDDMX) */
+
+   l4 {};
+
+   pm8916_l5: l5 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-always-on; /* Needed for most digital I/O */
+   };
+
+   pm8916_l6: l6 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+
+   pm8916_l7: l7 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-always-on; /* Needed for CPU PLL */
+   };
+
+   pm8916_l8: l8 {
+   regulator-min-microvolt = <290>;
+   regulator-max-microvolt = <290>;
+   };
+
+   pm8916_l9: l9 {
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   };
+
+   l10 {};
+
+   pm8916_l11: l11 {
+   regulator-min-microvolt = <295>;
+   regulator-max-micro

Re: [PATCH v4 31/39] dts: msm8916: import PMIC dtsi files

2024-02-20 Thread Sumit Garg
On Fri, 16 Feb 2024 at 02:22, Caleb Connolly  wrote:
>
> Import the supporting pm8916.dtsi and msm8916-pm8916.dtsi files from
> upstream in preparation for switching boards over.
>
> Taken from kernel tag v6.7
>
> Reviewed-by: Neil Armstrong 
> Signed-off-by: Caleb Connolly 
> ---
>  arch/arm/dts/msm8916-pm8916.dtsi | 157 ++
>  arch/arm/dts/pm8916.dtsi | 178 
> +++
>  2 files changed, 335 insertions(+)
>

Reviewed-by: Sumit Garg 


-Sumit

> diff --git a/arch/arm/dts/msm8916-pm8916.dtsi 
> b/arch/arm/dts/msm8916-pm8916.dtsi
> new file mode 100644
> index ..b1a7eafbee31
> --- /dev/null
> +++ b/arch/arm/dts/msm8916-pm8916.dtsi
> @@ -0,0 +1,157 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * msm8916-pm8916.dtsi describes common properties (e.g. regulator 
> connections)
> + * that apply to most devices that make use of the MSM8916 SoC and PM8916 
> PMIC.
> + * Many regulators have a fixed purpose in the original reference design and
> + * were rarely re-used for different purposes. Devices that deviate from the
> + * typical reference design should not make use of this include and instead 
> add
> + * the necessary properties in the board-specific device tree.
> + */
> +
> +#include "msm8916.dtsi"
> +#include "pm8916.dtsi"
> +
> +&camss {
> +   vdda-supply = <&pm8916_l2>;
> +};
> +
> +&mdss_dsi0 {
> +   vdda-supply = <&pm8916_l2>;
> +   vddio-supply = <&pm8916_l6>;
> +};
> +
> +&mdss_dsi0_phy {
> +   vddio-supply = <&pm8916_l6>;
> +};
> +
> +&mpss {
> +   pll-supply = <&pm8916_l7>;
> +};
> +
> +&pm8916_codec {
> +   vdd-cdc-io-supply = <&pm8916_l5>;
> +   vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
> +   vdd-micbias-supply = <&pm8916_l13>;
> +};
> +
> +&sdhc_1 {
> +   vmmc-supply = <&pm8916_l8>;
> +   vqmmc-supply = <&pm8916_l5>;
> +};
> +
> +&sdhc_2 {
> +   vmmc-supply = <&pm8916_l11>;
> +   vqmmc-supply = <&pm8916_l12>;
> +};
> +
> +&usb_hs_phy {
> +   v1p8-supply = <&pm8916_l7>;
> +   v3p3-supply = <&pm8916_l13>;
> +};
> +
> +&wcnss {
> +   vddpx-supply = <&pm8916_l7>;
> +};
> +
> +&wcnss_iris {
> +   vddxo-supply = <&pm8916_l7>;
> +   vddrfa-supply = <&pm8916_s3>;
> +   vddpa-supply = <&pm8916_l9>;
> +   vdddig-supply = <&pm8916_l5>;
> +};
> +
> +&rpm_requests {
> +   pm8916_rpm_regulators: regulators {
> +   compatible = "qcom,rpm-pm8916-regulators";
> +   vdd_l1_l2_l3-supply = <&pm8916_s3>;
> +   vdd_l4_l5_l6-supply = <&pm8916_s4>;
> +   vdd_l7-supply = <&pm8916_s4>;
> +
> +   /* pm8916_s1 is managed by rpmpd (MSM8916_VDDCX) */
> +
> +   pm8916_s3: s3 {
> +   regulator-min-microvolt = <125>;
> +   regulator-max-microvolt = <135>;
> +   regulator-always-on; /* Needed for L2 */
> +   };
> +
> +   pm8916_s4: s4 {
> +   regulator-min-microvolt = <185>;
> +   regulator-max-microvolt = <215>;
> +   regulator-always-on; /* Needed for L5/L7 */
> +   };
> +
> +   /*
> +* Some of the regulators are unused or managed by another
> +* processor (e.g. the modem). We should still define nodes 
> for
> +* them to ensure the vote from the application processor can 
> be
> +* dropped in case the regulators are already on during boot.
> +*
> +* The labels for these nodes are omitted on purpose because
> +* boards should configure a proper voltage before using them.
> +*/
> +   l1 {};
> +
> +   pm8916_l2: l2 {
> +   regulator-min-microvolt = <120>;
> +   regulator-max-microvolt = <120>;
> +   regulator-always-on; /* Needed for LPDDR RAM */
> +   };
> +
> +   /* pm8916_l3 is managed by rpmpd (MSM8916_VDDMX) */
> +
> +   l4 {};
> +
> +   pm8916_l5: l5 {
> +   regulator-min-microvolt = <180>;
> +   regulator-max-microvolt = <180>;
> +   regulator-always-on; /* Needed for most digital I/O */
> +   };
> +
> +   pm8916_l6: l6 {
> +   regulator-min-microvolt = <180>;
> +   regulator-max-microvolt = <180>;
> +   };
> +
> +   pm8916_l7: l7 {
> +   regulator-min-microvolt = <180>;
> +   regulator-max-microvolt = <180>;
> +   regulator-always-on; /* Needed for CPU PLL */
> +   };
> +
> +   pm8916_l8: l8 {
> +   regulator-min-microvolt = <290>;
> +   regu