mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] hwmon:(ina238)Add support for SQ52206
@ 2024-12-24  6:35 Wenliang Yan
  2024-12-24  6:35 ` [PATCH 1/3] " Wenliang Yan
  0 siblings, 1 reply; 6+ messages in thread
From: Wenliang Yan @ 2024-12-24  6:35 UTC (permalink / raw)
  To: linux, jdelvare
  Cc: Wenliang, robh, krzk+dt, conor+dt, corbet, linux-hwmon, linux-kernel

From: Wenliang <wenliang202407@163.com>

Add support for Silergy i2c power monitor SQ52206 to the ina238
driver as those two are similar.

Signed-off-by: Wenliang <wenliang202407@163.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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-08  2:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-24  6:35 [PATCH 0/3] hwmon:(ina238)Add support for SQ52206 Wenliang Yan
2024-12-24  6:35 ` [PATCH 1/3] " Wenliang Yan
2025-01-06 23:22   ` Guenter Roeck
2025-01-07 12:43     ` Wenliang Yan
2025-01-07 15:02       ` Guenter Roeck
2025-01-08  2:53         ` Wenliang Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®