Skip to contentSkip to conversation

dt-bindings: hwmon: Add support for NXP P3T1084UK temperature sensor

PATCH In review Anshika Gupta 3 participants 7 messages Mar 23 – Mar 24

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dt-bindings: hwmon: Add support for NXP P3T1084UK temperature sensor

The P3T1084UK is an NXP digital temperature sensor compatible with the Texas Instruments TMP108 register and protocol specification. This patch extends the existing DT binding for "ti,tmp108" to document the compatible string for P3T1084UK so that the hwmon TMP108 driver can bind to this device.

---
 Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml +5 -3
index 9f6c9f6fa561..47714df5aaff 100644
@@ -4,20 +4,21 @@
 $id: http://devicetree.org/schemas/hwmon/ti,tmp108.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: TMP108/P3T1035/P3T1085/P3T2030 temperature sensor
+title: TMP108/P3T1035/P3T1084/P3T1085/P3T2030 temperature sensor
 
 maintainers:
   - Krzysztof Kozlowski <[email protected]>
 
 description: |
-  The TMP108 or NXP P3T Family (P3T1035, P3T1085 and P3T2030) is a digital-
+  The TMP108 or NXP P3T Family (P3T1035, P3T1084, P3T1085 and P3T2030) is a digital-
   output temperature sensor with a dynamically-programmable limit window,
   and under- and over-temperature alert functions.
 
-  NXP P3T Family (P3T1035, P3T1085 and P3T2030) supports I3C.
+  NXP P3T Family (P3T1035, P3T1084, P3T1085 and P3T2030) supports I3C.
 
   Datasheets:
     https://www.ti.com/product/TMP108
+    https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf
     https://www.nxp.com/docs/en/data-sheet/P3T1085UK.pdf
     https://www.nxp.com/docs/en/data-sheet/P3T1035XUK_P3T2030XUK.pdf
 
@@ -28,6 +29,7 @@ properties:
           - const: nxp,p3t2030
           - const: nxp,p3t1035
       - const: nxp,p3t1035
+      - const: nxp,p3t1084
       - const: nxp,p3t1085
       - const: ti,tmp108
 
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 docs: hwmon: Update TMP108 documentation for NXP P3T1084UK support

Add references to the NXP P3T1084UK temperature sensor in the TMP108 hardware monitoring documentation. The P3T1084UK is compatible with the TMP108 register interface and protocol, and the hwmon driver now supports it. Update the .rst document accordingly to reflect the new compatible device and its expected behavior.

---
 Documentation/hwmon/tmp108.rst | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/hwmon/tmp108.rst +7 -0
index c218ea333dd6..cda280032710 100644
@@ -11,6 +11,13 @@ Supported chips:
 
     Datasheet: https://www.nxp.com/docs/en/data-sheet/P3T1035XUK_P3T2030XUK.pdf
 
+ * NXP P3T1084
+
+    Prefix: 'p3t1045'
+
+    Addresses scanned: none
+
+    Datasheet: https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf
 
   * NXP P3T1085
 
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH 2/3] docs: hwmon: Update TMP108 documentation for NXP P3T1084UK support

Quoted 17 lines · Anshika Gupta

Add references to the NXP P3T1084UK temperature sensor in the TMP108 hardware monitoring documentation. The P3T1084UK is compatible with the TMP108 register interface and protocol, and the hwmon driver now supports it. Update the .rst document accordingly to reflect the new compatible device and its expected behavior.

---
  Documentation/hwmon/tmp108.rst | 7 +++++++
  1 file changed, 7 insertions(+)
Documentation/hwmon/tmp108.rst +0 -0
index c218ea333dd6..cda280032710 100644

Documentation/hwmon/tmp108.rst Supported chips: · line 14

Quoted 4 lines
Documentation/hwmon/tmp108.rst +1 -0
@@ -11,6 +11,13 @@ Supported chips:
 
      Datasheet: https://www.nxp.com/docs/en/data-sheet/P3T1035XUK_P3T2030XUK.pdf
 
+ * NXP P3T1084

Sashiko:

This isn't a bug, but the new bullet point uses a single leading space, whereas the surrounding list items use two leading spaces. This inconsistent indentation might cause parsing issues when generating the reStructuredText documentation.

Documentation/hwmon/tmp108.rst Supported chips: · line 17

Quoted 3 lines
Documentation/hwmon/tmp108.rst +3 -0
+
+    Prefix: 'p3t1045'
+

P3T1084 or p3t1045 ?

Documentation/hwmon/tmp108.rst Supported chips: · line 23

Quoted 6 lines
Documentation/hwmon/tmp108.rst +3 -0
+    Addresses scanned: none
+
+    Datasheet: https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf
 
    * NXP P3T1085
 

Guenter

#3 lore raw

