Add device tree config for htu21
authorStefan Tatschner <rumpelsepp@sevenbyte.org>
Mon, 29 May 2017 19:46:16 +0000 (21:46 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:54:17 +0000 (15:54 +0100)
See: https://github.com/raspberrypi/linux/pull/2041

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

index bd7563be019c5a8086d6369c8fc24af7303f8610..1a905dba7fe1fa03c7ab842c64345988774c88e0 100644 (file)
@@ -673,6 +673,8 @@ Params: addr                    Set the address for the BME280, BMP280, TMP102
         bmp280                  Select the Bosch Sensortronic BMP280
                                 Valid addresses 0x76-0x77, default 0x76
 
+        htu21                   Select the HTU21 temperature and humidity sensor
+
         lm75                    Select the Maxim LM75 temperature sensor
                                 Valid addresses 0x48-0x4f, default 0x4f
 
index d2f0008addfadac8f6ed774a6e4f3f97871c0d61..17c27e3b666a7a83619471b50c63bb93836653c5 100644 (file)
        };
 
        fragment@4 {
+               target = <&i2c_arm>;
+               __dormant__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+
+                       htu21: htu21@40 {
+                               compatible = "htu21";
+                               reg = <0x40>;
+                               status = "okay";
+                       };
+               };
+       };
+
+       fragment@5 {
                target = <&i2c_arm>;
                __dormant__ {
                        #address-cells = <1>;
@@ -81,7 +96,7 @@
                };
        };
 
-       fragment@5 {
+       fragment@6 {
                target = <&i2c_arm>;
                __dormant__ {
                        #address-cells = <1>;
                };
        };
 
-       fragment@6 {
+       fragment@7 {
                target = <&i2c_arm>;
                __dormant__ {
                        #address-cells = <1>;
                bmp085 = <0>,"+1";
                bmp180 = <0>,"+2";
                bmp280 = <0>,"+3";
-               lm75 = <0>,"+4";
+               htu21 = <0>,"+4";
+               lm75 = <0>,"+5";
                lm75addr = <&lm75>,"reg:0";
-               si7020 = <0>,"+5";
-               tmp102 = <0>,"+6";
+               si7020 = <0>,"+6";
+               tmp102 = <0>,"+7";
        };
 };