summaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-6.1/950-0532-overlays-i2c-sensor-MS-temp-pressure-sensors.patch
blob: 368c4e9e87d27dc166993a7bf2aaf374f0dd32e8 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
From 837a3647eb9edd7b11d98d85e9c70997a6717397 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 4 Jan 2023 09:14:53 +0000
Subject: [PATCH] overlays: i2c-sensor: MS temp & pressure sensors

Add support for the Measurement Specialities temperature and pressure
sensors to the i2c-sensor overlay. The supported devices are MS5637,
MS5803, MS5805, MS5837 and MS8607.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README             | 20 ++++-
 .../boot/dts/overlays/i2c-sensor-common.dtsi  | 79 ++++++++++++++++++-
 2 files changed, 96 insertions(+), 3 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1982,8 +1982,9 @@ Info:   Adds support for a number of I2C
         light level and chemical sensors on i2c_arm
 Load:   dtoverlay=i2c-sensor,<param>=<val>
 Params: addr                    Set the address for the BH1750, BME280, BME680,
-                                BMP280, CCS811, DS1621, HDC100X, LM75, SHT3x or
-                                TMP102
+                                BMP280, CCS811, DS1621, HDC100X, JC42, LM75,
+                                MCP980x, MS5637, MS5803, MS5805, MS5837, MS8607,
+                                SHT3x or TMP102
 
         aht10                   Select the Aosong AHT10 temperature and humidity
                                 sensor
@@ -2044,6 +2045,21 @@ Params: addr                    Set the
                                 use the "jc42" option.
                                 Valid addresses are 0x18-0x1f (default 0x18)
 
+        ms5637                  Select the Measurement Specialities MS5637
+                                pressure and temperature sensor.
+
+        ms5803                  Select the Measurement Specialities MS5803
+                                pressure and temperature sensor.
+
+        ms5805                  Select the Measurement Specialities MS5805
+                                pressure and temperature sensor.
+
+        ms5837                  Select the Measurement Specialities MS5837
+                                pressure and temperature sensor.
+
+        ms8607                  Select the Measurement Specialities MS8607
+                                pressure and temperature sensor.
+
         no_timeout              Disable the SMBUS timeout. N.B. Only supported
                                 by some jc42 devices - using with an
                                 incompatible device can stop it from being
--- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
@@ -351,6 +351,76 @@
 		};
 	};
 
+	fragment@23 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ms5637: ms5637@76 {
+				compatible = "meas,ms5637";
+				reg = <0x76>;
+			};
+		};
+	};
+
+	fragment@24 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ms5803: ms5803@76 {
+				compatible = "meas,ms5803";
+				reg = <0x76>;
+			};
+		};
+	};
+
+	fragment@25 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ms5805: ms5805@76 {
+				compatible = "meas,ms5805";
+				reg = <0x76>;
+			};
+		};
+	};
+
+	fragment@26 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ms5837: ms5837@76 {
+				compatible = "meas,ms5837";
+				reg = <0x76>;
+			};
+		};
+	};
+
+	fragment@27 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ms8607: ms8607@76 {
+				compatible = "meas,ms8607-temppressure";
+				reg = <0x76>;
+			};
+		};
+	};
+
 	__overrides__ {
 		bme280 = <0>,"+0";
 		bmp085 = <0>,"+1";
@@ -376,11 +446,18 @@
 		aht10 = <0>,"+20";
 		mcp980x = <0>,"+21";
 		jc42 = <0>,"+22";
+		ms5637 = <0>,"+23";
+		ms5803 = <0>,"+24";
+		ms5805 = <0>,"+25";
+		ms5837 = <0>,"+26";
+		ms8607 = <0>,"+27";
 
 		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", <&mcp980x>,"reg:0", <&jc42>,"reg:0";
+			<&bh1750>,"reg:0", <&mcp980x>,"reg:0", <&jc42>,"reg:0",
+			<&ms5637>,"reg:0", <&ms5803>,"reg:0", <&ms5805>,"reg:0",
+			<&ms5837>,"reg:0", <&ms8607>,"reg:0";
 		int_pin = <&max30102>, "interrupts:0";
 		no_timeout = <&jc42>, "smbus-timeout-disable?";
 	};