Skip to content

Commit 0264347

Browse files
wangbaolin719arndb
authored andcommitted
arm64: dts: sprd: Add SC27XX fuel gauge device
Add Spreadtrum SC27XX fuel gauge device node to calculate the battery capacity. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent a479540 commit 0264347

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

arch/arm64/boot/dts/sprd/sc2731.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
#size-cells = <1>;
7171
hwlocks = <&hwlock 12>;
7272

73+
fgu_calib: calib@6 {
74+
reg = <0x6 0x2>;
75+
bits = <0 9>;
76+
};
77+
7378
adc_big_scale: calib@24 {
7479
reg = <0x24 0x2>;
7580
};
@@ -90,6 +95,19 @@
9095
nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
9196
};
9297

98+
fgu@a00 {
99+
compatible = "sprd,sc2731-fgu";
100+
reg = <0xa00>;
101+
bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
102+
io-channels = <&pmic_adc 3>, <&pmic_adc 6>;
103+
io-channel-names = "bat-temp", "charge-vol";
104+
monitored-battery = <&bat>;
105+
nvmem-cell-names = "fgu_calib";
106+
nvmem-cells = <&fgu_calib>;
107+
interrupt-parent = <&sc2731_pmic>;
108+
interrupts = <4>;
109+
};
110+
93111
vibrator@ec8 {
94112
compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator";
95113
reg = <0xec8>;

0 commit comments

Comments
 (0)