overlays: Add MAX30102 HR to i2c-sensor overlay
authorcoldspark29 <jan.claussen10@web.de>
Wed, 18 Aug 2021 11:41:04 +0000 (13:41 +0200)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:39 +0000 (16:04 +0000)
Add support for the MAX30102 heart rate and blood oxygen sensor to the
i2c-sensor overlay.

See: https://github.com/raspberrypi/linux/pull/4535

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

index 8a575a9..05ee153 100644 (file)
@@ -1725,6 +1725,9 @@ Params: addr                    Set the address for the BH1750, BME280, BME680,
 
         htu21                   Select the HTU21 temperature and humidity sensor
 
+        int_pin                 Set the GPIO to use for interrupts (max30102
+                                only)
+
         lm75                    Select the Maxim LM75 temperature sensor
                                 Valid addresses 0x48-0x4f, default 0x4f
 
@@ -1733,6 +1736,9 @@ Params: addr                    Set the address for the BH1750, BME280, BME680,
         max17040                Select the Maxim Integrated MAX17040 battery
                                 monitor
 
+        max30102                Select the Maxim Integrated MAX30102 heart-rate
+                                and blood-oxygen sensor
+
         sht3x                   Select the Sensiron SHT3x temperature and
                                 humidity sensor. Valid addresses 0x44-0x45,
                                 default 0x44
index b05b0fa..33965be 100755 (executable)
                };
        };
 
+       fragment@19 {
+               target = <&i2c_arm>;
+               __dormant__ {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "okay";
+
+                       max30102: max30102@57 {
+                               compatible = "maxim,max30102";
+                               reg = <0x57>;
+                               maxim,red-led-current-microamp = <7000>;
+                               maxim,ir-led-current-microamp  = <7000>;
+                               interrupt-parent = <&gpio>;
+                               interrupts = <4 2>;
+                       };
+               };
+       };
+
        __overrides__ {
                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";
+               int_pin = <&max30102>, "interrupts:0";
                bme280 = <0>,"+0";
                bmp085 = <0>,"+1";
                bmp180 = <0>,"+2";
                sgp30 = <0>,"+16";
                ccs811 = <0>, "+17";
                bh1750 = <0>, "+18";
+               max30102 = <0>,"+19";
        };
 };