From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-input@vger.kernel.org
Subject: [PATCH v6 17/36] ARM: dts: qcom: apq8064: split PMICs to separate dtsi files
Date: Thu, 28 Sep 2023 14:02:50 +0300 [thread overview]
Message-ID: <20230928110309.1212221-18-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230928110309.1212221-1-dmitry.baryshkov@linaro.org>
The PMICs are not a part of the SoC, so move PMICs to separate files and
include them from the board files.
Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm/boot/dts/qcom/pm8821.dtsi | 22 +++
arch/arm/boot/dts/qcom/pm8921.dtsi | 99 +++++++++++++
.../dts/qcom/qcom-apq8064-asus-nexus7-flo.dts | 6 +-
.../boot/dts/qcom/qcom-apq8064-cm-qs600.dts | 5 +-
.../boot/dts/qcom/qcom-apq8064-ifc6410.dts | 5 +-
.../qcom-apq8064-sony-xperia-lagan-yuga.dts | 5 +-
arch/arm/boot/dts/qcom/qcom-apq8064.dtsi | 134 +-----------------
7 files changed, 140 insertions(+), 136 deletions(-)
create mode 100644 arch/arm/boot/dts/qcom/pm8821.dtsi
diff --git a/arch/arm/boot/dts/qcom/pm8821.dtsi b/arch/arm/boot/dts/qcom/pm8821.dtsi
new file mode 100644
index 000000000000..064e3ba54e18
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/pm8821.dtsi
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/* This PMIC is used on a secondary SSBI bus */
+&ssbi2 {
+ pm8821: pmic {
+ compatible = "qcom,pm8821";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8821_mpps: mpps@50 {
+ compatible = "qcom,pm8821-mpp", "qcom,ssbi-mpp";
+ reg = <0x50>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8821_mpps 0 0 4>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/qcom/pm8921.dtsi b/arch/arm/boot/dts/qcom/pm8921.dtsi
index 414941f7a42f..ad41d99ab265 100644
--- a/arch/arm/boot/dts/qcom/pm8921.dtsi
+++ b/arch/arm/boot/dts/qcom/pm8921.dtsi
@@ -8,6 +8,30 @@ pm8921: pmic {
#address-cells = <1>;
#size-cells = <0>;
+ pm8921_gpio: gpio@150 {
+
+ compatible = "qcom,pm8921-gpio",
+ "qcom,ssbi-gpio";
+ reg = <0x150>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ gpio-ranges = <&pm8921_gpio 0 0 44>;
+ #gpio-cells = <2>;
+
+ };
+
+ pm8921_mpps: mpps@50 {
+ compatible = "qcom,pm8921-mpp",
+ "qcom,ssbi-mpp";
+ reg = <0x50>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8921_mpps 0 0 12>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
pwrkey@1c {
compatible = "qcom,pm8921-pwrkey";
reg = <0x1c>;
@@ -36,5 +60,80 @@ rtc@11d {
reg = <0x11d>;
allow-set-time;
};
+
+ pm8921_xoadc: xoadc@197 {
+ compatible = "qcom,pm8921-adc";
+ reg = <0x197>;
+ interrupts-extended = <&pm8921 78 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>;
+ };
+
+ vph_pwr: adc-channel@4 {
+ reg = <0x00 0x04>;
+ };
+
+ batt_therm: adc-channel@8 {
+ reg = <0x00 0x08>;
+ };
+
+ batt_id: adc-channel@9 {
+ reg = <0x00 0x09>;
+ };
+
+ 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>;
+ };
+
+ chg_temp: adc-channel@e {
+ reg = <0x00 0x0e>;
+ };
+
+ ref_muxoff: adc-channel@f {
+ reg = <0x00 0x0f>;
+ };
+ };
+ };
+};
+
+/ {
+ /*
+ * 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 = <&pm8921_xoadc 0x00 0x01>, /* Battery */
+ <&pm8921_xoadc 0x00 0x02>, /* DC in (charger) */
+ <&pm8921_xoadc 0x00 0x04>, /* VPH the main system voltage */
+ <&pm8921_xoadc 0x00 0x0b>, /* Die temperature */
+ <&pm8921_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
+ <&pm8921_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
+ <&pm8921_xoadc 0x00 0x0e>; /* Charger temperature */
};
};
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-asus-nexus7-flo.dts
index b820f3255c16..d709d6e840ec 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8064-asus-nexus7-flo.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-asus-nexus7-flo.dts
@@ -1,8 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "Asus Nexus7(flo)";
compatible = "asus,nexus7-flo", "qcom,apq8064";
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-cm-qs600.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-cm-qs600.dts
index c01254b1a3a7..d4db84e9fcf3 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8064-cm-qs600.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-cm-qs600.dts
@@ -1,8 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "CompuLab CM-QS600";
compatible = "qcom,apq8064-cm-qs600", "qcom,apq8064";
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts
index f1bd29333c9b..5fd84319254e 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts
@@ -1,9 +1,12 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "Qualcomm APQ8064/IFC6410";
compatible = "qcom,apq8064-ifc6410", "qcom,apq8064";
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts
index 7917f1657025..ba18a02b1c57 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064-sony-xperia-lagan-yuga.dts
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
-#include "qcom-apq8064-v2.0.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/mfd/qcom-rpm.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include "qcom-apq8064-v2.0.dtsi"
+#include "pm8821.dtsi"
+#include "pm8921.dtsi"
+
/ {
model = "Sony Xperia Z";
compatible = "sony,xperia-yuga", "qcom,apq8064";
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi
index 76796002bda6..5704d0598b96 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-apq8064.dtsi
@@ -284,23 +284,6 @@ scm {
};
};
-
- /*
- * 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 = <&pm8921_xoadc 0x00 0x01>, /* Battery */
- <&pm8921_xoadc 0x00 0x02>, /* DC in (charger) */
- <&pm8921_xoadc 0x00 0x04>, /* VPH the main system voltage */
- <&pm8921_xoadc 0x00 0x0b>, /* Die temperature */
- <&pm8921_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
- <&pm8921_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
- <&pm8921_xoadc 0x00 0x0e>; /* Charger temperature */
- };
-
soc: soc {
#address-cells = <1>;
#size-cells = <1>;
@@ -655,129 +638,16 @@ rng@1a500000 {
clock-names = "core";
};
- ssbi@c00000 {
+ ssbi2: ssbi@c00000 {
compatible = "qcom,ssbi";
reg = <0x00c00000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pm8821: pmic {
- compatible = "qcom,pm8821";
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pm8821_mpps: mpps@50 {
- compatible = "qcom,pm8821-mpp", "qcom,ssbi-mpp";
- reg = <0x50>;
- interrupt-controller;
- #interrupt-cells = <2>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8821_mpps 0 0 4>;
- };
- };
};
- ssbi@500000 {
+ ssbi: ssbi@500000 {
compatible = "qcom,ssbi";
reg = <0x00500000 0x1000>;
qcom,controller-type = "pmic-arbiter";
-
- pm8921: pmic {
- compatible = "qcom,pm8921";
- #interrupt-cells = <2>;
- interrupt-controller;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pm8921_gpio: gpio@150 {
-
- compatible = "qcom,pm8921-gpio",
- "qcom,ssbi-gpio";
- reg = <0x150>;
- interrupt-controller;
- #interrupt-cells = <2>;
- gpio-controller;
- gpio-ranges = <&pm8921_gpio 0 0 44>;
- #gpio-cells = <2>;
-
- };
-
- pm8921_mpps: mpps@50 {
- compatible = "qcom,pm8921-mpp",
- "qcom,ssbi-mpp";
- reg = <0x50>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8921_mpps 0 0 12>;
- interrupt-controller;
- #interrupt-cells = <2>;
- };
-
- rtc@11d {
- compatible = "qcom,pm8921-rtc";
- interrupt-parent = <&pm8921>;
- interrupts = <39 1>;
- reg = <0x11d>;
- allow-set-time;
- };
-
- pwrkey@1c {
- compatible = "qcom,pm8921-pwrkey";
- reg = <0x1c>;
- interrupt-parent = <&pm8921>;
- interrupts = <50 1>, <51 1>;
- debounce = <15625>;
- pull-up;
- };
-
- pm8921_xoadc: xoadc@197 {
- compatible = "qcom,pm8921-adc";
- reg = <0x197>;
- interrupts-extended = <&pm8921 78 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>;
- };
- vph_pwr: adc-channel@4 {
- reg = <0x00 0x04>;
- };
- batt_therm: adc-channel@8 {
- reg = <0x00 0x08>;
- };
- batt_id: adc-channel@9 {
- reg = <0x00 0x09>;
- };
- 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>;
- };
- chg_temp: adc-channel@e {
- reg = <0x00 0x0e>;
- };
- ref_muxoff: adc-channel@f {
- reg = <0x00 0x0f>;
- };
- };
- };
};
qfprom: qfprom@700000 {
--
2.39.2
next prev parent reply other threads:[~2023-09-28 11:03 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 11:02 [PATCH v6 00/36] ARM: dts: qcom: cleanup PMIC usage Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 01/36] dt-bindings: input: qcom,pm8921-keypad: convert to YAML format Dmitry Baryshkov
2023-10-30 20:04 ` Rob Herring
2023-09-28 11:02 ` [PATCH v6 02/36] ARM: dts: qcom: apq8064: correct XOADC register address Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 03/36] ARM: dts: qcom: msm8960: introduce label for PMIC keypad Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 04/36] ARM: dts: qcom: msm8660-surf: use keypad label directly Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 05/36] ARM: dts: qcom: apq8064-nexus7: move sdcc1 node to proper place Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 06/36] ARM: dts: qcom: mdm9615-wp8548-mangoh-green: group include clauses Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 07/36] ARM: dts: qcom: strip prefix from PMIC files Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 08/36] ARM: dts: qcom: apq8064: fix PMIC node labels Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 09/36] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 10/36] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 11/36] ARM: dts: qcom: msm8960: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 12/36] ARM: dts: qcom: apq8064: move PMIC interrupts to the board files Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 13/36] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 14/36] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 15/36] ARM: dts: qcom: msm8960: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 16/36] ARM: dts: qcom: msm8960: split PMIC to separate dtsi files Dmitry Baryshkov
2023-09-28 11:02 ` Dmitry Baryshkov [this message]
2023-09-28 11:02 ` [PATCH v6 18/36] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 19/36] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 20/36] ARM: dts: qcom: pm8058: reorder nodes Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 21/36] ARM: dts: qcom: pm8921: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 22/36] ARM: dts: qcom: pm8018: move reg property Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 23/36] ARM: dts: qcom: pm8921: " Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 24/36] ARM: dts: qcom: pm8058: use defined IRQ flags Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 25/36] ARM: dts: qcom: pm8921: switch to interrupts-extended Dmitry Baryshkov
2023-09-28 11:02 ` [PATCH v6 26/36] ARM: dts: qcom: pm8018: " Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 27/36] ARM: dts: qcom: pm8058: " Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 28/36] ARM: dts: qcom: apq8064: move RPM regulators to board files Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 29/36] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 30/36] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 31/36] ARM: dts: qcom: msm8960: drop useless rpm regulators node Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 32/36] ARM: dts: qcom: msm8974: move regulators to board files Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 33/36] ARM: dts: qcom: pm8921: Disable keypad by default Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 34/36] ARM: dts: qcom: apq8060-dragonboard: rename mpp ADC channels to adc-channel Dmitry Baryshkov
2023-09-28 11:03 ` [PATCH v6 35/36] ARM: dts: qcom: ipq8064: drop qcom, prefix from SSBI node name Dmitry Baryshkov
2023-09-28 13:49 ` Konrad Dybcio
2023-09-28 11:03 ` [PATCH v6 36/36] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-09-28 13:50 ` Konrad Dybcio
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=20230928110309.1212221-18-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).