aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0619-overlays-add-sensirion-sgp30-to-i2c-sensor-overlay.patch
blob: 45232f720e38c0877911eb49edd8897fb8bbeefc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 0fa1f65da585dae9cf4fce77f412eb129ac13da6 Mon Sep 17 00:00:00 2001
From: Mehmet Ahsen <2084476+mehmetahsen@users.noreply.github.com>
Date: Fri, 21 May 2021 00:14:29 +0200
Subject: [PATCH] overlays: add sensirion sgp30 to i2c-sensor overlay

---
 arch/arm/boot/dts/overlays/README                |  3 +++
 .../arm/boot/dts/overlays/i2c-sensor-overlay.dts | 16 ++++++++++++++++
 2 files changed, 19 insertions(+)
 mode change 100644 => 100755 arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1527,6 +1527,9 @@ Params: addr                    Set the
         sps30                   Select the Sensirion SPS30 particulate matter
                                 sensor. Fixed address 0x69.
 
+        sgp30                   Select the Sensirion SGP30 VOC sensor.
+                                Fixed address 0x58.
+
         tmp102                  Select the Texas Instruments TMP102 temp sensor
                                 Valid addresses 0x48-0x4b, default 0x48
 
--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
@@ -246,6 +246,21 @@
 		};
 	};
 
+	fragment@16 {
+		target = <&i2c_arm>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			sgp30: sgp30@58 {
+				compatible = "sensirion,sgp30";
+				reg = <0x58>;
+				status = "okay";
+			};
+		};
+	};
+
 	__overrides__ {
 		addr =  <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
 			<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
@@ -267,5 +282,6 @@
 		max17040 = <0>,"+13";
 		bme680 = <0>,"+14";
 		sps30 = <0>,"+15";
+		sgp30 = <0>,"+16";
 	};
 };