]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: cssi: add support for reading temperature
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 2 Apr 2024 17:22:24 +0000 (19:22 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 18 Apr 2024 13:47:46 +0000 (15:47 +0200)
All CSSI boards have an LM74 chip as temperature sensor.

Enable it.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
arch/powerpc/dts/cmpc885.dts
arch/powerpc/dts/cmpcpro.dts
arch/powerpc/dts/mcr3000.dts
configs/CMPC885_defconfig
configs/CMPCPRO_defconfig
configs/MCR3000_defconfig

index 9a33e7e77ca8bcca80acd0f4c00df9ec66610d15..454ceb91ca06edce6dc87ca6f11755b91438c9b0 100644 (file)
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "fsl,mpc8xx-spi";
-                       gpios = <&CPM1_PIO_B 21 1>; /* /EEPROM_CS ACTIVE_LOW */
+                       gpios = <&CPM1_PIO_B 21 1       /* /EEPROM_CS ACTIVE_LOW */
+                                &CPM1_PIO_B 23 1       /* Temperature mother board */
+                                &CPM1_PIO_B 14 1>;     /* Temperature CPU board */
 
                        eeprom@0 {
                                reg = <0>;
                                compatible = "atmel,at25", "cs,eeprom";
                        };
+                       temp@1 {
+                               reg = <1>;
+                               compatible = "ti,lm74";
+                       };
+                       temp@2 {
+                               reg = <2>;
+                               compatible = "ti,lm74";
+                       };
                };
        };
 };
index 78f8a9f4d3212cbc278985062481eadc84a0931c..1dfa864ebba8f9c0c099ef6479c219a36e20b8fc 100644 (file)
                        compatible = "fsl,mpc832x-spi";
                        reg = <0x4c0 0x40>;
                        mode = "cpu";
-                       gpios = <&qe_pio_d 3 1>;
+                       gpios = <&qe_pio_d 3 1
+                                &qe_pio_c 5 1          /* TEMP mother board */
+                                &qe_pio_c 3 1>;        /* TEMP CPU board */
                        clock-frequency = <0>;
                        eeprom@0 {
                                reg = <0>;
                                compatible = "atmel,at25", "cs,eeprom";
                        };
+                       temp@1 {
+                               reg = <1>;
+                               compatible = "ti,lm74";
+                       };
+                       temp@2 {
+                               reg = <2>;
+                               compatible = "ti,lm74";
+                       };
                };
                eth0: ucc@3000 {
                        device_type = "network";
index edcd8358d099a32a7bbff1ebb203bf1bcce92193..f678951e22d184d046588910b219fa325660b28a 100644 (file)
                        #size-cells = <0>;
                        cell-index = <0>;
                        compatible = "fsl,mpc8xx-spi";
+                       gpios = <&csspi 2 0>;
+
+                       temp@0 {
+                               reg = <0>;
+                               compatible = "ti,lm74";
+                       };
                };
        };
 
index bbe8d5be7ed28b51537c0a8d4ed3a05eeabe93b1..11c24f72a827ccc151eaf395d831e8ac9ddea9e8 100644 (file)
@@ -50,6 +50,7 @@ CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND=y
+CONFIG_CMD_TEMPERATURE=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_MII_INIT=y
@@ -107,6 +108,8 @@ CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MPC8XX_SPI=y
+CONFIG_DM_THERMAL=y
+CONFIG_TI_LM74_THERMAL=y
 CONFIG_WDT=y
 CONFIG_WDT_MPC8xxx_BME=y
 # CONFIG_REGEX is not set
index cefed63f2463299464d58bfc6e9041bc8bbacb6e..f8f5c9fd869f789c0d00b7c56e9930c102e28772 100644 (file)
@@ -134,6 +134,7 @@ CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND=y
+CONFIG_CMD_TEMPERATURE=y
 CONFIG_CMD_DHCP=y
 CONFIG_BOOTP_BOOTFILESIZE=y
 CONFIG_CMD_MII=y
@@ -197,6 +198,8 @@ CONFIG_DM_SPI=y
 CONFIG_MPC8XXX_SPI=y
 CONFIG_SYSRESET=y
 CONFIG_SYSRESET_MPC83XX=y
+CONFIG_DM_THERMAL=y
+CONFIG_TI_LM74_THERMAL=y
 CONFIG_WDT=y
 CONFIG_WDT_MPC8xxx=y
 # CONFIG_REGEX is not set
index ce34c2aa88f46df2f143c0b35842a381438618f3..f2eac2c5449c7555fcd7033896e099e572e5cf59 100644 (file)
@@ -47,6 +47,7 @@ CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND=y
+CONFIG_CMD_TEMPERATURE=y
 # CONFIG_CMD_ECHO is not set
 # CONFIG_CMD_ITEST is not set
 # CONFIG_CMD_SOURCE is not set
@@ -107,6 +108,8 @@ CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MPC8XX_SPI=y
+CONFIG_DM_THERMAL=y
+CONFIG_TI_LM74_THERMAL=y
 CONFIG_WDT=y
 CONFIG_WDT_MPC8xxx_BME=y
 CONFIG_LZMA=y