[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241224063559.391061-1-wenliang202407@163.com>
Date: Tue, 24 Dec 2024 14:35:56 +0800
From: Wenliang Yan <wenliang202407@....com>
To: linux@...ck-us.net,
jdelvare@...e.com
Cc: Wenliang <wenliang202407@....com>,
robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
corbet@....net,
linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/3] hwmon:(ina238)Add support for SQ52206
From: Wenliang <wenliang202407@....com>
Add support for Silergy i2c power monitor SQ52206 to the ina238
driver as those two are similar.
Signed-off-by: Wenliang <wenliang202407@....com>
---
The manual content of the chip has not been fully disclosed yet. Can the manual be provided in the form of a cloud storage link for reviewing the driver code? If not, how can it be provided? It can be provided in V2.
This version patch is displayed through text, and both chips are power monitors with a 16 bit delta sigma ADC specifically designed for current sensing applications Operates from a 2.7-V to 5.5-V supply. Same pin definition.In addition, SQ52206 add detection for power peak, energy and charge.
The main differences between the two chips are as follows:
___________________________________
| INA238 | SQ52206 |
VBUS_LSB | 3.125mV | 3.75mV |
DIETEMP_LSB | 125 mC | 7.8125 mC |
____________|__________|___________|
________________________________________________
reg address | INA238 | SQ52206 |
____________|_______________|___________________|
0h | CONFIG | CONFIG |
1h | ADC_CONFIG | ADC_CONFIG |
2h | SHUNT_CAL | SHUNT_CAL |
3h | / |SHUNT_TEMPCO(16bit)|
4h | VSHUNT | VSHUNT |
5h | VBUS | VBUS |
6h | DIETEMP | DIETEMP |
7h | CURRENT | CURRENT |
8h | POWER | POWER |
9h | / | ENERGY(40bit) |
Ah | / | CHARGE(40bit) |
Bh | DIAG_ALERT | DIAG_ALERT |
Ch | SOVL | SOVL |
Dh | SUVL | SUVL |
Eh | BOVL | BOVL |
Fh | BUVL | BUVL |
10h | TEMP_LIMIT | TEMP_LIMIT |
11h | PWR_LIMIT | PWR_LIMIT |
20h | | PWR_PEAK(24bit) |
3Eh |MANUFACTURER_ID| / |
3Fh | DEVICE_ID | / |
____________|_______________|___________________|
The ENERGY and CHARGE registers are 40 bit read-only registers used to display the values of energy and charge. PWR_PEAK register is 24 bit read-only registers.The CONFIG register has some differences:
__________________________________________________________________________
BIT | INA238 | SQ52206 |
____|____________________________|________________________________________|
14 | Reserved. Always reads 0 | reset ENERGY and CHARGE registers to 0 |
____|____________________________|________________________________________|
4 |ADCRANGE 0h=163.84 1h=81.92 | (BIT4~3)ADCRANGE 2h/3h = 40.96, |
____|____________________________| 0h=163.84 1h=81.92 |
3 | Reserved. Always reads 0 | |
____|____________________________|________________________________________|
Wenliang (3):
hwmon:(ina238)Add support for SQ52206
hwmon:(ina238)Add new features for SQ52206
dt-bindings:Add SQ52206 to ina2xx devicetree bindings
.../devicetree/bindings/hwmon/ti,ina2xx.yaml | 1 +
Documentation/hwmon/ina238.rst | 16 +
drivers/hwmon/ina238.c | 286 ++++++++++++++----
3 files changed, 240 insertions(+), 63 deletions(-)
--
2.43.0
Powered by blists - more mailing lists