overlays: i2c-sensor: Add mcp980x support
authorPhil Elwell <phil@raspberrypi.com>
Tue, 1 Nov 2022 08:47:21 +0000 (08:47 +0000)
committerPhil Elwell <phil@raspberrypi.com>
Tue, 1 Nov 2022 08:53:17 +0000 (08:53 +0000)
See: https://github.com/raspberrypi/linux/issues/5234

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
arch/arm/boot/dts/overlays/README
arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi

index fe809b5..ce52719 100644 (file)
@@ -1981,6 +1981,10 @@ Params: addr                    Set the address for the BH1750, BME280, BME680,
         max30102                Select the Maxim Integrated MAX30102 heart-rate
                                 and blood-oxygen sensor
 
+        mcp980x                 Select the Maxim MCP980x range of temperature
+                                sensors (e.g. MCP9808).
+                                Valid addresses are 0x18-0x1f (default 0x18)
+
         sht3x                   Select the Sensiron SHT3x temperature and
                                 humidity sensor. Valid addresses 0x44-0x45,
                                 default 0x44
index 231db98..77babe8 100755 (executable)
                };
        };
 
+       fragment@21 {
+               target = <&i2cbus>;
+               __dormant__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+
+                       mcp980x: mcp980x@18 {
+                               compatible = "maxim,mcp980x";
+                               reg = <0x18>;
+                       };
+               };
+       };
+
        __overrides__ {
                bme280 = <0>,"+0";
                bmp085 = <0>,"+1";
                bh1750 = <0>, "+18";
                max30102 = <0>,"+19";
                aht10 = <0>,"+20";
+               mcp980x = <0>,"+21";
 
                addr =  <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
                        <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
                        <&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
-                       <&bh1750>,"reg:0";
+                       <&bh1750>,"reg:0", <&mcp980x>,"reg:0";
                int_pin = <&max30102>, "interrupts:0";
        };
 };