[PATCH 3/6] arm64: dts: qcom: use main pmk8350.dtsi for sc8280xp platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Employ existing PMK8350_SID and switch sc8280xp-pmics to use
pmk8350.dtsi to reduce duplication and possible discrepancies.

For example, this changes sc8280xp platforms to use qcom,pmk8350-pon
for the pon device compatibility rather than the incorrect
qcom,pm8998-pon.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
---
 arch/arm64/boot/dts/qcom/pmk8350.dtsi         |  9 +++
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts     |  6 +-
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 30 ++++-----
 arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi  | 67 ++-----------------
 4 files changed, 31 insertions(+), 81 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
index 455ffffb5f5c..26e40dbfc173 100644
--- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
@@ -66,6 +66,15 @@ pmk8350_rtc: rtc@6100 {
 			status = "disabled";
 		};
 
+		pmk8350_sdam_6: nvram@8500 {
+			compatible = "qcom,spmi-sdam";
+			reg = <0x8500>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x8500 0x100>;
+			status = "disabled";
+		};
+
 		pmk8350_gpios: gpio@b000 {
 			compatible = "qcom,pmk8350-gpio", "qcom,spmi-gpio";
 			reg = <0xb000>;
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index d7b537284990..d32594b5a4e7 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -559,18 +559,18 @@ &pmc8280c_lpg {
 	status = "okay";
 };
 
-&pmk8280_pon_pwrkey {
+&pmk8350_pon_pwrkey {
 	status = "okay";
 };
 
-&pmk8280_rtc {
+&pmk8350_rtc {
 	nvmem-cells = <&rtc_offset>;
 	nvmem-cell-names = "offset";
 
 	status = "okay";
 };
 
-&pmk8280_sdam_6 {
+&pmk8350_sdam_6 {
 	status = "okay";
 
 	rtc_offset: rtc-offset@bc {
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 590400985055..7d61108daede 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -275,7 +275,7 @@ thermal-zones {
 		skin-temp-thermal {
 			polling-delay-passive = <250>;
 			polling-delay = <0>;
-			thermal-sensors = <&pmk8280_adc_tm 5>;
+			thermal-sensors = <&pmk8350_adc_tm 5>;
 
 			trips {
 				skin_temp_alert0: trip-point0 {
@@ -729,12 +729,12 @@ &pmc8280c_lpg {
 	status = "okay";
 };
 
-&pmk8280_adc_tm {
+&pmk8350_adc_tm {
 	status = "okay";
 
 	sys-therm@0 {
 		reg = <0>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -742,7 +742,7 @@ sys-therm@0 {
 
 	sys-therm@1 {
 		reg = <1>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -750,7 +750,7 @@ sys-therm@1 {
 
 	sys-therm@2 {
 		reg = <2>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -758,7 +758,7 @@ sys-therm@2 {
 
 	sys-therm@3 {
 		reg = <3>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -766,7 +766,7 @@ sys-therm@3 {
 
 	sys-therm@4 {
 		reg = <4>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -774,7 +774,7 @@ sys-therm@4 {
 
 	sys-therm@5 {
 		reg = <5>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -782,7 +782,7 @@ sys-therm@5 {
 
 	sys-therm@6 {
 		reg = <6>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
@@ -790,29 +790,29 @@ sys-therm@6 {
 
 	sys-therm@7 {
 		reg = <7>;
-		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
+		io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
 		qcom,hw-settle-time-us = <200>;
 		qcom,avg-samples = <2>;
 		qcom,ratiometric;
 	};
 };
 
-&pmk8280_pon_pwrkey {
+&pmk8350_pon_pwrkey {
 	status = "okay";
 };
 
-&pmk8280_pon_resin {
+&pmk8350_pon_resin {
 	status = "okay";
 };
 
-&pmk8280_rtc {
+&pmk8350_rtc {
 	nvmem-cells = <&rtc_offset>;
 	nvmem-cell-names = "offset";
 
 	status = "okay";
 };
 
-&pmk8280_sdam_6 {
+&pmk8350_sdam_6 {
 	status = "okay";
 
 	rtc_offset: rtc-offset@bc {
@@ -820,7 +820,7 @@ rtc_offset: rtc-offset@bc {
 	};
 };
 
-&pmk8280_vadc {
+&pmk8350_vadc {
 	status = "okay";
 
 	pmic-die-temp@3 {
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
index c35e7f6bd657..781fb6448a52 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi
@@ -51,70 +51,11 @@ trip1 {
 	};
 };
 
-&spmi_bus {
-	pmk8280: pmic@0 {
-		compatible = "qcom,pmk8350", "qcom,spmi-pmic";
-		reg = <0x0 SPMI_USID>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		pmk8280_pon: pon@1300 {
-			compatible = "qcom,pm8998-pon";
-			reg = <0x1300>;
-
-			pmk8280_pon_pwrkey: pwrkey {
-				compatible = "qcom,pmk8350-pwrkey";
-				interrupts-extended = <&spmi_bus 0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
-				linux,code = <KEY_POWER>;
-				status = "disabled";
-			};
-
-			pmk8280_pon_resin: resin {
-				compatible = "qcom,pmk8350-resin";
-				interrupts-extended = <&spmi_bus 0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
-				status = "disabled";
-			};
-		};
-
-		pmk8280_vadc: adc@3100 {
-			compatible = "qcom,spmi-adc7";
-			reg = <0x3100>;
-			interrupts-extended = <&spmi_bus 0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-			#io-channel-cells = <1>;
-			status = "disabled";
-		};
-
-		pmk8280_adc_tm: adc-tm@3400 {
-			compatible = "qcom,spmi-adc-tm5-gen2";
-			reg = <0x3400>;
-			interrupts-extended = <&spmi_bus 0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-			#thermal-sensor-cells = <1>;
-			status = "disabled";
-		};
-
-		pmk8280_rtc: rtc@6100 {
-			compatible = "qcom,pmk8350-rtc";
-			reg = <0x6100>, <0x6200>;
-			reg-names = "rtc", "alarm";
-			interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
-			wakeup-source;
-			status = "disabled";
-		};
-
-		pmk8280_sdam_6: nvram@8500 {
-			compatible = "qcom,spmi-sdam";
-			reg = <0x8500>;
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0 0x8500 0x100>;
-			status = "disabled";
-		};
-	};
+#define PMK8350_SID 0
+#include "pmk8350.dtsi"
+#undef PMK8350_SID
 
+&spmi_bus {
 	pmc8280_1: pmic@1 {
 		compatible = "qcom,pm8350", "qcom,spmi-pmic";
 		reg = <0x1 SPMI_USID>;
-- 
2.30.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux