summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@linaro.org>2026-03-02 13:32:08 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-03-03 23:58:07 +0100
commit2864fb6aa947703d290b52b1b030b0b74d0a6128 (patch)
tree9fa0187a58c75c866c61001f16c0ce68f37a32c8 /include
parent2288d5eaca2249b1b8a80af063808cfc42e2a834 (diff)
power: supply: max17042: initial support for Maxim MAX77759
The Maxim MAX77759 is a companion PMIC intended for use in mobile phones and tablets. It is used on Google Pixel 6 and 6 Pro (oriole and raven). Amongst others, it contains a fuel gauge that is similar to the ones supported by this driver. The fuel gauge can measure battery charge and discharge current, battery voltage, battery temperature, and the Type C connector's temperature. The MAX77759 incorporates the Maxim ModelGauge m5 algorithm. It, as well as previous generations like m3 on max17047/max17050, requires the host to save/restore some register values across power cycles to maintain full accuracy. Extending the driver for such support is out of scope in this initial commit. Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: André Draszik <andre.draszik@linaro.org> Link: https://patch.msgid.link/20260302-max77759-fg-v3-9-3c5f01dbda23@linaro.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/max17042_battery.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index c417abd2ab70..05097f08ea36 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -105,7 +105,7 @@ enum max17042_register {
MAX17042_OCV = 0xEE,
- MAX17042_OCVInternal = 0xFB, /* MAX17055 VFOCV */
+ MAX17042_OCVInternal = 0xFB, /* MAX17055/77759 VFOCV */
MAX17042_VFSOC = 0xFF,
};
@@ -156,7 +156,7 @@ enum max17055_register {
MAX17055_AtAvCap = 0xDF,
};
-/* Registers specific to max17047/50/55 */
+/* Registers specific to max17047/50/55/77759 */
enum max17047_register {
MAX17047_QRTbl00 = 0x12,
MAX17047_FullSOCThr = 0x13,
@@ -167,12 +167,32 @@ enum max17047_register {
MAX17047_QRTbl30 = 0x42,
};
+enum max77759_register {
+ MAX77759_AvgTA0 = 0x26,
+ MAX77759_AtTTF = 0x33,
+ MAX77759_Tconvert = 0x34,
+ MAX77759_AvgCurrent0 = 0x3B,
+ MAX77759_THMHOT = 0x40,
+ MAX77759_CTESample = 0x41,
+ MAX77759_ISys = 0x43,
+ MAX77759_AvgVCell0 = 0x44,
+ MAX77759_RlxSOC = 0x47,
+ MAX77759_AvgISys = 0x4B,
+ MAX77759_QH0 = 0x4C,
+ MAX77759_MixAtFull = 0x4F,
+ MAX77759_VSys = 0xB1,
+ MAX77759_TAlrtTh2 = 0xB2,
+ MAX77759_VByp = 0xB3,
+ MAX77759_IIn = 0xD0,
+};
+
enum max170xx_chip_type {
MAXIM_DEVICE_TYPE_UNKNOWN = 0,
MAXIM_DEVICE_TYPE_MAX17042,
MAXIM_DEVICE_TYPE_MAX17047,
MAXIM_DEVICE_TYPE_MAX17050,
MAXIM_DEVICE_TYPE_MAX17055,
+ MAXIM_DEVICE_TYPE_MAX77759,
MAXIM_DEVICE_TYPE_NUM
};