PATCH 3/3 hwmon: (tmp108) Add support for NXP P3T1084UK

In reply to Anshika Gupta

The NXP P3T1084UK is a ±0.4°C accurate digital temperature sensor with a 12-bit temperature register, configuration register, and alert functionality over I²C/I3C. Its register interface matches the TMP108 programming model, so the existing tmp108 driver can bind it without functional changes.

Add "nxp,p3t1084uk" to the OF match table and "p3t1084" to the I²C device-id table so the driver probes the device via both devicetree and board data.

Datasheet: https://www.nxp.com/part/P3T1084UK

           https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf
---
 drivers/hwmon/tmp108.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/tmp108.c +2 -0
index 3ea5f6485744..db46961a31d3 100644
@@ -538,6 +538,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(tmp108_dev_pm_ops, tmp108_suspend, tmp108_resume
 
 static const struct i2c_device_id tmp108_i2c_ids[] = {
 	{ "p3t1035", (unsigned long)&p3t1035_data },
+        { "p3t1084", (unsigned long)&tmp108_data },
 	{ "p3t1085", (unsigned long)&tmp108_data },
 	{ "tmp108", (unsigned long)&tmp108_data },
 	{}
@@ -546,6 +547,7 @@ MODULE_DEVICE_TABLE(i2c, tmp108_i2c_ids);
 
 static const struct of_device_id tmp108_of_ids[] = {
 	{ .compatible = "nxp,p3t1035", .data = &p3t1035_data },
+	{ .compatible = "nxp,p3t1084", .data = &tmp108_data },
 	{ .compatible = "nxp,p3t1085", .data = &tmp108_data },
 	{ .compatible = "ti,tmp108", .data = &tmp108_data },
 	{}
Signature · 1 line
2.34.1
maintainer
#4 lore raw

Re: [PATCH 3/3] hwmon: (tmp108) Add support for NXP P3T1084UK

Quoted 7 lines · Anshika Gupta

The NXP P3T1084UK is a ±0.4°C accurate digital temperature sensor with a 12-bit temperature register, configuration register, and alert functionality over I²C/I3C. Its register interface matches the TMP108 programming model, so the existing tmp108 driver can bind it without functional changes.

Add "nxp,p3t1084uk" to the OF match table and "p3t1084" to the I²C

This does not match the code (added "uk").

Also (from Sashiko's review):

The commit message mentions the device supports functionality over I2C/I3C. However, the driver's I3C device ID match table doesn't seem to be updated for this new device.

Will the driver be able to bind to the device on an I3C bus without an entry in p3t1085_i3c_ids?

static const struct i3c_device_id p3t1085_i3c_ids[] = {
	I3C_DEVICE(0x011B, 0x1529, &tmp108_data),
	I3C_DEVICE(0x011B, 0x152B, &p3t1035_data),
	{}
};

... which is actually also a concern/question for P3T1085. As far as I can see from the datasheet, both use 0x1529. This should be mentioned somewhere, maybe as comment in p3t1085_i3c_ids.

Quoted 8 lines

device-id table so the driver probes the device via both devicetree and board data.

Datasheet: https://www.nxp.com/part/P3T1084UK

            https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf

Per this sequence, Lakshay would be the author, which is not reflected by the e-mail itself. That suggests that Signed-off-by: Lakshay ... might not be appropriate.

drivers/hwmon/tmp108.c static DEFINE_SIMPLE_DEV_PM_OPS(tmp108_dev_pm_ops, tmp108_suspend, tmp108_resume · line 541

Quoted 13 lines
---
  drivers/hwmon/tmp108.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/hwmon/tmp108.c +1 -0
index 3ea5f6485744..db46961a31d3 100644
@@ -538,6 +538,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(tmp108_dev_pm_ops, tmp108_suspend, tmp108_resume
 
  static const struct i2c_device_id tmp108_i2c_ids[] = {
  	{ "p3t1035", (unsigned long)&p3t1035_data },
+        { "p3t1084", (unsigned long)&tmp108_data },

Indentation seems off here.

Quoted 11 lines
drivers/hwmon/tmp108.c +1 -0
  	{ "p3t1085", (unsigned long)&tmp108_data },
  	{ "tmp108", (unsigned long)&tmp108_data },
  	{}
@@ -546,6 +547,7 @@ MODULE_DEVICE_TABLE(i2c, tmp108_i2c_ids);
 
  static const struct of_device_id tmp108_of_ids[] = {
  	{ .compatible = "nxp,p3t1035", .data = &p3t1035_data },
+	{ .compatible = "nxp,p3t1084", .data = &tmp108_data },
  	{ .compatible = "nxp,p3t1085", .data = &tmp108_data },
  	{ .compatible = "ti,tmp108", .data = &tmp108_data },
  	{}
#5 lore raw
In reply to Anshika Gupta
Quoted 2 lines · Anshika Gupta

The P3T1084UK is an NXP digital temperature sensor compatible with the Texas Instruments TMP108 register and protocol specification. This patch

Then why is tmp108 not used as a fallback compatible? Looks from the driver patch like it would be suitable.

Quoted 5 lines

extends the existing DT binding for "ti,tmp108" to document the compatible string for P3T1084UK so that the hwmon TMP108 driver can bind to this device.

What did Lakshay do? You're author and submitter, but their sign-off is here. Are you missing a co-developed-by?

Quoted 45 lines
---
 Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml +5 -3
index 9f6c9f6fa561..47714df5aaff 100644
@@ -4,20 +4,21 @@
 $id: http://devicetree.org/schemas/hwmon/ti,tmp108.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: TMP108/P3T1035/P3T1085/P3T2030 temperature sensor
+title: TMP108/P3T1035/P3T1084/P3T1085/P3T2030 temperature sensor
 
 maintainers:
   - Krzysztof Kozlowski <[email protected]>
 
 description: |
-  The TMP108 or NXP P3T Family (P3T1035, P3T1085 and P3T2030) is a digital-
+  The TMP108 or NXP P3T Family (P3T1035, P3T1084, P3T1085 and P3T2030) is a digital-
   output temperature sensor with a dynamically-programmable limit window,
   and under- and over-temperature alert functions.
 
-  NXP P3T Family (P3T1035, P3T1085 and P3T2030) supports I3C.
+  NXP P3T Family (P3T1035, P3T1084, P3T1085 and P3T2030) supports I3C.
 
   Datasheets:
     https://www.ti.com/product/TMP108
+    https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf
     https://www.nxp.com/docs/en/data-sheet/P3T1085UK.pdf
     https://www.nxp.com/docs/en/data-sheet/P3T1035XUK_P3T2030XUK.pdf
 
@@ -28,6 +29,7 @@ properties:
           - const: nxp,p3t2030
           - const: nxp,p3t1035
       - const: nxp,p3t1035
+      - const: nxp,p3t1084
       - const: nxp,p3t1085
       - const: ti,tmp108
 
Signature · 1 line
2.34.1
maintainer
#6 lore raw
In reply to Anshika Gupta
Quoted 42 lines · Anshika Gupta

The P3T1084UK is an NXP digital temperature sensor compatible with the Texas Instruments TMP108 register and protocol specification. This patch extends the existing DT binding for "ti,tmp108" to document the compatible string for P3T1084UK so that the hwmon TMP108 driver can bind to this device.

---
  Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml +4 -3
index 9f6c9f6fa561..47714df5aaff 100644
@@ -4,20 +4,21 @@
  $id: http://devicetree.org/schemas/hwmon/ti,tmp108.yaml#
  $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: TMP108/P3T1035/P3T1085/P3T2030 temperature sensor
+title: TMP108/P3T1035/P3T1084/P3T1085/P3T2030 temperature sensor
 
  maintainers:
    - Krzysztof Kozlowski <[email protected]>
 
  description: |
-  The TMP108 or NXP P3T Family (P3T1035, P3T1085 and P3T2030) is a digital-
+  The TMP108 or NXP P3T Family (P3T1035, P3T1084, P3T1085 and P3T2030) is a digital-
    output temperature sensor with a dynamically-programmable limit window,
    and under- and over-temperature alert functions.
 
-  NXP P3T Family (P3T1035, P3T1085 and P3T2030) supports I3C.
+  NXP P3T Family (P3T1035, P3T1084, P3T1085 and P3T2030) supports I3C.
 
    Datasheets:
      https://www.ti.com/product/TMP108
+    https://www.nxp.com/docs/en/data-sheet/P3T1084UK.pdf
      https://www.nxp.com/docs/en/data-sheet/P3T1085UK.pdf
      https://www.nxp.com/docs/en/data-sheet/P3T1035XUK_P3T2030XUK.pdf
 

Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml properties: · line 32

Quoted 4 lines
Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml +1 -0
@@ -28,6 +29,7 @@ properties:
            - const: nxp,p3t2030
            - const: nxp,p3t1035
        - const: nxp,p3t1035
+      - const: nxp,p3t1084

Indentation seems off here.

Should nxp,p3t1084 be listed as compatible to nxp,p3t1085 instead of requiring a code change, similar to nxp,p3t2030 and nxp,p3t1035 ? Unless I am missing something, both use the same I3C device provisional ID, so I assume they are register compatible.

Thanks,
Guenter

Quoted 3 lines
Documentation/devicetree/bindings/hwmon/ti,tmp108.yaml +0 -0
        - const: nxp,p3t1085
        - const: ti,tmp108