Skip to contentSkip to conversation

ARM: dts: imx: tqma7: add lm75a sensor (rev. 01xxx)

PATCH Applied João Rodrigues 5 participants 8 messages Nov 2, 2023 – Dec 5, 2023

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

PATCH 1/1 ARM: dts: imx: tqma7: add lm75a sensor (rev. 01xxx)

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor.
The two sensors use different I2C addresses, so we can set both sensors simultaneously.

---
 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +7 -2
index fe42b0a4683..3fc3130f9de 100644
@@ -128,11 +128,16 @@ vgen6_reg: vldo4 {
 		};
 	};
 
-	/* NXP SE97BTP with temperature sensor + eeprom */
+	/* LM75A temperature sensor, TQMa7x 01xx */
+	lm75a: temperature-sensor@48 {
+		compatible = "national,lm75a";
+		reg = <0x48>;
+	};
+
+	/* NXP SE97BTP with temperature sensor + eeprom, TQMa7x 02xx */
 	se97b: temperature-sensor-eeprom@1e {
 		compatible = "nxp,se97b", "jedec,jc-42.4-temp";
 		reg = <0x1e>;
-		status = "okay";
 	};
 
 	/* ST M24C64 */
Signature · 1 line
2.25.1
reviewer
#1 lore raw

[Adding Bruno and Alexander]

Quoted 38 lines · João Rodrigues

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor.
The two sensors use different I2C addresses, so we can set both sensors simultaneously.

---
 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +7 -3
index fe42b0a4683..3fc3130f9de 100644
@@ -128,11 +128,16 @@ vgen6_reg: vldo4 {
                };
        };
 
-       /* NXP SE97BTP with temperature sensor + eeprom */
+       /* LM75A temperature sensor, TQMa7x 01xx */
+       lm75a: temperature-sensor@48 {
+               compatible = "national,lm75a";
+               reg = <0x48>;
+       };
+
+       /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x 02xx */
        se97b: temperature-sensor-eeprom@1e {
                compatible = "nxp,se97b", "jedec,jc-42.4-temp";
                reg = <0x1e>;
-               status = "okay";
        };
 
        /* ST M24C64 */
--

2.25.1

#2 lore raw

Hi,

Am Freitag, 3. November 2023, 22:07:08 CET schrieb Fabio Estevam:

Quoted 8 lines

[Adding Bruno and Alexander]

Quoted 5 lines · João Rodrigues

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor.
The two sensors use different I2C addresses, so we can set both sensors simultaneously.

I've contacted responsible department and I am waiting for more details.

Best regards,
Alexander

Quoted 39 lines
Quoted 39 lines

---

 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi index
fe42b0a4683..3fc3130f9de 100644

arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +7 -3
@@ -128,11 +128,16 @@ vgen6_reg: vldo4 {
 
                };
 
        };
 
-       /* NXP SE97BTP with temperature sensor + eeprom */
+       /* LM75A temperature sensor, TQMa7x 01xx */
+       lm75a: temperature-sensor@48 {
+               compatible = "national,lm75a";
+               reg = <0x48>;
+       };
+
+       /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x 02xx */
 
        se97b: temperature-sensor-eeprom@1e {
 
                compatible = "nxp,se97b", "jedec,jc-42.4-temp";
                reg = <0x1e>;
 
-               status = "okay";
 
        };
 
        /* ST M24C64 */
 
--

2.25.1

Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
#3 lore raw

Hi João,

Am Dienstag, 7. November 2023, 07:34:32 CET schrieb Alexander Stein:

Quoted 6 lines

Hi,

Am Freitag, 3. November 2023, 22:07:08 CET schrieb Fabio Estevam:

Quoted 3 lines

[Adding Bruno and Alexander]

On Thu, Nov 2, 2023 at 7:12 PM João Rodrigues <[email protected]>

Quoted 7 lines · wrote:
Quoted 5 lines
Quoted 5 lines

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor.
The two sensors use different I2C addresses, so we can set both sensors simultaneously.

I've contacted responsible department and I am waiting for more details.

I got response that REV.01xx was just a prototype and not released officially.

Quoted 18 lines

Best regards,
Alexander

Quoted 15 lines
Quoted 15 lines

---

 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi index
fe42b0a4683..3fc3130f9de 100644

arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +0 -0
@@ -128,11 +128,16 @@ vgen6_reg: vldo4 {
 
                };
 
Quoted 8 lines
Quoted 8 lines

arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi vgen6_reg: vldo4 { · line 135

Quoted 8 lines
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +5 -1
        };
 
-       /* NXP SE97BTP with temperature sensor + eeprom */
+       /* LM75A temperature sensor, TQMa7x 01xx */
+       lm75a: temperature-sensor@48 {
+               compatible = "national,lm75a";
+               reg = <0x48>;
+       };

I don't like the idea of adding an i2c device for everybody. This restricts/ affects usage of i2c address 0x48 for all rev.02xx users, no?

Best regards,
Alexander

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +2 -2
+
+       /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x 02xx */
 
        se97b: temperature-sensor-eeprom@1e {
 
                compatible = "nxp,se97b", "jedec,jc-42.4-temp";
                reg = <0x1e>;
 
-               status = "okay";
 
        };
 
        /* ST M24C64 */
 
--

2.25.1

Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
author
#4 lore raw

Hi Alexander,

Quoted 17 lines · On Thu, 09 Nov 2023 07:57:36 +0100 Alexander Stein…

Hi João,

Am Dienstag, 7. November 2023, 07:34:32 CET schrieb Alexander Stein:

Quoted 7 lines

Hi,

Am Freitag, 3. November 2023, 22:07:08 CET schrieb Fabio Estevam:

