* [PATCH 0/2] hwmon: (lm75) Add NXP P3T1755 support
@ 2024-12-17 12:03 Wolfram Sang
2024-12-17 12:03 ` [PATCH 2/2] " Wolfram Sang
2024-12-17 22:59 ` [PATCH 0/2] " Guenter Roeck
0 siblings, 2 replies; 7+ messages in thread
From: Wolfram Sang @ 2024-12-17 12:03 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Conor Dooley, devicetree, Guenter Roeck,
Jean Delvare, Jonathan Corbet, Krzysztof Kozlowski, linux-doc,
linux-hwmon, Rob Herring
This small series adds support for the above temp sensor. Ultimately, I
want to support it via I3C. But for now, start simple and add I2C
support, so we have something to compare against.
Wolfram Sang (2):
dt-bindings: hwmon: lm75: Add NXP P3T1755 sensor
hwmon: (lm75) Add NXP P3T1755 support
Documentation/devicetree/bindings/hwmon/lm75.yaml | 1 +
Documentation/hwmon/lm75.rst | 6 ++++--
drivers/hwmon/lm75.c | 13 +++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] hwmon: (lm75) Add NXP P3T1755 support
2024-12-17 12:03 [PATCH 0/2] hwmon: (lm75) Add NXP P3T1755 support Wolfram Sang
@ 2024-12-17 12:03 ` Wolfram Sang
2024-12-17 21:26 ` Guenter Roeck
2024-12-17 22:59 ` [PATCH 0/2] " Guenter Roeck
1 sibling, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2024-12-17 12:03 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Jean Delvare, Guenter Roeck, Jonathan Corbet,
linux-hwmon, linux-doc
Tested with the P3T1755 soldered additionally to the P3T1085UK-ARD
shield and connected to a Renesas RZ/G3S SMARC board.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Documentation/hwmon/lm75.rst | 6 ++++--
drivers/hwmon/lm75.c | 13 +++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/lm75.rst b/Documentation/hwmon/lm75.rst
index 6adab608dd05..9877ddbbf7c8 100644
--- a/Documentation/hwmon/lm75.rst
+++ b/Documentation/hwmon/lm75.rst
@@ -121,9 +121,9 @@ Supported chips:
https://www.ti.com/product/TMP1075
- * NXP LM75B, PCT2075
+ * NXP LM75B, P3T1755, PCT2075
- Prefix: 'lm75b', 'pct2075'
+ Prefix: 'lm75b', 'p3t1755', 'pct2075'
Addresses scanned: none
@@ -131,6 +131,8 @@ Supported chips:
https://www.nxp.com/documents/data_sheet/LM75B.pdf
+ https://www.nxp.com/docs/en/data-sheet/P3T1755.pdf
+
https://www.nxp.com/docs/en/data-sheet/PCT2075.pdf
* AMS OSRAM AS6200
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 2c2205aec7d4..a8f95bef68cb 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -38,6 +38,7 @@ enum lm75_type { /* keep sorted in alphabetical order */
max6626,
max31725,
mcp980x,
+ p3t1755,
pct2075,
stds75,
stlm75,
@@ -222,6 +223,13 @@ static const struct lm75_params device_params[] = {
.default_resolution = 9,
.default_sample_time = MSEC_PER_SEC / 18,
},
+ [p3t1755] = {
+ .clr_mask = 1 << 1 | 1 << 7, /* disable SMBAlert and one-shot */
+ .default_resolution = 12,
+ .default_sample_time = 55,
+ .num_sample_times = 4,
+ .sample_times = (unsigned int []){ 28, 55, 110, 220 },
+ },
[pct2075] = {
.default_resolution = 11,
.default_sample_time = MSEC_PER_SEC / 10,
@@ -734,6 +742,7 @@ static const struct i2c_device_id lm75_ids[] = {
{ "max31725", max31725, },
{ "max31726", max31725, },
{ "mcp980x", mcp980x, },
+ { "p3t1755", p3t1755, },
{ "pct2075", pct2075, },
{ "stds75", stds75, },
{ "stlm75", stlm75, },
@@ -813,6 +822,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
.compatible = "maxim,mcp980x",
.data = (void *)mcp980x
},
+ {
+ .compatible = "nxp,p3t1755",
+ .data = (void *)p3t1755
+ },
{
.compatible = "nxp,pct2075",
.data = (void *)pct2075
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] hwmon: (lm75) Add NXP P3T1755 support
2024-12-17 12:03 ` [PATCH 2/2] " Wolfram Sang
@ 2024-12-17 21:26 ` Guenter Roeck
2024-12-18 7:22 ` Wolfram Sang
0 siblings, 1 reply; 7+ messages in thread
From: Guenter Roeck @ 2024-12-17 21:26 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Jean Delvare, Jonathan Corbet, linux-hwmon, linux-doc
Hi Wolfram,
On 12/17/24 04:03, Wolfram Sang wrote:
> Tested with the P3T1755 soldered additionally to the P3T1085UK-ARD
> shield and connected to a Renesas RZ/G3S SMARC board.
>
Technically that should describe the patch, not how you tested it.
Anyway, can you send me a register dump for this chip ? I'd like to
add it to my module test scripts.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] hwmon: (lm75) Add NXP P3T1755 support
2024-12-17 12:03 [PATCH 0/2] hwmon: (lm75) Add NXP P3T1755 support Wolfram Sang
2024-12-17 12:03 ` [PATCH 2/2] " Wolfram Sang
@ 2024-12-17 22:59 ` Guenter Roeck
2024-12-18 7:27 ` Wolfram Sang
1 sibling, 1 reply; 7+ messages in thread
From: Guenter Roeck @ 2024-12-17 22:59 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Conor Dooley, devicetree, Jean Delvare, Jonathan Corbet,
Krzysztof Kozlowski, linux-doc, linux-hwmon, Rob Herring
On 12/17/24 04:03, Wolfram Sang wrote:
> This small series adds support for the above temp sensor. Ultimately, I
> want to support it via I3C. But for now, start simple and add I2C
> support, so we have something to compare against.
I just sent a RFC/RFT patch converting all chip access code to regmap
to the hwmon list. This should help with adding I3C support. It would
be great if you can have a look.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] hwmon: (lm75) Add NXP P3T1755 support
2024-12-17 21:26 ` Guenter Roeck
@ 2024-12-18 7:22 ` Wolfram Sang
2024-12-18 9:15 ` Wolfram Sang
0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2024-12-18 7:22 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-renesas-soc, Jean Delvare, Jonathan Corbet, linux-hwmon,
linux-doc
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
> Technically that should describe the patch, not how you tested it.
I will modify it.
> Anyway, can you send me a register dump for this chip ? I'd like to
> add it to my module test scripts.
Sure thing. What format? Plain hex values in ASCII?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] hwmon: (lm75) Add NXP P3T1755 support
2024-12-17 22:59 ` [PATCH 0/2] " Guenter Roeck
@ 2024-12-18 7:27 ` Wolfram Sang
0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2024-12-18 7:27 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-renesas-soc, Conor Dooley, devicetree, Jean Delvare,
Jonathan Corbet, Krzysztof Kozlowski, linux-doc, linux-hwmon,
Rob Herring
[-- Attachment #1: Type: text/plain, Size: 536 bytes --]
Guenter,
> I just sent a RFC/RFT patch converting all chip access code to regmap
> to the hwmon list. This should help with adding I3C support. It would
> be great if you can have a look.
Thanks, this is really awesome! It surely will help me adding I3C
support. I already sketched multiple paths to handle the regmap problem
of config reg being 8 bits while all other are 16 bits. A custom read
callback was also one option I considered. I will check your patch later
today and base my work on top of it.
All the best,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] hwmon: (lm75) Add NXP P3T1755 support
2024-12-18 7:22 ` Wolfram Sang
@ 2024-12-18 9:15 ` Wolfram Sang
0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2024-12-18 9:15 UTC (permalink / raw)
To: Guenter Roeck, linux-renesas-soc, Jean Delvare, Jonathan Corbet,
linux-hwmon, linux-doc
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
> Sure thing. What format? Plain hex values in ASCII?
Reading registers from the bootloader matches the default values in the
datasheet:
=> i2c md 0x4c 0 2
0000: 12 50 .P
=> i2c md 0x4c 2 2
0002: 4b 00 K.
=> i2c md 0x4c 3 2
0003: 50 00 P.
=> i2c md 0x4c 1 1
0001: 28 (
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-12-18 9:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-17 12:03 [PATCH 0/2] hwmon: (lm75) Add NXP P3T1755 support Wolfram Sang
2024-12-17 12:03 ` [PATCH 2/2] " Wolfram Sang
2024-12-17 21:26 ` Guenter Roeck
2024-12-18 7:22 ` Wolfram Sang
2024-12-18 9:15 ` Wolfram Sang
2024-12-17 22:59 ` [PATCH 0/2] " Guenter Roeck
2024-12-18 7:27 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).