ARM: dts: qcom: msm8660: split PMIC to separate dtsi files
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 28 Sep 2023 11:02:52 +0000 (14:02 +0300)
committerBjorn Andersson <andersson@kernel.org>
Tue, 14 Nov 2023 17:25:59 +0000 (11:25 -0600)
The PMIC is not a part of the SoC, so move PMIC to a separate file and
include it from the board files.

Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230928110309.1212221-20-dmitry.baryshkov@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm/boot/dts/qcom/pm8058.dtsi [new file with mode: 0644]
arch/arm/boot/dts/qcom/qcom-apq8060-dragonboard.dts
arch/arm/boot/dts/qcom/qcom-msm8660-surf.dts
arch/arm/boot/dts/qcom/qcom-msm8660.dtsi

diff --git a/arch/arm/boot/dts/qcom/pm8058.dtsi b/arch/arm/boot/dts/qcom/pm8058.dtsi
new file mode 100644 (file)
index 0000000..ad581c3
--- /dev/null
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: GPL-2.0
+
+&ssbi {
+       pm8058: pmic {
+               compatible = "qcom,pm8058";
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pm8058_gpio: gpio@150 {
+                       compatible = "qcom,pm8058-gpio",
+                                    "qcom,ssbi-gpio";
+                       reg = <0x150>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pm8058_gpio 0 0 44>;
+                       #gpio-cells = <2>;
+               };
+
+               pm8058_mpps: mpps@50 {
+                       compatible = "qcom,pm8058-mpp",
+                                    "qcom,ssbi-mpp";
+                       reg = <0x50>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       gpio-ranges = <&pm8058_mpps 0 0 12>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               pwrkey@1c {
+                       compatible = "qcom,pm8058-pwrkey";
+                       reg = <0x1c>;
+                       interrupt-parent = <&pm8058>;
+                       interrupts = <50 1>, <51 1>;
+                       debounce = <15625>;
+                       pull-up;
+               };
+
+               pm8058_keypad: keypad@148 {
+                       compatible = "qcom,pm8058-keypad";
+                       reg = <0x148>;
+                       interrupt-parent = <&pm8058>;
+                       interrupts = <74 1>, <75 1>;
+                       debounce = <15>;
+                       scan-delay = <32>;
+                       row-hold = <91500>;
+               };
+
+               pm8058_xoadc: xoadc@197 {
+                       compatible = "qcom,pm8058-adc";
+                       reg = <0x197>;
+                       interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
+                       #address-cells = <2>;
+                       #size-cells = <0>;
+                       #io-channel-cells = <2>;
+
+                       vcoin: adc-channel@0 {
+                               reg = <0x00 0x00>;
+                       };
+
+                       vbat: adc-channel@1 {
+                               reg = <0x00 0x01>;
+                       };
+
+                       dcin: adc-channel@2 {
+                               reg = <0x00 0x02>;
+                       };
+
+                       ichg: adc-channel@3 {
+                               reg = <0x00 0x03>;
+                       };
+
+                       vph_pwr: adc-channel@4 {
+                               reg = <0x00 0x04>;
+                       };
+
+                       usb_vbus: adc-channel@a {
+                               reg = <0x00 0x0a>;
+                       };
+
+                       die_temp: adc-channel@b {
+                               reg = <0x00 0x0b>;
+                       };
+
+                       ref_625mv: adc-channel@c {
+                               reg = <0x00 0x0c>;
+                       };
+
+                       ref_1250mv: adc-channel@d {
+                               reg = <0x00 0x0d>;
+                       };
+
+                       ref_325mv: adc-channel@e {
+                               reg = <0x00 0x0e>;
+                       };
+
+                       ref_muxoff: adc-channel@f {
+                               reg = <0x00 0x0f>;
+                       };
+               };
+
+               rtc@1e8 {
+                       compatible = "qcom,pm8058-rtc";
+                       reg = <0x1e8>;
+                       interrupt-parent = <&pm8058>;
+                       interrupts = <39 1>;
+                       allow-set-time;
+               };
+
+               vibrator@4a {
+                       compatible = "qcom,pm8058-vib";
+                       reg = <0x4a>;
+               };
+
+               pm8058_led48: led@48 {
+                       compatible = "qcom,pm8058-keypad-led";
+                       reg = <0x48>;
+                       status = "disabled";
+               };
+
+               pm8058_led131: led@131 {
+                       compatible = "qcom,pm8058-led";
+                       reg = <0x131>;
+                       status = "disabled";
+               };
+
+               pm8058_led132: led@132 {
+                       compatible = "qcom,pm8058-led";
+                       reg = <0x132>;
+                       status = "disabled";
+               };
+
+               pm8058_led133: led@133 {
+                       compatible = "qcom,pm8058-led";
+                       reg = <0x133>;
+                       status = "disabled";
+               };
+       };
+};
+
+/ {
+       /*
+        * These channels from the ADC are simply hardware monitors.
+        * That is why the ADC is referred to as "HKADC" - HouseKeeping
+        * ADC.
+        */
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&pm8058_xoadc 0x00 0x01>, /* Battery */
+                             <&pm8058_xoadc 0x00 0x02>, /* DC in (charger) */
+                             <&pm8058_xoadc 0x00 0x04>, /* VPH the main system voltage */
+                             <&pm8058_xoadc 0x00 0x0b>, /* Die temperature */
+                             <&pm8058_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
+                             <&pm8058_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
+                             <&pm8058_xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
+       };
+};
index 8a82f56fe7ca8fb7a8a8cc14146b22545aace465..aa6a620f180d3d828a1de76c13fb0aafa321300a 100644 (file)
@@ -5,6 +5,7 @@
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
 #include "qcom-msm8660.dtsi"
+#include "pm8058.dtsi"
 
 / {
        model = "Qualcomm APQ8060 Dragonboard";
index a5441aecd63711f395734e09ab3235214b6ea1ae..be2fbc1e0950b2fb6ef61320cbb264955882ac68 100644 (file)
@@ -2,6 +2,7 @@
 #include <dt-bindings/input/input.h>
 
 #include "qcom-msm8660.dtsi"
+#include "pm8058.dtsi"
 
 / {
        model = "Qualcomm MSM8660 SURF";
index 84b0366792d4ef0dd540e9c74cc35624cb3cc827..eef4712bbcc47b4326cb21ce705fe1502133c462 100644 (file)
                };
        };
 
-       /*
-        * These channels from the ADC are simply hardware monitors.
-        * That is why the ADC is referred to as "HKADC" - HouseKeeping
-        * ADC.
-        */
-       iio-hwmon {
-               compatible = "iio-hwmon";
-               io-channels = <&pm8058_xoadc 0x00 0x01>, /* Battery */
-                             <&pm8058_xoadc 0x00 0x02>, /* DC in (charger) */
-                             <&pm8058_xoadc 0x00 0x04>, /* VPH the main system voltage */
-                             <&pm8058_xoadc 0x00 0x0b>, /* Die temperature */
-                             <&pm8058_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
-                             <&pm8058_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
-                             <&pm8058_xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
-       };
-
        soc: soc {
                #address-cells = <1>;
                #size-cells = <1>;
                        status = "disabled";
                };
 
