arm64: dts: qcom: sm7225-fairphone-fp4: Add pmk8350 PMIC
authorLuca Weiss <luca.weiss@fairphone.com>
Wed, 7 Dec 2022 08:40:45 +0000 (09:40 +0100)
committerBjorn Andersson <andersson@kernel.org>
Wed, 28 Dec 2022 03:18:50 +0000 (21:18 -0600)
The PMK8350 (which is actually a PMK8003) is used for the RTC and has
ADC for thermals.

Since the adc_tm compatible used in PMK8350 is not yet supported, skip
configuring that and the associated thermal zone for now.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221207084045.270172-1-luca.weiss@fairphone.com
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts

index c456e9594ea5b1a2f5bab4bccc75a3c6f5c29559..df05e5dc86966297b974a0ebc8fe0018c8f196bd 100644 (file)
@@ -5,7 +5,11 @@
 
 /dts-v1/;
 
+/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
+#define PMK8350_SID 6
+
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
@@ -13,6 +17,7 @@
 #include "pm6150l.dtsi"
 #include "pm6350.dtsi"
 #include "pm7250b.dtsi"
+#include "pmk8350.dtsi"
 
 / {
        model = "Fairphone 4";
        };
 };
 
+&pmk8350_rtc {
+       status = "okay";
+};
+
+&pmk8350_vadc {
+       adc-chan@644 {
+               reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+               qcom,ratiometric;
+               qcom,hw-settle-time = <200>;
+               qcom,pre-scaling = <1 1>;
+               label = "xo_therm";
+       };
+};
+
 &qupv3_id_1 {
        status = "okay";
 };