bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0670-overlays-Add-MAX30102-HR-to-i2c-sensor-overlay.patch
1 From 2f995c2231e449016206dd2905b87846adc2b357 Mon Sep 17 00:00:00 2001
2 From: coldspark29 <jan.claussen10@web.de>
3 Date: Wed, 18 Aug 2021 13:41:04 +0200
4 Subject: [PATCH] overlays: Add MAX30102 HR to i2c-sensor overlay
5
6 Add support for the MAX30102 heart rate and blood oxygen sensor to the
7 i2c-sensor overlay.
8
9 See: https://github.com/raspberrypi/linux/pull/4535
10
11 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
12 ---
13 arch/arm/boot/dts/overlays/README | 6 ++++++
14 .../boot/dts/overlays/i2c-sensor-overlay.dts | 20 +++++++++++++++++++
15 2 files changed, 26 insertions(+)
16
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -1725,6 +1725,9 @@ Params: addr Set the
20
21 htu21 Select the HTU21 temperature and humidity sensor
22
23 + int_pin Set the GPIO to use for interrupts (max30102
24 + only)
25 +
26 lm75 Select the Maxim LM75 temperature sensor
27 Valid addresses 0x48-0x4f, default 0x4f
28
29 @@ -1733,6 +1736,9 @@ Params: addr Set the
30 max17040 Select the Maxim Integrated MAX17040 battery
31 monitor
32
33 + max30102 Select the Maxim Integrated MAX30102 heart-rate
34 + and blood-oxygen sensor
35 +
36 sht3x Select the Sensiron SHT3x temperature and
37 humidity sensor. Valid addresses 0x44-0x45,
38 default 0x44
39 --- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
40 +++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
41 @@ -291,11 +291,30 @@
42 };
43 };
44
45 + fragment@19 {
46 + target = <&i2c_arm>;
47 + __dormant__ {
48 + #address-cells = <1>;
49 + #size-cells = <0>;
50 + status = "okay";
51 +
52 + max30102: max30102@57 {
53 + compatible = "maxim,max30102";
54 + reg = <0x57>;
55 + maxim,red-led-current-microamp = <7000>;
56 + maxim,ir-led-current-microamp = <7000>;
57 + interrupt-parent = <&gpio>;
58 + interrupts = <4 2>;
59 + };
60 + };
61 + };
62 +
63 __overrides__ {
64 addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
65 <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
66 <&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
67 <&bh1750>,"reg:0";
68 + int_pin = <&max30102>, "interrupts:0";
69 bme280 = <0>,"+0";
70 bmp085 = <0>,"+1";
71 bmp180 = <0>,"+2";
72 @@ -316,5 +335,6 @@
73 sgp30 = <0>,"+16";
74 ccs811 = <0>, "+17";
75 bh1750 = <0>, "+18";
76 + max30102 = <0>,"+19";
77 };
78 };