-               ssbi@500000 {
+               ssbi: ssbi@500000 {
                        compatible = "qcom,ssbi";
                        reg = <0x500000 0x1000>;
                        qcom,controller-type = "pmic-arbiter";
-
-                       pm8058: pmic {
-                               compatible = "qcom,pm8058";
-                               #interrupt-cells = <2>;
-                               interrupt-controller;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               pm8058_gpio: gpio@150 {
-                                       compatible = "qcom,pm8058-gpio",
-                                                    "qcom,ssbi-gpio";
-                                       reg = <0x150>;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                                       gpio-controller;
-                                       gpio-ranges = <&pm8058_gpio 0 0 44>;
-                                       #gpio-cells = <2>;
-
-                               };
-
-                               pm8058_mpps: mpps@50 {
-                                       compatible = "qcom,pm8058-mpp",
-                                                    "qcom,ssbi-mpp";
-                                       reg = <0x50>;
-                                       gpio-controller;
-                                       #gpio-cells = <2>;
-                                       gpio-ranges = <&pm8058_mpps 0 0 12>;
-                                       interrupt-controller;
-                                       #interrupt-cells = <2>;
-                               };
-
-                               pwrkey@1c {
-                                       compatible = "qcom,pm8058-pwrkey";
-                                       reg = <0x1c>;
-                                       interrupt-parent = <&pm8058>;
-                                       interrupts = <50 1>, <51 1>;
-                                       debounce = <15625>;
-                                       pull-up;
-                               };
-
-                               pm8058_keypad: keypad@148 {
-                                       compatible = "qcom,pm8058-keypad";
-                                       reg = <0x148>;
-                                       interrupt-parent = <&pm8058>;
-                                       interrupts = <74 1>, <75 1>;
-                                       debounce = <15>;
-                                       scan-delay = <32>;
-                                       row-hold = <91500>;
-                               };
-
-                               pm8058_xoadc: xoadc@197 {
-                                       compatible = "qcom,pm8058-adc";
-                                       reg = <0x197>;
-                                       interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
-                                       #address-cells = <2>;
-                                       #size-cells = <0>;
-                                       #io-channel-cells = <2>;
-
-                                       vcoin: adc-channel@0 {
-                                               reg = <0x00 0x00>;
-                                       };
-                                       vbat: adc-channel@1 {
-                                               reg = <0x00 0x01>;
-                                       };
-                                       dcin: adc-channel@2 {
-                                               reg = <0x00 0x02>;
-                                       };
-                                       ichg: adc-channel@3 {
-                                               reg = <0x00 0x03>;
-                                       };
-                                       vph_pwr: adc-channel@4 {
-                                               reg = <0x00 0x04>;
-                                       };
-                                       usb_vbus: adc-channel@a {
-                                               reg = <0x00 0x0a>;
-                                       };
-                                       die_temp: adc-channel@b {
-                                               reg = <0x00 0x0b>;
-                                       };
-                                       ref_625mv: adc-channel@c {
-                                               reg = <0x00 0x0c>;
-                                       };
-                                       ref_1250mv: adc-channel@d {
-                                               reg = <0x00 0x0d>;
-                                       };
-                                       ref_325mv: adc-channel@e {
-                                               reg = <0x00 0x0e>;
-                                       };
-                                       ref_muxoff: adc-channel@f {
-                                               reg = <0x00 0x0f>;
-                                       };
-                               };
-
-                               rtc@1e8 {
-                                       compatible = "qcom,pm8058-rtc";
-                                       reg = <0x1e8>;
-                                       interrupt-parent = <&pm8058>;
-                                       interrupts = <39 1>;
-                                       allow-set-time;
-                               };
-
-                               vibrator@4a {
-                                       compatible = "qcom,pm8058-vib";
-                                       reg = <0x4a>;
-                               };
-
-                               pm8058_led48: led@48 {
-                                       compatible = "qcom,pm8058-keypad-led";
-                                       reg = <0x48>;
-                                       status = "disabled";
-                               };
-
-                               pm8058_led131: led@131 {
-                                       compatible = "qcom,pm8058-led";
-                                       reg = <0x131>;
-                                       status = "disabled";
-                               };
-
-                               pm8058_led132: led@132 {
-                                       compatible = "qcom,pm8058-led";
-                                       reg = <0x132>;
-                                       status = "disabled";
-                               };
-
-                               pm8058_led133: led@133 {
-                                       compatible = "qcom,pm8058-led";
-                                       reg = <0x133>;
-                                       status = "disabled";
-                               };
-
-                       };
                };
 
                l2cc: clock-controller@2082000 {