diff mbox series

arm64: dts: qcom: pm660: Add rradc, charger

Message ID 20240606-pm660-charger-rrdac-v1-1-a95d4da24f3b@gmail.com
State New
Headers show
Series arm64: dts: qcom: pm660: Add rradc, charger | expand

Commit Message

Barnabás Czémán June 6, 2024, 2:47 p.m. UTC
From: Aboothahir U <aboothahirpkd@gmail.com>

Add charger to PM660 PMIC. Readings from round-robin ADC
are needed for charger to function, so add it as well.

Signed-off-by: Aboothahir U <aboothahirpkd@gmail.com>
Signed-off-by: Barnabás Czémán <trabarni@gmail.com>
---
 arch/arm64/boot/dts/qcom/pm660.dtsi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)


---
base-commit: ee78a17615ad0cfdbbc27182b1047cd36c9d4d5f
change-id: 20240606-pm660-charger-rrdac-e003ff9498c8

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/pm660.dtsi b/arch/arm64/boot/dts/qcom/pm660.dtsi
index 98dc04962fe3..ed2c8e485cdd 100644
--- a/arch/arm64/boot/dts/qcom/pm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm660.dtsi
@@ -74,6 +74,23 @@  pon_resin: resin {
 			};
 		};
 
+		pm660_charger: charger@1000 {
+			compatible = "qcom,pm660-charger";
+			reg = <0x1000>;
+
+			interrupts = <0x0 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
+				     <0x0 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
+				     <0x0 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
+				     <0x0 0x13 0x6 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "usb-plugin", "bat-ov", "wdog-bark", "usbin-icl-change";
+
+			io-channels = <&pm660_rradc 3>,
+				      <&pm660_rradc 4>;
+			io-channel-names = "usbin_i", "usbin_v";
+
+			status = "disabled";
+		};
+
 		pm660_temp: temp-alarm@2400 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0x2400>;
@@ -181,6 +198,14 @@  channel@85 {
 			};
 		};
 
+		pm660_rradc: adc@4500 {
+			compatible = "qcom,pm660-rradc";
+			reg = <0x4500>;
+			#io-channel-cells = <1>;
+
+			status = "disabled";
+		};
+
 		pm660_gpios: gpio@c000 {
 			compatible = "qcom,pm660-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;