Files
build/patch/kernel/archive/sm8250-6.12/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patch
2024-12-05 00:23:00 +01:00

64 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Teguh Sobirin <teguh@sobir.in>
Date: Wed, 20 Nov 2024 23:01:45 +0700
Subject: arm64: dts: qcom: pm8150b: Add a charger Signed-off-by: Teguh Sobirin
<teguh@sobir.in>
---
arch/arm64/boot/dts/qcom/pm8150b.dtsi | 32 ++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm8150b.dtsi b/arch/arm64/boot/dts/qcom/pm8150b.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/qcom/pm8150b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8150b.dtsi
@@ -107,6 +107,26 @@ pm8150b_temp: temp-alarm@2400 {
#thermal-sensor-cells = <0>;
};
+ pm8150b_charger: charger@1000 {
+ compatible = "qcom,pm8150b-charger";
+ reg = <0x1000>;
+
+ interrupts = <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
+ <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
+ <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
+ <0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "usbin-plugin",
+ "bat-ov",
+ "wdog-bark",
+ "usbin-icl-change";
+
+ io-channels = <&pm8150b_adc 7>,
+ <&pm8150b_adc 8>;
+ io-channel-names = "usb_in_i_uv", "usb_in_v_div_16";
+
+ status = "disabled";
+ };
+
pm8150b_adc: adc@3100 {
compatible = "qcom,spmi-adc5";
reg = <0x3100>;
@@ -133,6 +153,18 @@ channel@6 {
label = "die_temp";
};
+ channel@7 {
+ reg = <ADC5_USB_IN_I>;
+ qcom,pre-scaling = <1 1>;
+ label = "usb_in_i_uv";
+ };
+
+ channel@8 {
+ reg = <ADC5_USB_IN_V_16>;
+ qcom,pre-scaling = <1 16>;
+ label = "usb_in_v_div_16";
+ };
+
channel@9 {
reg = <ADC5_CHG_TEMP>;
qcom,pre-scaling = <1 1>;
--
Armbian