arm64: dts: qcom: msm8916: Move PM8916-specific parts to msm8916-pm8916.dtsi
authorStephan Gerhold <stephan@gerhold.net>
Mon, 20 Jul 2020 08:54:03 +0000 (10:54 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 15 Sep 2020 04:50:49 +0000 (04:50 +0000)
Device trees for newer SoCs avoid defining the regulator nodes directly
in the SoC device tree (here: msm8916.dtsi). The reason for this is that
theoretically it is possible to combine the SoC with a different PMIC,
or to use all the regulators in a board-specific way.

Therefore let's remove those from the SoC include (msm8916.dtsi).

In practice, pretty much all MSM8916 boards were combined with PM8916,
and use the regulators in similar ways. After looking at many different
MSM8916 boards (mostly smartphones and tablets), I haven't seen a single
device that isn't using the same regulators for components integrated
into the SoC.

If all boards end up defining all regulators and supplies in the same way
then it is useful to have an include for that, so we can avoid duplicating
it everywhere. If there is really a super special board that does it
differently it could just override some properties or avoid using the
include altogether.

This patch moves the regulator and common supply definitions to
a new include called "msm8916-pm8916.dtsi".

This is also going to be useful when introducing CPR (Core Power
Reduction) later because we can configure the CPU regulator
(pm8916_spmi_s2) for all devices in this common include.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200720085406.6716-8-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi
arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
arch/arm64/boot/dts/qcom/msm8916.dtsi

index 3e42ba9cca94516795e8948d207ad6b209f122bb..267b61755e1a9f5ed9cbd2081069cfe7d7881508 100644 (file)
@@ -3,8 +3,7 @@
  * Copyright (c) 2015, The Linux Foundation. All rights reserved.
  */
 
-#include "msm8916.dtsi"
-#include "pm8916.dtsi"
+#include "msm8916-pm8916.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
index 90ce0f96eda472e968ca6aaf11c56d261b5c5810..0b72da1bb6ca59e6280bddf5470168e3dd8132be 100644 (file)
@@ -2,8 +2,7 @@
 
 /dts-v1/;
 
-#include "msm8916.dtsi"
-#include "pm8916.dtsi"
+#include "msm8916-pm8916.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
index 453e6acb5203feb845764cbc6daa31f27ee70a74..9c4926326f21688aa3b655d77ff47668ee4f4c55 100644 (file)
@@ -3,8 +3,7 @@
  * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
  */
 
-#include "msm8916.dtsi"
-#include "pm8916.dtsi"
+#include "msm8916-pm8916.dtsi"
 
 / {
        aliases {
diff --git a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi
new file mode 100644 (file)
index 0000000..d416fe3
--- /dev/null
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916.dtsi"
+#include "pm8916.dtsi"
+
+&camss {
+       vdda-supply = <&pm8916_l2>;
+};
+
+&mpss {
+       cx-supply = <&pm8916_s1>;
+       mx-supply = <&pm8916_l3>;
+       pll-supply = <&pm8916_l7>;
+};
+
+&pronto {
+       vddmx-supply = <&pm8916_l3>;
+       vddpx-supply = <&pm8916_l7>;
+
+       iris {
+               vddxo-supply = <&pm8916_l7>;
+               vddrfa-supply = <&pm8916_s3>;
+               vddpa-supply = <&pm8916_l9>;
+               vdddig-supply = <&pm8916_l5>;
+       };
+};
+
+&rpm_requests {
+       smd_rpm_regulators: pm8916-regulators {
+               compatible = "qcom,rpm-pm8916-regulators";
+
+               pm8916_s1: s1 {};
+               pm8916_s3: s3 {};
+               pm8916_s4: s4 {};
+
+               pm8916_l1: l1 {};
+               pm8916_l2: l2 {};
+               pm8916_l3: l3 {};
+               pm8916_l4: l4 {};
+               pm8916_l5: l5 {};
+               pm8916_l6: l6 {};
+               pm8916_l7: l7 {};
+               pm8916_l8: l8 {};
+               pm8916_l9: l9 {};
+               pm8916_l10: l10 {};
+               pm8916_l11: l11 {};
+               pm8916_l12: l12 {};
+               pm8916_l13: l13 {};
+               pm8916_l14: l14 {};
+               pm8916_l15: l15 {};
+               pm8916_l16: l16 {};
+               pm8916_l17: l17 {};
+               pm8916_l18: l18 {};
+       };
+};
index c6eb0b0cd84981af7e87bd2f9c97ea636ec9a972..64e9c73953bbd291854ed55dd820a1fdcb11b0a1 100644 (file)
@@ -1,7 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
-#include "msm8916.dtsi"
-#include "pm8916.dtsi"
+#include "msm8916-pm8916.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
index acbaed23bbdd9c5504d503b93d9fb9054cb092c8..141348a927880beb27efc99c73d5491d2f6d64ed 100644 (file)
                        resets = <&scm 0>;
                        reset-names = "mss_restart";
 
-                       cx-supply = <&pm8916_s1>;
-                       mx-supply = <&pm8916_l3>;
-                       pll-supply = <&pm8916_l7>;
-
                        qcom,halt-regs = <&tcsr 0x18000 0x19000 0x1a000>;
 
                        status = "disabled";
                                              <&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
                        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
 
-                       vddmx-supply = <&pm8916_l3>;
-                       vddpx-supply = <&pm8916_l7>;
-
                        qcom,state = <&wcnss_smp2p_out 0>;
                        qcom,state-names = "stop";
 
 
                                clocks = <&rpmcc RPM_SMD_RF_CLK2>;
                                clock-names = "xo";
-
-                               vddxo-supply = <&pm8916_l7>;
-                               vddrfa-supply = <&pm8916_s3>;
-                               vddpa-supply = <&pm8916_l9>;
-                               vdddig-supply = <&pm8916_l5>;
                        };
 
                        smd-edge {
                                "csi_vfe0",
                                "vfe_ahb",
                                "vfe_axi";
-                       vdda-supply = <&pm8916_l2>;
                        iommus = <&apps_iommu 3>;
                        status = "disabled";
                        ports {
                                        compatible = "qcom,rpmcc-msm8916";
                                        #clock-cells = <1>;
                                };
-
-                               smd_rpm_regulators: pm8916-regulators {
-                                       compatible = "qcom,rpm-pm8916-regulators";
-
-                                       pm8916_s1: s1 {};
-                                       pm8916_s3: s3 {};
-                                       pm8916_s4: s4 {};
-
-                                       pm8916_l1: l1 {};
-                                       pm8916_l2: l2 {};
-                                       pm8916_l3: l3 {};
-                                       pm8916_l4: l4 {};
-                                       pm8916_l5: l5 {};
-                                       pm8916_l6: l6 {};
-                                       pm8916_l7: l7 {};
-                                       pm8916_l8: l8 {};
-                                       pm8916_l9: l9 {};
-                                       pm8916_l10: l10 {};
-                                       pm8916_l11: l11 {};
-                                       pm8916_l12: l12 {};
-                                       pm8916_l13: l13 {};
-                                       pm8916_l14: l14 {};
-                                       pm8916_l15: l15 {};
-                                       pm8916_l16: l16 {};
-                                       pm8916_l17: l17 {};
-                                       pm8916_l18: l18 {};
-                               };
                        };
                };
        };