From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: devicetree@vger.kernel.org, Lee Jones <lee@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-arm-msm@vger.kernel.org,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org
Subject: [PATCH v4 21/38] ARM: dts: qcom: msm8660: split PMIC to separate dtsi files
Date: Sun, 27 Aug 2023 03:59:03 +0300 [thread overview]
Message-ID: <20230827005920.898719-22-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230827005920.898719-1-dmitry.baryshkov@linaro.org>
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>
---
arch/arm/boot/dts/qcom/pm8058.dtsi | 160 ++++++++++++++++++
.../dts/qcom/qcom-apq8060-dragonboard.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8660-surf.dts | 1 +
arch/arm/boot/dts/qcom/qcom-msm8660.dtsi | 149 +---------------
4 files changed, 163 insertions(+), 148 deletions(-)
create mode 100644 arch/arm/boot/dts/qcom/pm8058.dtsi
diff --git a/arch/arm/boot/dts/qcom/pm8058.dtsi b/arch/arm/boot/dts/qcom/pm8058.dtsi
new file mode 100644
index 000000000000..ad581c3bcbd2
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/pm8058.dtsi
@@ -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 */
+ };
+};
diff --git a/arch/arm/boot/dts/qcom/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom/qcom-apq8060-dragonboard.dts
index e4261d729d35..10b8f529c337 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8060-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8060-dragonboard.dts
@@ -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";
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8660-surf.dts b/arch/arm/boot/dts/qcom/qcom-msm8660-surf.dts
index a5441aecd637..be2fbc1e0950 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8660-surf.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8660-surf.dts
@@ -2,6 +2,7 @@
#include <dt-bindings/input/input.h>
#include "qcom-msm8660.dtsi"
+#include "pm8058.dtsi"
/ {
model = "Qualcomm MSM8660 SURF";
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8660.dtsi
index 84b0366792d4..eef4712bbcc4 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8660.dtsi
@@ -73,22 +73,6 @@ sleep-clk {
};
};
- /*
- * 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>;
@@ -334,141 +318,10 @@ ebi2: external-bus@1a100000 {
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 {
--
2.39.2
next prev parent reply other threads:[~2023-08-27 1:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 0:58 [PATCH v4 00/38] ARM: dts: qcom: cleanup PMIC usage Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 01/38] dt-bindings: input: qcom,pm8921-keypad: convert to YAML format Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 02/38] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 03/38] dt-bindings: mfd: qcom-pm8xxx: allow using interrupts-extended Dmitry Baryshkov
2023-08-27 8:35 ` Krzysztof Kozlowski
2023-08-27 10:42 ` Dmitry Baryshkov
2023-08-27 11:12 ` Krzysztof Kozlowski
2023-08-27 11:48 ` Dmitry Baryshkov
2023-08-27 12:00 ` Krzysztof Kozlowski
2023-08-27 12:57 ` Dmitry Baryshkov
2023-08-27 18:05 ` Krzysztof Kozlowski
2023-08-27 0:58 ` [PATCH v4 04/38] ARM: dts: qcom: apq8064: correct XOADC register address Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 05/38] ARM: dts: qcom: msm8960: introduce label for PMIC keypad Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 06/38] ARM: dts: qcom: msm8660-surf: use keypad label directly Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 07/38] ARM: dts: qcom: apq8064-nexus7: move sdcc1 node to proper place Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 08/38] ARM: dts: qcom: mdm9615-wp8548-mangoh-green: group include clauses Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 09/38] ARM: dts: qcom: strip prefix from PMIC files Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 10/38] ARM: dts: qcom: apq8064: fix PMIC node labels Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 11/38] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 12/38] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 13/38] ARM: dts: qcom: msm8960: " Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 14/38] ARM: dts: qcom: apq8064: move PMIC interrupts to the board files Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 15/38] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 16/38] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-08-27 0:58 ` [PATCH v4 17/38] ARM: dts: qcom: msm8960: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 18/38] ARM: dts: qcom: msm8960: split PMIC to separate dtsi files Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 19/38] ARM: dts: qcom: apq8064: split PMICs " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 20/38] ARM: dts: qcom: mdm9615: split PMIC " Dmitry Baryshkov
2023-08-27 0:59 ` Dmitry Baryshkov [this message]
2023-08-27 0:59 ` [PATCH v4 22/38] ARM: dts: qcom: pm8058: reorder nodes Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 23/38] ARM: dts: qcom: pm8921: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 24/38] ARM: dts: qcom: pm8018: move reg property Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 25/38] ARM: dts: qcom: pm8921: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 26/38] ARM: dts: qcom: pm8058: use defined IRQ flags Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 27/38] ARM: dts: qcom: pm8921: switch to interrupts-extended Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 28/38] ARM: dts: qcom: pm8018: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 29/38] ARM: dts: qcom: pm8058: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 30/38] ARM: dts: qcom: apq8064: move RPM regulators to board files Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 31/38] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 32/38] ARM: dts: qcom: msm8660: " Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 33/38] ARM: dts: qcom: msm8960: drop useless rpm regulators node Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 34/38] ARM: dts: qcom: msm8974: move regulators to board files Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 35/38] ARM: dts: qcom: pm8921: Disable keypad by default Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 36/38] ARM: dts: qcom: apq8060-dragonboard: rename mpp ADC channels to adc-channel Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 37/38] ARM: dts: qcom: ipq8064: drop qcom, prefix from SSBI node name Dmitry Baryshkov
2023-08-27 0:59 ` [PATCH v4 38/38] ARM: dts: qcom: mdm9615: " Dmitry Baryshkov
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=20230827005920.898719-22-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--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).