Quoted 4 lines

[Adding Bruno and Alexander]

On Thu, Nov 2, 2023 at 7:12 PM João Rodrigues
<[email protected]>

Quoted 6 lines · wrote:
Quoted 5 lines
Quoted 5 lines

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor. The two sensors use different I2C addresses, so we can set both sensors simultaneously.

Quoted 5 lines
Quoted 2 lines

I've contacted responsible department and I am waiting for more details.

I got response that REV.01xx was just a prototype and not released officially.

But REV. 01xx was not an internal-only prototype. Furthermore, in the board manual,
https://www.tq-group.com/filedownloads/files/products/embedded/manuals/arm/carrierboard/MBa7x/MBa7x.UM.0101.pdf
section 4.1.2, the old version is still referenced.

Quoted 21 lines
Quoted 21 lines

Best regards,
Alexander

Quoted 17 lines
Quoted 17 lines

---

 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi index
fe42b0a4683..3fc3130f9de 100644

arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +0 -0
@@ -128,11 +128,16 @@ vgen6_reg: vldo4 {
 
                };
 
        };
 
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines

arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi vgen6_reg: vldo4 { · line 135

Quoted 6 lines
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +5 -1
-       /* NXP SE97BTP with temperature sensor + eeprom */
+       /* LM75A temperature sensor, TQMa7x 01xx */
+       lm75a: temperature-sensor@48 {
+               compatible = "national,lm75a";
+               reg = <0x48>;
+       };  

I don't like the idea of adding an i2c device for everybody. This restricts/ affects usage of i2c address 0x48 for all rev.02xx users, no?

Yes, it restricts the usage of I2C address 0x48 in I2C1. While I2C1 is not exclusive to the SoM, the TQMa7x manual states "I2C1 is used for devices on the TQMa7x".
As a counterpoint, the MBa7x carrier board also uses I2C1.

Quoted 22 lines

Best regards,
Alexander

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +2 -0
+
+       /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x

02xx */

        se97b: temperature-sensor-eeprom@1e {
        
                compatible = "nxp,se97b", "jedec,jc-42.4-temp";
                reg = <0x1e>;

- status = "okay";

        };
        
        /* ST M24C64 */

--
2.25.1

Reviewed-by
#5 lore raw
In reply to Fabio Estevam

Den fre. 3. nov. 2023 kl. 22.07 skrev Fabio Estevam <[email protected]>:

Quoted 10 lines

[Adding Bruno and Alexander]

Quoted 6 lines · João Rodrigues

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor.
The two sensors use different I2C addresses, so we can set both sensors simultaneously.

Hi João,

Looks correct to me and an elegant way of adding support for rev 01xx boards.

After this change the imx7d-flex-concentrator.dts needs to be updated as it uses TQMa7d rev 02xx boards with something like this:

/* TQMa7d 02xx */

&se97b {
        status = "okay";
};

I can send a follow up patch when this change lands.

/Bruno

Quoted 32 lines
Quoted 32 lines
---
 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +7 -3
index fe42b0a4683..3fc3130f9de 100644
@@ -128,11 +128,16 @@ vgen6_reg: vldo4 {
                };
        };
 
-       /* NXP SE97BTP with temperature sensor + eeprom */
+       /* LM75A temperature sensor, TQMa7x 01xx */
+       lm75a: temperature-sensor@48 {
+               compatible = "national,lm75a";
+               reg = <0x48>;
+       };
+
+       /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x 02xx */
        se97b: temperature-sensor-eeprom@1e {
                compatible = "nxp,se97b", "jedec,jc-42.4-temp";
                reg = <0x1e>;
-               status = "okay";
        };
 
        /* ST M24C64 */
--

2.25.1

author
#6 lore raw
Quoted 24 lines · On Wed, 8 Nov 2023 23:51:11 +0100 Bruno Thomsen <[email protected]> wrote:

Den fre. 3. nov. 2023 kl. 22.07 skrev Fabio Estevam <[email protected]>:

Quoted 11 lines

[Adding Bruno and Alexander]

Quoted 6 lines · João Rodrigues

From: João Rodrigues <[email protected]>

TQMa7x (revision 01xxx) uses a LM75A temperature sensor. The two sensors use different I2C addresses, so we can set both sensors simultaneously.

Hi João,

Looks correct to me and an elegant way of adding support for rev 01xx boards.

After this change the imx7d-flex-concentrator.dts needs to be updated as it uses TQMa7d rev 02xx boards with something like this:

Quoted 9 lines

/* TQMa7d 02xx */

&se97b {
        status = "okay";
};

I can send a follow up patch when this change lands.

/Bruno

Hi Bruno,

Thank you for the review.
Taking the status out was a request from Krzysztof in the initial version of the patch, since the default for status is "okay". I have also tested (and confirmed) this works as expected, with the appropriate temperature sensor being recognised by the kernel.

Kind regards,
João

Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
---
 arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi index fe42b0a4683..3fc3130f9de 100644 --- a/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi @@ -128,11 +128,16 @@

vgen6_reg: vldo4 { };
        };
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi +7 -1
-       /* NXP SE97BTP with temperature sensor + eeprom */
+       /* LM75A temperature sensor, TQMa7x 01xx */
+       lm75a: temperature-sensor@48 {
+               compatible = "national,lm75a";
+               reg = <0x48>;
+       };
+
+       /* NXP SE97BTP with temperature sensor + eeprom, TQMa7x
02xx */ se97b: temperature-sensor-eeprom@1e {
                compatible = "nxp,se97b", "jedec,jc-42.4-temp";
                reg = <0x1e>;
-               status = "okay";
        };

        /* ST M24C64 */

--
2.25.1